Interface switching method and device, storage medium and program product

By detecting the user's return operation in an electronic device and obtaining application information, the problem that the user cannot directly return to the application desktop application icon interface when playing the application's animation effect is opened, and the smoothness and consistency of the user's return operation is achieved. .

CN119396505AActive Publication Date: 2025-02-07HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411350415.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-02-07
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

In an electronic device, the user performs a return operation when playing the opening effect of the application, and cannot directly return to the interface where the application desktop application icon is located.

Method used

By detecting the user's desktop return operation, when playing the open animation of the application, the application information corresponding to the recorded preview animation is obtained. If the information on the top of the stack is the same as the application information, return to the interface where the application desktop application icon is located; if it is different, directly switch to the corresponding desktop based on the icon position information.

Benefits of technology

It realizes that the user always returns to the interface where the desktop application icon of the application is located during the video playback and the user performs the return operation, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396505A_ABST
    Figure CN119396505A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terminals, and discloses an interface switching method and device, a storage medium and a program product. The interface switching method comprises the steps that in the process that the electronic equipment plays a preview dynamic effect of an application program, the operation that a user returns to a desktop is detected, and if it is determined that stack top information in currently-running task information is the same as application information corresponding to the preview dynamic effect, the application program is switched to the application program. If yes, the electronic equipment returns to an interface where the desktop application icon of the application program is located based on the stack top information. If it is determined that the stack top information is different from the application information corresponding to the preview dynamic effect, the electronic device can obtain the icon position in the application information, and the interface is directly switched to the interface corresponding to the icon position. Thus, in the process that the electronic equipment plays the preview dynamic effect, if the operation of returning to the desktop of the user is detected, the electronic equipment can return to the interface where the desktop application icon is located.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to an interface switching method, device, storage medium and program product. Background Art

[0002] Mobile phones and other electronic devices can usually install a variety of applications (APPs), and users can trigger the launch of an application by clicking on a desktop application icon. When the electronic device detects that the user clicks on a desktop application icon, it will first play the opening animation, gradually enlarge the relevant screen of the opening animation to occupy the entire screen, and then display the application interface. For example, Figure 1 As shown in FIG. 1 (a), the user can click on the desktop application icon 102 in the interface 101 of the mobile phone 100, thereby triggering the mobile phone 100 to start the corresponding "email" application. Figure 1 As shown in Figures (b) and (c), after the mobile phone 100 detects a click operation by the user, the mobile phone 100 will display the opening animation screen 103, and gradually enlarge the opening animation screen 103 to occupy the entire screen of the mobile phone 100, so as to provide a visual buffer for the user.

[0003] The desktop of an electronic device may include a central desktop and multiple other interfaces. The central desktop refers to the interface that can be directly seen when the electronic device is turned on. When the electronic device completely opens the application interface of the application, that is, after the opening animation is played, if the user's swipe up operation is detected, the electronic device can return to the interface where the application desktop application icon is located. Figure 1 For example, when the email application in Figure 1 When the opening dynamic effect screen 103 shown in FIG. (c) is gradually enlarged to occupy the entire screen of the mobile phone 100, the mobile phone 100 can display the following Figure 2 In the application interface 105 shown in (a) of FIG. At this time, if the mobile phone 100 detects the user's upward sliding return operation, such as Figure 2 As shown in FIG. 1( b ), the mobile phone 100 returns the interface to the interface 101 having the email application icon 102 .

[0004] However, when the electronic device has not completely opened the application interface of the application, that is, when the electronic device is playing the opening animation, if the user's return operation is detected, the electronic device will return from the opening animation screen to the center desktop, and cannot return to the interface where the desktop application icon is located. Figure 1 As shown in FIG. 1 (c), the mobile phone 100 detects the user's upward sliding back operation during the process of displaying the opening dynamic effect screen 103. Figure 1As shown in (d) of FIG. 1 , the mobile phone 100 can return the screen to the center desktop 104. It can be seen that when the user performs a swipe-up return operation to interrupt the playback of the opening animation, the mobile phone 100 cannot directly return to the interface 101 where the desktop application icon 102 of the email application is located. Summary of the invention

[0005] In order to solve the above problems, the present application provides an interface switching method, device, storage medium and program product.

[0006] In a first aspect, the present application provides an interface switching method, which is applied to an electronic device, and the method includes: detecting an opening instruction for a first application, playing a first animation of the first application, wherein a first icon of the first application is located on a first desktop, and the first desktop is different from a central desktop of the electronic device; during the playing of the first animation, detecting a user's desktop return operation; the top information of the stack corresponding to the task information running in the electronic device is the same as the application information of the first application, and returning to the first desktop; the top information of the stack corresponding to the task information running in the electronic device is different from the application information of the first application, and based on the position information of the first icon, displaying the first desktop corresponding to the position information.

[0007] In the present application, the first application may be the application to be launched mentioned in the present application; the first icon may be the desktop application icon of the first application mentioned in the present application; the first desktop may be the desktop interface where the first icon mentioned in the present application is located; the first animation may be the opening animation mentioned in the present application.

[0008] In some embodiments, when the electronic device detects that the user clicks on the desktop application icon, the electronic device will first play the opening animation, gradually enlarge the relevant screen of the opening animation to occupy the entire screen, and then display the application interface. In the process of playing the opening animation, if the user's return to the desktop operation is detected, the electronic device will obtain the application information corresponding to the recorded preview animation. If it is determined that the current stack top information is the same as the application information corresponding to the preview animation, that is, the startup window animation is currently playing or the application interface of the application has been opened, and the foreground application currently interacting with the user is the application, and the application has detected the user's return to the desktop operation, the electronic device will return to the interface where the desktop application icon of the application is located based on the stack top information. If it is determined that the application information corresponding to the stack top information and the preview animation is different, that is, the preview animation is still playing at this time, and the foreground application currently interacting with the user is still the desktop, and the desktop has detected the user's return to the desktop operation, the electronic device will obtain the icon position in the application information and directly switch the interface to the interface where the icon position is located.

[0009] In this way, through the above method, when the electronic device is playing the opening animation, if the user's return to the desktop operation is detected, the electronic device will return to the interface where the desktop application icon is located.

[0010] In a possible implementation of the first aspect above, the method further includes: detecting an opening instruction for the first application, and recording application information of the first application, where the application information includes location information of a first icon corresponding to the first application.

[0011] In some implementations, the electronic device plays the corresponding preview animation only after detecting that the user clicks on the desktop application icon. Therefore, when the electronic device detects that the user clicks on the desktop application icon, the electronic device can record the application information of the application to be started, for example, the location of the desktop application icon corresponding to the application, the application package name corresponding to the desktop application icon, and other application information.

