A method for switching application pages

By pre-capturing the first application page image of the smart watch and combining it with the sliding gesture, the hand-following operation of the smart watch application page is realized, which solves the problem of poor switching smoothness caused by memory and performance limitations, and improves the user experience and device efficiency.

CN117093119BActive Publication Date: 2024-09-10HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310863188.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-12
Publication Date
2024-09-10
Estimated Expiration
2043-07-12

AI Technical Summary

Technical Problem

Due to memory and performance limitations, smart watches cannot implement hand-following operations, resulting in poor smoothness in application page switching.

Method used

By pre-capturing the image of the first application page as the first screenshot, and combining the sliding gesture with the screenshot of the second application page, the sliding operation corresponding to the sliding gesture is realized, avoiding the reconstruction of the resources of the first application page, thereby improving the smoothness of application page switching. sex.

Benefits of technology

It realizes hand-following operation, improves the smoothness and user experience of application page switching, saves device resources, and avoids users waiting for long periods of time for resources to load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117093119B
    Figure CN117093119B
Patent Text Reader

Abstract

The embodiment of the present application provides an application page switching method, which is applied to an electronic device, and the electronic device is configured with a first application and a second application. The method includes: in response to a sliding operation on the second application page to switch from the second application page to the first application page, obtaining a second screenshot of the second application page; based on the second screenshot and the first screenshot, displaying a hand-following movement diagram of switching from the second application page to the first application page on the electronic device, that is, displaying an image based on a sliding gesture, which gradually moves from displaying the second screenshot to displaying the first screenshot on the electronic device; after the hand-following movement diagram is displayed, the first application page is displayed on the electronic device. In this way, the sliding operation corresponding to the sliding gesture can be realized through the pre-captured first screenshot and the second screenshot, without the need to establish the resources of the first application page and then take screenshots, thereby improving the fluency of application page switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an application page switching method. Background Art

[0002] Embedded devices are electronic devices based on embedded systems. Among them, embedded systems are application-centric, based on computer technology, with customizable software and hardware, and are suitable for special-purpose computer systems with strict requirements on functions, reliability, cost, size, and power consumption.

[0003] Taking smart watches as an example, smart watches are watches with built-in intelligent systems and equipped with smartphone systems that are connected to the Internet to achieve multi-functions. They can synchronize calls, text messages, emails, photos, music and other applications in the mobile phone.

[0004] Smart watches can switch between different application pages, or between application pages within an application. For example, a smart watch can include two applications, email and music. Users can switch between the email page and the music page by clicking the switch button on the dial or pressing the physical button. In addition, in order to improve the smoothness of application page switching, smart watches use transition effects to transition when switching between different application pages.

[0005] However, due to memory and performance limitations, current smart watches cannot switch application pages by following the user's sliding action on the screen. That is, embedded devices with memory and performance limitations cannot achieve hand-following operations, and the smoothness of application page switching is poor. Summary of the invention

[0006] An application page switching method provided in an embodiment of the present application can realize hand-following operation and improve the fluency of application page switching.

[0007] In order to achieve the above objectives, this application adopts the following technical solutions:

[0008] In a first aspect, an embodiment of the present application provides an application page switching method, which is applied to an electronic device, the electronic device including a display screen, the electronic device being configured with a first application and a second application; the method comprising:

[0009] The electronic device displays a second application page; in response to a sliding operation on the second application page to switch from the second application page to the first application page, a second screenshot of the second application page is obtained; based on the second screenshot and the first screenshot, the electronic device displays a hand-following movement diagram of switching from the second application page to the first application page, that is, the electronic device displays an image that gradually moves from displaying the second screenshot to displaying the first screenshot based on the sliding gesture; wherein the first screenshot is an image captured of the first application page when the display content of the electronic device switches from the first application page to the currently displayed second application page before the electronic device is triggered by the sliding operation; after the hand-following movement diagram is displayed, the first application page is displayed on the electronic device.

[0010] In an embodiment of the present application, based on the sliding gesture of the object being used, the second screenshot of the currently displayed second application page is gradually displayed as the first screenshot captured by the first application page. Since the first screenshot is an image captured of the first application page when the display content of the electronic device switches from the first application page to the currently displayed second application page before the target device is triggered by the sliding operation, that is, the first screenshot is a pre-captured image, the sliding operation corresponding to the sliding gesture can be implemented through the first screenshot and the second screenshot, without establishing the resources of the first application page and then taking screenshots, thereby improving the smoothness of application page switching.

[0011] As a possible implementation method, the first screenshot is obtained by:

[0012] In response to an application switching operation in which the displayed content of the electronic device switches from a first application page to a second application page currently displayed, a first page resource of the first application page is established; a screenshot of the first application page is taken based on the first page resource to obtain a first screenshot; wherein the first page resource is cleared after the first screenshot is saved. Among them, by pre-screening the first application page, it is convenient to respond to the hand-following operation acting on the target device, so as to realize the hand-following operation and improve the smoothness of the application page switching. In addition, after saving the first screenshot, the resources of the first application page will also be cleared to save the resources of the target device.

[0013] As a possible implementation manner, before establishing the first page resource of the first application page, the method further includes:

[0014] Determine whether the first application page is a main application page with a resource quantity greater than a preset threshold; if the first application page is a main application page, establish a first page resource of the first application page through an asynchronous task; and take a screenshot of the first application page through the asynchronous task for the first page resource, and save the obtained first screenshot to a preset file; the preset file is used to store screenshots of the main application page. Among them, when the number of resources of the first application page is large, the first page resource of the first application page can be established through an asynchronous task to reduce resource occupation. At the same time, the first screenshot when the first application page is the main application page can also be stored in the preset file, without repeatedly establishing resources, saving resources.

[0015] In a possible implementation, after the hand-following movement diagram is displayed, the first application page is displayed on the electronic device, including: after the hand-following movement diagram is displayed, determining the sliding distance corresponding to the sliding operation; when the sliding distance is greater than or equal to a preset distance, displaying the first application page on the electronic device. Wherein, by judging whether the sliding distance is greater than or equal to the preset distance, it is determined whether to switch the second application page to the first application page, thereby avoiding application page switching caused by user's misoperation.

[0016] As a possible implementation, after the hand-following movement graph is displayed, the first application page is displayed on the electronic device, including: after the hand-following movement graph is displayed, the hand-release speed of the sliding operation from the hand-following time to the hand-release time is determined according to the hand-following distance, hand-following time and hand-release time corresponding to the sliding operation; when the hand-release speed is greater than the preset hand-release speed, the first application page is displayed on the electronic device. Wherein, by judging whether the hand-release speed is greater than or equal to the preset hand-release speed, it is determined whether to switch the second application page to the first application page, so as to avoid the application page switching caused by the user's misoperation.

[0017] As a possible implementation method, after the hand-following movement diagram is displayed, the first application page is displayed on the electronic device, including: after the hand-following movement diagram is displayed, the transition effect generated based on the transition effect mask, the second screenshot and the first screenshot from the second application page to the first application page is displayed; after the transition effect is displayed, the second screenshot is removed, and the first page resource of the first application page is established; after the first page resource is established, the first screenshot is removed, and the first application page is displayed on the electronic device based on the first page resource. Among them, by switching from the second application page to the first application page through the transition effect, the smoothness of the application page switching can be improved, and after switching to the first application page, the first page resource is established, so that the response to the application page switching can be achieved, avoiding the user's unresponsive waiting.

[0018] As a possible implementation, the electronic device also supports displaying a third application page. Before establishing the first page resource of the first application page, the method further includes: the third application page is an application page displayed by the electronic device before the electronic device displays the first application page and the second application page. Therefore, when switching from the second application page to the first application page, it is necessary to determine whether the third application page is a main application page with a resource quantity greater than a preset threshold; if the third application page is the main application page, a third screenshot of the third application page stored in advance is obtained; if the third application page is not the main application page, a third application resource of the third application page is established; based on the third application resource, a screenshot of the third application page is taken to obtain a third screenshot; the third screenshot is saved, and the third application resource is cleared. Among them, by taking a screenshot of the third application page in advance when switching from the second application page to the first application page, the smoothness of the sliding operation when the first application page switches to the third application page can be guaranteed.

[0019] As a possible implementation method, before displaying the transition effect from the second application page to the first application page, the method further includes: determining whether the first application page includes a dynamic effect; if the first application page includes a dynamic effect, intercepting and displaying the dynamic effect, and displaying the dynamic effect after the transition effect is executed. Since the application page may carry a dynamic effect, the dynamic effect may cause the transition effect to be abnormal, so in order to ensure the normal display of the transition effect, the dynamic effect needs to be intercepted.

