Transitional dynamic effect playing method and electronic equipment
Patent Information
- Application Number
- CN202480009829.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-24
- Filing Date
- 2024-03-21
- Publication Date
- 2025-09-19
AI Technical Summary
Existing electronic devices have a problem of long click response delay when playing transitional animations, resulting in poor user experience.
After the animation effect playback thread receives the animation effect start notification message, it directly contacts the drawing process of the transition animation effect, and does not need to wait for the Vsync signal, and optimizes the click response delay.
It effectively shortens the click response delay, improves the user experience, and makes the transitional animation display more timely and smooth.
Smart Images

Figure CN120677462A_ABST
Abstract
Description
Transition effect playing method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 24, 2023, with application number 202311076331.9 and invention name “A method and electronic device for playing transition animation effects”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application belongs to the technical field of interface switching, and specifically relates to a transition animation playback method and electronic device. Background Art
[0003] With the development of intelligent technology, users can interact with electronic devices through screens. For example, users can tap on an on-screen application control to trigger a switch between application interfaces. Transition effects can be used to enhance visual quality and make the transition smoother and more natural.
[0004] Click response latency is a key metric for measuring touch experience. For scenarios requiring transition effects, click response latency refers to the time it takes from the user inputting a click to the electronic device starting to play the transition effect.
[0005] Currently, in some scenarios involving transition effects, there is still the issue of poor click response. This means that electronic devices may experience a lag in displaying transition effects, thus affecting the user experience.
[0006] Summary of the Invention
[0007] The present application provides a transition animation playback method and electronic device, which can optimize click response delay and improve user experience.
[0008] In a first aspect, the present application provides a method for playing a transition animation, which is applied to an electronic device, and the method includes: the electronic device displays a first interface, and the first interface includes a first control; in response to a user's click operation on the first control, a drawing operation on the second interface is performed; after completing the drawing operation on the second interface, an animation start notification message is sent to a target animation playback thread, and the animation start notification message is used to notify the target animation playback thread to start the animation drawing operation; in response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation pictures; after the multiple frames of animation pictures are displayed, the electronic device displays the second interface.
[0009] In this way, compared with the solution of triggering the drawing of transition effects through the Vsync signal, this application can trigger the drawing process of the transition effect after the animation playback thread receives the animation start notification message, without waiting for the triggering of the Vsync signal. This can shorten the click response delay by an average of half a Vsync cycle.
[0010] In one implementable manner, in response to the motion effect start notification message, the target motion effect playback thread draws the transition motion effect between the first interface and the second interface, including: in response to the motion effect start notification message, the target motion effect playback thread draws the first motion effect picture in the multiple-frame motion effect pictures; the first motion effect picture is the first-frame motion effect picture in the multiple-frame motion effect pictures; before drawing the second motion effect picture, a Vsync request signal is sent to the image synthesizer; the second motion effect picture includes the motion effect pictures in the multiple-frame motion effect pictures except the first-frame motion effect picture; in response to the Vsync signal, the target motion effect playback thread draws the second motion effect picture.
[0011] In one implementation, in response to the animation start notification message, the target animation playback thread draws the transition animation between the first interface and the second interface, including: in response to the animation start notification message, the target animation playback thread skips the first frame animation picture in the multi-frame animation picture, and draws the second frame animation picture in the multi-frame animation picture; wherein, the second frame animation picture is the next frame animation picture of the first frame animation picture in the multi-frame animation picture, and the first frame animation picture is the same as the first interface; before drawing the third animation picture, sending a Vsync request signal to the image synthesizer; the third animation picture includes the animation pictures in the multi-frame animation picture except the first frame animation picture and the second frame animation picture; in response to the Vsync signal, the target animation playback thread draws the third animation picture.
[0012] In this way, after receiving the animation start notification message, the first frame of the animation screen is skipped and the second frame of the animation screen is directly drawn and displayed. In addition, the trigger condition for the drawing operation of the second frame of the animation screen is the animation start notification message. In this way, compared with the solution of triggering the drawing of transition animation effects through the Vsync signal, the click response time can be shortened by an average of one and a half Vsync cycles.
[0013] In one implementable manner, the drawing of the second frame of the multiple frames of animation screens includes: in response to the animation start notification message, obtaining interface drawing data and animation parameters corresponding to the second interface, the animation parameters including the correspondence between the animation playback progress and the animation playback time, and the animation type; determining the animation playback time corresponding to the second frame of animation screen; determining the animation playback progress corresponding to the second frame of animation screen based on the animation curve and the animation playback time corresponding to the second frame of animation screen; determining the interface drawing data corresponding to the second frame of animation screen based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the second frame of animation screen, and the animation type; and drawing the second frame of animation screen based on the interface drawing data corresponding to the second frame of animation screen.
[0014] In this way, based on the interface drawing data and the dynamic effect parameters corresponding to the second interface, the interface drawing data corresponding to each frame of the dynamic effect picture can be determined, so that each frame of the dynamic effect picture can be drawn.
[0015] In one possible implementation, before executing the drawing operation on the second interface, the method further includes: determining the click operation scenario in response to a user's click operation on the first control; when the click operation scenario is a launch application scenario, generating drawing information of the second interface, the drawing information includes remote animation indication information; the remote animation indication information is used to indicate that the target animation playback thread is a remote animation playback thread.
[0016] In this way, transition effects can be divided into remote animations and non-remote animations. The animation playback thread of remote animations can be the desktop launcher, and the animation playback thread of local animations can be the animation playback thread anim.lf inside the system service, that is, the system default animation thread.
[0017] In one possible implementation, after completing the drawing operation on the second interface, a motion effect start notification message is sent to the target motion effect playback thread, including: after completing the drawing operation on the second interface, obtaining the drawing information; determining the target motion effect playback thread based on the drawing information; and sending a motion effect start notification message to the target motion effect playback thread.
[0018] In one achievable manner, determining the target motion effect playback thread based on the drawing information includes: when the drawing information includes the remote motion effect indication information, determining the remote motion effect playback thread as the target motion effect playback thread; when the drawing information does not include the remote motion effect indication information, determining the near-end motion effect playback thread as the target motion effect playback thread.
[0019] In one achievable manner, the local motion effect playback thread includes a default motion effect playback thread in the system service of the electronic device, and the remote motion effect playback thread includes a desktop launcher.
[0020] In one possible implementation, the first interface is a main interface of the electronic device; or, the first interface is an interface of an application in the electronic device.
[0021] Thus, if the first interface is the main interface of the electronic device, the corresponding click operation scenario is the application startup scenario. If the first interface is the interface of an application in the electronic device, the corresponding click operation scenario is the in-application click operation scenario.
[0022] In a second aspect, the present application provides a method for playing a transition animation effect, which is applied to an electronic device, the method comprising: the electronic device displays a first interface, the first interface including a first control; in response to a click operation input by a user on the first control, performing a drawing operation on the second interface; after completing the drawing operation on the second interface, sending a motion effect start notification message to a target motion effect playback thread, the motion effect start notification message being used to notify the target motion effect playback thread to start the motion effect playback operation; in response to the motion effect start notification message, sending a first Vsync request signal to an image synthesizer; the first Vsync request signal being used to request drawing a transition animation effect between the first interface and the second interface; the transition animation effect including multiple frames of animation effect images; in response to the first Vs ync signal, the target animation playback thread skips the first frame animation picture in the multiple frames of animation picture, and draws the second frame animation picture in the multiple frames of animation picture; wherein, the second frame animation picture is the next frame animation picture of the first frame animation picture in the multiple frames of animation picture, and the first frame animation picture is the same as the first interface; before drawing the third animation picture, a second Vsync request signal is sent to the image synthesizer; the third animation picture includes the animation pictures in the multiple frames of animation picture except the first frame animation picture and the second frame animation picture; in response to the second Vsync signal, the target animation playback thread draws the third animation picture; after the second frame animation picture and the third animation picture are displayed, the electronic device displays the second interface.
[0023] In this way, after receiving the animation start notification message, the first frame of the animation screen is skipped and the second frame of the animation screen is directly drawn and displayed. Compared with the solution of triggering the drawing of the first frame of the transition animation screen by the Vsync signal, the click response time can be shortened by one Vsync cycle.
[0024] In one implementable manner, in response to the first Vsync signal, the target animation playback thread skips the first animation frame in the multiple animation frames and draws the second animation frame in the multiple animation frames, including: in response to the first Vsync signal, obtaining the interface drawing data and animation parameters corresponding to the second interface, the animation parameters including the correspondence between the animation playback progress and the playback time and the animation type; determining the animation playback time corresponding to the second frame animation; determining the animation playback progress corresponding to the second frame animation based on the animation curve and the animation playback time corresponding to the second frame animation; determining the interface drawing data corresponding to the second frame animation based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the second frame animation, and the animation type; drawing the second frame animation based on the interface drawing data corresponding to the second frame animation.
[0025] In a second aspect, the present application provides an electronic device, comprising a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code comprises computer instructions, and when the processor executes the computer instructions, the electronic device executes the method as described in any one of the first aspects.
[0026] In a third aspect, the present application provides a computer program product, comprising a computer program or instructions, which, when executed on a computer, enables the computer to execute the method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0028] FIG1 is a schematic diagram of a human factors analysis of response delay provided in an embodiment of the present application;
[0029] FIG2 is an example diagram of a transition effect playback interface provided by an embodiment of the present application;
[0030] FIG3 is a flow chart of a method for broadcasting transition effects provided by an embodiment of the present application;
[0031] FIG4 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0032] FIG5 is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;
[0033] FIG6 is a flowchart of another method for broadcasting transition effects provided by an embodiment of the present application;
[0034] FIG7 is a flowchart of a method for determining a motion effect playback thread provided by an embodiment of the present application;
[0035] FIG8 is a flowchart of a method for drawing a dynamic effect picture provided by an embodiment of the present application;
[0036] FIG9 is an example diagram of a dynamic effect curve provided in an embodiment of the present application;
[0037] FIG10 is a flowchart of another method for broadcasting transition effects provided in an embodiment of the present application;
[0038] FIG11 is a flowchart of another method for broadcasting transition effects provided by an embodiment of the present application;
[0039] FIG12 is a flowchart of another method for broadcasting transition effects provided by an embodiment of the present application;
[0040] FIG13 is a flowchart of another method for broadcasting transition effects provided by an embodiment of the present application;
[0041] FIG14 is a schematic diagram of the structure of a transition animation broadcasting device provided in an embodiment of the present application;
[0042] FIG15 is a schematic structural diagram of another transition animation broadcasting device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0044] With the development of touch screen technology, users can achieve human-computer interaction with electronic devices through touch screens. For example, users can input touch operations such as sliding operations and clicking operations through the touch screen, and the electronic device can respond accordingly based on the touch operations input by the user.
[0045] Among them, the response latency of an electronic device to a user's touch operation is a key indicator for measuring the touch experience. Response latency refers to the time it takes for an electronic device to display the corresponding interface on the display screen after receiving a user's touch operation. The shorter the electronic device's response latency to touch operations, the better the user's touch experience. Conversely, if the electronic device's response latency to touch operations is long, users will experience display lag and lag, affecting the user experience.
[0046] Figure 1 is a schematic diagram of human factors analysis of response delay provided by an embodiment of the present application. As shown in Figure 1, the user's perception threshold for sliding and following the hand response delay is 10ms, and the user's perception threshold for clicking and responding delay is 80ms. The average processing cycle of the perception system of the electronic device is 100ms, the average duration of a single scan + gaze of the human eye is 230ms, the feedback delay that feels directly controllable is 300ms, the feedback delay that starts to feel delayed is 500ms, and the upper limit of the duration of a single scan + gaze of the human eye is 700ms. In other words, if the sliding and following the hand response delay is greater than 10ms, the user will perceive the sliding and following the hand response delay. If the click response delay is greater than 80ms, the user will perceive the click response delay. When the playback time of the transition effect is around 100ms to 700ms, the user perceives the effect as smooth and continuous.
[0047] Therefore, in order to improve the user's visual experience, it is desirable to shorten the response delay of each electronic device as much as possible. For example, the solution provided in the embodiment of the present application is used to optimize the click response delay to shorten the click response delay.
[0048] Currently, electronic devices experience significant click response latency in some click operation scenarios, requiring further optimization. For example, in scenarios where a click operation is input within an app to trigger a switch interface, the click response latency is 96.2ms. Another example is when clicking on an application control to launch the application, the click response latency is 89.75ms.
[0049] Therefore, this application hopes to further optimize the click response delay and improve the user experience.
[0050] In the embodiment of the present application, the click operation scenario includes an application launch scenario and an in-application click operation scenario. The application launch scenario refers to clicking on the application control to trigger the scenario of launching the application, that is, in response to the user's click operation on the application control, the electronic device switches from the main interface (also known as the desktop, which may include multiple application controls) to the application main interface of the application. The application launch scenario belongs to the cold start scenario. The in-application click operation scenario refers to performing a click operation in the application interface of the application, triggering the electronic device to switch from the current application interface to another application interface of the application. The in-application click operation scenario belongs to the hot start scenario.
[0051] As you can see, both launching an application and clicking within an app involve interface transitions. Currently, transition animations are used during interface transitions to provide a better visual experience, making the transition smoother and more natural. For click operations, click response latency refers to the time it takes from the user inputting a click to the electronic device starting to play the transition animation.
[0052] For example, as shown in (a) of FIG2 , a user clicks on a video application control on the desktop of the electronic device 100. As shown in (b), (c) and (d) of FIG2 , in response to the click operation input by the user, the electronic device first plays a transition animation and then switches the interface to the main interface of the video application. As shown in (b), (c) and (d) of FIG2 , the transition animation is a transition animation effect that gradually enlarges the main interface of the video application until it covers the entire display interface. In this way, using transition animation to provide a visual transition effect makes the interface switching smoother and more natural.
[0053] The following uses the in-app click operation scenario as an example to illustrate the process from the user inputting the click operation to the electronic device starting to play the transition effect.
[0054] FIG3 is a flow chart of a method for playing transition effects provided by an embodiment of the present application. As shown in FIG3 , the method may include the following steps:
[0055] S201, receiving a click operation input by a user on a first control in a first interface, and generating a click event.
[0056] In some embodiments, the first interface can be an interface within any application on the electronic device, and thus the first control can be any control within any application interface. For example, the first interface is a video search interface within a video application, and the first control is a control corresponding to video A within the video search interface. In this case, the click operation scenario is an in-application interface switching scenario, which is a hot start scenario.
[0057] S202: Report the point reporting event to the target application.
[0058] When the touch sensor in the screen receives a touch operation, the kernel layer processes the touch operation into a reporting event (including touch coordinates, touch strength, timestamp of the touch operation, and other information). The kernel layer further reports the reporting event to the application framework layer. The application framework layer can parse the information of the reporting event (including: operation type and reporting position, etc.) and determine the target application based on the current focus, and send the parsed information to the target application. The focus can be the touch point position in the touch operation. The target application is the application running in the foreground of the electronic device or the application corresponding to the touch position in the touch operation. The target application can determine the control corresponding to the click operation based on the parsed information of the reporting event (for example, the reporting position). The switching interface corresponding to the control can be further determined.
[0059] For example, if the first interface is a video search interface in a video application, and the first control is a control corresponding to video A in the video search interface, the application framework layer can parse out the corresponding target application as a video application based on the reporting event.
[0060] S203: In response to receiving the point reporting event, the target application starts a target activity and begins drawing the second interface.
[0061] An Activity is a component that represents the application interface. It's the part of an Android application responsible for managing user interactions with the application. Each Activity corresponds to a user interface and can contain various view and layout elements for displaying information, receiving user input, and performing actions.
[0062] An activity can be thought of as a window within an application where users can interact. It can contain user interface elements such as menus, buttons, and text fields, and can interact with other activities. By launching different activities, users can switch between different interfaces and functions within the application.
[0063] In response to receiving the click event, the target application can create and start a new activity, namely the target activity, by calling the system's start activity interface. The target activity is the activity corresponding to the second interface. The second interface is the interface that the target switches to based on the click operation.
[0064] S204: Pause the Activity corresponding to the first interface.
[0065] After receiving the notification event, the target application starts a new activity and pauses the previous activity. The new activity is the activity corresponding to the second interface, and the previous activity is the activity corresponding to the first interface. Pausing the previous activity means that the previous activity loses focus and enters a paused state, stopping responding to user input.
[0066] For example, assuming that the first interface is a video search interface and the second interface is a video details interface, after the video application receives the time event, it starts the activity corresponding to the video details interface and pauses the activity of the video search interface.
[0067] After the target application starts the activity corresponding to the click operation, it begins to draw the second interface.
[0068] Among them, the drawing process of the second interface mainly includes: starting a new Activity and entering the visible state. Then, further enter the active state (Activity Resume). In the Activity Resume state, the system will perform the drawing operation of the second interface. This process involves steps such as doFrame and finishDrawing. doFrame refers to the drawing process of each frame of the Android system. During the doFrame stage, the system will perform the drawing operation of each frame in the second interface, including measuring, laying out, drawing and other operations on the interface. finishDrawing refers to the last step of the drawing process, which indicates that the drawing operation has been completed and the transition effect is ready.
[0069] S205: After the drawing operation on the second interface is completed, the target application notifies the system server that the animation preparation is complete.
[0070] S206: The system service sends a motion effect start notification message apptransition ready to the motion effect playback thread.
[0071] In some embodiments, the second interface may include one or more frames. Thus, if the second interface includes one frame, after completing the drawing operation on the second interface, the system service sends a motion effect start notification message to the motion effect playback thread. If the second interface includes multiple frames, after completing the drawing operation on the first frame of the multiple frames, the system service sends a motion effect start notification message to the motion effect playback thread. The motion effect start notification message is used to notify the motion effect playback thread to start the motion effect drawing operation.
[0072] S207 , after receiving the motion effect start notification message, the motion effect playing thread sends a first vertical synchronization (Vsync) request signal to the surface flinger (SF).
[0073] The Vsync signal is a periodic signal, and the Vsync signal period can be set according to the screen refresh rate. For example, when the screen refresh rate is 60Hz, the Vsync signal period is 16.6ms, that is, the electronic device generates a control signal every 16.6ms to trigger the Vsync signal period. For another example, when the screen refresh rate is 90Hz, the Vsync signal period can be 11.1ms, that is, the electronic device generates a control signal every 11.1ms to trigger the Vsync signal period.
[0074] S208: The image synthesizer sends a first Vsync signal to the motion effect playback thread.
[0075] S209 , in response to receiving the first Vsync signal, the animation playing thread draws a first frame of animation between the first interface and the second interface.
[0076] S210 , after completing the drawing operation on the first frame of the motion effect picture, display the first frame of the motion effect picture on the screen.
[0077] S211 , sending a second Vsync request signal to the image synthesizer.
[0078] S212: The image synthesizer sends a second Vsync signal to the motion effect playback thread.
[0079] S213, in response to receiving the second Vsync signal, the animation playing thread starts drawing the second frame of animation between the first interface and the second interface.
[0080] S214, after completing the drawing operation of the second frame of the dynamic effect picture, the second frame of the dynamic effect picture is displayed on the screen.
[0081] Repeat the above steps S211 to S214 until the last frame of the dynamic effect picture is drawn and displayed on the screen.
[0082] Among them, the drawn dynamic effect picture can be driven by the display of the kernel layer so that the screen (display) displays the corresponding dynamic effect picture. The embodiment of the present application does not limit the display process of the dynamic effect. For example, the dynamic effect picture can be displayed based on the trigger mechanism of the existing Vsync signal. That is, the screen display refresh process is triggered by the hardware Vsync signal.
[0083] It should be noted that the above embodiment only takes the in-application click operation scenario as an example to exemplify the playback process of the transition animation, and does not limit the playback process of the transition animation. Among them, the playback process of the transition animation in the application startup scenario can refer to the process of the above embodiment. The difference is that: in the application startup scenario, the target application is the desktop launcher, and correspondingly, the desktop launcher does not start a new Activity, but a cold start animation window. In this way, in the above step S205, after completing the drawing operation of the cold start animation window, the desktop launcher notifies the system service (system sever) that the animation preparation is complete.
[0084] In summary, in the transition effect playback method shown in Figure 3, after receiving the animation start notification message, the animation effect playback thread first requests a Vsync signal from the image synthesizer. Only after receiving the Vsync signal does the animation effect playback thread start the animation drawing process. In other words, after receiving the animation start notification message, the animation effect playback thread does not immediately trigger the animation drawing process, but instead waits for the Vsync signal to be triggered.
[0085] However, from the time the animation start notification message is received to the time the animation drawing process starts, in the worst case, it takes a Vsync cycle to wait. The best case is that it just catches up with a Vsync signal. In this case, the animation drawing process can be started immediately in response to the receipt of the Vsync signal, but the probability of this situation is extremely low. Generally, from the time the animation start notification message is received to the time the animation drawing process starts, it takes an average of half a Vsync cycle to wait. In this way, from the user's perspective, the transition animation is displayed at least half a Vsync cycle later.
[0086] In addition, in some embodiments, the first frame of the animation image drawn in step S209 is exactly the same as the content of the first interface. Therefore, even if the first frame of the animation image is updated on the screen, from the user's perspective, the screen does not change at all, that is, the user cannot perceive the change in the user interface.
[0087] Based on the above description, the embodiments of the present application provide three transition effect playback methods to optimize click response.
[0088] The first solution: After the animation playback thread receives the animation start notification message, it can trigger the execution of the first frame of the animation image drawing process without waiting for the Vsync signal to be triggered, thereby optimizing the click response latency. In particular, for click operation scenarios where the original click response latency was just over 80ms, such as 89.75ms and 96.2ms, it is likely to be optimized to within 80ms, making the response delay imperceptible to users and improving the user experience.
[0089] The second solution: In response to receiving the first Vsync signal, the first frame of the animation effect is skipped and the drawing process starts directly from the second frame of the animation effect. In this way, in response to the user's click operation, the display starts directly from the second frame of the animation effect, and the user can perceive the change in the interface, thereby optimizing the click response latency and improving the user experience.
[0090] The third solution combines the first and second solutions. This means that once the animation playback thread receives the animation start notification message, it can trigger the execution of the second frame animation drawing process. This eliminates the need to wait for the Vsync signal to be triggered and skips the first frame animation drawing process, thus optimizing click response latency and improving the user experience.
[0091] The transition effect playback method provided in the embodiment of the present application can be applied to any electronic device with a touch screen, such as a mobile phone, a watch, a tablet computer, etc. For example, the specific structure of the electronic device can be referred to the structural diagram of the electronic device shown in FIG4 .
[0092] As shown in Figure 4, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a 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, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0093] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0094] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0095] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0096] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0097] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0098] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0099] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0100] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0101] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0102] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0103] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0104] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0105] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0106] The charging management module 140 is configured to receive charging input from a charger. The charger can be either 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 via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.
[0107] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0108] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0109] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0110] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0111] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0112] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate 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 for radiation through the antenna 2.
[0113] In some embodiments, the antenna 1 of the electronic device 100 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 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include 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, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0114] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is 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 modify display information.
[0115] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0116] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0117] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0118] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can 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 passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0119] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0120] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0121] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0122] 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 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0123] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. 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 disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0124] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0125] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0126] Speaker 170A, also known as a "horn," is used to convert audio electrical signals into sound signals. Electronic device 100 can use speaker 170A to listen to music or make hands-free calls. Multiple speakers 170A can be provided in electronic device 100. For example, one speaker 170A can be provided on the top of electronic device 100, another speaker 170A can be provided on the bottom, and so on.
[0127] Receiver 170B, also known as an "earpiece," is used to convert audio signals into sound signals. When electronic device 100 receives a call or voice message, the user can hold receiver 170B close to their ear to listen to the voice. In some embodiments, speaker 170A and receiver 170B may be integrated into one component, although this is not a limitation of the present invention.
[0128] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0129] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0130] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.
[0131] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0132] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
[0133] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.
[0134] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0135] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
[0136] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0137] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.
[0138] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0139] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.
[0140] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0141] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.
[0142] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0143] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0144] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0145] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0146] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0147] FIG5 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
[0148] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0149] The application layer can include a series of application packages.
[0150] As shown in FIG5 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, desktop launcher, etc.
[0151] In an embodiment of the present application, when launching an application, the desktop launcher can be used as a motion effect playback thread.
[0152] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0153] As shown in FIG5 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, an image compositor, and the like.
[0154] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0155] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0156] The view system includes visual controls, such as those for displaying text and images. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0157] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).
[0158] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0159] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0160] The image synthesizer is used to generate a Vsync signal. The image synthesizer may include a Vsync thread, which is used to generate a next Vsync signal according to a Vsync signal request.
[0161] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0162] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0163] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0164] The system library can include multiple functional modules, such as the surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), system services, etc.
[0165] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0166] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0167] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0168] A 2D graphics engine is a drawing engine for 2D drawings.
[0169] The system service can include anim.lf, a thread for playing animation effects. In-app click operations can call anim.lf, a thread within the system service, as the animation effect playback thread. The system service can also send an animation start notification message to the animation effect playback thread to notify it to start the animation drawing operation.
[0170] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0171] In the embodiment of the present application, the drawn dynamic effect picture can be driven by the display of the kernel layer so that the screen (display screen) displays the corresponding dynamic effect picture.
[0172] The following first describes the first click response optimization solution provided in the embodiment of the present application.
[0173] FIG6 is a flow chart of a method for playing transition effects provided by an embodiment of the present application. As shown in FIG6 , the method may include the following steps:
[0174] S301: The system service sends a motion effect start notification message to the motion effect playback thread.
[0175] In the embodiments of the present application, transition effects can be divided into remote effects and non-remote effects (also called near-end effects). Among them, remote effects can be understood as transition effects between different applications, and non-remote effects can be understood as transition effects between different interfaces of the same application. In other words, in the embodiments of the present application, the transition effect of the application startup scene is a remote effect, and the transition effect of the click operation scene within the application is a non-remote effect.
[0176] For remote animations and non-remote animations, the corresponding animation playback threads responsible for executing animation drawing operations may be different. For example, for the application startup scenario (cold start scenario), the remote animation playback thread can be used to execute the animation drawing operation; for the in-application click operation scenario (hot start scenario), the local animation playback thread can be used to execute the animation drawing operation. Among them, the remote animation playback thread can be the desktop launcher, and the local animation playback thread can be the animation playback thread anim.lf inside the system service, that is, the system default animation thread.
[0177] In this way, if the current click operation scenario is to launch an application, the system service can send an animation start notification message to the desktop launcher to trigger the desktop launcher to perform the animation drawing operation. If the current click operation scenario is an in-app click operation scenario, the system service sends an animation start notification message to the animation playback thread anim.lf to trigger the animation playback thread anim.lf to perform the animation drawing operation.
[0178] FIG7 is a flow chart of a method for determining a motion effect playback thread provided by an embodiment of the present application. As shown in FIG7 , the method may include the following steps:
[0179] S3011: In response to receiving a click operation input by the user on the first control, determine a click operation scenario.
[0180] S3012: When the click operation scenario is to launch an application program, generate drawing information of the second interface, wherein the drawing information includes remote motion effect indication information.
[0181] In some embodiments, the drawing information of the second interface can be generated during the target Activity startup phase. The remote motion effect indication information in the drawing information is used to indicate that the execution subject responsible for the motion effect drawing operation is the remote motion effect playback thread.
[0182] Correspondingly, when the click operation scenario is an in-application click operation scenario, the generated drawing information of the second interface does not include the remote motion effect indication information.
[0183] S3013: After completing the drawing operation on the second interface, obtain drawing information.
[0184] S3014: Determine whether the drawing information includes remote motion effect indication information.
[0185] S3015: When the drawing information includes remote motion effect indication information, determine the remote motion effect playback thread as the motion effect playback thread.
[0186] S3016: When the drawing information does not include the remote motion effect indication information, determine the local motion effect playback thread as the motion effect playback thread.
[0187] Thus, if no remote animation indication information is found in the drawing information, it indicates that the current click operation scenario is to launch an application scenario. In this case, an animation start notification message can be sent to the remote animation playback thread desktop launcher. If remote animation indication information is found in the drawing information, it indicates that the current click operation scenario is an in-application click operation scenario. In this case, an animation start notification message can be sent to the local animation playback thread anim.lf.
[0188] If the desktop launcher is used as the animation playback thread, it can achieve animation linkage with other application controls on the desktop to improve the user experience.
[0189] S302: After the animation effect playing thread receives the animation effect start notification message, the animation effect playing thread draws the first frame of the animation effect screen between the first interface and the second interface.
[0190] Among them, the steps before the animation effect playback thread receives the animation effect start notification message can refer to the description of the above steps S201 to S206, which will not be repeated here.
[0191] In the embodiment of the present application, after the animation playback thread receives the animation start notification message, it is not necessary to send the first Vsync request signal to the image synthesizer, that is, it is not necessary to wait for the first Vsync signal to trigger the drawing operation of the first frame of the animation effect. Instead, after the animation playback thread receives the animation start notification message, it directly triggers the drawing operation of the first frame of the animation effect. In this way, the animation drawing process can be triggered immediately to display the first frame of the transition animation as quickly as possible.
[0192] S303: After the drawing operation of the first frame of the dynamic effect picture is completed, the first frame of the dynamic effect picture is displayed on the screen.
[0193] S304, the animation playing thread sends a Vsync request signal to the image synthesizer.
[0194] S305: The image synthesizer sends a Vsync signal to the motion effect playback thread.
[0195] S306 , in response to receiving the Vsync signal, the animation playing thread draws a second frame of animation between the first interface and the second interface.
[0196] S307: After the drawing operation of the second frame of the dynamic effect picture is completed, the second frame of the dynamic effect picture is displayed on the screen.
[0197] Repeat the above steps S304 to S306 until the last frame of the dynamic effect picture is drawn and displayed on the screen.
[0198] In the embodiment of the present application, only the first frame of the dynamic effect picture does not need to wait for the Vsync signal to be triggered. The Vsync signal trigger mechanism is still maintained for the drawing of the second frame of the dynamic effect picture and each frame of the dynamic effect picture after the second frame. In other words, for the second frame of the dynamic effect picture and each frame of the dynamic effect picture after the second frame of the dynamic effect picture, a Vsync request signal needs to be sent to the image synthesizer before each drawing, and when the Vsync signal is received, the drawing of the corresponding dynamic effect picture is triggered.
[0199] Among them, when drawing the previous frame of dynamic effect picture, a Vsync request signal can be sent to the image synthesizer to request to trigger the drawing operation of the next frame of dynamic effect picture. For example, when drawing the first frame of dynamic effect picture, if it is determined that the second frame of dynamic effect picture is included after the first frame of dynamic effect picture, a Vsync request signal is sent to the image synthesizer to request to trigger the drawing operation of the second frame of dynamic effect picture. Correspondingly, when drawing the first frame of dynamic effect picture, if it is determined that there is no dynamic effect picture to be drawn after the first frame of dynamic effect picture, there is no need to send a Vsync request signal to the image synthesizer.
[0200] The following further explains the drawing process of each frame of the animation effect.
[0201] FIG8 is a flowchart of drawing a dynamic effect picture provided by an embodiment of the present application. As shown in FIG8 , the process may include the following steps:
[0202] S401 , in response to receiving a motion effect start notification message, obtaining interface drawing data and motion effect parameters corresponding to the second interface.
[0203] Animation parameters can include animation curve and animation type.
[0204] The animation curve represents the relationship between the animation playback progress and the animation playback time. The animation playback progress can be understood as the percentage of the animation screen displayed in the user interface relative to the complete second interface. Depending on the animation type, the display percentage can be a displacement percentage, a zoom percentage, a display depth percentage, and so on.
[0205] For example, as shown in Figure 9, the horizontal axis of the animation curve can be the animation playback time T, and the vertical axis of the animation curve can be the animation playback progress value value. The animation playback start time is 0, the animation playback end time is 200ms, and the total animation playback duration is 200ms. Based on the animation curve, the animation playback progress corresponding to each animation playback time point within 200ms can be determined.
[0206] For example, the animation playback progress value value can include 0-100, where value = 0 means the display percentage is 0, that is, the user interface does not display the second interface at all and remains the interface before switching (the first interface). Value = 25 means the display percentage is 25%; value = 50 means the display percentage is 50%; value = 75 means the display percentage is 75%; value = 100 means the display percentage is 100%, that is, the user interface displays the complete second interface.
[0207] Taking the image transformation method of gradually enlarging the second interface as an example, when the animation playback time is 0 (i.e., the starting playback time), the animation playback progress is 0, that is, the content displayed on the user interface is still the first interface; when the animation playback time is 50ms, the animation playback progress is 25, that is, the second interface displayed on the user interface occupies a quarter of the entire user interface; similarly, when the playback time is 200ms, the animation playback progress is 100, that is, the second interface is completely covered in the user interface.
[0208] The electronic device can set different animation curves according to the types of the interface before and after the switch. The set animation curves are saved in a local database. In this way, the electronic device can call the corresponding animation curve according to the different interface switching types.
[0209] For example, in the scenario of switching from the video search interface to the video A details interface, the interface drawing data corresponding to the video A details interface can be obtained, and the motion effect curve corresponding to the process of switching from the video search interface to the video A details interface can be called.
[0210] When displaying motion effects, the motion effects are displayed frame by frame based on the type of motion effect, such as the image transformation method and the image movement direction. For example, the image transformation method may include one or more superpositions of translation, scaling, rotation, and color gradient. The image movement direction may include upward, downward, left, right, upper left, lower left, upper right, lower right, and movement from the center to the surroundings and from the surroundings to the center.
[0211] S402: Determine the animation playing time corresponding to the first animation frame.
[0212] S403: Determine the motion effect playback progress corresponding to the first frame of the motion effect picture based on the motion effect curve and the motion effect playback time corresponding to the first frame of the motion effect picture.
[0213] Starting from the start time of the animation, one frame of the animation is played every Vsync cycle until the total duration of the animation reaches 200ms. For example, the first frame of the animation is played at the animation playback time T0, the second frame of the animation is played at the animation playback time T1, and the third frame of the animation is played at the animation playback time T2, where T1 is separated from T0 by one Vsync cycle, and T2 is separated from T0 by two Vsync cycles. Taking the screen refresh rate of 60Hz as an example, T0 is 0ms, T1=16.6ms, and T2=33.2ms.
[0214] Please continue to refer to Figure 9. Based on the motion effect curve, the motion effect playback progress corresponding to each motion effect playback time point can be determined. In this way, after determining the motion effect playback time corresponding to each frame of the motion effect screen, the motion effect playback progress corresponding to each frame of the motion effect screen can be determined. For example, the motion effect playback time corresponding to the first frame of the motion effect screen is T0 (0ms), and the motion effect playback progress corresponding to the motion effect playback time T0 is 0, then it can be determined that the motion effect playback progress corresponding to the first frame of the motion effect screen is 0. For another example, the motion effect playback time corresponding to the first frame of the motion effect screen is T1 (16.6ms), and the motion effect playback progress corresponding to the motion effect playback time T1 is 8.3, then it can be determined that the motion effect playback progress corresponding to the second frame of the motion effect screen is 8.3.
[0215] In one possible implementation, the playback time corresponding to the first frame of the animation effect can be determined as follows: after receiving the animation start notification, the animation effect playback thread obtains the system time t0 and aligns the system time t0 with the animation effect playback time 0ms in the animation effect curve. In this way, the animation effect playback progress corresponding to the current system time t0 can be determined to be 0 based on the animation effect curve. This is equivalent to determining that the animation effect playback progress corresponding to the first frame of the animation effect is 0.
[0216] S404 : Determine the interface drawing data corresponding to the first frame of the dynamic effect screen based on the interface drawing data corresponding to the second interface, the dynamic effect playback progress corresponding to the first frame of the dynamic effect screen, and the dynamic effect type.
[0217] S405 , drawing the first frame of the dynamic effect picture based on the interface drawing data corresponding to the first frame of the dynamic effect picture.
[0218] After determining the animation playback progress corresponding to the first frame of the animation effect, the interface drawing data corresponding to the first frame of the animation effect can be determined based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the first frame of the animation effect, and the animation type. After obtaining the interface drawing data corresponding to the first frame of the animation effect, the first frame of the animation effect can be drawn based on the interface drawing data corresponding to the first frame of the animation effect.
[0219] It should be noted that the above description is only an example of the drawing process of the first frame of the dynamic effect picture. The drawing process of the second frame of the dynamic effect picture to the last frame of the dynamic effect picture can refer to the description of the drawing process of the first frame of the dynamic effect picture.
[0220] For example, the drawing process of the second frame of the dynamic effect screen can be implemented in the following way: after the dynamic effect playback thread receives the first Vsync signal, it obtains the system time t1 again, and calculates the difference between the current system time t1 and the previous system time t0 (for example, the difference is 16.6ms), and obtains the dynamic effect playback time corresponding to the second frame of the dynamic effect screen. Among them, the interval between the dynamic effect playback time corresponding to the second frame of the dynamic effect screen and the dynamic effect playback time 0ms is the difference between the current system time t1 and the previous system time t0, which is 16.6ms. In this way, the current system time t1 can be aligned with the dynamic effect playback time 16.6ms in the dynamic effect curve, and then the dynamic effect playback progress corresponding to the second frame of the dynamic effect screen can be determined based on the dynamic effect curve and the dynamic effect playback time 16.6ms corresponding to the second frame of the dynamic effect screen. Afterwards, the interface drawing data corresponding to the second interface, the dynamic effect playback progress corresponding to the second frame of the dynamic effect screen, and the dynamic effect type can be determined. Finally, based on the interface drawing data corresponding to the second frame of the dynamic effect screen, the second frame of the dynamic effect screen is drawn.
[0221] Similarly, each frame of the transition animation can be drawn. The drawing methods for the third to the last frame of the animation can refer to the drawing process of the second frame of the animation, which will not be repeated here.
[0222] For example, taking the first frame of the animation effect as an example, in the animation curve, the progress corresponding to the animation playback time of 0ms is 0. In this way, the first frame of the animation effect is the interface content corresponding to the second interface when 0% is displayed. In other words, the content displayed by the first frame of the animation effect is completely different from the second interface and exactly the same as the first interface.
[0223] Taking the second frame of the animation as an example, assuming that the animation playback time of 16.6ms corresponds to a progress of 8.3 in the animation curve, the second frame of the animation corresponds to the interface content when 8.3% of the second interface is displayed. Taking the image transformation method of gradually enlarging the second interface as an example, the second frame of the animation corresponds to the image when the second interface is reduced to 8.3%.
[0224] In this way, based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to each frame of the animation effect, and the animation type, the interface drawing data corresponding to each frame of the animation effect can be determined. Then, based on the interface drawing data corresponding to each frame of the animation effect, the corresponding animation effect picture can be drawn.
[0225] It should be noted that the above embodiment is only an example of representing the correspondence between the progress of the animation and the duration of the animation through the animation curve, and does not limit this. For example, the correspondence between the progress of the animation and the duration of the animation can also be represented by an array, matrix, etc.
[0226] It should also be noted that the above embodiment only uses the animation playback progress value value of 0-100 as an example for illustrative description. The animation playback progress value value can also be other numerical values. For example, the animation playback progress value value can also be 0-500. In this way, when value = 0, the corresponding animation playback progress is 0%; when value = 100, the corresponding animation playback progress is 100%; when value = 250, the corresponding animation playback progress is 50%; and so on. This will not be repeated here. In other words, the animation playback progress value value in the animation curve can be customized, and this application does not limit this.
[0227] In summary, the first click response optimization solution provided by the embodiment of the present application triggers the drawing operation of the first frame of the animation effect screen with the animation start notification message. This saves the time consumed by steps S207 and S208 compared to the transition animation playback method shown in Figure 3, thus shortening the click response time by an average of half a Vsync cycle.
[0228] The second click response optimization solution provided in the embodiment of the present application is described below.
[0229] FIG10 is a flowchart of a method for playing transition effects provided by an embodiment of the present application. As shown in FIG10 , the method may include the following steps:
[0230] S501: The system service sends a motion effect start notification message to the motion effect playback thread.
[0231] S502: After receiving the motion effect start notification message, the motion effect playback thread sends a first Vsync request signal to the image synthesizer.
[0232] S503: The image synthesizer sends a first Vsync signal to the motion effect playback thread.
[0233] S504 , in response to receiving the first Vsync signal, the animation playing thread draws a second frame of animation between the first interface and the second interface.
[0234] S505: After the drawing operation of the second frame of the dynamic effect picture is completed, the second frame of the dynamic effect picture is displayed on the screen.
[0235] S506: The animation playing thread sends a second Vsync request signal to the image synthesizer.
[0236] S507: The image synthesizer sends a second Vsync signal to the motion effect playback thread.
[0237] S508 , in response to receiving the second Vsync signal, the animation playing thread draws a third frame of animation between the first interface and the second interface.
[0238] S509: After the drawing operation of the third frame of the dynamic effect picture is completed, the third frame of the dynamic effect picture is displayed on the screen.
[0239] Repeat the above steps S506 to S509 until the last frame of the dynamic effect picture is drawn and displayed on the screen.
[0240] Combined with the animation curve shown in Figure 9, it can be seen that the animation playback progress corresponding to the first frame of the transition animation is 0, that is, the first frame of the animation is exactly the same as the first interface. Therefore, even if the first frame of the animation interface has begun to display on the user interface, because the first frame of the animation is exactly the same as the first interface, the user cannot perceive that the transition animation has begun. In other words, from the user's perspective, the electronic device has not begun to respond to the click operation.
[0241] Based on this, the second click response optimization solution provided by the embodiment of the present application skips the first frame of the animation effect and directly starts drawing and displaying the second frame of the animation effect. In this way, the first animation effect frame updated on the user interface is the second frame of the animation effect. In this way, compared with the transition animation playback method shown in Figure 3, the user can see the changes in the user interface one Vsync cycle earlier, that is, the click response time is shortened by one Vsync cycle.
[0242] Among them, the method of drawing the second frame of dynamic effect screen between the first interface and the second interface can refer to the description of step S401 to step S405. For example, in response to receiving the first Vsync signal, the current system time t0 is obtained, and the current system time t0 is aligned with the dynamic effect playback time 16.6ms in the dynamic effect curve (one Vsync cycle backward from the starting dynamic effect playback time). In other words, it is equivalent to initializing the system time t0 to the dynamic effect playback time corresponding to the second Vsync cycle in the dynamic effect curve. In this way, in response to receiving the first Vsync signal, the determined dynamic effect playback time is the dynamic effect playback time corresponding to the second frame of dynamic effect screen. The dynamic effect playback progress corresponding to the second frame of dynamic effect screen can then be determined based on the dynamic effect curve (for example, the dynamic effect playback progress corresponding to the second frame of dynamic effect screen is 8.3). In this way, the first frame of dynamic effect screen can be skipped and the second frame of dynamic effect screen can be directly started.
[0243] For another example, in response to receiving the first Vsync signal, the current system time t0 is obtained, and the time after subtracting one Vsync cycle from the current system time t0 is aligned with the motion effect playback time 0ms in the motion effect curve. In other words, it is equivalent to initializing (t0-16.6ms) as the motion effect playback time corresponding to the first Vsync cycle in the motion effect curve (i.e., the motion effect playback time 0ms). In this way, in response to receiving the first Vsync signal, the determined motion effect playback time is 16.6ms. Then, based on the motion effect curve, the motion effect playback progress corresponding to the motion effect playback time 16.6ms is determined, which is the motion effect playback progress corresponding to the second frame of the motion effect picture. It can be seen that in response to the first Vsync signal, the first frame of the motion effect picture can be skipped and the second frame of the motion effect picture can be directly started.
[0244] It should be noted that the steps of drawing the dynamic effect screen based on the dynamic effect playback progress can refer to the description of steps S401 to S405, which will not be repeated here.
[0245] It should also be noted that the second click response optimization solution provided in the embodiment of this application is identical to the first click response optimization solution. For details, please refer to the description of the first click response optimization solution and will not be repeated here. For example, the method for determining the animation playback thread can refer to the description of the first click response optimization solution.
[0246] The third click response optimization solution provided in the embodiment of the present application is described below.
[0247] FIG11 is a flow chart of a method for playing transition effects provided by an embodiment of the present application. As shown in FIG11 , the method may include the following steps:
[0248] S601: The system service sends a motion effect start notification message to the motion effect playback thread.
[0249] S602: After the animation effect playing thread receives the animation effect start notification message, the animation effect playing thread draws a second frame of animation effect picture between the first interface and the second interface.
[0250] S603: After the drawing operation of the first frame of the dynamic effect picture is completed, the second frame of the dynamic effect picture is displayed on the screen.
[0251] S604, the animation playback thread sends a Vsync request signal to the image synthesizer.
[0252] S605: The image synthesizer sends a Vsync signal to the motion effect playback thread.
[0253] S606 , in response to receiving the Vsync signal, the animation playing thread draws the third animation frame between the first interface and the second interface.
[0254] S607: After the drawing operation of the third frame of the dynamic effect picture is completed, the third frame of the dynamic effect picture is displayed on the screen.
[0255] Repeat the above steps S604 to S607 until the last frame of the dynamic effect picture is drawn and displayed on the screen.
[0256] In this way, the third click response optimization solution provided by the embodiment of the present application, after receiving the animation start notification message, skips the first frame of the animation picture, and directly starts drawing and displaying from the second frame of the animation picture. Moreover, the trigger condition for the drawing operation of the second frame of the animation picture is the animation start notification message. In this way, compared with the transition animation playback method shown in Figure 3, the click response time can be shortened by an average of one and a half Vsync cycles. Compared with the transition animation playback method shown in Figure 6, the click response time can be shortened by one Vsync cycle. Compared with the transition animation playback method shown in Figure 10, the click response time can be shortened by an average of half a Vsync cycle.
[0257] Among them, the method of drawing the second frame of dynamic effect screen between the first interface and the second interface can refer to the description of the second click response optimization scheme. For example, in response to receiving the dynamic effect start notification message, the current system time t0 is obtained, and the current system time t0 is aligned with the dynamic effect playback time 16.6ms in the dynamic effect curve (one Vsync cycle backward from the starting dynamic effect playback time). In other words, it is equivalent to initializing the system time t0 to the dynamic effect playback time corresponding to the second Vsync cycle in the dynamic effect curve. In this way, in response to receiving the dynamic effect start notification message, the determined dynamic effect playback time is the dynamic effect playback time corresponding to the second frame of dynamic effect screen. The dynamic effect playback progress corresponding to the second frame of dynamic effect screen can then be determined based on the dynamic effect curve (for example, the dynamic effect playback progress corresponding to the second frame of dynamic effect screen is 8.3). In this way, the first frame of dynamic effect screen can be skipped and the second frame of dynamic effect screen can be directly started.
[0258] It should be noted that the third click response optimization solution provided in the embodiment of this application is identical to the first and second click response optimization solutions. For the parts that are the same as those in the first and second click response optimization solutions, please refer to the description of the first and second click response optimization solutions, and will not be repeated here. For example, the method for determining the animation playback thread, etc., can refer to the description of the first click response optimization solution.
[0259] FIG12 is a flow chart of a method for playing transition effects provided by an embodiment of the present application. As shown in FIG12 , the method may include the following steps:
[0260] S701, the electronic device displays a first interface, where the first interface includes a first control.
[0261] In some embodiments, the first interface may be an interface in any application in the electronic device, and thus the first control may be any control in any application interface.
[0262] In some embodiments, the first interface may be a main interface of the electronic device (also referred to as a desktop), and thus the first control may be a control of any application on the desktop.
[0263] S702: In response to a click operation input by the user on the first control, a drawing operation is performed on the second interface.
[0264] S703: After the drawing operation on the second interface is completed, a motion effect start notification message is sent to the target motion effect playback thread. The motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect drawing operation.
[0265] The specific implementation of steps S701 to S703 can refer to the description of steps S201 to S206 and will not be repeated here.
[0266] S704, in response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images.
[0267] In one possible implementation, in response to the animation start notification message, the target animation playback thread draws the transition animation between the first interface and the second interface. Specifically, this can be implemented in the following manner: in response to the animation start notification message, the target animation playback thread draws the first animation screen in the multi-frame animation screen; the first animation screen is the first animation screen in the multi-frame animation screen; before drawing the second animation screen, a Vsync request signal is sent to the image synthesizer; the second animation screen includes the animation screens in the multi-frame animation screen except the first animation screen; in response to the Vsync signal, the target animation playback thread draws the second animation screen. (For details, please refer to the description of steps S301 to S307, which will not be repeated here)
[0268] In one possible implementation, in response to the animation start notification message, the target animation playback thread draws the transition animation between the first interface and the second interface. Specifically, it can be implemented in the following manner: in response to the animation start notification message, the target animation playback thread skips the first frame animation screen in the multi-frame animation screen, and draws the second frame animation screen in the multi-frame animation screen; wherein, the second frame animation screen is the next frame animation screen of the first frame animation screen in the multi-frame animation screen, and the first frame animation screen is the same as the first interface; before drawing the third animation screen, a Vsync request signal is sent to the image synthesizer; the third animation screen includes the animation screens other than the first frame animation screen and the second frame animation screen in the multi-frame animation screen; in response to the Vsync signal, the target animation playback thread draws the third animation screen. (For details, please refer to the description of steps S601 to S607, which will not be repeated here)
[0269] In one possible implementation, drawing the second frame of the multi-frame animation screen can be implemented in the following manner: in response to the animation start notification message, obtaining the interface drawing data and animation parameters corresponding to the second interface, the animation parameters including the correspondence between the animation playback progress and the animation playback time and the animation type; determining the animation playback time corresponding to the second frame of the animation screen; determining the animation playback progress corresponding to the second frame of the animation screen based on the animation curve and the animation playback time corresponding to the second frame of the animation screen; determining the interface drawing data corresponding to the second frame of the animation screen based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the second frame of the animation screen, and the animation type; drawing the second frame of the animation screen based on the interface drawing data corresponding to the second frame of the animation screen. (For details, please refer to steps S401 to S405 and the description of the second click response optimization solution, which will not be repeated here)
[0270] In one implementation, before executing the drawing operation on the second interface, the process further includes: determining a click operation scenario in response to a user click operation on the first control; if the click operation scenario is an application launch scenario, generating drawing information for the second interface, the drawing information including remote animation indication information; the remote animation indication information is used to indicate that the target animation playback thread is the remote animation playback thread. (For details, please refer to the description of steps S3011 to S3016, which will not be repeated here.)
[0271] In one implementation, after the drawing operation on the second interface is completed, a motion effect start notification message is sent to the target motion effect playback thread, including: obtaining drawing information after the drawing operation on the second interface is completed; determining the target motion effect playback thread based on the drawing information; and sending the motion effect start notification message to the target motion effect playback thread. (For details, please refer to the description of steps S3011 to S3016, which will not be repeated here.)
[0272] In one implementation, determining the target animation playback thread based on the drawing information includes: if the drawing information includes remote animation indication information, determining the remote animation playback thread as the target animation playback thread; if the drawing information does not include remote animation indication information, determining the local animation playback thread as the target animation playback thread. (For details, please refer to the description of steps S3011 to S3016, which will not be repeated here.)
[0273] S705: After the display of multiple frames of dynamic effect images is completed, the electronic device displays the second interface.
[0274] After the transition effect is played, the second interface is displayed on the electronic device. At this point, the interface switching is completed.
[0275] FIG13 is a flow chart of another method for playing transition effects provided by an embodiment of the present application. As shown in FIG13 , the method may include the following steps:
[0276] S801, the electronic device displays a first interface, where the first interface includes a first control.
[0277] S802: In response to a click operation input by the user on the first control, a drawing operation is performed on the second interface.
[0278] S803: After the drawing operation on the second interface is completed, a motion effect start notification message is sent to the target motion effect playback thread. The motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect playback operation.
[0279] S804, in response to the animation start notification message, sending a first Vsync request signal to the image synthesizer; the first Vsync request signal is used to request drawing a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images.
[0280] S805, in response to the first Vsync signal, the target animation playback thread skips the first frame animation picture in the multi-frame animation picture, and draws the second frame animation picture in the multi-frame animation picture; wherein, the second frame animation picture is the next frame animation picture of the first frame animation picture in the multi-frame animation picture, and the first frame animation picture is the same as the first interface.
[0281] S806 , before drawing the third motion effect picture, sending a second Vsync request signal to the image synthesizer; the third motion effect picture includes the motion effect pictures except the first frame motion effect picture and the second frame motion effect picture in the multiple frames of motion effect pictures.
[0282] S807 , in response to the second Vsync signal, the target animation playback thread draws a third animation effect picture.
[0283] S808, after the second frame of the dynamic effect picture and the third dynamic effect picture are displayed, the electronic device displays the second interface.
[0284] The above steps S801 to S802 can refer to the description of the second click response optimization solution, and will not be repeated here.
[0285] The various method embodiments described herein may be independent solutions or may be combined according to internal logic, and all of these solutions fall within the scope of protection of this application.
[0286] It can be understood that, in the above-mentioned various method embodiments, the methods and operations implemented by the electronic device can also be implemented by components (such as chips or circuits) that can be used in the electronic device.
[0287] The above embodiments introduce the transition effect playback method provided by the present application. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0288] Figure 14 is a schematic diagram of the structure of a transition effect playback device provided in an embodiment of the present application. In one embodiment, an electronic device can implement the corresponding functions using the hardware device shown in Figure 14. As shown in Figure 14, the device 900 may include: a first display module 901, a second interface drawing module 902, a sending module 903, a dynamic effect interface drawing module 904, and a second display module 905.
[0289] A first display module 901 is configured to display a first interface including a first control;
[0290] A second interface drawing module 902 is configured to execute a drawing operation on a second interface in response to a click operation input by a user on the first control;
[0291] The sending module 903 is used to send a motion effect start notification message to the target motion effect playback thread after completing the drawing operation on the second interface, wherein the motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect drawing operation;
[0292] The dynamic effect interface drawing module 904 is configured to, in response to the dynamic effect start notification message, cause the target dynamic effect playback thread to draw a transition dynamic effect between the first interface and the second interface; the transition dynamic effect includes multiple frames of dynamic effect images;
[0293] The second display module 905 is configured to enable the electronic device to display the second interface after the display of the multiple frames of motion effect images is completed.
[0294] In one implementation, the motion effect interface drawing module 904 is used to respond to the motion effect start notification message, and the target motion effect playback thread draws the first motion effect picture in the multiple frames of motion effect pictures; the first motion effect picture is the first frame of motion effect pictures in the multiple frames of motion effect pictures; before drawing the second motion effect picture, a Vsync request signal is sent to the image synthesizer; the second motion effect picture includes the motion effect pictures in the multiple frames of motion effect pictures except the first frame of motion effect pictures; in response to the Vsync signal, the target motion effect playback thread draws the second motion effect picture.
[0295] In one implementation, the animation interface drawing module 904 is used to respond to the animation start notification message, the target animation playback thread skips the first frame animation picture in the multiple frames of animation pictures, and draws the second frame animation picture in the multiple frames of animation pictures; wherein, the second frame animation picture is the next frame animation picture of the first frame animation picture in the multiple frames of animation pictures, and the first frame animation picture is the same as the first interface; before drawing the third animation picture, a Vsync request signal is sent to the image synthesizer; the third animation picture includes the animation pictures in the multiple frames of animation pictures except the first frame animation picture and the second frame animation picture; in response to the Vsync signal, the target animation playback thread draws the third animation picture.
[0296] In one implementable manner, the animation interface drawing module 904 is used to obtain the interface drawing data and animation parameters corresponding to the second interface in response to the animation start notification message, the animation parameters including the correspondence between the animation playback progress and the animation playback time and the animation type; determine the animation playback time corresponding to the second frame animation screen; determine the animation playback progress corresponding to the second frame animation screen based on the animation curve and the animation playback time corresponding to the second frame animation screen; determine the interface drawing data corresponding to the second frame animation screen based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the second frame animation screen, and the animation type; and draw the second frame animation screen based on the interface drawing data corresponding to the second frame animation screen.
[0297] In one implementation, the second interface drawing module 902 is used to determine the click operation scenario in response to the user's click operation on the first control; when the click operation scenario is a launch application scenario, generate drawing information of the second interface, the drawing information includes remote animation indication information; the remote animation indication information is used to indicate that the target animation playback thread is a remote animation playback thread.
[0298] In one achievable manner, the sending module 903 is configured to obtain the drawing information after completing the drawing operation on the second interface; determine the target motion effect playback thread based on the drawing information; and send a motion effect start notification message to the target motion effect playback thread.
[0299] In one achievable manner, the sending module 903 is configured to determine the remote motion effect playback thread as the target motion effect playback thread when the drawing information includes the remote motion effect indication information; and to determine the local motion effect playback thread as the target motion effect playback thread when the drawing information does not include the remote motion effect indication information.
[0300] Figure 15 is a schematic diagram of the structure of another transition effect playback device provided in an embodiment of the present application. In one embodiment, the electronic device can implement the corresponding functions through the hardware device shown in Figure 15. As shown in Figure 15, the device 1000 may include: a first display module 1001, a second interface drawing module 1002, a sending module 1003, a Vsync signal request module 1004, a dynamic effect screen drawing module 1005, and a second display module 1006.
[0301] A first display module 1001 is configured to display a first interface including a first control;
[0302] A second interface drawing module 1002 is configured to execute a drawing operation on a second interface in response to a click operation input by a user on the first control;
[0303] The sending module 1003 is used to send a motion effect start notification message to the target motion effect playback thread after completing the drawing operation on the second interface, wherein the motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect playback operation;
[0304] A Vsync signal request module 1004 is configured to send a first Vsync request signal to an image synthesizer in response to the animation start notification message; the first Vsync request signal is configured to request drawing a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images;
[0305] The animation picture drawing module 1005 is configured to, in response to the first Vsync signal, cause the target animation effect playback thread to skip the first animation picture frame of the multiple animation picture frames and draw the second animation picture frame of the multiple animation picture frames; wherein the second animation picture frame is the next animation picture frame of the first animation picture frame of the multiple animation picture frames, and the first animation picture frame is the same as the first interface;
[0306] The Vsync signal request module 1004 is configured to send a second Vsync request signal to the image synthesizer before drawing a third motion effect picture; the third motion effect picture includes the motion effect pictures other than the first motion effect picture and the second motion effect picture in the multiple frames of motion effect pictures;
[0307] The motion effect picture drawing module 1005 is configured to cause the target motion effect playing thread to draw the third motion effect picture in response to the second Vsync signal;
[0308] The second display module 1006 is configured to enable the electronic device to display the second interface after the second frame of the motion effect picture and the third motion effect picture are displayed.
[0309] That is, the apparatus 900 and the apparatus 1000 can implement the steps or processes executed in the method embodiments shown in Figures 1 to 13, and the apparatus 900 and the apparatus 1000 can include modules for executing the methods executed in the method embodiments shown in Figures 1 to 13. It should be understood that the specific process of each module executing the above-mentioned corresponding steps has been described in detail in the above-mentioned method embodiments, and for the sake of brevity, it will not be repeated here.
[0310] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.
[0311] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0312] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0313] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a computer program product, which includes: a computer program or instructions, which, when the computer program or instructions are run on a computer, enables the computer to execute the method of any one of the method embodiments.
[0314] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a computer storage medium, which stores a computer program or instruction. When the computer program or instruction is run on a computer, the computer executes the method of any one of the embodiments of the method.
[0315] According to the method provided in an embodiment of the present application, an embodiment of the present application also provides an electronic device, including a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method of any one of the embodiments of the method.
[0316] Those skilled in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0317] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0318] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0319] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0320] In addition, the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.
[0321] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0322] The devices, computer storage media, computer program products, and electronic devices provided in the above-mentioned embodiments of the present application are all used to execute the methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding beneficial effects of the methods provided above, and will not be repeated here.
[0323] It should be understood that in each embodiment of the present application, the execution order of each step should be determined by its function and internal logic. The size of the sequence number of each step does not mean the order of execution and does not limit the implementation process of the embodiment.
[0324] The various sections of this specification are described in a progressive manner. Similar portions between embodiments can be referenced to each other, and each embodiment focuses on the differences between the other embodiments. In particular, the embodiments of the apparatus, computer storage medium, computer program product, and electronic device are generally similar to the method embodiments, so their descriptions are simplified. For relevant details, refer to the descriptions of the method embodiments.
[0325] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0326] The above-described embodiments of the present application do not constitute a limitation on the scope of protection of the present application.
Claims
1. A transition effect playing method, characterized in that: The method is applied to an electronic device, and the method comprises: The electronic device displays a first interface, wherein the first interface includes a first control; In response to a click operation input by the user on the first control, executing a drawing operation on the second interface; After completing the drawing operation on the second interface, sending a motion effect start notification message to the target motion effect playback thread, wherein the motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect drawing operation; In response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images; After the display of the multiple frames of dynamic effect images is completed, the electronic device displays the second interface.
2. The method according to claim 1, characterized in that In response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface, including: In response to the motion effect start notification message, the target motion effect playback thread draws a first motion effect picture in the multiple frames of motion effect pictures; the first motion effect picture is the first frame of the motion effect picture in the multiple frames of motion effect pictures; Before drawing a second motion effect picture, sending a Vsync request signal to the image synthesizer; the second motion effect picture includes motion effect pictures other than the first frame of the motion effect picture in the multiple frames of the motion effect picture; In response to the Vsync signal, the target motion effect playback thread draws the second motion effect picture.
3. The method according to claim 1, characterized in that In response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface, including: In response to the animation start notification message, the target animation playback thread skips the first animation frame in the multiple animation frames and draws the second animation frame in the multiple animation frames; wherein the second animation frame is the next animation frame of the first animation frame in the multiple animation frames, and the first animation frame is the same as the first interface; Before drawing the third motion effect picture, sending a Vsync request signal to the image synthesizer; the third motion effect picture includes the motion effect pictures other than the first frame motion effect picture and the second frame motion effect picture in the multiple frames of motion effect pictures; In response to the Vsync signal, the target motion effect playback thread draws the third motion effect picture.
4. The method according to claim 3, characterized in that The drawing of the second frame of the dynamic effect picture among the multiple frames of the dynamic effect picture includes: In response to the animation start notification message, obtaining interface drawing data and animation parameters corresponding to the second interface, wherein the animation parameters include a correspondence between animation play progress and animation play time, and an animation type; Determine the animation playing time corresponding to the second animation frame; Determine the motion effect playback progress corresponding to the second frame of the motion effect picture based on the motion effect curve and the motion effect playback time corresponding to the second frame of the motion effect picture; Determine the interface drawing data corresponding to the second frame of the dynamic effect picture based on the interface drawing data corresponding to the second interface, the dynamic effect playback progress corresponding to the second frame of the dynamic effect picture, and the dynamic effect type; Based on the interface drawing data corresponding to the second frame of the dynamic effect picture, the second frame of the dynamic effect picture is drawn.
5. The method according to claim 1, characterized in that Before executing the drawing operation on the second interface, the method further includes: In response to a click operation input by a user to the first control, determining the click operation scenario; When the click operation scenario is a scenario of launching an application program, drawing information of the second interface is generated, and the drawing information includes remote motion effect indication information; the remote motion effect indication information is used to indicate the target motion effect broadcast. The playback thread is the remote animation playback thread.
6. The method according to claim 5, characterized in that After the drawing operation on the second interface is completed, a motion effect start notification message is sent to the target motion effect playback thread, including: After completing the drawing operation on the second interface, obtaining the drawing information; Based on the drawing information, determining the target animation effect playback thread; Send a motion effect start notification message to the target motion effect playback thread.
7. The method according to claim 6, characterized in that The step of determining the target animation playing thread based on the drawing information includes: In a case where the drawing information includes the remote motion effect indication information, determining the remote motion effect playback thread as the target motion effect playback thread; In a case where the drawing information does not include the remote motion effect indication information, the local motion effect playback thread is determined as the target motion effect playback thread.
8. The method according to any one of claims 5 to 7, characterized in that: The local motion effect playing thread includes a default motion effect playing thread in the system service of the electronic device, and the remote motion effect playing thread includes a desktop launcher.
9. The method according to claim 1, characterized in that: The first interface is a main interface of the electronic device; or, the first interface is an interface of an application in the electronic device.
10. A transition effect playing method, characterized in that: The method is applied to an electronic device, and the method comprises: The electronic device displays a first interface, wherein the first interface includes a first control; In response to a click operation input by the user on the first control, executing a drawing operation on the second interface; After completing the drawing operation on the second interface, sending a motion effect start notification message to the target motion effect playback thread, wherein the motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect playback operation; In response to the animation start notification message, a first Vsync request signal is sent to the image synthesizer; the first Vsync request signal is used to request drawing a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images; In response to the first Vsync signal, the target animation playback thread skips the first animation frame in the multiple animation frames, and draws the second animation frame in the multiple animation frames; wherein the second animation frame is the next animation frame of the first animation frame in the multiple animation frames, and the first animation frame is the same as the first interface; Before drawing the third motion effect picture, sending a second Vsync request signal to the image synthesizer; the third motion effect picture includes the motion effect pictures other than the first frame motion effect picture and the second frame motion effect picture in the multiple frames of motion effect pictures; In response to the second Vsync signal, the target motion effect playback thread draws the third motion effect picture; After the second frame of motion effect picture and the third motion effect picture are displayed, the electronic device displays the second interface.
11. The method according to claim 10, characterized in that In response to the first Vsync signal, the target animation playback thread skips the first animation frame in the multiple animation frames and draws the second animation frame in the multiple animation frames, including: In response to the first Vsync signal, interface drawing data and dynamic effect parameters corresponding to the second interface are obtained, The animation parameters include the corresponding relationship between the animation playing progress and the playing time and the animation type; Determine the animation playing time corresponding to the second animation frame; Determine the motion effect playback progress corresponding to the second frame of the motion effect picture based on the motion effect curve and the motion effect playback time corresponding to the second frame of the motion effect picture; Determine the interface drawing data corresponding to the second frame of the dynamic effect picture based on the interface drawing data corresponding to the second interface, the dynamic effect playback progress corresponding to the second frame of the dynamic effect picture, and the dynamic effect type; Based on the interface drawing data corresponding to the second frame of the dynamic effect picture, the second frame of the dynamic effect picture is drawn.
12. An electronic device, characterized in that: The electronic device comprises a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, the computer program code comprises computer instructions, and when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1-11.
13. A computer program product, characterized in that The computer program product comprises a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is caused to perform the method according to any one of claims 1 to 11.