[0012] In a possible implementation of the first aspect above, the desktop return operation may include any one of a bottom swipe up operation to return to the desktop, an edge swipe sideways operation to return to the desktop, and a main button click operation to return to the desktop.

[0013] In some implementations, during the playback of the first motion effect, the user can return to the first desktop through a variety of desktop return operations, which is not limited in this application.

[0014] In a possible implementation of the first aspect above, corresponding to the desktop return operation being a swipe up operation from the bottom to return to the desktop, the above-mentioned detection of the user's desktop return operation during the playback of the first animation effect includes: detecting the user's touch screen operation in the bottom hot zone of the electronic device during the playback of the first animation effect; acquiring the user's operation gesture in the bottom hot zone, and, when determining that the operation gesture is a swipe up operation, detecting the user's desktop return operation.

[0015] In some embodiments, the bottom hot zone refers to an area located below the screen of an electronic device that can interact with the user. During the opening animation playback of an application, when the electronic device detects the user pressing the screen in the bottom hot zone of the screen, it means that the electronic device has detected that the bottom hot zone has been triggered. At this time, the electronic device can be triggered to perform tasks related to the swipe up return operation. Among them, after the bottom hot zone is triggered, the electronic device can obtain the user's operation gesture in the bottom hot zone. If the operation gesture is the same as the specific operation gesture (swipe up operation gesture), it means that the electronic device has detected the user's bottom swipe up return to the desktop operation.

[0016] In a possible implementation of the first aspect, the method further includes: detecting a lifting action event of a user's desktop return operation, and acquiring top stack information of task information being run in the electronic device.

[0017] In some implementations, after the electronic device detects the user's lift operation in the swipe-up return operation, the electronic device can also call the system-side interface again to obtain the top stack information in the currently running task information. The top stack information stores the information of the foreground application that is currently interacting with the user. For example, Figure 4 As shown in Figure (a), if the mobile phone 100 displays the desktop interface 401 during the music playing process, the desktop 401 and the music application are both currently running tasks. However, since the user performs an upward swipe operation in the desktop interface 401, that is, the task currently interacting with the user is the desktop, the top information in the stack of the currently running task information is the task information corresponding to the desktop (such as the package name used to uniquely identify the desktop, etc.).

[0018] In a possible implementation of the first aspect above, the top information of the stack corresponding to the task information running in the electronic device is the same as the application information of the first application, and returning to the first desktop includes: the top information of the stack corresponding to the task information running in the electronic device is the same as the application information of the first application, and returning to the first desktop in response to the desktop return operation of the first application.

[0019] In some embodiments, when the electronic device determines that the stack top information of the currently running task information is the same as the application information of the preview animation, that is, the startup window animation or the application interface of the application is currently playing, and the foreground application currently interacting with the user is the application, it is the application that detects the user's return to desktop operation. Then the electronic device can directly respond to the desktop return operation instruction for the first application, that is, directly run the relevant code of the electronic device to exit the application, so as to return to the interface where the desktop application icon is located.

[0020] In a possible implementation of the first aspect above, the top information of the stack corresponding to the task information running in the electronic device is different from the application information of the first application, and based on the location information of the first icon, the first desktop corresponding to the location information is displayed, including: the top information of the stack corresponding to the task information running in the electronic device is the desktop information of the electronic device, determining that the top information of the stack of the task information running in the electronic device is different from the application information of the first application; obtaining the location information of the first icon corresponding to the first application in the application information of the first application recorded by the electronic device, and switching the display interface of the electronic device to the first desktop corresponding to the location information.

[0021] In some embodiments, if it is determined that the application information corresponding to the top information of the stack and the preview animation is different, that is, the preview animation is still playing at this time, and the foreground application currently interacting with the user is still the desktop, and the desktop detects the user's return to the desktop operation, the electronic device will obtain the icon position in the application information and directly switch the interface to the interface where the icon position is located.

[0022] In this way, through the above-mentioned interface switching method, when the electronic device is playing the opening animation, if the user's return to the desktop operation is detected, the electronic device will return to the interface where the desktop application icon is located.

[0023] In a second aspect, the present application provides an electronic device, comprising: a memory and a processor, the memory being used to store instructions executed by one or more processors of the electronic device, and the processor being one of the one or more processors of the electronic device, and being used to execute the interface switching method mentioned in the present application.

[0024] In a third aspect, the present application provides a readable storage medium, on which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the interface switching method mentioned in the present application.

[0025] In a fourth aspect, the present application provides a computer program product, including: computer instructions, when the computer instructions are executed on an electronic device, the electronic device executes the interface switching method mentioned in the present application.

[0026] The beneficial effects of the second to fourth aspects mentioned above can be referred to the relevant descriptions in the first aspect mentioned above and various possible implementations of the first aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 According to some embodiments of the present application, a schematic diagram of an application scenario of interrupting the playback of an animation effect is shown;

[0028] Figure 2 According to some embodiments of the present application, a schematic diagram of an application scenario of returning to the interface where the desktop application icon is located is shown;

[0029] Figure 3 According to some embodiments of the present application, a schematic diagram of a process of sliding up to return operation is shown;

[0030] Figure 4 According to some embodiments of the present application, a schematic diagram of an application scenario of switching to a central desktop is shown;

[0031] Figure 5 According to some embodiments of the present application, a schematic diagram of a scenario of interrupting the opening of the animation effect playback and returning to the interface where the desktop application icon is located is shown;

[0032] Figure 6 According to some embodiments of the present application, a flow chart of an interface switching method is shown;

[0033] Figure 7 According to some embodiments of the present application, a specific flow chart of an interface switching method is shown;

[0034] Figure 8 According to some embodiments of the present application, a schematic diagram of a system architecture of an electronic device is shown;

[0035] Fig. 9 According to some embodiments of the present application, a schematic diagram of an interaction process of an interface switching method is shown;

[0036] Fig.10 According to some embodiments of the present application, a schematic diagram of the hardware structure of an electronic device is shown. DETAILED DESCRIPTION

[0037] The illustrative embodiments of the present application include, but are not limited to, an interface switching method, device, storage medium, and program product.

[0038] Let's first combine Figure 3 The flowchart shown in the figure describes the process of the user exiting the application by sliding up to return. Specifically, the process is as follows:

[0039] S301: The electronic device detects that a user triggers the bottom hot zone.

[0040] In some examples, a hot zone refers to an area on the screen of an electronic device that can interact with the user. When the user touches or clicks the hot zone, the electronic device is triggered to execute a specific application function or service. Among them, the bottom hot zone refers to an area located below the screen of an electronic device that can interact with the user. When the electronic device detects that the user presses the screen in the hot zone at the bottom of the screen, it means that the user has triggered the bottom hot zone. At this time, the electronic device can be triggered to execute the related tasks of the subsequent swipe up return operation. For example, as mentioned above Figure 1 As shown in Figure (c), the operation area where the user swipes up to return (below the screen of the mobile phone 100) is the bottom hot zone of the mobile phone 100. When the mobile phone 100 detects that the user presses the screen in this area, it means that the user has triggered the bottom hot zone of the mobile phone 100.