[0020] As a possible implementation method, the electronic device is also configured with a status bar; the method further includes: in response to a sliding operation on the second application page, obtaining a second parameter of the second status bar of the second application page; obtaining a first parameter of the first status bar when the electronic device displays the first application page; judging whether the first parameter and the second parameter are consistent; obtaining a second combined screenshot of the second application page and the second status bar; the second combined screenshot includes an image captured of the second status bar and a second screenshot; according to the second combined screenshot and the first combined screenshot, the electronic device displays a hand-following movement diagram of switching from the second application page and the second status bar to the first application page and the first status bar, the hand-following movement diagram is an image based on a sliding gesture, gradually moving from displaying the second combined screenshot to displaying the first combined screenshot; after the hand-following movement diagram is displayed, the electronic device displays the first application page and the first status bar. Since the captured image is generally an image of the application page, and does not include an image of the status bar, when the status bar parameters corresponding to different application pages are different, the status bar may cause an abnormality when switching synchronously with the application page. Therefore, it can be pre-judged whether the status bar parameters corresponding to the application page are consistent. If not, a combined image of the application page and the status bar is captured to implement application page switching.

[0021] As a possible implementation method, the first application page and the second application page are application pages that are managed through a dual stack structure; the stack linked list corresponding to the dual stack structure is used to perform a pop operation or a push operation on the first node of the first application page and the second node of the second application page; after the electronic device displays the second application page, the method further includes: in response to a sliding operation acting on the electronic device, performing a pop operation on the second node in the stack linked list. Among them, by using a dual stack structure to manage application pages, the nodes of the application pages can be pushed and popped according to needs, and the corresponding application pages will be switched based on the push and pop operations, which is highly flexible.

[0022] As a possible implementation, the electronic device further includes a pre-stored buffer and a scrolling buffer, and the method further includes: before the electronic device is triggered by a sliding operation, when the displayed content of the electronic device switches from the first application page to the currently displayed second application page, the second screenshot is stored in the scrolling buffer, and the first screenshot is stored in the pre-stored buffer. By saving the screenshot of the current application page through the scrolling buffer, the buffer can be reused to reduce memory usage and improve the processing efficiency of the electronic device.

[0023] In a second aspect, an embodiment of the present application provides an electronic device, including: a display screen, a processor, and a memory;

[0024] A display screen, used to display different application pages;

[0025] Among them, one or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the electronic device executes the application page switching method as any one of the first aspects.

[0026] In a third aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the application page switching method as described in any one of the first aspects.

[0027] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, the computer executes the application page switching method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of application page switching of a smart watch provided in an embodiment of the present application;

[0029] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0030] Figure 3An example diagram of the software structure of the electronic device according to the embodiment of the present application;

[0031] Figure 4 A schematic diagram of a hand-following operation provided in an embodiment of the present application;

[0032] Figure 5 A schematic diagram of an application management page based on a dual-stack structure provided in an embodiment of the present application;

[0033] Figure 6 A schematic diagram of a dual-stack model provided in an embodiment of the present application;

[0034] Figure 7 A flowchart of an application page switching method provided in an embodiment of the present application;

[0035] Figure 8 A schematic diagram of application switching provided in an embodiment of the present application;

[0036] Figure 9a A schematic diagram of a stacking operation provided in an embodiment of the present application;

[0037] Figure 9b A schematic diagram of an application page switching method based on a push operation provided in an embodiment of the present application;

[0038] Fig.10a A schematic diagram of a pop operation provided in an embodiment of the present application;

[0039] Fig.10b A flowchart of an application page switching method based on a pop operation provided in an embodiment of the present application;

[0040] Fig.11a A schematic diagram of an application page with multiple sub-application pages provided in an embodiment of the present application;

[0041] Fig.11b A schematic diagram of another pop operation provided in an embodiment of the present application;

[0042] Fig.11c A flowchart of a sub-application page switching method based on a pop operation provided in an embodiment of the present application;

[0043] Fig.12a A schematic diagram of another stacking operation provided in an embodiment of the present application;

[0044] Figure 12b A flowchart of a sub-application page switching method based on a push operation provided in an embodiment of the present application;

[0045] Fig.13 A schematic diagram of a buffer provided in an embodiment of the present application;

[0046] Fig.14a A flowchart of another application page switching method provided in an embodiment of the present application;

[0047] Fig.14b A schematic diagram of a main application page provided in an embodiment of the present application;

[0048] Fig.15a A schematic diagram of switching between an application page and a sub-application page provided in an embodiment of the present application;

[0049] Fig.15b A flowchart of another application page switching method provided in an embodiment of the present application;

[0050] Fig.16 A schematic diagram of a different application page and status bar provided in an embodiment of the present application;

[0051] Fig.17 A flowchart of another sub-application page switching method based on a push operation provided in an embodiment of the present application;

[0052] Fig.18 A flowchart of another sub-application page switching method based on a pop operation provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects rather than to limit a specific order.

[0054] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0055] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given:

[0056] An embedded device is an electronic device based on an embedded system, which may be a smart watch, a smart refrigerator, etc. In this embodiment, a smart watch is used as an example for illustration. Figure 1 , which is a schematic diagram of application page switching of a smart watch provided in an embodiment of the present application.

[0057] See also Figure 1 As shown, Figure 1 a in the table is the first application page. Figure 1The f in is the second application page, Figure 1 b, c, d, and e in the figure are the dynamic effects of switching from the first application page to the second application page.

[0058] For application page switching without transition effects, the application page switching process is not smooth and has poor fluency. Figure 1 As shown, Figure 1 a to f in the figure are the application page switching process with transition effects. If there is no transition effect, it is directly Figure 1 Switch to Figure 1 In f, since there is no association between the content of the application pages, the switching process of the application pages without transition effects is relatively stiff, the user experience is not good, and the smoothness of the application page switching is poor.

[0059] In order to solve the problem of poor smoothness when switching between application pages, some application pages of current smart watches can be realized as follows: Figure 1 a to Figure 1 However, due to the memory and performance limitations of the smart watch, the application page cannot be switched by following the user's sliding action on the screen, that is, the hand-following operation cannot be achieved, and the smoothness of application page switching is poor.

[0060] In view of this, the application page switching method provided by the present application gradually displays the second screenshot of the currently displayed second application page as the first screenshot captured by the first application page based on the sliding gesture of the object used. Since the first screenshot is an image captured of the first application page when the display content of the electronic device switches from the first application page to the currently displayed second application page before the target device is triggered by the sliding operation, that is, the first screenshot is a pre-captured image, the sliding operation corresponding to the sliding gesture can be implemented through the first screenshot and the second screenshot, without establishing the resources of the first application page and then taking screenshots, thereby improving the smoothness of application page switching.

[0061] It should be noted that the above description of application switching for smart watches is only an example and does not constitute a specific limitation on the embedded devices involved in the embodiments of the present application. For example, the embedded device can be a vehicle navigation device, a smart refrigerator with visualization function, a smart access control system, etc. The present application does not impose any special limitations on the specific form of the above embedded devices.

[0062] See also Figure 2 , this figure is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device is an embedded electronic device, which can be a wearable electronic device (such as a smart watch), a device with visualization and interactive functions (such as a smart refrigerator, a smart access control system), and a vehicle-mounted device, etc.

[0063] like Figure 2 As shown, the electronic device 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, a sensor module 180, a button 190, a motor, an indicator 192, a camera, a display screen 194, and a subscriber identification module (SIM) card interface, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0064] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown in the figure, or combine some components, or split 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.

[0065] 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 processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0066] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

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

[0068] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0069] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge an electronic device, and can also be used to transfer data between an electronic device and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0070] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0071] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of an electronic device. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0072] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display screen 194, the camera, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0073] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0074] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0075] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0076] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to electronic devices. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0077] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).

[0078] The electronic device implements the display function through the GPU, the display screen 194, and the application processor. As an example, the electronic device may be a smart watch, which may display application pages such as emails, calls, messages, etc. through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0079] The display screen 194 is used to display images, videos, etc. For example, the display screen 194 can be applied to a smart watch and display photos, images of application pages, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oled, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0080] A series of graphical user interfaces (GUIs) can be displayed on the display screen 194 of the electronic device, and these GUIs are the main screens of the electronic device. Generally speaking, the size of the display screen 194 of the electronic device is fixed, and only limited controls can be displayed on the display screen 194 of the electronic device. A control is a GUI element, which is a software component contained in an application, controlling all data processed by the application and the interactive operations on these data. Users can interact with the control through direct manipulation to read or edit the relevant information of the application. Generally speaking, controls can include icons, controls, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets and other visual interface elements. The display screen 194 of the electronic device can display different application pages, and when switching between different application pages, transition effects can be displayed, and in response to the user's operation on the display screen 194, the application page corresponding to the operation is displayed. As an example, the electronic device can be a smart watch, and a series of graphical user interfaces can be displayed on the display screen 194 of the smart watch, such as application icons, status bars, menus, etc.

[0081] The electronic device can realize the shooting function through ISP, camera, video codec, GPU, display screen 194 and application processor.

[0082] The ISP is used to process the data fed back by the camera. For example, when taking a photo, the shutter is opened and the ISP can also perform algorithm optimization on the image noise, brightness, and skin color. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera.

[0083] The camera is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device may include 1 or N cameras, where N is a positive integer greater than 1.

[0084] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0085] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121, and / or the instructions stored in the memory provided in the processor.

[0086] The electronic device 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 headphone interface, and the application processor.

[0087] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0088] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device can listen to music or listen to a hands-free call through the speaker 170A.

[0089] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0090] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device can be provided with at least one microphone 170C. In other embodiments, the electronic device can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, and directional recording function, etc.

[0091] The pressure sensor is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor can be set on the display screen 194. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. When a touch operation is applied to the display screen 194, the electronic device detects the intensity of the touch operation based on the pressure sensor. As an example, when a user's sliding operation is applied to the display screen 194, the smart watch detects the direction, strength, time, trajectory, etc. of the sliding operation based on the pressure sensor.

[0092] The gyroscope sensor can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor. The gyroscope sensor can be used for anti-shake shooting.

[0093] The air pressure sensor is used to measure air pressure. In some embodiments, the electronic device calculates the altitude through the air pressure value measured by the air pressure sensor to assist positioning and navigation.

[0094] The magnetic sensor includes a Hall sensor. The electronic device can use the magnetic sensor to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device is a flip phone, the electronic device can detect the opening and closing of the flip cover according to the magnetic sensor. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0095] The accelerometer can detect the magnitude of the acceleration of an electronic device in all directions (generally three axes). When the electronic device is stationary, it can detect the magnitude and direction of gravity. 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 and pedometers.

[0096] A distance sensor is used to measure distance. The electronic device can measure distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device can use a distance sensor to measure distance to achieve fast focusing.

[0097] The proximity light sensor may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. An electronic device may use the proximity light sensor to detect when a user holds the electronic device close to their ear to make a call, so as to automatically turn off the screen to save power. The proximity light sensor may also be used to automatically unlock and lock the screen in the leather case mode and pocket mode.

[0098] The ambient light sensor is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light. The ambient light sensor can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor can also cooperate with the proximity light sensor to detect whether the electronic device is in a pocket to prevent accidental touches.

[0099] The fingerprint sensor is used to collect fingerprints. The electronic device can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc. For example, in order to ensure the privacy of the user, before the application page is opened, the user currently using the electronic device can be verified through the fingerprint sensor, such as fingerprint verification, and only the user who has passed the fingerprint verification can switch the application page of the electronic device.

[0100] The temperature sensor is used to detect temperature. In some embodiments, the electronic device uses the temperature detected by the temperature sensor to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor exceeds a threshold, the electronic device reduces the performance of a processor located near the temperature sensor to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device heats the battery 142 to avoid abnormal shutdown of the electronic device due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device boosts the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.

[0101] Touch sensor, also known as "touch control device". The touch sensor can be set on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also known as a "touch control screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. As an example, the touch sensor can pass the detected touch operation to the application processor to determine whether the touch event is a sliding operation. If it is a hand-following operation, the direction, force, time, trajectory and other parameters of the hand-following operation are determined based on the pressure sensor, and different application pages of the electronic device are switched based on the parameters, and displayed through the display screen 194. In other embodiments, the touch sensor can also be set on the surface of the electronic device, which is different from the position of the display screen 194.

[0102] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The electronic device may receive the button input and generate a key signal input related to the user settings and function control of the electronic device. As an example, a smart watch may receive the button 190 input and generate a key signal input related to the user settings and function control of the smart watch, such as pressing the button twice to switch from the current application page to another application page.

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

[0104] In addition, an operating system is running on the above components, such as the iOS operating system developed by Apple, the Android open source operating system developed by Google, and the Windows operating system developed by Microsoft. Application programs can be installed and run on the operating system.

[0105] The operating system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.

[0106] Figure 3 This is an example diagram of the software structure of the electronic device according to an embodiment of the present application.

[0107] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, framework layer, Android runtime and system library, and kernel layer.

[0108] The application layer can include a series of application packages. Figure 3 As shown, the application package may include applications such as gallery, calendar, call, map, navigation music, video, short message, etc.

[0109] The framework layer provides application programming interface (API) and programming framework for the application layer. The framework layer includes some predefined functions. Figure 3 As shown, the framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0110] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0111] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0112] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0113] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).

[0114] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0115] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0116] The kernel layer is responsible for managing the system's processes, memory, device drivers, files, and network systems, and determines the system's performance and stability.

[0117] Understandably, Figure 3 The components included in the system framework layer, system library and runtime layer shown do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or combine some components, or split some components, or arrange the components differently.

[0118] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS and Windows.

[0119] In an embodiment of the present application, when a user performs a touch operation on the display screen 194, the touch sensor can obtain the user's touch operation and report the touch operation to the processor 110. After receiving the touch operation sent by the touch sensor, the processor 110 can respond to the touch operation and execute the application switching action corresponding to the touch operation.

[0120] In some possible implementations, when a user performs a sliding operation on the display screen 194, the touch sensor can obtain the user's following hand operation, and the pressure sensor can obtain the operation trajectory corresponding to the following hand operation, and report the following hand operation and the operation trajectory to the processor 110. After receiving the following hand operation and the operation trajectory sent by the touch sensor and the pressure sensor respectively, the processor 110 can respond to the following hand operation and execute an application switching action corresponding to the following hand operation.

[0121] It is understandable that the above-mentioned electronic device includes an embedded electronic device. For the convenience of description, the embedded electronic device will be referred to as an electronic device in the following text, and a smart watch will be taken as an example of the electronic device.

[0122] See also Figure 4 , which is a schematic diagram of a hand-following operation provided in an embodiment of the present application.

[0123] Hand tracking operation means that when a user slides the screen of an electronic device, the screen content of the electronic device can respond accordingly according to the user's sliding gesture, that is, the user's sliding action. Figure 4 As shown, when the user slides the application page of application A in the smart watch and wants to switch to application B, the application page of application A and the application page of application B will switch with the user's sliding operation. Exemplarily, the user slides the display screen of the smart watch, and the application page displayed on the display screen changes accordingly based on the sliding gesture, which is hand following.

[0124] In order to implement the above-mentioned hand-following operation, as a possible method, a dual-stack structure can be used to manage each application page and each sub-application page within the application, so as to facilitate the implementation of the application page switching method provided in the embodiment of the present application.

[0125] See also Figure 5 , which is a schematic diagram of an application management page based on a dual-stack structure provided in an embodiment of the present application.

[0126] Combination Figure 5 As shown, View can be used to represent an application page, referred to as Vx, where x is an unfixed positive integer and 0, such as V0, V1, etc.; wherein each application page can contain N sub-application pages, and container can be used to represent a sub-application page in an application page, referred to as Conx, where x is an unfixed positive integer and 0, such as Con0, Con1, etc. For example, a smart watch can include 4 applications, namely A, B, C, and D, and the application pages V0, V1, V2, and V3 corresponding to applications A, B, C, and D, and each of applications A, B, C, and D can include one or more sub-application pages Conx, for example, application B includes three sub-application pages Con0, Con1, and Con2.

[0127] It should be noted that in Figure 5 Only three sub-application pages Con0, Con1 and Con2 of application B are shown as examples. Other applications also include one or more sub-application pages, which are not specifically limited here.

[0128] It should be understood that in the embodiment of the present application, different application pages or different sub-application pages within an application page are organized using a chain structure to facilitate the management of different application pages.

[0129] Furthermore, based on the application management page of the dual-stack structure provided above, in an embodiment of the present application, a dual-stack structure may be specifically used to manage different application pages or different sub-application pages within an application page.