[0041] S302: The electronic device calls a system-side interface to obtain information about currently running tasks.

[0042] In some examples, the system-side interface may be an application programming interface (API), and the electronic device may access and obtain the running task information (RunningTaskInfo) object in the system through the API provided by the system. Among them, the task information currently being run by the electronic device is stored in the running task information (RunningTaskInfo) object. Among them, the application opened by the user may be the currently running task, and the task information may include the package name used to identify the application and the status of the application (the status may be running). For example, if the electronic device detects that the user is viewing a web page through a browser while playing music, the music application and the browser application are both currently running tasks, and the running task information (RunningTaskInfo) object will store the task information corresponding to the music application (uniquely identified package name, etc.) and the task information corresponding to the browsing application. In addition, when the electronic device detects that the user performs an operation on the desktop, the desktop of the electronic device may also be the running task information.

[0043] S303: The electronic device determines whether the specific gesture operation has been started and has not yet ended. If so, the process proceeds to S305; if not, the process proceeds to S304.

[0044] In some examples, the specific gesture operation may be a predefined swipe up operation. In the above S301, the electronic device has detected that the user has triggered the bottom hot zone. If the specific gesture operation (slide up operation) has started and has not ended, it means that the electronic device has detected that the user is performing a slide up operation, then S305 is executed to perform tasks related to the slide up return operation.

[0045] In some examples, if the user has not started to perform the swipe operation, or the user has finished the swipe operation before the electronic device starts to detect, the electronic device cannot determine that the user operation is a swipe operation. Then the electronic device can execute S304 to create other types of input objects, such as input objects of click operation type.

[0046] S304: The electronic device creates other types of input objects.

[0047] In some examples, if the user has not started to perform the sliding operation, or the user has finished the sliding operation before the electronic device starts to detect whether the user has performed the sliding operation, the electronic device cannot determine that the user operation is a sliding operation in the above S303. At this time, the electronic device can perform tasks of other operation types (such as long press operation, etc.) different from the sliding operation, for example, create input objects of other operation types different from the sliding operation, such as input objects of long press operation type, etc.

[0048] S305: The electronic device caches the top of the stack information.

[0049] In some examples, when the electronic device determines through the above S303 that the user is performing a swipe up operation, the electronic device can create a program class (OtherActivityInputConsumer) and cache the top stack information in the running task information (RunningTaskInfo) obtained in the above S302 in the program class. The top stack information stores information about the foreground application that is currently interacting with the user. For example, Figure 4 As shown in Figure (a), if the mobile phone 100 displays the desktop interface 401 during the music playing process, the desktop 401 and the music application are both currently running tasks. However, since the user performs an upward swipe operation in the desktop interface 401, that is, the task currently interacting with the user is the desktop, the top information in the stack of the currently running task information is the task information corresponding to the desktop (such as the package name used to uniquely identify the desktop, etc.).

[0050] For example, as mentioned above Figure 2 As shown in Figure (a), if the mobile phone 100 displays the email application interface 105 during the music playing process, the email application and the music application are both currently running tasks. However, since the user performs an upward sliding operation in the email application interface 105, that is, the task currently interacting with the user is the email application, the top stack information in the currently running task information is the task information corresponding to the email application (e.g., the package name used to uniquely identify the email application, etc.). Therefore, the top stack information can be the relevant information of the application currently interacting with the user, or it can be the relevant information of the desktop currently interacting with the user.

[0051] S306: The electronic device detects the user's hand raising operation.

[0052] In some examples, the user's swipe-up operation may include a finger press (down) operation, a slide operation, and a hand lift (up) operation. When the electronic device detects the user's hand lift operation, it can determine that the user has completed the swipe-up operation.

[0053] S307: The electronic device executes relevant instructions corresponding to the sliding up operation.

[0054] In some examples, when the electronic device detects the user's hand-raising operation, it can determine that the user has completed the swipe-up operation, and can trigger the electronic device to execute the relevant instructions corresponding to the swipe-up operation. The swipe-up operation-related instructions may include the following S308 and S309; ​​or the swipe-up operation-related instructions may also include the following S308 and S310.

[0055] S308: The electronic device determines whether the current top stack information is the desktop. If so, the process proceeds to S309; ​​if not, the process proceeds to S310.

[0056] In some examples, in the above S305, the electronic device has cached the stack top information, and the stack top information refers to the information of the foreground application currently interacting with the user. Therefore, the electronic device can determine whether the foreground application currently interacting with the user is the desktop based on the stack top information? If so, enter S309 and switch to the central desktop of the electronic device; if not, enter S310 and return to the interface where the desktop application icon of the application is located.

[0057] S309: The electronic device switches to the central desktop.

[0058] In some examples, when the electronic device determines through the above S308 that the foreground application currently interacting with the user is the desktop, that is, the user performs a swipe-up operation on the desktop, the electronic device will switch from the current desktop interface to the center desktop. The center desktop refers to the interface that can be directly seen when the electronic device is turned on. For example, Figure 4 As shown in FIG. 1 (a), after the mobile phone 100 determines that the user is performing a swipe-up operation on the desktop interface 401, the electronic device switches the desktop interface 401 to Figure 4 The central desktop 402 is shown in Figure (b).

[0059] S310: The electronic device returns to the interface where the desktop application icon of the application is located.

[0060] In some examples, when the electronic device determines through the above S308 that the foreground application currently interacting with the user is not the desktop, that is, when the user performs an upward swipe operation on the application interface, the electronic device switches from the current application interface to the interface where the desktop application icon is located. Figure 2 As shown in FIG. 1 (a), after the mobile phone 100 determines that the user is performing a swipe-up operation on the application interface 105, the electronic device switches the application interface 105 to Figure 2 The interface 101 shown in FIG. (b) in FIG. 101 includes a desktop application icon 102 corresponding to the email application.

[0061] In this way, when the user performs a swipe up to return operation, the electronic device can return to the interface where the desktop application icon of the application is located when it determines that the top information popped from the stack is the relevant information corresponding to the application; if it is determined that the top information popped from the stack is the relevant information corresponding to the desktop, the electronic device will switch the interface to the center desktop.

[0062] In addition, as mentioned above, when the electronic device detects that the user clicks on the desktop application icon, the electronic device will first play the opening animation, gradually enlarge the relevant screen of the opening animation to occupy the entire screen, and then display the complete application interface. Among them, the opening animation can be divided into two stages, the first stage is the preview animation, and the second stage is the startup window animation. Among them, the startup window animation in the second stage is an animation initiated by the application that can interact with the user. When the startup window animation is played, it means that the application is being started. The top of the stack information currently obtained by the electronic device is the relevant information corresponding to the application. If the user performs a return operation, he can return to the interface where the desktop application icon is located.