[0130] It should be noted that the dual stack structure refers to two sequential stacks, which is a special type of sequential stack. The dual stacks share a storage unit with a continuous address. That is, when the program needs two stacks at the same time, a sufficiently large stack space can be defined, and the two ends of the space are set as the bottom of the two stacks, which can be indicated by bottom[0]=-1 and bottom[1]=maxSize.

[0131] See also Figure 6 , which is a schematic diagram of a double-stack model provided in an embodiment of the present application.

[0132] It can be understood that the two stacks numbered 0 and 1 are stored in an array space V[m], with the bottoms of the stacks at the two ends of the array. When the stack pointer top[0] of stack 0 is equal to -1, the stack is empty; when the stack pointer top[1] of stack 1 is equal to m, the stack is empty. Both stacks grow from the two ends to the middle.

[0133] Exemplarily, switching application pages based on the user's hand-following operation may generate a push or pop. For example, when pushing the application list from the main dial to the application list, the node of the application list will be added to the end of the stack list. At this time, the stack structure changes from the main dial node to the application list node; when popping the application list from the application list to the main dial, the node of the application list will be popped from the stack list. At this time, the stack structure only has the main dial node. Similarly, there is also a linked list structure management in the application page, which will generate push and pop of sub-application pages. Among them, when the application page is switched, the stack of the sub-page corresponding to the application page will be cleared.

[0134] It can be understood that each application page can be switched between, and the sub-application pages within each application can also be switched. For example, assume that the node of application page V0 is K0, and the node of application page V1 is K1. K0 is the bottom of the stack structure. When switching from V0 to V1, K1 needs to be added to the stack linked list of the application page, that is, a push operation is performed on K1. At this time, the stack structure will be changed from K0 to K1. Correspondingly, application page V0 is switched to application page V1.

[0135] It can be understood that since the two stacks share one stack space, the storage space can be better utilized and can be adjusted with each other. When the application page needs to be switched, the nodes of the application page can be pushed and popped as needed, and the corresponding application page will be switched based on the push and pop operations, which is highly flexible. Therefore, in this embodiment, a dual stack structure is used to manage application pages and sub-application pages within the application, which can improve the efficiency and flexibility of application page management.

[0136] See also Figure 7 , which is a flowchart of an application page switching method provided in an embodiment of the present application.

[0137] In the related technology, taking a smart watch as an example, assuming that a user switches from the first application page (the current application page) to the second application page (the application page to be switched relative to the current application page) through a click operation, the process may be to take a screenshot of the first application page, establish resources corresponding to the second application page, take a screenshot of the second application page after establishing the resources, switch from the first application page to the second application page based on the screenshot of the first application page, the screenshot of the second application page and the transition animation, destroy the screenshot and resources of the first application page, remove the screenshot of the second application page and refresh the application page to enter the second application page.

[0138] However, when the user returns to the first application page from the second application page through the hand-following operation, since the screenshot and resources of the first application page have been destroyed, it is necessary to re-establish the resources and take a screenshot. During the resource establishment process, the hand-following operation cannot be implemented.

[0139] In order to implement the hand-following operation, the application page switching method provided in the embodiment of the present application may specifically include:

[0140] S701: In response to the hand-following operation, taking a screenshot of the current application page, and obtaining a screenshot of the current page.

[0141] The hand-following operation means that when the user slides the screen of the electronic device, the screen content of the electronic device can respond accordingly according to the user's sliding gesture. For example, the user can perform the hand-following operation on the screen of the smart watch, such as swiping left from the first application page to enter the second application page, swiping right from the second application page to exit the second application page and enter the first application page, or swiping left and right repeatedly to display the first application page and the second application page, etc., which is not specifically limited here.

[0142] When the user performs the hand-following operation, the electronic device responds to the hand-following operation and takes a screenshot of the current application page to obtain a first screenshot. Exemplarily, the smart watch responds to the user's hand-following operation and takes a screenshot of the current application page to obtain a first screenshot.

[0143] In this embodiment, an exemplary description is given by taking the example of entering the second application page from the first application page as a click to enter and returning from the second application page to the first application page as a right swipe to return.

[0144] The current application page can be understood as the application page entered by the target application page and currently displayed. For example, assuming that it includes a first application page and a second application page, the first application page can be understood as the target application page, and the second application page can be understood as the current application page. Specifically, the second application page is entered based on a click on the first application page. That is, when the user swipes right and returns, the electronic device will take a screenshot of the second application page to obtain the first screenshot.

[0145] S702: Obtain a target page screenshot of a target application page to be switched from a pre-stored buffer.

[0146] It should be noted that the second screenshot is a screenshot of the target application page, which can be obtained when the target application page jumps to the current application page. For example, the user needs to enter the second application page from the first application page. In the process of entering the second application page, the first application page is pre-screenshot and stored in the pre-stored buffer, so that when the user swipes right to return from the second application page, the user can perform the hand-following operation through the first screenshot of the second application page and the pre-stored second screenshot of the first application page.

[0147] S703: Based on the current page screenshot, the target page screenshot and the preset transition effect, and based on the hand-following operation, the current application page is switched to the target application page.

[0148] The preset transition effect refers to the transition effect set from one application page to another application page.

[0149] It should be noted that transition effects refer to the transition effects when different application pages are switched. Figure 1 As shown, Figure 1 b, c, d, and e in the figure show a transition effect, in which the first application page gradually becomes smaller and then switches to the second application page, and the second application page gradually becomes larger until it becomes a preset size. For example, the transition effect can also be a book flipping change, a chessboard change, a blind change, etc., which is not specifically limited here.

[0150] In some possible implementations, since the application page has dynamic effects, in order to avoid conflicts between the dynamic effects of the application page and the transition effects, it can be determined in advance whether the application page has dynamic effects. If so, the dynamic effects are prohibited from being executed until the transition effects are completed, and then the dynamic effects can be restored.

[0151] In some possible implementations, the user can perform a hand swipe based on the first screenshot and the second screenshot. When the image of the second screenshot is displayed on more than half of the screen of the electronic device, a preset transition effect can be executed based on the first screenshot and the second screenshot to switch from the current application page to the target application page. After the preset transition effect is executed, the resources of the target application page are established. After the resources of the target application are established, the second screenshot is removed, and the application page is refreshed to display the target application page.

[0152] It should be understood that when the resource loading time of an application is too long, the user will be in a long wait without response. For example, when switching from the first application page to the second application page, the resources of the second application page need to be established. However, the second application page may have more resources and the establishment time is longer. In this case, it is impossible to take a screenshot of the second application page, and further, the application page conversion cannot be achieved. It is necessary to wait on the first application page until the resources of the second application page are established and a screenshot is taken before the application page switch can be executed, resulting in a long wait without response for the user. Figure 1 As shown, assuming that Figure 1 Switch to Figure 1 If f in Figure 1 If the second application page corresponding to f in the above example has more resources, then when the application page is switched, Figure 1 The embodiment of the present application can respond to the first application page by taking a pre-screenshot of the first application page, and when switching back to the first application page from the second application page, the pre-screenshot can be used to implement responsive application page switching, thereby improving the user experience.

[0153] See also Figure 8 , which is a schematic diagram of an application switching provided in an embodiment of the present application.

[0154] It should be understood that in the embodiment of the present application, the electronic device may be a smart watch, and the smart watch may include application A and application B, application A is email, application B is music, and entering application B from application A is a click entry, as shown in the following example. Figure 8 The P part shown in the figure; returning to application A from application B is to swipe right and return with your hand, as shown in the figure below: Figure 8 Part Q shown.

[0155] The user can click on the application page of application A to enter application B. After entering application B, swipe from left to right. During the swiping process, part of the page area of ​​the application page of application B is displayed on the screen of the smart watch, and part of the application page of application A is displayed on the screen of the smart watch. When the part of the application page displayed on the application page of application A reaches one-half of the entire application page, and the user ends the hand-following operation and performs the hand-release operation, a transition effect can be executed, switching from the application page of application B to the application page of application A. This embodiment is only an exemplary description and is not used as a basis for limiting the scope of protection of this application.

[0156] The embodiment of the present application provides an application page switching method. By pre-screening the target application page in advance, when returning to the target application page from the current application page, the pre-screenshot of the target application page can be directly obtained, without the need to take a screenshot after the resources of the target application page are loaded. The screenshot of the current application page and the pre-screenshot of the target application page can change with the user's sliding gesture, that is, the hand-following operation can be implemented, thereby improving the smoothness of application page switching. Compared with the related art, when there are many resources on the target application page, the establishment of the resources requires the user to be in a long period of unresponsive waiting. The embodiment of the present application can respond to the user's operation, allowing the user to enter the target application page and wait for the resources to load, thereby improving the user experience.