[0063] However, the first stage preview effect in the opening animation cannot interact with the user and cannot respond to user operation instructions. Moreover, the application is not started when the preview effect is played. Only a static layer that can be gradually enlarged is displayed on the desktop. That is, when playing the preview effect, the foreground application that is currently interacting with the user is still the desktop, and the top stack information currently obtained by the electronic device is still the relevant information corresponding to the desktop. Therefore, in the process of the electronic device playing the opening animation, if the user's swipe up operation is detected, the electronic device will determine that the current top stack information is the relevant information corresponding to the desktop, and it will return to the center desktop instead of returning to the interface where the desktop application icon of the application is located.

[0064] It can be understood that the electronic device will play the corresponding preview animation after detecting the user's operation of clicking the desktop application icon. Therefore, in this application, when the electronic device detects the user's operation instruction to open the application (such as clicking the desktop application icon), the electronic device can record the application information of the application to be started corresponding to the desktop application icon, for example, the location of the desktop application icon corresponding to the application, the application package name corresponding to the desktop application icon, and other application information. Based on this, the application provides an interface switching method.

[0065] In the present application, when the electronic device detects that the user is performing a return to desktop operation, if it detects that the opening animation is currently playing, the electronic device will obtain the application information corresponding to the recorded opening animation. After detecting that the user has completed the return to desktop operation, if it is determined that the current top stack information is the same as the application information corresponding to the opening animation, that is, the startup window animation is currently playing or the application interface of the application has been opened, and the foreground application currently interacting with the user is the application, and it is the application that detects the user's return to desktop operation, then the electronic device will return to the interface where the desktop application icon of the application is located based on the top stack information. If it is determined that the top stack information and the application information corresponding to the preview opening effect are different, that is, the preview animation is still playing at this time, and the foreground application currently interacting with the user is still the desktop, and it is the desktop that detects the user's return to desktop operation, then the electronic device will obtain the icon position in the application information and directly switch the interface to the interface where the icon position is located. In this way, during the process of the electronic device playing the opening animation, if the user's return to desktop operation is detected, the electronic device will return to the interface where the desktop application icon is located.

[0066] In some embodiments, the user's return to desktop operation may include, but is not limited to, swiping up from the bottom to return to the desktop, swiping from the edge to return to the desktop, clicking a control (e.g., clicking the home button) to return to the desktop, and any of a variety of operations. This application does not limit this. For ease of description, the following embodiments take the swiping up from the bottom to return as an example to describe the interface switching method provided by this application.

[0067] In some embodiments, when the electronic device detects that the user performs a swipe-up return operation, if the electronic device is playing a preview animation, the electronic device can cache the application information corresponding to the preview animation. When the electronic device detects that the user completes the swipe-up return operation, the electronic device will again obtain the top stack information in the currently running task information. If the top stack information is the same as the application information, it means that the electronic device is already playing the startup window animation, and the application has begun to start. The electronic device can directly determine that the top stack information is the relevant information corresponding to the application, and the electronic device can directly respond to the program exit instruction to return to the interface where the desktop application icon is located. If the top stack information is different from the application information, it means that the electronic device is still currently playing the preview animation, the electronic device can obtain the icon position information in the cached application information, and then directly switch the interface to the interface where the desktop application icon is located. In this way, when the user performs a swipe-up return operation while the electronic device is playing a preview animation, he can always return to the interface where the desktop application icon of the application is located.

[0068] In other embodiments, when the electronic device detects that the user performs a swipe up to return operation, if the electronic device is playing a startup window animation, indicating that the application is started, and the current top stack information is the relevant information corresponding to the application. Figure 3 The execution logic of the swipe up return operation shown in , when it is determined that the top information of the stack is the relevant information corresponding to the application, the electronic device can return to the interface where the desktop application icon of the application is located.

[0069] In this way, when the user performs a swipe-up return operation at any playback position of the opened animation (preview animation or start window animation), the electronic device can always return to the interface where the desktop application icon of the application is located. Figure 5 As shown in FIG. 5( a ), the user can click on the desktop application icon 502 in the interface 501 of the mobile phone 100 to trigger the mobile phone 100 to start the corresponding “music” application. Figure 5 As shown in FIG. 5( b ), after the mobile phone 100 detects the user's click operation, the mobile phone 100 will display the opening dynamic effect screen 503. Figure 5 As shown in FIG. 5(c), the mobile phone 100 detects the user's upward sliding back operation during the process of playing the opening dynamic effect screen 503. Figure 5 As shown in FIG. 5( d ) , the mobile phone 100 can return the screen to the interface 501 where the desktop application icon 502 of the music application is located.

[0070] It can be understood that the electronic device applicable to the embodiments of the present application may be any electronic device including mobile phones, computers, virtual reality (VR) devices, tablet computers, wearable devices, augmented reality (AR) devices, laptop computers, vehicle-mounted devices, etc., and the form of the electronic device is not specifically limited in the embodiments of the present application.

[0071] The following is based on Figure 6 The flowchart schematic diagram shown in the figure describes the processing process of the interface switching method mentioned in the present application. Among them, the method can be applied to electronic devices, for example, it can be applied to the mobile phone 100 mentioned above. Specifically, the method is as follows:

[0072] S601: An opening instruction for a first application is detected, and a first animation effect of the first application is played.

[0073] In some embodiments, the first icon of the first application is located on the first desktop, and the first desktop is different from the central desktop.

[0074] The first application may be the application to be started mentioned in this application; the first icon may be the desktop application icon of the first application mentioned in this application; the first desktop may be the desktop interface where the first icon is located, for example, Figure 1 The desktop interface 101 shown in Figure (a); the first animation effect may be the opening animation effect mentioned in this application.

[0075] In some embodiments, when the electronic device detects that a user clicks on a desktop application icon, the electronic device will first play an opening animation, gradually enlarge the related screen of the opening animation to occupy the entire screen, and then display the application interface.

[0076] S602: During the playback of the first animation effect, a desktop return operation of the user is detected.

[0077] In some embodiments, detecting the desktop return operation may be detecting an upward swipe operation of the user, for example, after detecting that the user triggers the bottom hot zone, a swipe operation from bottom to top is also performed. Alternatively, detecting the desktop return operation may be detecting a side swipe operation of the user, for example, after detecting that the user triggers the edge hot zone, a swipe operation from the edge to the middle is also performed. Alternatively, detecting the desktop return operation may be detecting an operation of the user clicking a specific control, for example, detecting an operation of the user clicking a main button. This application does not limit the specific operation type of the desktop return operation.

[0078] S603: The top information of the stack corresponding to the task information currently running in the electronic device is the same as the application information of the first application program, and the display returns to the first interface.

[0079] In some embodiments, when the electronic device detects that the user is performing a return to desktop operation, if it detects that a preview animation is currently playing, the electronic device will obtain the application information corresponding to the recorded preview animation. After detecting that the user has completed the return to desktop operation, if it is determined that the current top stack information is the same as the application information corresponding to the preview animation, that is, the startup window animation is currently playing or the application interface of the first application has been opened, and the foreground application currently interacting with the user is the first application, and it is the first application that detects the user's return to desktop operation, then the electronic device directly responds to the operation instruction to exit the first application and returns to the first desktop where the first icon of the first application is located.

[0080] S604: The top information of the stack corresponding to the task information currently running in the electronic device is different from the application information of the first application program, and based on the position information of the first icon, a first desktop corresponding to the position information is displayed.

[0081] In some embodiments, if it is determined that the application information corresponding to the top information of the stack and the preview animation is different, that is, the preview animation is still playing at this time, and the foreground application currently interacting with the user is still the desktop, and the desktop detects the user's return to the desktop operation, the electronic device will obtain the icon position in the application information and directly switch the interface to the first desktop where the icon position is located.

[0082] In this way, based on the above method, when the user performs a swipe-up return operation at any playback position of the opened animation (previewing the animation or starting the window animation), the electronic device can always return to the interface where the desktop application icon of the application is located.

[0083] The following is based on Figure 7 The flowchart shown in the figure takes the user's return to desktop operation as an example of a swipe up return operation to describe the specific execution process of the interface switching method mentioned in the present application. The method can be applied to electronic devices, for example, the mobile phone 100 mentioned above. Specifically, the method is as follows:

[0084] S701: Detecting that the user triggers the bottom hot zone.

[0085] In some embodiments, a hot zone refers to an area on the screen of an electronic device that can interact with the user. When the user touches or clicks the hot zone, the electronic device will be triggered to execute a specific application function or service. Among them, the bottom hot zone refers to the area located below the screen of the electronic device that can interact with the user. During the opening animation playback of the application, when the electronic device detects the user pressing the screen in the hot zone at the bottom of the screen, it means that the electronic device has detected that the bottom hot zone has been triggered. At this point, the electronic device can be triggered to execute the related tasks of the subsequent swipe up return operation.

[0086] S702: Call the system side interface to obtain the currently running task information.

[0087] In some embodiments, the system side interface may be an application programming interface (API), and the electronic device may access and obtain the running task information (RunningTaskInfo) object in the system through the API provided by the system. The running task information (RunningTaskInfo) object stores the task information currently being run by the electronic device.

[0088] S703: Determine whether the specific gesture operation has been started and has not ended, and whether the preview animation is currently being played? If yes, proceed to S705; if no, proceed to S704.

[0089] In some embodiments, the specific gesture operation may be a predefined swipe up operation. In the above S701, the electronic device has detected that the user has triggered the bottom hot zone. If the specific gesture operation (slide up operation) has started and has not ended, it means that the electronic device has detected that the user is performing a slide up operation. When it is determined that the preview animation is currently playing, S705 is executed to perform tasks related to the slide up return operation.

[0090] In some embodiments, during the playback of the opening animation of an application, when the electronic device detects that the user presses the screen in the bottom hot zone of the screen, the electronic device can obtain the user's operation gesture in the bottom hot zone. If the operation gesture is the same as a specific operation gesture (swipe up operation gesture), it means that the electronic device has detected the user's bottom swipe up operation to return to the desktop.

[0091] In some embodiments, if the user has not started to perform the swipe operation, or the user has finished the swipe operation before the electronic device starts to detect, the electronic device cannot determine that the user operation is a swipe operation. Then the electronic device can execute S704 to create other types of input objects, such as input objects of click operation type.

[0092] In some other embodiments, if the electronic device determines that the preview animation is not currently being played, the electronic device may directly execute the above Figure 3 The execution logic of the swipe-up return operation shown in the figure is that when it is determined that the top information popped out of the stack is the relevant information corresponding to the application, the electronic device can return to the interface where the desktop application icon of the application is located; when it is determined that the top information popped out of the stack is the relevant information corresponding to the desktop, it returns to the center desktop.

[0093] S704: Create other types of input objects.

[0094] In some embodiments, when the electronic device cannot detect that the user is performing a swipe up operation through the above S703, the electronic device will create input objects of other operation types different from the swipe up operation, such as a click operation type input object, a long press operation type input object, etc.

[0095] S705: Cache the top information of the stack and cache the application information corresponding to the preview animation.

[0096] In some embodiments, when the electronic device determines through the above S703 that the user is performing a swipe up operation, the electronic device can create a program class (OtherActivityInputConsumer) and cache the top stack information in the running task information (RunningTaskInfo) obtained in the above S702 in the program class, as well as the application information corresponding to the preview animation recorded in the cache. The top stack information stores information about the foreground application that is currently interacting with the user. The top stack information can be relevant information about the application that is currently interacting with the user, or it can be relevant information about the desktop that is currently interacting with the user.

[0097] S706: The user's hand raising operation is detected.

[0098] In some embodiments, the user's swipe-up operation may include a finger press (down) operation, a slide operation, and a hand lift (up) operation. When the electronic device detects the user's hand lift operation, it can determine that the user has completed the swipe-up operation.

[0099] S707: Execute the relevant instructions corresponding to the sliding up operation.

[0100] In some embodiments, when the electronic device detects the user's hand-raising operation, it can determine that the user has completed the swipe-up operation, and can trigger the electronic device to execute the relevant instructions corresponding to the swipe-up operation described below. The relevant instructions corresponding to the swipe-up operation may include S708 to S712 described below.

[0101] S708: Obtain the current stack top information again.

[0102] In some embodiments, after the electronic device detects the lifting operation in the swipe-up return operation of the user through the above S706, the electronic device may call the system-side interface again to obtain the top stack information in the currently running task information.

[0103] S709: Determine whether the stack top information obtained again is the same as the application information of the preview animation effect. If so, execute S710; if not, execute S711.

[0104] In some embodiments, if the stack top information obtained again is the same as the application information of the preview animation, it means that the electronic device is already playing the startup window animation or has entered the application display interface, and the application has started. Therefore, the electronic device can directly execute S710, the electronic device can directly determine that the stack top information is the relevant information corresponding to the application, and the electronic device can directly respond to the instruction to exit the application and return to the interface where the desktop application icon is located.

[0105] In some embodiments, if the stack top information obtained again is different from the application information of the preview animation, it means that the electronic device is still playing the preview animation. The electronic device can execute S711 to obtain the icon position information in the cached application information, and then directly switch the interface to the interface where the desktop application icon is located.