[0157] Based on the application page switching method provided in the above embodiment, in order to illustrate the process of pre-screenshotting the target application page and how to implement the hand-following operation, it can be further combined with the management of application pages based on the dual-stack structure described above for exemplary description.

[0158] It should be noted that since application page switching involves switching between different application pages and switching between different sub-application pages within an application page, the switching between different application pages and switching between different sub-application pages within an application are exemplified below.

[0159] It should be understood that switching between different application pages can be specifically divided into two processes. The first process is switching from the first application page to the second application page based on a click operation; the second process is returning to the first application page from the second application page based on a hand-following operation. The two processes are exemplified below.

[0160] See also Figure 9a , which is a schematic diagram of a stacking operation provided in an embodiment of the present application.

[0161] Combination Figure 9a As shown, assuming that the user clicks from the first application page V0 to enter the second application page V1, the node corresponding to the first application page V0 is X0, and the node corresponding to the second application page V1 is X1, the stacking operation can be:

[0162] S901a: Responding to a click-to-enter operation.

[0163] S902a: Push the X1 node into the stack.

[0164] It should be noted that the X1 node is used as the top of the stack linked list, and the X0 node is used as the bottom of the stack. When the stack linked list is executed, the X1 node is executed first.

[0165] S903a: Determine whether there is an X0 node corresponding to the first application page V0 in the stack linked list; if not, push the X0 node into the stack first, and then push the X1 node into the stack; if it exists, directly push the X1 node into the stack.

[0166] It should be noted that by judging whether there is an X0 node of the first application page V0 in the stack linked list, it is ensured that the node corresponding to the first application page is in the stack linked list, thereby avoiding errors when returning to the first application page and improving fault tolerance.

[0167] S904a: Execute the X1 node based on the stack linked list.

[0168] See also Figure 9b , which is a schematic diagram of an application page switching method based on a push operation provided by an embodiment of the present application. Based on the push operation of steps S901a to S904a above, the application page switching method may be:

[0169] S901b: Take a screenshot of the first application page V0 and destroy the resources of the first application page V0.

[0170] It should be noted that in order to save memory and resource usage of the electronic device, when switching application pages, the resources of the first application page V0 will be destroyed, and only the resources corresponding to the current application page, that is, the resources of the second application page V1 will be retained.

[0171] S902b: Create resources of the first application page V0 and take a pre-screenshot, and then destroy the resources of the first application page V0.

[0172] It should be noted that in order to realize the subsequent right swiping and returning to the first application page V0 from the second application page V1, before entering the second application page V1 from the first application page V0, it is necessary to pre-screenshot the first application page V0 and store it in a pre-stored buffer.

[0173] S903b: Create resources for the second application page V1 and take a screenshot.

[0174] S904b: Execute transition effects based on the screenshot of the first application page V0 and the screenshot of the second application page V1.

[0175] S905b: After the transition animation ends, remove the screenshot of the first application page V0 and the mask of the transition animation.

[0176] S906b: Refresh the application page, remove the screenshot of the second application page V1, and display the second application page V1 based on the resources of the second application page V1.

[0177] In this embodiment, by pre-screenshotting the first application page V0, it is possible to facilitate the subsequent follow-up return operation of switching from the second application page V1 to the first application page V0. There is no need to take a screenshot after the resources of the first application page V0 are loaded, and the user can enter the first application page V0 and wait for the resources to load, thereby improving the smoothness of application page switching.

[0178] See also Fig.10a , which is a schematic diagram of a pop operation provided in an embodiment of the present application.

[0179] After switching from V0 to V1, if the user needs to return from V1 to V0, the user can perform a right swipe and return operation. The specific process can be:

[0180] S1001a: Responding to a right swipe and hand return operation.

[0181] S1002a: Pop the X1 node.

[0182] S1003a: Execute the X0 node based on the stack linked list.

[0183] See also Fig.10b , which is a flow chart of an application page switching method based on a pop operation provided by an embodiment of the present application. Based on the pop operations of steps S1001a to S1003a above, the application page switching method may be:

[0184] S1001b: Take a screenshot of the second application page V1.

[0185] S1002b: Obtain a preview screenshot of the first application page V0.

[0186] S1003b: Moving the screenshot of the second application page V1 and the pre-screenshot of the first application page V0 based on the sliding gesture of the follow-hand operation.

[0187] It should be noted that by using the pre-screenshot of the first application page V0 for hand-following operation, there is no need to establish resources of the first application page V0, which saves time for resource establishment and improves the smoothness of application page switching.

[0188] S1004b: Execute transition effect after the user releases the hand.

[0189] S1005b: After the transition animation ends, remove the screenshot of the second application page V1 and the mask of the transition animation.

[0190] S1006b: Display a screenshot of the first application page V0 and create resources of the first application page V0.

[0191] S1007b: When the resources of the first application page V0 are loaded, the screenshot of the first application page V0 is removed, and the first application page V0 is displayed based on the resources of the first application page V0.

[0192] It should be noted that the prerequisite for switching from the second application page V1 to the first application page V0 is to switch from the first application page V0 to the second application page V1, that is, first switch from the first application page V0 to the second application page V1, and then switch from the second application page V1 to the first application page V0 in response to the right swipe and hand return operation. Fig.10b Steps S901b to S906b in the above Figure 9b The steps S901b to S906b in are the same, and are used to represent the pre-screenshot process of the first application page V0, so they are not repeated here. For related explanations, please refer to the contents of the above steps S901b to S906b.

[0193] It should be noted that the follow-up operation can be left swipe / right swipe to enter, left swipe / right swipe to return, left and right swipe, etc., which are not specifically limited here. The above is only an example and is not used as a basis for limiting the scope of protection of this application.

[0194] It should be noted that, in this embodiment, by taking a screenshot of the current application page (such as the second application page V1) and obtaining a preview of the target application page (such as the first application page V0), and then performing a follow-up operation based on the screenshot of the current application page and the preview of the target application page, there is no need to take a screenshot after the resources of the target application page are loaded, and the user can enter the target application page and wait for the resources to load, thereby improving the smoothness of application page switching.

[0195] It should be understood that when switching between different application pages, the establishment of resources needs to be considered during the follow-up operation. Therefore, it is necessary to use the pre-screenshot of the target application page and the screenshot of the current application page to implement the follow-up operation. However, when switching between different sub-application pages within an application page, the resources of the previous sub-application page will not be destroyed. Therefore, when returning, you can directly take screenshots of the current sub-application page and the target sub-application page, and implement the follow-up operation and execute the transition animation based on the two screenshots.

[0196] For example, see Fig.11a , which is a schematic diagram of an application page with multiple sub-application pages provided in an embodiment of the present application. Assume that the electronic device is a smart watch, the application A is music, the application page of the application A is a, and the application page a may include sub-application pages a1, a2 and a3.

[0197] In some possible implementations, see Fig.11b, which is a schematic diagram of another pop operation provided by an embodiment of the present application. Assuming that application A includes three sub-applications, namely A1, A2, and A3, the corresponding sub-application pages are a1, a2, and a3, and the corresponding nodes are C1, C2, and C3; assuming that the third sub-application page a3 returns to the second sub-application page a2, the pop operation can be:

[0198] S1101b: In response to the hand-following operation, pop the C3 node from the stack.

[0199] S1102b: Execute the C2 node based on the stack linked list.

[0200] See also Fig.11c , which is a flow chart of a sub-application page switching method based on a pop operation provided by an embodiment of the present application. The sub-application page switching process may be:

[0201] S1101c: Take a screenshot of the third sub-application page a3.

[0202] S1102c: Obtain resources of the second sub-application page a2, and take a screenshot of the second sub-application page a2.

[0203] It should be understood that, since the resources of the second sub-application page a2 will not be destroyed, the resources of the second sub-application page a2 can be directly obtained, and a screenshot of the second sub-application page a2 can be taken, and a hand-following operation can be implemented.

[0204] S1103c: Perform a hand-following operation based on the screenshot of the third sub-application page a3 and the screenshot of the second sub-application page a2.

[0205] S1104c: Execute transition effect after the user releases the hand.

[0206] S1105c: After the transition animation ends, remove the screenshot of the third sub-application page a3.

[0207] S1106c: Refresh the application page, remove the screenshot of the second sub-application page a2, and display the second sub-application page a2 based on the resources of the second sub-application page a2.