[0106] S710: Return to the interface where the desktop application icon of the application is located.

[0107] In some embodiments, if it is determined through the above S709 that the top information of the stack of the currently running task information obtained again is the same as the application information of the preview animation, the electronic device can directly determine that the top information of the stack is the application information corresponding to the application, and the electronic device can directly respond to the desktop return operation instruction for the first application, that is, directly run the relevant code of the electronic device to exit the application, thereby returning to the interface where the desktop application icon is located.

[0108] S711: Obtain the location of the desktop application icon based on the application information of the preview animation.

[0109] In some embodiments, the location information of the corresponding desktop application icon may be stored in the application information. When it is determined through S709 that the top information of the stack of the currently running task information is the desktop information, that is, when it is determined that the top information of the stack obtained again is different from the application information, the electronic device may read the location information of the desktop application icon from the cached application information.

[0110] S712: Return to the interface where the desktop application icon of the application is located.

[0111] In some embodiments, after obtaining the location information of the desktop application icon, the electronic device can directly switch the interface to the interface corresponding to the location information of the desktop application icon.

[0112] In this way, based on the above-mentioned interface switching method, when the user performs a swipe-up return operation at any playback position of the opened animation, the electronic device can return to the interface where the desktop application icon of the application is located.

[0113] It can be understood that the electronic device applicable to the embodiments of the present application may be any electronic device including mobile phones, computers, virtual reality (VR) devices, tablet computers, wearable devices, augmented reality (AR) devices, laptop computers, vehicle-mounted devices, etc., and the form of the electronic device is not specifically limited in the embodiments of the present application.

[0114] Below is the layered architecture of Android TMTaking the system as an example, a schematic diagram of the system architecture of an electronic device according to an embodiment of the present application is exemplarily described.

[0115] like Figure 8 As shown, you can use Android TM The system is divided into four layers, including the application layer, application framework layer, Android runtime and system library, and kernel layer.

[0116] like Figure 8 As shown, the application layer may include applications such as camera, gallery, calendar, map, navigation, Bluetooth, music, short message, system user interface (System UI), desktop (Launcher), etc. The user can trigger the electronic device to start the corresponding application by clicking the desktop application icon corresponding to each application.

[0117] Among them, the system user interface provides users with core interface elements for interacting with electronic devices, which can be used to display system status, display navigation bar, display lock screen interface, etc.

[0118] Desktop applications are responsible for managing and presenting the desktop interface, including desktop layout, application icons, plug-ins, etc.

[0119] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer may include layer synthesizer (SurfaceFlinger), input module (Input), activity manager service (AMS), system service (SystemServer), etc.

[0120] Among them, the layer compositor is responsible for managing and rendering all display content to ensure the smoothness and efficiency of the user interface.

[0121] The input module is used to receive user input data, including the user's finger press (down) operation event and finger lift (up) operation event.

[0122] AMS is used to track and manage the life cycle of activities in an application, including starting, pausing, stopping, and destroying activities.

[0123] System services are responsible for starting and managing various services in the system, including service management, cross-process communication, etc.

[0124] Android TMThe runtime includes core libraries and virtual machines. The Android runtime is responsible for the scheduling and management of the Android system.

[0125] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0126] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0127] The system library may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library, a 2D graphics engine, etc.

[0128] The kernel layer is the layer between hardware and software, responsible for the management and abstraction of the underlying hardware, and providing a stable and efficient operating environment for upper-layer applications. The kernel layer includes at least display drivers, camera drivers, audio drivers, and sensor drivers.

[0129] Combine the following Figure 8 The system architecture diagram shown is based on Fig. 9 The interactive process shown describes the overall execution process of the interface switching method provided by the present application. In the process of executing the interface switching method provided by the present application, the electronic device needs to transmit data between multiple system architecture modules. The system architecture modules used may include the system user interface, desktop; and the layer synthesizer, input module, AMS, system service in the application framework layer; and the display driver in the kernel layer. Interface switching can be achieved through data interaction between the above modules. Specifically, the interactive process is as follows:

[0130] 901: The desktop receives a down operation event sent by the input module.

[0131] In some embodiments, when a user clicks on a desktop application icon, the input module detects a down operation event in the user's click operation and sends the down operation event to the desktop.

[0132] 902: The desktop sends the application package name of the application to be started to the system service.

[0133] In some embodiments, the desktop can send the application package name of the application to be started to the system service, and the system service determines whether the startup type is a cold start or a hot start, wherein the application includes a unique identifier that can be used as the application.

[0134] 903: The system service sends the startup type to the desktop.

[0135] In some embodiments, when the system service obtains the application package name, it can determine whether the same application has been loaded in the background based on the package name. If so, the startup type of the application is hot start; if not, the startup type of the application is cold start. After determining the startup type of the application to be started, the system service can send the startup type to the desktop.

[0136] 904: The system service sends information related to the completion of the preparation work to the system user interface.

[0137] In some embodiments, when loading the preview animation corresponding to the application to be started, it is necessary to obtain the relevant layer of the preview animation. For example, when the user last exited the application, the electronic device saved the interface layer of the application when it was exited. If the current startup type for the application to be started is a hot start, the electronic device can obtain the interface layer saved when the application was exited last time, and use the interface layer as the layer of the preview animation. If the startup type of the current application to be started is a cold start, for example, a clear memory operation was performed after the application was exited last time, then the layer of the preview animation can be a startup interface customized for the application, for example, usually the logo interface of the application.

[0138] 905: The system user interface sends a play animation instruction to the desktop.

[0139] In some embodiments, after the system user interface receives the relevant instruction sent by the system service that the preparation work is completed, it can notify the desktop that the preview effect can be played.

[0140] 906: The desktop creates a root control layer when the preview animation is opened (pre-opening root leash) and a root control layer when the preview animation is closed (pre-closing root leash).

[0141] In some embodiments, the control layer (leash) can be used to mount other layers so that the layers mounted under the control layer (leash) can be isolated. That is, when processing the layers mounted under the control layer (leash), other layers in the business logic will not be affected. Among them, the root control layer (pre-opening root leash) when creating the preview animation effect can be to create a control layer (leash) related to the animation effect at the starting stage of the preview animation effect, so that the relevant layers at the starting stage of the preview animation effect are mounted under the control layer (leash), so that the electronic device will not interfere with other layers when processing the relevant layers at the starting stage of the preview animation effect. The root control layer (pre-closing root leash) when creating the preview animation effect can be to create a control layer (leash) related to the animation effect at the closing stage of the preview animation effect, so that the relevant layers at the closing stage of the preview animation effect are mounted under the control layer (leash), so that the electronic device will not interfere with other layers when processing the relevant layers at the closing stage of the preview animation effect.

[0142] 907: The desktop receives an up operation event sent by the input module.

[0143] In some embodiments, when the user completes the operation of clicking the desktop application icon, the input module detects a lift operation event in the user's click operation and sends the lift operation event to the desktop.

[0144] 908: The desktop triggers AMS to call the startActivity method.

[0145] In some embodiments, when an up operation is detected, the AMS is triggered to execute a startActivity method to start a new startActivity method so as to display a new window or interface. Among them, AMS is the core component of activity management, providing functions such as activity startup, life cycle management, and stack management.

[0146] 909: The desktop creates an animation object.

[0147] In some embodiments, the electronic device creates a motion effect object when playing any motion effect. The created motion effect object may include various properties of the preview motion effect, such as the motion effect change type (e.g., gradient, rotation, etc.) of the preview motion effect, the duration of the preview motion effect, and other properties.

[0148] 910: The layer compositor obtains the animation sent to the desktop.

[0149] In some embodiments, the layer compositor is an Android TM A key component in the system, responsible for managing and compositing display content. The layer compositor receives preview animations and renders and displays them.

[0150] 911: Layer compositor for layer processing.

[0151] In some embodiments, the layer synthesizer can synthesize multiple graphic elements (e.g., multiple text boxes) in the preview animation layer into one layer, thereby forming a complete picture for final display. In addition, the layer synthesizer can also render based on the preview animation information and the preview animation related layers. This application does not limit this.

[0152] 912: The layer compositor sends the preview animation to the display driver.

[0153] In some embodiments, the electronic device sends the relevant layers of the processed preview motion effect to the display driver, so that the display driver can send the layers to the screen for display, thereby realizing the playback of the preview motion effect.

[0154] 913: The desktop receives a down operation event sent by the input module.

[0155] In some embodiments, after the layer synthesizer sends the preview animation to the display driver, that is, when the electronic device is playing the preview animation, if the desktop receives a finger press (down) operation event from the user, and the press (down) operation event is located in the bottom hot zone of the electronic device screen. Among them, since the bottom hot zone refers to the area on the electronic device screen that can interact with the user, when the electronic device detects that the user touches or clicks the bottom hot zone, it means that the electronic device has received the instruction triggered by the bottom hot zone, thereby triggering the electronic device to execute the interface switching method provided by the present application.

[0156] 914: The desktop creates an activity input consumer (OtherActivityInputConsumer) class.

[0157] In some embodiments, before creating the OtherActivityInputConsumer class, the desktop will also detect whether a user swipe-up operation event sent by the input module is received. When the desktop determines that the user is performing a swipe-up operation, the desktop can create an OtherActivityInputConsumer program class and cache the top stack information in the running task information (RunningTaskInfo) in the program class, as well as the application information corresponding to the cached preview animation.

[0158] 915: The desktop initiates a slide-up effect request to the system user interface.

[0159] In some embodiments, sliding up from the preview animation to return to the interface where the desktop application icon is located is also an animation change, which can be described as a "slide-up effect". To implement the slide-up effect, the desktop needs to initiate an animation request.

[0160] 916: The system service receives a slide-up effect request sent by the system user interface.

[0161] In some embodiments, after the system user interface receives the slide-up effect request initiated by the desktop, it sends the slide-up effect request to the system service so that the system service can perform relevant preparations for the slide-up effect request.

[0162] 917: System service performs preparation work for the sliding effect.

[0163] In some embodiments, the preparation work may include setting the application state of the desktop to the foreground application state and setting the application state of the application program to the background application state. Alternatively, the system service may also collect the motion effect participants of the sliding effect, that is, collect the system settings that need to be changed when the sliding effect is applied, so that subsequent electronic devices can only operate on the collected motion effect participants, and will not operate on elements unrelated to the motion effect participants (such as time settings, etc.), so that elements unrelated to the motion effect participants will not change. Among them, since the motion effect participants are elements that need to change when converting from the preview motion effect to the sliding effect, the motion effect participants collected by the electronic device may include but are not limited to elements such as interface layout, text box content, brightness change parameters, buttons, etc.

[0164] 918: The system service sends information related to the slide-up effect to the system user interface.

[0165] In some embodiments, after completing the relevant preparations for the sliding-up effect, the system service can send relevant information of the sliding-up effect to the system user interface. For example, it can send the information of the motion effect participants collected by the system service in the above 917, as well as information notifying the system user interface that the preparations are complete.

[0166] 919: The system user interface callbacks the animation-related information to the desktop.

[0167] In some embodiments, the system user interface sends relevant information of the sliding-up effect to the desktop so that the sliding-up effect can be played on the desktop.

[0168] 920: The desktop creates an animation object.

[0169] In some embodiments, the electronic device creates a motion effect object when playing the sliding up effect, wherein the created motion effect object may include various properties of the sliding up effect, for example, the motion effect change type of the sliding up effect (such as gradual change, rotation, etc.), the motion effect duration of the sliding up effect, and other properties.

[0170] 921: The layer compositor obtains the animation sent to the desktop.

[0171] In some embodiments, the layer compositor is an Android TM A key component in the system that manages and composites display content. The layer compositor receives slide-up effects and renders and sends them to the display.

[0172] 922: Layer compositor for layer processing.

[0173] In some embodiments, the layer synthesizer can synthesize multiple graphic elements (for example, multiple text boxes) in the interface where the desktop application icon is located into one layer, thereby forming a complete interface that is finally displayed. In addition, when the layer synthesizer performs layer processing, the layer can also be rendered based on the dynamic effect information of the sliding effect (for example, fade-in, gradient, etc.). For example, if the dynamic effect information of the sliding effect is fade-in (such as, the desktop interface gradually displays from a transparent state to a clear state), the layer synthesizer can determine the transparency of the desktop interface at each moment, so that when the desktop interface is displayed, a fade-in animation effect can be achieved based on the determined different transparencies. Among them, the present application does not limit the way in which the layer synthesizer performs layer processing.

[0174] 923: The layer compositor sends the slide-up effect to the display driver.

[0175] In some embodiments, the electronic device sends the interface where the desktop application icon is located to the display driver, so that the display driver can send the interface to the screen for display, so that the playback of the sliding effect can be achieved.

[0176] Thus, through the above interaction diagram, when the user clicks the desktop application icon, the electronic device can be triggered to play the preview effect. Moreover, when the user performs a swipe-up return operation during the process of playing the preview effect on the electronic device, the electronic device can always return to the interface where the desktop application icon of the application is located.

[0177] An embodiment of the present application provides a readable storage medium, on which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the interface switching method mentioned in the present application.

[0178] An embodiment of the present application provides a computer program product, including: computer instructions, when the computer instructions are executed on an electronic device, the electronic device executes the interface switching method mentioned in the present application.