[0208] It should be understood that when entering the third sub-application page a3 from the second sub-application page a2, the resources of the second sub-application page a2 are not destroyed. Therefore, when the third sub-application page a3 switches to the second sub-application page a2 based on the hand-following operation, the second sub-application page a2 can be directly screenshotted, and the hand-following operation can be performed based on the screenshot of the third sub-application page a3 and the screenshot of the second sub-application page a2. After the user releases the hand, the transition animation effect is executed.

[0209] In some other possible implementations, the target sub-application page can still be pre-screenshot to facilitate the hand-following operation when returning to the target sub-application page from the current sub-application page, see Fig.12a , which is a schematic diagram of another push operation provided by an embodiment of the present application. Assuming that application A includes three sub-applications, namely A1, A2, and A3, the corresponding sub-application pages are a1, a2, and a3, and the corresponding nodes are C1, C2, and C3; assuming that the first sub-application page a1 enters the second sub-application page a2, the push operation can be:

[0210] S1201a: In response to the click operation, push the C2 node into the stack.

[0211] It should be noted that the click operation refers to the operation of entering the second sub-application page a2 from the first sub-application page a1.

[0212] S1202a: Determine whether there is a C1 node in the stack linked list; if not, first push the C1 node into the stack, and then push the C2 node into the stack; if it exists, directly push the C2 node into the stack.

[0213] S1203a: Execute the C2 node based on the stack linked list.

[0214] See also Figure 12b , which is a flow chart of a sub-application page switching method based on a stacking operation provided in an embodiment of the present application. Based on the above-mentioned stacking operation, the sub-application page switching method can be:

[0215] S1201b: Take a screenshot of the first sub-application page a1, and destroy the resources of the first sub-application page a1.

[0216] S1202b: Create resources for the first sub-application page a1 and take a pre-screenshot, and then destroy the resources for the first sub-application page a1.

[0217] It should be noted that in order to realize the subsequent return of the second sub-application page a2 to the first sub-application page a1 based on the hand-following operation, when entering the second sub-application page a2 from the first sub-application page a1, it is necessary to pre-screenshot the first sub-application page a1 and store it in the pre-stored buffer.

[0218] S1203b: Create resources for the second sub-application page a2 and take a screenshot.

[0219] S1204b: Execute transition effects based on the screenshots of the first sub-application page a1 and the screenshots of the second sub-application page a2.

[0220] S1205b: After the transition animation ends, remove the screenshot of the first sub-application page a1 and the mask of the transition animation.

[0221] S1206b: Refresh the application page, remove the screenshot of the second sub-application page a2, and display the second sub-application page a2 based on the resources of the second sub-application page a2.

[0222] It should be understood that when switching from the first sub-application page a1 to the second sub-application page a2, a pre-screenshot of the first sub-application page a1 is taken, and when the second sub-application page a2 switches to the first sub-application page a1 based on the hand-following operation, the screenshot of the second sub-application page a2 and the pre-screenshot of the first sub-application page a1 are used to perform the hand-following return operation. Compared with obtaining the resources of the first sub-application page a1 and taking a screenshot, the response time is faster, thereby improving the smoothness of the application page switching.

[0223] Due to the memory limitation of existing electronic devices (such as smart watches), there may be a problem of insufficient memory. Based on the application page switching method provided in the above embodiment, in order to further save memory, see Fig.13 , which is a schematic diagram of a buffer provided by an embodiment of the present application. As some possible implementations, the cache buffer may include a pre-stored buffer, a buffer0 and a buffer1.

[0224] The buffer is a part of the memory space, that is, a certain amount of storage space is reserved in the memory space, which is used to buffer input or output data. This reserved space is called a buffer, which can be expressed in English as buffer.

[0225] It should be noted that, in order to save memory, in this embodiment, the screenshot of the next application page is saved by buffering buffer0, and the screenshot of the current application page is saved by buffering buffer1, so that buffer reuse can be achieved to reduce memory usage and improve the processing efficiency of the electronic device.

[0226] It should be noted that the pre-stored buffer is used to store the pre-screenshot of the current application page, so as to facilitate the hand-following operation performed when returning to the current application page.

[0227] Exemplary, combined Fig.13 As shown, it is assumed that the electronic device is a smart watch, the first application page is V0, the second application page is V1, and the third application page is V2.

[0228] When switching from the first application page V0 to the second application page V1, the screenshot a of the first application page V0 is stored in buffer1, the screenshot b of the second application page V1 is stored in buffer0, and the pre-screenshot a' of the first application page V0 is stored in the pre-stored buffer.

[0229] When switching from the second application page V1 to the third application page V2, the screenshot b1 of the second application page V1 is stored in buffer buffer1, and overwrites the saved screenshot a of the first application page V0, the screenshot c of the third application page V2 is stored in buffer buffer0, and overwrites the saved screenshot b of the second application page V1, and the pre-screenshot b' of the second application page V1 is stored in the pre-stored buffer, overwriting the saved pre-screenshot a' of the first application page V0.

[0230] When the second application page V1 is switched to the first application page V0 based on the hand-following operation, the new screenshot b2 of the second application page V1 is stored in the buffer buffer1, and the pre-screenshot a' of the first application page V0 stored in the pre-stored buffer is obtained.

[0231] In some possible implementations, the screenshots may be stored in the RG888 format, which occupies less memory than the traditional ARG8888 format, thus saving memory of the electronic device.

[0232] It is understandable that by scrolling and storing screenshots, buffer reuse can be achieved, memory usage can be reduced, and pre-screenshots can be stored to facilitate hand-following operations and improve the smoothness of application page switching.

[0233] Because some application pages of electronic devices have more memory resources, such as application pages that contain watch face resources and other card application page resources, it takes a long time to load resources during the creation process. After the user optimizes and exits, the operation will not respond immediately and will be more stuck, reducing the smoothness of switching application pages.

[0234] In order to solve the above problem, it is assumed that the electronic device is a smart watch, the first application page is V0, the second application page is V1, the node of the first application page V0 is X0, and the node of the second application page V1 is X1. It is assumed that the first application page V0 is switched to the second application page V1. The steps of the stacking operation are similar to steps S901a to S904a in the above embodiment, so they are not repeated here. For details, please refer to Figure 9a and related instructions for steps S901a to S904a.

[0235] See also Fig.14a , which is a flow chart of another application page switching method provided by an embodiment of the present application. Based on the above stacking operation, the application page switching method may include:

[0236] S1401: Take a screenshot of the first application page V0 and destroy the resources of the first application page V0.

[0237] S1402: Determine whether the first application page V0 is the main application page, if so, execute step S1403; if not, execute step S1405.

[0238] It should be noted that when switching from the first application page V0 to the second application page V1, it is necessary to pre-screenshot the first application page V0, that is, it is necessary to re-establish the resources of the first application page V0 and take a screenshot. However, the first application page V0 may have more resources, resulting in a longer time-consuming switching from the first application page V0 to the second application page V1, and the application page switching is not smooth. Therefore, by pre-determining whether the first application page V0 is the main application page, it is further determined whether it is necessary to use an asynchronous task method to establish the resources of the first application page V0.

[0239] It should be understood that the main application page refers to the application page whose resource volume exceeds the threshold, such as the main dial page. Fig.14b As shown, Fig.14b A schematic diagram of a main application page provided in an embodiment of the present application. Fig.14b As shown, since the main dial page H includes multiple applications, it may be necessary to establish resources between the multiple applications, which have more resources.

[0240] S1403: Send the resource creation task corresponding to the first application page V0 to the asynchronous task.

[0241] It should be noted that by sending the resource establishment task corresponding to the first application page V0 to the asynchronous task, it can be executed by a task with a lower priority, avoiding the time-consuming switching from the first application page V0 to the second application page V1 due to the large number of resources of the first application page V0, thereby improving the smoothness of application switching.

[0242] S1404: Create a first application page V0 resource based on the asynchronous task and take a pre-screenshot of the first application page V0, and store it in a preset file.

[0243] It should be noted that since the main application page has more resources, it needs to be re-established each time a pre-screenshot is taken, which is time-consuming and occupies more resources. In order to save resources, after the resources of the main application page are established, a screenshot of the main application page can be taken and stored in a preset file. When a pre-screenshot of the main application page is needed, it can be obtained directly from the preset file without re-establishing the resources, saving time and memory resources.

[0244] S1405: Create resources of the first application page V0 and take a pre-screenshot of the first application page V0, and store the pre-screenshot in a pre-stored buffer; then destroy the resources of the first application page V0.