[0179] An embodiment of the present application also provides an electronic device, which includes: a memory and a processor, the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device, and is used to execute the interface switching method mentioned in the present application.

[0180] The interface switching method of the present application can be executed by an electronic device, wherein the electronic device can be any electronic device such as a server, a mobile phone, a computer, a tablet computer, an augmented reality (AR) device, a laptop computer, etc. The form of the electronic device is not specifically limited in the embodiments of the present application.

[0181] like Fig.10 As shown, taking mobile phone 100 as an example, a hardware structure diagram of an electronic device according to an embodiment of the present application is exemplified.

[0182] like Fig.10 As shown, the mobile phone 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 screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a gyroscope sensor 180A, a magnetic sensor 180B, an acceleration sensor 180C, an infrared sensor 180D, a temperature sensor 180E, a touch sensor 180F, an ambient light sensor 180G, a light sensor 180H, etc.

[0183] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0184] 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), a controller, a video codec, a digital signal processor (DSP), etc. Different processing units may be independent devices or integrated into one or more processors.

[0185] In an embodiment of the present application, the processor 110 may be used to execute the interface switching method mentioned in the present application, for example, to detect whether the user performs a return to desktop operation, to detect whether a preview animation is being played, and so on.

[0186] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0187] The USB interface 130 can be used to connect a charger to charge the mobile phone 100, or to transfer data between the mobile phone 100 and peripheral devices. It can also be used to connect headphones to play audio. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0188] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 140 charges the battery 142, it can also power the electronic device through the power management module 141.

[0189] 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 supplies power to the processor 110, the internal memory 121, the screen 194, the camera 193, and the wireless communication module 160. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.

[0190] The wireless communication function of the mobile phone 100 can be realized by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, and a modulation and demodulation processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, antenna 1 can be used in combination with a tuning switch.

[0191] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the mobile phone 100 .

[0192] The screen 194 is used to display images, videos, etc. The 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 or an active-matrix organic light emitting diode (AMOLED), etc. In some embodiments, the mobile phone 100 may include 1 or N screens 194, where N is a positive integer greater than 1.

[0193] 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. In some embodiments, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0194] 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 mobile phone 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 mobile phone 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0195] The mobile phone 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0196] The gyro sensor 180A may be used to determine the motion posture of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180A.

[0197] The magnetic sensor 180B includes a Hall sensor and can be used to detect the strength of the surrounding magnetic field.

[0198] The acceleration sensor 180C can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching, pedometers, etc.

[0199] The infrared sensor 180D is used to detect, receive and analyze infrared radiation signals.

[0200] The temperature sensor 180E is used to detect temperature. In some embodiments, the mobile phone 100 uses the temperature detected by the temperature sensor 180E to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180E exceeds a threshold, the mobile phone 100 reduces the performance of the processor located near the temperature sensor 180E to reduce power consumption and implement thermal protection.

[0201] The touch sensor 180F is also called a "touch control device". The touch sensor 180F can be set on the screen 194, and the touch sensor 180F and the screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180F is used to detect touch operations acting on or near it.

[0202] The ambient light sensor 180G is used to sense the brightness of ambient light.

[0203] The light sensor 180H can be used to detect light intensity. It has high sensitivity and fast response speed. It can be used in various lighting environments and provide real-time feedback on light conditions.

[0204] The key 190 includes a power key, a volume key, etc. The key 190 can be a mechanical key or a touch key. The mobile phone 100 can receive key input and generate key signal input related to the user settings and function control of the mobile phone 100.

[0205] 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.

[0206] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0207] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the mobile phone 100 by inserting the SIM card interface 195 or pulling the SIM card interface 195 out. The mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0208] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0209] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.

[0210] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0211] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0212] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0213] It should be noted that, in the examples and description of the present application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the statement "include one" do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0214] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims

1. An interface switching method, applied to an electronic device, characterized in that: The method comprises: An opening instruction for a first application is detected, and a first motion effect of the first application is played, wherein: The first icon of the first application is located on a first desktop, and the first desktop is different from the central desktop of the electronic device; During the playback of the first animation effect, a desktop return operation of the user is detected; The stack top information corresponding to the task information currently running in the electronic device is the same as the application information of the first application program, and is returned to the first desktop; The stack top information corresponding to the task information currently running in the electronic device is different from the application information of the first application program, and based on the position information of the first icon, the first desktop corresponding to the position information is displayed.

2. The method according to claim 1, characterized in that The method further comprises: An opening instruction for a first application is detected, and application information of the first application is recorded, where the application information includes location information of a first icon corresponding to the first application.

3. The method according to claim 2, characterized in that The desktop return operation includes any one of a bottom swipe up operation to return to the desktop, an edge swipe sideways operation to return to the desktop, and a main button click operation to return to the desktop.

4. The method according to claim 3, characterized in that Corresponding to the desktop return operation being the bottom swiping up operation to return to the desktop, during the playing of the first animation effect, detecting the user's desktop return operation includes: During the playback of the first motion effect, a user's touch screen operation is detected at the bottom hot zone of the electronic device; An operation gesture of the user in the bottom hot zone is acquired, and when it is determined that the operation gesture is an upward sliding operation, a desktop return operation of the user is detected.

5. The method according to claim 4, characterized in that The method further comprises: A lifting action event of the user's desktop return operation is detected, and the top stack information of the task information running in the electronic device is obtained.

6. The method according to claim 5, characterized in that The stack top information corresponding to the task information currently running in the electronic device is the same as the application information of the first application program, and is returned to the first desktop, including: The stack top information corresponding to the task information currently running in the electronic device is the same as the application information of the first application, and in response to a desktop return operation on the first application, returns to the first desktop.

7. The method according to claim 5, characterized in that The stack top information corresponding to the task information currently running in the electronic device is different from the application information of the first application program, and based on the position information of the first icon, the first desktop corresponding to the position information is displayed, including: The stack top information corresponding to the task information being run in the electronic device is the desktop information of the electronic device, and it is determined that the stack top information of the task information being run in the electronic device is different from the application information of the first application; In the application information of the first application recorded by the electronic device, the location information of the first icon corresponding to the first application is obtained, and the display interface of the electronic device is switched to the first desktop corresponding to the location information.

8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device, and is used to execute the interface switching method described in any one of claims 1 to 7.

9. A readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed on the electronic device, the electronic device executes the interface switching method according to any one of claims 1 to 7.

10. A computer program product, characterized in that include: A computer instruction, when the computer instruction is executed on an electronic device, causes the electronic device to execute the interface switching method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent television set and tabletop switching method thereof

    CN104581415A

  • Application startup method, apparatus, storage medium, and terminal

    CN108710513A

  • Method for display when exiting an application, and terminal

    CN111602107A

  • Upper sliding effect exception handling method and electronic equipment

    CN116991274A

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

    CN117130678A