[0245] S1406: Create resources for the second application page V1 and take a screenshot.

[0246] S1407: Execute transition effects based on the screenshot of the first application page V0 and the screenshot of the second application page V1.

[0247] S1408: After the transition animation ends, remove the screenshot of the first application page V0 and the mask of the transition animation.

[0248] S1409: Refresh the application page, remove the screenshot of the second application page V1, and display the second application page V1 based on the resources of the second application page V1.

[0249] It should be understood that since the main application page has more resources and takes longer to create, during the stacking operation, a message is sent to an asynchronous task with a lower priority than the current application page. The asynchronous task stores the pre-screenshot in the file system, and reads the corresponding pre-screenshot from the file system when the user swipes right to return to the main application page. In some possible implementations, the pre-screenshot of the main application page can be stored in a preset file and used repeatedly to reduce resource usage and improve the processing efficiency of the electronic device.

[0250] Since application page switching is not limited to switching between different application pages or switching between different sub-application pages within an application page, it may also involve switching between an application page and a sub-application page. For details, see Fig.15a As shown in FIG. 1 , this figure is a schematic diagram of switching between an application page and a sub-application page provided in an embodiment of the present application. Fig.15a As shown, it is assumed that it can include application pages E, R, and T, and application page T can include sub-application pages t1, t2, and t3. When the currently displayed page is sub-application page t3, the user can switch from sub-application page t3 to sub-application page t2, or directly switch from sub-application page t3 to application page R.

[0251] To switch between application pages and sub-application pages, see Fig.15b , which is a flowchart of another application page switching method provided in an embodiment of the present application.

[0252] Assume that the electronic device includes a first application M1, a second application M2, and a third application M3, and the corresponding application pages are respectively a first application page Y1, a second application page Y2, and a third application page Y3, and the third application page Y3 may include sub-application pages y1, y2, and y3. Assume that the current application page is a sub-application page y2 of the third application page V3, the application page switching method may specifically include:

[0253] S1501: The user performs a hand-following operation.

[0254] S1502: In response to the hand-following operation, determine whether it is a sub-application page switch; if so, execute step S1503; if not, execute step S1504.

[0255] It should be noted that since the switching between sub-application pages cannot be perceived by the underlying application program, it is necessary to first determine the type of application switching, such as switching between application pages, switching between application pages and sub-application pages, and switching between sub-application pages.

[0256] S1503: Obtain a preview screenshot of the sub-application page y1 and execute step S1505.

[0257] It should be noted that if the sub-application page is switched to another sub-application page, a preview screenshot of the target sub-application to be switched to is obtained. For example, a preview screenshot of the sub-application page y1 can be obtained.

[0258] S1504: Obtain a preview screenshot of the second application page Y2, and execute step S1505.

[0259] It should be noted that if it is not a sub-application page switch, it is considered to be a switch between an application page and a sub-application page, and a preview screenshot of the second application page Y2 needs to be obtained.

[0260] S1505: Take a screenshot of the sub-application page y2 of the third application page V3.

[0261] S1506: Perform a hand-following operation based on the pre-screenshot of the sub-application page y1 or the pre-screenshot of the second application page Y2, and the screenshot of the sub-application page y2.

[0262] S1507: Determine whether it is a sub-application page switch; if so, execute step S1508; if not, execute step S1513.

[0263] It should be noted that the determination in step S1502 is to detect whether it is a sub-application page switch, while step S1507 executes different processes based on the switch type.

[0264] S1508: Determine whether the distance corresponding to the right sliding action reaches half of the screen distance, or whether the hand-off speed reaches a threshold; if so, execute step S1509; if not, execute step S1511.

[0265] As some possible implementation methods, the hand-off speed can also be determined according to the following distance, following time and hand-off time corresponding to the sliding operation. For example, assuming the following distance is 3 cm, the following time is 17:30, and the hand-off time is 17:35, the time difference is 5 seconds, and the hand-off speed is 0.6 cm per second. Assuming the threshold is 0.5-0.6 cm per second, it is considered that the hand-off speed reaches the threshold and the application page needs to be switched.

[0266] It should be noted that when the user performs the hand-following operation, there may be misoperation. In order to avoid this problem, it is necessary to determine whether the user needs to switch pages through step S1508.

[0267] S1509: Execute transition animation based on the screenshot of the sub-application page y2 and the pre-screenshot of the sub-application page y1.

[0268] S1510: After the transition effect ends, the sub-application page y1 is displayed.

[0269] S1511: Execute transition effects based on the screenshot of sub-application page y2.

[0270] S1512: After the transition effect ends, the sub-application page y2 is displayed.

[0271] It should be understood that if the distance corresponding to the right sliding action does not reach half of the screen distance, or the hand-off speed does not reach the threshold, it is considered that the user does not need to switch application pages, and the current page will still be displayed.

[0272] S1513: Determine whether the distance corresponding to the right sliding action reaches half of the screen distance, or whether the hand-off speed reaches a threshold; if so, execute step S1514; if not, execute step S1521.

[0273] S1514: Execute transition animation based on the screenshot of the sub-application page y2 and the pre-screenshot of the second application page Y2.

[0274] S1515: After the transition animation ends, a preview screenshot of the second application page Y2 is displayed.

[0275] S1516: Determine whether the first application page Y1 associated with the second application page Y2 is the main application page; if so, execute step S1517; if not, execute step S1518.

[0276] S1517: Obtain a pre-screenshot of the first application page Y1 from the file, and store it in a pre-stored buffer.

[0277] S1518: Create resources of the first application page Y1 and take a pre-screenshot of the first application page Y1, store the pre-screenshot in a pre-stored buffer, and destroy the resources of the first application page Y1.

[0278] It should be noted that if there is an application page associated with the application page to be switched to, a screenshot of the associated application page needs to be pre-stored to facilitate subsequent switching of application pages and improve the smoothness of application page switching.

[0279] S1519: Create resources for the second application page Y2.

[0280] S1520: Refresh the application page, remove the preview screenshot of the second application page Y2, and display the second application page Y2 based on the resources of the second application page Y2.

[0281] S1521: Execute transition effects based on the screenshot of sub-application page y2.

[0282] S1522: After the transition effect ends, the sub-application page y2 is displayed.

[0283] It should be understood that in the embodiment of the present application, by determining whether it is a switch between sub-applications or a switch between a sub-application and an application, the corresponding pre-screenshot is further selected to achieve application switching in different scenarios. For switching between multiple applications, after completing the switch between the current application page and the target application page, the target application page to be switched will be pre-cached based on the current target application page to ensure the smoothness of continuous hand-following operation on the application page and improve the user experience.

[0284] See also Fig.16 , which is a schematic diagram of a different sub-application page and status bar provided in an embodiment of the present application.

[0285] Due to the personalized display of electronic devices, the application page and the status bar can be included when the application page is displayed. Different application pages can set different status bar colors. For details, see Fig.16 As shown, Fig.16 A and B in the figure may represent different sub-application pages under the same application and the corresponding application page diagram of the status bar. Specifically, the electronic device may be a smart watch, and the application may be music. Fig.16 The A in the music list indicates the music list page. Fig.16 The B in the figure represents the music playback page. When switching application pages, a screenshot of the application page is generally taken. However, the application page switching is accompanied by the transition of the status bar, which may cause the status bar to flicker when switching applications, reducing the user experience.

[0286] In order to solve the above technical problems, in some possible implementations, it is possible to pre-determine whether the color of the status bar between the current application page and the target application page is inconsistent. If they are consistent, a screenshot of the current application page is taken, and a pre-screenshot of the target application page is taken; if they are inconsistent, a root screenshot of the current application page and a pre-root screenshot of the target application page are obtained, wherein the root screenshot refers to a screenshot obtained based on the root application page containing the status bar.

[0287] See also Fig.17 and Fig.18 , Fig.17 Provided in the embodiments of this application, Fig.18 A flowchart of another sub-application page switching method based on a pop operation provided by an embodiment of the present application: Assume that an application W1 includes sub-application pages W1-0 and W1-1, and their corresponding nodes are Z0 and Z1.

[0288] Combination Fig.17 As shown, when switching from sub-application page W1-0 to sub-application page W1-1, the Z1 node may be pushed into the stack linked list in response to a click operation. Based on the push operation, the sub-application page switching method may include:

[0289] S1701: In response to the click operation, determine the root application page of W1-0 and take a root screenshot.

[0290] S1702: Determine the root application page of W1-1 and take a root screenshot.

[0291] S1703: Load the root screenshot of W1-0 onto the root view.

[0292] S1704: Set the root screenshot of W1-1 under the root screenshot of W1-0.

[0293] S1705: Execute transition effects.

[0294] S1706: Remove root screenshots of W1-0.

[0295] S1707: Refresh the sub-application page, remove the root screenshot of W1-1, and display W1-1 based on the resources of W1-1.

[0296] Combination Fig.18 As shown, when switching from sub-application page W1-0 to W1-1, a pop operation may be performed on the Z1 node in response to a click operation or a hand-following operation. Based on the pop operation, the sub-application page switching method may include:

[0297] S1801: Determine the root application page of W1-1 and take a root screenshot.

[0298] S1802: Determine the root application page of W1-0 and take a root screenshot.

[0299] S1803: Load the root screenshot of W1-1 on the root view root view.

[0300] S1804: Set the root screenshot of W1-0 under the root screenshot of W1-1.

[0301] S1805: Execute transition effects.

[0302] S1806: Remove root screenshots of W1-0.

[0303] S1807: Refresh the sub-application page, remove the root screenshot of W1-1, and display W1-1 based on the resources of W1-1.

[0304] It is understandable that since the status bar colors corresponding to different application pages may be different, the status bar may flicker when switching application pages, affecting the user experience. In an embodiment of the present application, by taking a screenshot of the root application page, the status bar can be screenshoted, and the color of the status bar corresponding to the application page can be displayed when the application page is switched. The application page switching is natural, which improves the user experience.

[0305] The technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment. The aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, etc., various media that can store program codes.

[0306] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for switching application pages, It is characterized in that Applied to an electronic device, the electronic device is configured with a first application and a second application; the method comprises: The electronic device displays a first application page of the first application; In response to an application switching operation, taking a screenshot of the first application page, obtaining a current page screenshot and displaying the current page screenshot, and clearing a first page resource of the first application page; the application switching operation is an operation of switching the displayed content of the electronic device from the first application page to the second application page of the second application; the current page screenshot is a screenshot of the first application page currently being displayed; In response to the application switching operation, establishing the first page resource; Taking a screenshot of a first application page based on the first page resource to obtain a first screenshot; wherein the first page resource is cleared after the first screenshot is saved; A second page resource of the second application page is established, and a screenshot is taken based on the second page resource to obtain a screenshot of the page to be switched; the screenshot of the page to be switched is a screenshot of the second application page to which the first application page is to be switched; Execute transition animation according to the current page screenshot and the to-be-switched page screenshot; After the application switching operation is completed, the screenshot of the page to be switched is replaced with the second application page corresponding to the second page resource, so that the electronic device displays the second application page; In response to a sliding operation on the second application page, obtaining a second screenshot of the second application page; the sliding operation is used to indicate switching from the second application page to the first application page; According to the second screenshot and the first screenshot, displaying on the electronic device a hand-following movement diagram of switching from the second application page to the first application page, wherein the hand-following movement diagram is an image that gradually moves from displaying the second screenshot to displaying the first screenshot based on a sliding gesture; After the hand-movement diagram is displayed, the electronic device displays the first application page.

2. The method according to claim 1, It is characterized in that Before establishing the first page resource of the first application page, the method further includes: Determine whether the first application page is a main application page; the main application page is an application page with a resource quantity greater than a preset threshold; The step of establishing the first page resource of the first application page includes: If the first application page is a main application page, creating a first page resource of the first application page through an asynchronous task; The taking a screenshot of the first application page based on the first page resource to obtain the first screenshot includes: The first application page is screenshotted using the first page resource through the asynchronous task to obtain the first screenshot; the first screenshot is saved in a preset file; the preset file is used to store screenshots of the main application page.

3. The method according to any one of claims 1 to 2, It is characterized in that After the hand-following movement graph is displayed, the electronic device displays the first application page, including: After the hand-following movement graph is displayed, determining a hand-following distance corresponding to the sliding operation; the hand-following distance is a sliding distance based on the sliding operation; When the hand-following distance is greater than or equal to a preset distance, the electronic device displays the first application page.

4. The method according to any one of claims 1 to 2, It is characterized in that After the hand-following movement graph is displayed, displaying the first application page on the electronic device includes: After the hand-following movement graph is displayed, the hand-off speed corresponding to the sliding operation is determined; the hand-off speed is determined according to the hand-following distance, hand-following time and hand-off time corresponding to the sliding operation; the hand-off speed is used to characterize the speed of the sliding operation from the hand-following time to the hand-off time; When the hand-off speed is greater than a preset hand-off speed, the electronic device displays the first application page.

5. The method according to claim 1, It is characterized in that After the hand-following movement graph is displayed, the electronic device displays the first application page, including: After the hand-following movement diagram is displayed, a transition effect of switching from the second application page to the first application page is displayed; wherein the transition effect is generated based on the transition effect mask, the second screenshot and the first screenshot; After the preset transition effect is displayed, the second screenshot is removed, and a first page resource of the first application page is created; After the first page resource is created, the first screenshot is removed, and the first application page is displayed on the electronic device based on the first page resource.

6. The method according to claim 5, It is characterized in that The electronic device further supports displaying a third application page. Before establishing a first page resource of the first application page, the method further includes: Determine whether the third application page is a main application page; the main application page is an application page whose number of resources is greater than a preset threshold; the third application page is an application page displayed by the electronic device before the electronic device displays the first application page and the second application page; If the third application page is the main application page, obtaining a pre-stored third screenshot of the third application page; If the third application page is not the main application page, a third page resource of the third application page is established; based on the third page resource, a screenshot of the third application page is taken to obtain the third screenshot; the third screenshot is saved, and the third page resource is cleared.

7. The method according to claim 5, It is characterized in that Before displaying the transition effect of switching from the second application page to the first application page, the method further includes: Determining whether the first application page includes a dynamic effect; If the first application page includes a dynamic effect, the dynamic effect is intercepted and displayed; and after the preset transition effect is executed, the dynamic effect is displayed.

8. The method according to claim 1, It is characterized in that The electronic device is further configured with a status bar; the method further comprises: In response to a sliding operation on the second application page, acquiring a second parameter of a second status bar of the second application page; Acquire a first parameter of a first status bar when the electronic device displays the first application page; Determining whether the first parameter and the second parameter are consistent; If the first parameter and the second parameter are inconsistent, obtaining a second screenshot of the second application page includes: Acquire a second combined screenshot of the second application page and the second status bar; the second combined screenshot includes an image captured of the second status bar and the second screenshot; The method of displaying, on the electronic device, a hand-following movement diagram of switching from the second application page to the first application page based on the second screenshot and the first screenshot, wherein the hand-following movement diagram is an image that gradually moves from displaying the second screenshot to displaying the first screenshot based on the sliding gesture, includes: According to the second combined screenshot and the first combined screenshot, displaying on the electronic device a hand-following movement diagram of switching from the second application page and the second status bar to the first application page and the first status bar, wherein the hand-following movement diagram is an image that gradually moves from displaying the second combined screenshot to displaying the first combined screenshot based on the sliding gesture; The first combined screenshot is an image captured of the first application page and the first status bar when the displayed content of the electronic device is switched from the first application page and the first status bar to the currently displayed second application page and the second status bar before the electronic device is triggered by the sliding operation; After the hand-following movement diagram is displayed, the first application page and the first status bar are displayed on the electronic device.

9. The method according to claim 1, It is characterized in that The first application page and the second application page are application pages that are managed by a dual stack structure; the stack linked list corresponding to the dual stack structure is used to perform a pop operation or a push operation on a first node of the first application page and a second node of the second application page; After the electronic device displays the second application page, the method further includes: In response to a sliding operation applied to the electronic device, a pop operation is performed on the second node in the stack linked list.

10. The method according to claim 1, It is characterized in that The electronic device further includes a pre-storage buffer and a rolling buffer, and the method further includes: Before the electronic device is triggered by the sliding operation, when the displayed content of the electronic device switches from the first application page to the currently displayed second application page, the second screenshot is stored in the scrolling buffer, and the first screenshot is stored in the pre-stored buffer.

11. An electronic device, It is characterized in that include: Display, processor and memory; The display screen is used to display different application pages; Wherein, one or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the electronic device executes the application page switching method as described in any one of claims 1-10.

12. A computer storage medium, It is characterized in that It includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the application page switching method as described in any one of claims 1 to 10.

13. A computer program product, It is characterized in that When the computer program product runs on a computer, the computer executes the application page switching method according to any one of claims 1 to 10.