Task migration system and method

The task migration system simplifies task management across devices by allowing users to view and manage historical tasks seamlessly, enhancing user experience through efficient data stream migration and device compatibility.

JP7750993B2Active Publication Date: 2025-10-07HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023572703
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-11-23
Filing Date
2022-05-17
Publication Date
2025-10-07
Estimated Expiration
2042-05-17

AI Technical Summary

Technical Problem

The process of users viewing and transferring tasks between different devices is complicated and not user-friendly, leading to a poor user experience.

Method used

A task migration system and method that allows users to view and manage historical tasks on one device without application adaptation, aligning with user habits and enhancing the user experience by displaying task cards and enabling seamless transitions between devices.

Benefits of technology

Improves user experience by simplifying task management across devices, supporting efficient application data stream migration, and ensuring compatibility with different device configurations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007750993000001
    Figure 0007750993000001
  • Figure 0007750993000002
    Figure 0007750993000002
  • Figure 0007750993000003
    Figure 0007750993000003
Patent Text Reader

Abstract

The present application provides a task transition system and method. The system includes a first terminal and a second terminal. The second terminal runs a first application. After receiving an operation performed by a user, the first terminal opens a recent task interface including an identifier of the second terminal, and after receiving an operation performed by the user on the identifier of the second terminal, displays at least one task card corresponding to the application performed by the second terminal in the background in the recent task interface, and after receiving an operation performed by the user on the first task card corresponding to the first application, runs the first application and displays a first user interface of the first application. After displaying the first user interface and receiving the operation performed by the user in the first user interface, the first terminal displays a parent interface or a sub-interface of the first user interface instead of displaying a home screen of the first terminal device. This is compatible with the user's usage habits, is user-friendly, helps the user to perform subsequent operations, and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application is a continuation of Chinese Patent Application No. 202111396815.2, entitled "TASK MIGRATION SYSTEM AND METHOD," filed with the State Intellectual Property Office of the People's Republic of China on November 23, 2021; Chinese Patent Application No. 202110614232.6, entitled "REMOTE DEVICE TASK INFORMATION TRANSMISSION METHOD AND APPARATUS," filed with the State Intellectual Property Office of the People's Republic of China on June 2, 2021; Chinese Patent Application No. 202110583391.4, entitled "REMOTE DEVICE TASK INFORMATION SYNCHRONIZATION METHOD AND APPARATUS," filed with the State Intellectual Property Office of the People's Republic of China on May 27, 2021; and Chinese Patent Application No. 202110583391.4, entitled "REMOTE DEVICE TASK DISPLAY AND CONTROL SYSTEM AND APPARATUS," filed with the State Intellectual Property Office of the People's Republic of China on September 9, 2021. This application claims priority to Chinese Patent Application No. 202111057294.8 entitled "APPLICATION DATA STREAM TRANSMISSION METHOD AND ELECTRONIC DEVICE," filed with the State Intellectual Property Office of China on June 1, 2021, Chinese Patent Application No. 202110611184.5 entitled "APPLICATION DATA STREAM TRANSMISSION METHOD AND ELECTRONIC DEVICE," filed with the State Intellectual Property Office of China on June 2, 2021, Chinese Patent Application No. 202110616969.1 entitled "TASK MIGRATION METHOD AND RELATED DEVICE," filed with the State Intellectual Property Office of China on June 2, 2021, and Chinese Patent Application No. 202110615954.3 entitled "LOCAL LOCK-BASED CROSS-DEVICE TASK EXECUTION SYSTEM AND METHOD," filed with the State Intellectual Property Office of China on June 2, 2021, all of which applications are incorporated herein by reference in their entireties.

[0002] [Technical field]

[0003] The present application relates to the field of terminal technology, and in particular to a task migration system and method. [Background technology]

[0004] For a terminal such as a mobile phone or tablet computer currently being used by a user, the user can typically slide up from the bottom of the touch screen of the terminal or tap a "multitasking" button to enter the terminal's recent task interface. In the recent task interface, the user can query and manage recently used applications on the terminal and other devices.

[0005] However, in the current technical solutions, the process of users viewing task cards on remote devices and transferring tasks between different devices is complicated and not user-friendly, resulting in a poor user experience. Summary of the Invention

[0006] The present application provides a task migration system and method that allows a user to view and manage the historical tasks of another device on one device, which can be applied to almost any application without the need for application adaptation, meets the user's requirements for managing and controlling multi-device tasks, conforms to the user's usage habits, is user-friendly, helps the user perform subsequent operations, and improves the user experience.

[0007] According to a first aspect, a task transition system is provided, the system including a first terminal and a second terminal, the second terminal configured to execute a first application and, when a first user interface of the first application is displayed, switch the first application to execute in the background, the first terminal receiving task information from the second terminal, the task information including information about the application executed in the background by the second terminal, receiving a first operation from a user, and opening a recent tasks interface based on the first operation, the recent tasks interface including a control, the control including an identifier of the second terminal, and opening in response to the second operation executed by the user on the identifier of the second terminal. In response, the terminal is configured to: display at least one task card in the recent tasks interface corresponding to applications executed in the background by the second terminal, the at least one task card including a first task card corresponding to the first application; execute the first application and display a first user interface in response to a third operation performed by the user on the first task card; and display a second user interface in response to a fourth operation performed by the user in the first user interface, the fourth operation being a back operation and the second user interface being a parent user interface of the first user interface.

[0008] According to the task migration system provided in the first aspect, when a first application of a second terminal is migrated to a first terminal, the first terminal displays a first user interface of the first application. After receiving an operation performed by a user in the first user interface, the first terminal displays a parent interface or a sub-interface of the first user interface instead of displaying the home screen of the first terminal device. This is in line with the user's usage habits, is user-friendly, helps the user perform subsequent operations, and improves the user experience.

[0009] In a possible implementation of the first aspect, the first terminal is further configured to display a second task card corresponding to a recently executed application of the first terminal in the recent task interface, and to stop displaying the second task card in response to a second operation.

[0010] In a possible implementation of the first aspect, the second terminal is further configured to: segment an application data stream of a first application into a plurality of segment data; determine an index table corresponding to the plurality of segment data, where the index table indicates a storage path and an order relationship of the plurality of segment data in a distributed file system of the second terminal; transmit the plurality of segment data to the first terminal in a multi-thread parallel transmission manner; and transmit the index table to the first terminal. The first terminal is further configured to restore the application data stream of the first application based on the received plurality of segment data and the index table; and, after receiving a third operation, execute the first application based on the third operation and the application data stream of the first application. In this implementation, in the process of migrating application data between terminals, the application data stream is segmented, an index table for the segment data is established, the segment data is transmitted in parallel through multiple threads in the distributed file system, and the index table is transmitted to the peer terminal. The peer terminal restores the application data based on the received segment data and index table. In this way, the migration of application data streams of at least 200 KB can be supported, the efficiency of application data stream migration is improved, and the user experience is enhanced.

[0011] In a possible implementation of the first aspect, the at least one task card further includes a third task card corresponding to a first screen snapshot of a home screen of the second terminal, wherein at least one of a feature capability (FA) card, a floating window, and a floating bubble is present on the third task card, and the first terminal is further configured to display the task card of the second terminal in a single row or multiple rows in a recent tasks interface of the first terminal based on one of the second terminal's use of landscape mode, portrait mode, portrait mode with the folding screen unfolded, landscape mode with the folding screen unfolded, landscape mode with the folding screen folded, and portrait mode with the folding screen folded. In this implementation, the at least one task card is displayed in a single row or multiple rows in the recent tasks interface of the first terminal based on a state of use of the second terminal by the user, a state of use of the first terminal by the user, and a screen size of the first terminal. This can improve the task card display efficiency of the second terminal, help the user view and manage the history tasks of another device on the device, and improve the user experience.

[0012] In a possible implementation form of the first aspect, the first terminal is further configured to execute the first application based on the hardware capabilities of the first terminal, or to execute the first application based on the hardware capabilities of the second terminal, or to execute the first application based on the hardware capabilities of the first terminal and the hardware capabilities of the second terminal. In this implementation form, the flexibility in using the hardware capabilities when the first terminal executes the first application can be improved, and the efficiency of executing the first application by the first terminal can be ensured.

[0013] According to a second aspect, a task migration method is provided. The method is applied to a first terminal and includes the steps of receiving task information from a second terminal, the task information including information about an application executed in the background by the second terminal; receiving a first operation from a user; and opening a recent tasks interface based on the first operation, the recent tasks interface including a control, the control including an identifier of the second terminal; in response to a second operation performed by the user on the identifier of the second terminal, displaying at least one task card in the recent tasks interface corresponding to an application executed in the background by the second terminal, the at least one task card including a first task card corresponding to the first application executed in the background by the second terminal; in response to a third operation performed by the user on the first task card, executing the first application and displaying a first user interface of the first application; and in response to a fourth operation performed by the user on the first user interface, displaying a second user interface, the fourth operation being a back operation and the second user interface being a parent user interface of the first user interface.

[0014] According to a task migration method provided in a second aspect, when a first application of a second terminal is migrated to a first terminal, the first terminal displays a first user interface of the first application. After receiving an operation performed by a user on the first user interface, the first terminal displays a parent interface or a sub-interface of the first user interface instead of displaying the home screen of the first terminal device. This is in line with the user's usage habits, is user-friendly, helps the user perform subsequent operations, and improves the user experience.

[0015] In a possible implementation form of the second aspect, the method further includes displaying, in the recent tasks interface, a second task card corresponding to a recently executed application of the first terminal.

[0016] In a possible implementation of the second aspect, the control further includes an identifier of the first terminal, and the method further includes, before displaying the second task card in the recent tasks interface, the first terminal receiving an operation performed by the user on the identifier of the first terminal.

[0017] In a possible implementation of the second aspect, the method further includes, before the second operation, the first terminal displaying a second task card in a recent task interface, and after the second operation, the first terminal stopping displaying the second task card.

[0018] In a possible implementation form of the second aspect, the method further includes, after the second operation, the first terminal continuing to display the second task card in the recent tasks interface.

[0019] In a possible implementation form of the second aspect, before the first terminal device displays the first user interface, the method further includes a step of receiving a task stack transmitted by the second terminal device, the task stack including a first activity record and a second activity record, the first activity record including interface data of the first user interface and user data of the first user interface, and the second activity record including interface data of the second user interface and user data of the second user interface. In this implementation form, the first terminal device may restore a user interface that was once opened based on the task stack and display it on the second terminal device.

[0020] In a possible implementation form of the second aspect, the first activity record and the second activity record are stored adjacent to each other in a task stack, the first activity record is read by the first terminal device before the second activity record is read, and before the first terminal device displays the first user interface, the method further includes generating the first user interface based on interface data of the first user interface and storing a state of the first user interface based on the user data of the first user interface, and before the first terminal device displays the second user interface, the method further includes generating the second user interface based on interface data of the second user interface and storing a state of the second user interface based on the user data of the second user interface. In this way, the first terminal device can first restore the first user interface based on information stored in the task stack and further store a user's usage state of the first user interface, and when the user performs a back operation, the first terminal device can restore the second user interface and further store a user's usage state of the second user interface.

[0021] In a possible implementation of the second aspect, the method further includes the steps of receiving, in a multi-thread parallel receiving manner, a plurality of segment data transmitted by a second terminal, the plurality of segment data being obtained by segmenting an application data stream of a first application; receiving an index table transmitted by the second terminal, the index table indicating a storage path and an order relationship of the plurality of segment data in a distributed file system of the second terminal; restoring the application data stream of the first application based on the received plurality of segment data and the index table; and, after a third operation is detected, executing the first application based on the third operation and the application data stream of the first application. In this implementation, in the process of migrating application data between terminals, the application data stream is segmented, an index table for the segment data is established, the segment data is transmitted in parallel through multiple threads in the distributed file system, and the index table is transmitted to the peer terminal. The peer terminal restores the application data based on the received segment data and the index table. In this manner, migration of an application data stream of at least 200 KB can be supported, improving application data stream migration efficiency and enhancing user experience.

[0022] In a possible implementation form of the second aspect, the amount of data for each of the multiple segment data is fixed, and / or the index table includes message header information corresponding to each of the multiple segment data, and the message header information corresponding to each segment data includes a correspondence between the segment number and the segment data path of each segment data, and length information, start identifier information, and end identifier information of each segment data.

[0023] In a possible implementation of the second aspect, the method further includes receiving a fifth operation performed by a user, the fifth operation being used to trigger transmission of a first task instruction to the second terminal, the first task instruction instructing the second terminal to clear the first application; transmitting first information to the second terminal, the first information including information related to the first task instruction; and attempting to hold a second local lock based on the first task instruction, the second local lock being used to ensure that the first application on the second terminal executes task instructions from only one device at a time, the second local lock being able to be held by only one device at a time. In this implementation, it is ensured that the target device (the second terminal) executes task instructions from only one device at a time, avoiding conflicts between multiple cross-device tasks, solving instability problems in cross-device task scenarios, and improving the user experience.

[0024] In a possible implementation of the second aspect, the method further includes a step of attempting to hold a first local lock of the first terminal based on the first task command, the first local lock being used to ensure that the first terminal can send one task command to only one device at a time, the first local lock being held by only one device at a time, and the first terminal successfully holding the first local lock. In this implementation, since the first terminal has successfully held the first local lock corresponding to the task command, it is proven that the first terminal is not currently sending another cross-device task command to the second terminal, i.e., the task command may occupy the first local lock, which can ensure that task commands sent by the first terminal to the second terminal do not conflict and can improve the efficiency and success rate of sending task commands.

[0025] In a possible implementation form of the second aspect, the at least one task card further includes a third task card corresponding to a first screen snapshot of a home screen of the second terminal, and at least one of a feature capability (FA) card, a floating window, and a floating bubble is present on the third task card, and the method further includes, when the task card of the second terminal is displayed in the recent tasks interface of the first terminal, the first terminal displays the task card of the second terminal in a single row or multiple rows in the recent tasks interface of the first terminal based on any one of the second terminal's use of landscape mode, use of portrait mode, use of portrait mode with the folding screen unfolded, use of landscape mode with the folding screen unfolded, use of landscape mode with the folding screen folded, and use of portrait mode with the folding screen folded. In this implementation, at least one task card is displayed in a single row or multiple rows in the recent tasks interface of the first terminal based on the user's usage of the second terminal, the user's usage of the first terminal, and the screen size of the first terminal, which can improve the efficiency of displaying task cards on the second terminal, help the user view and manage the history tasks of another device on the device, and improve the user experience.

[0026] In a possible implementation form of the second aspect, the method further includes: executing the first application based on a hardware capability of the first terminal; or executing the first application based on a hardware capability of the second terminal; or executing the first application based on a hardware capability of the first terminal and a hardware capability of the second terminal. In this implementation form, the flexibility of the first application being executed by the first terminal can be increased, and the efficiency of the first application being executed by the first terminal is guaranteed.

[0027] According to a third aspect, a task transition system is provided, the system including a first terminal and a second terminal, the second terminal configured to execute a first application, the first terminal configured to: receive a sixth operation from a user; display a third user interface based on the sixth operation, the third user interface including a control, the control including an identifier of the second terminal; display a fourth user interface in response to a seventh operation performed by the user on the identifier of the second terminal, the fourth user interface including a home screen application identifier of the second terminal; and execute the first application in response to an eighth operation performed by the user on an identifier of the first application within the home screen application identifier of the second terminal.

[0028] According to the task transition system provided in the third aspect, a home screen application of another device may be displayed on the first terminal, and a super home screen function may be implemented on the first terminal so that a user can operate and manage the home screen application of the other device on the first terminal, which is user-friendly and improves the user experience.

[0029] In a possible implementation form of the third aspect, the first terminal is further configured to receive a ninth operation performed by a user on a home screen application identifier of the second terminal, where the ninth operation includes at least one of sorting the home screen applications, creating a folder, and deleting a home screen application, and to display the home screen application identifier of the second terminal after the ninth operation, and the second terminal is further configured to display the home screen application identifier of the second terminal after the ninth operation. In this implementation form, the user can manage the home screen applications of the second terminal on the first terminal. This facilitates user operation, is user-friendly, and improves the user experience.

[0030] In a possible implementation form of the third aspect, the first terminal is further configured to display the first application in a floating window, a split screen, or a full screen. This implementation form improves the flexibility of displaying the second application by the first terminal and improves the user experience.

[0031] According to a fourth aspect, there is provided a task transition method, the method being applicable to a first terminal, including: receiving a sixth operation from a user; displaying a third user interface based on the sixth operation, the third user interface including a control, the control including an identifier of the second terminal; displaying a fourth user interface in response to a seventh operation performed by the user on the identifier of the second terminal, the fourth user interface including a home screen application identifier of the second terminal; and executing the first application in response to an eighth operation performed by the user on an identifier of the first application in the home screen application identifier of the second terminal.

[0032] Task transition provided in the fourth aspectmethod According to the present invention, a home screen application of another device may be displayed on the first terminal, and a super home screen function may be implemented on the first terminal so that a user can operate and manage the home screen application of the other device on the first terminal, which is user-friendly and improves the user experience.

[0033] In a possible implementation form of the fourth aspect, the method further includes a step of receiving a ninth operation performed by a user on a home screen application identifier of the second terminal, where the ninth operation includes at least one of sorting the home screen applications, creating a folder, and deleting a home screen application, and a step of displaying the home screen application identifier of the second terminal after the ninth operation.

[0034] In a possible implementation of the fourth aspect, the method further includes displaying the second application in a floating window, split screen, or full screen.

[0035] In a possible implementation of the fourth aspect, the method further includes displaying the home screen application identifier of the second terminal in a home screen application layout format of the second terminal, or displaying the home screen application identifier of the second terminal in a home screen application layout format of the first terminal. This implementation improves the flexibility of displaying home screen applications of another terminal by the first terminal, and improves the user experience.

[0036] According to a fifth aspect, a task transition system is provided. The system includes a first terminal and a second terminal, and the method includes the first terminal displaying a recent tasks interface. An icon and at least one task card of the second terminal are displayed in the recent tasks interface. When the task card of the second terminal is displayed in the recent tasks interface of the first terminal, the task card of the second terminal is laid out in the recent tasks interface of the first terminal based on a usage state of the second terminal by the user. The usage state of the second terminal by the user includes any one of a landscape mode usage state, a portrait mode usage state, a portrait mode usage state with a folding screen unfolded, a landscape mode usage state with a folding screen unfolded, a landscape mode usage state with a folding screen folded, and a portrait mode usage state with a folding screen folded.

[0037] According to a task migration system provided in a fifth aspect, the task card of the second terminal is displayed in a single row or multiple rows in the recent task interface of the first terminal based on the user's usage status of the second terminal, the user's usage status of the first terminal, and the screen size of the first terminal. This can improve the efficiency of displaying the task card of the second terminal, help the user view and manage the history tasks of another device on the device, and improve the user experience.

[0038] For example, the first terminal or the second terminal may include a mobile phone, a large screen device, a tablet computer, a PC, an in-vehicle infotainment system, a foldable screen device, etc.

[0039] In a possible implementation form of the fifth aspect, when a task card of the second terminal is displayed in a recent task interface of the first terminal, the task card of the second terminal includes a task card of a first screen snapshot of a home screen of the second terminal. In this implementation form, the home screen snapshot of the second terminal may be displayed in the recent task interface of the first terminal to facilitate user browsing and improve the user experience.

[0040] In a possible implementation form of the fifth aspect, at least one of an FA card, a floating window, and a floating bubble is present on the task card of the first screen snapshot of the home screen of the second terminal and / or the task card of the second screen snapshot of the home screen of the second terminal. In this implementation form, the home screen snapshot of the second terminal may display the FA card, the floating window, or the floating bubble to flexibly display the task card of the second terminal in different manners in the recent task interface of the first terminal, thereby improving the user experience.

[0041] In a possible implementation form of the fifth aspect, the first terminal receives a third operation performed by a user on the FA card, the floating window, or the floating bubble, and displays a first screen interface of a home screen of the second terminal based on the third operation. Su The device is further configured to display on the first terminal or execute on the first terminal an application corresponding to the FA card, floating window, or floating bubble. In this implementation, a user can perform an operation on the FA card, floating window, or floating bubble on a home screen snapshot of the second terminal to quickly display or open an application on the second terminal. In this way, the operation is simple and the user experience is improved.

[0042] In a possible implementation form of the fifth aspect, when a task card of the second terminal is displayed in a recent task interface of the first terminal, the task card of the second terminal includes a snapshot of a control device configured to control the second terminal. In this implementation form, a task card related to the second terminal may be flexibly displayed in the recent task interface of the first terminal, thereby improving the user experience.

[0043] In a possible implementation form of the fifth aspect, the first terminal is further configured to receive a fourth operation performed by the user on the snapshot of the control device, and display a detailed interface of the control device on the first terminal or remotely control the second terminal based on the fourth operation. In this implementation form, the user can view a task card of the control device that controls the second device on the first terminal and perform an operation on the task card to quickly control the second terminal device on the first terminal. In this way, the operation is simple and the user experience is improved.

[0044] For example, the second terminal is a large screen device and the control device is a remote control.

[0045] In a possible implementation form of the fifth aspect, when a task card of the second terminal is displayed in a recent task interface of the first terminal, the task card of the second terminal includes a task card of a home screen application of the second terminal.

[0046] In a possible implementation form of the fifth aspect, the first terminal is further configured to receive a fifth operation performed by a user on an application on a task card of the home screen application of the second terminal, and manage the home screen application of the second terminal on the first terminal based on the fifth operation. In this implementation form, the user can view the home screen application icon of the second terminal on the first terminal and perform an operation on the home screen application icon to help the second terminal manage the applications (such as sorting applications, creating folders, deleting applications, etc.), thereby quickly helping the second terminal manage the applications on the first terminal. In this way, the operation is simple and the user experience is improved.

[0047] In a possible implementation form of the fifth aspect, the system further includes a lightweight device, where the lightweight device includes a wearable device and a smart home device used by the user, and when the task cards of the lightweight device are displayed in a recent task interface of the first terminal, the task cards include task cards corresponding to ongoing tasks of different lightweight devices, respectively. In this implementation form, the task cards of the lightweight device may be displayed in the recent task interface of the first terminal to enrich the types of task cards displayed in the recent task interface of the first terminal. This is user-friendly.

[0048] For example, lightweight devices are a general term for devices such as IoT devices, wearable devices, smart home devices, etc. For example, lightweight devices may include smart refrigerators, smart air conditioners, smart wok, smart kitchen hoods, smart sound boxes, smart watches, etc.

[0049] In a possible implementation form of the fifth aspect, the first terminal is further configured to receive a sixth operation performed by a user on a task card of the device, and to display a detailed interface of the ongoing task of the lightweight device on the first terminal based on the sixth operation, or to remotely control the ongoing task of the lightweight device. In this implementation form, the user can view a task card corresponding to the ongoing task of the associated lightweight device on the first terminal, and perform an operation on the card corresponding to the ongoing task of the lightweight device to remotely control the ongoing task of the lightweight device. In this way, the operation is simple, and the user experience is improved.

[0050] In a possible implementation of the fifth aspect, the system further includes a third terminal, wherein the first terminal is further configured to receive a seventh operation performed by the user on the task card of the lightweight device and share the task card of the lightweight device with the third terminal based on the seventh operation, and the third terminal displays the task card of the lightweight device in a recent task interface. In this implementation, the task card of the lightweight device can be pushed to the third terminal for display, thereby allowing the user to control ongoing tasks of the lightweight device on the third terminal and improving the user experience.

[0051] In a possible implementation of the fifth aspect, the first lightweight device is further configured to: display a task card corresponding to an ongoing task of the second lightweight device on a display interface of the first lightweight device; receive an eighth operation performed by a user on the task card corresponding to the ongoing task of the second lightweight device; and remotely control the ongoing task of the second lightweight device based on the eighth operation. In this implementation, a user can remotely control the ongoing task of another lightweight device on the lightweight device. In this way, the operation is simple and the user experience is improved.

[0052] In a possible implementation form of the fifth aspect, the first lightweight device is further configured to authenticate the identity of a user by using the first lightweight device and / or a device associated with the first lightweight device, and after successful authentication of the user's identity, display task cards of the first terminal and / or the second terminal on a display interface of the first lightweight device.

[0053] According to a sixth aspect, a task transition method is provided. The method is applied to a first terminal, and includes the first terminal displaying a recent tasks interface. An icon and at least one task card of a second terminal are displayed in the recent tasks interface, and the N devices include the first terminal and the second terminal. When the task card of the second terminal is displayed in the recent tasks interface of the first terminal, the task card of the second terminal is displayed in a single row or multiple rows in the recent tasks interface of the first terminal based on one of the second terminal's use of landscape mode, portrait mode, portrait mode with a foldable screen in an unfolded state, landscape mode with a foldable screen in an unfolded state, landscape mode with a foldable screen in a folded state, and portrait mode with a foldable screen in a folded state.

[0054] According to a task migration method provided in a sixth aspect, the task card of the second terminal is displayed in a single row or multiple rows in the recent task interface of the first terminal based on the user's usage status of the second terminal, the user's usage status of the first terminal, and the screen size of the first terminal, which can improve the efficiency of displaying the task card of the second terminal, help the user view and manage the history tasks of another device on the device, and improve the user experience.

[0055] In a possible implementation form of the sixth aspect, the task card of the second terminal includes a task card of a first screen snapshot of a home screen of the second terminal and a task card of a second screen snapshot of a home screen of the second terminal.

[0056] In a possible implementation form of the sixth aspect, at least one of a feature capability (FA) card, a floating window, and a floating bubble is present on a task card of a first screen snapshot of a home screen of the second terminal and / or a task card of a second screen snapshot of a home screen of the second terminal.

[0057] In a possible implementation form of the sixth aspect, the method further includes: task cards of the lightweight devices are displayed in a recent task interface of the first terminal, and the task cards of the lightweight devices include task cards respectively corresponding to ongoing tasks of different lightweight devices. The lightweight devices include wearable devices and smart home devices used by the user.

[0058] In a possible implementation form of the sixth aspect, when the source device corresponding to the first application is a second terminal, and in a process of migrating the first application to the first terminal for execution, the method further includes: the first terminal determines an execution state of the first application based on different modes in which the first application is migrated to the first terminal. The different modes in which the first application is migrated to the first terminal include a duplication mode, a migration mode based on window projection technology, and a migration mode based on feature capability (FA) technology.

[0059] In a possible implementation form of the sixth aspect, when the source device corresponding to the second application is a first terminal and in a process of the second application being migrated to the second terminal for execution, the method further includes the first terminal releasing hardware capacity of the first terminal occupied by the second application, or the first terminal not releasing hardware capacity of the first terminal occupied by the second application.

[0060] According to a seventh aspect, there is provided a task migration method, the method being applied to a first terminal, the method including: opening a recent task interface, the task interface including a first task card corresponding to a first application, the first application being an application executed in the background by a second terminal; and receiving a first operation performed by a user on the first task card, and instructing the second terminal to perform a second operation corresponding to the first operation on the first application.

[0061] According to the task transition method provided in the seventh aspect, a user of a first terminal can perform a first operation on a task card in a recent task interface to instruct a second terminal to perform a corresponding second operation on an application corresponding to the task card, thereby enabling the user to control recently used applications of the second terminal and improving the user experience.

[0062] In a possible implementation form of the seventh aspect, the step of receiving a first operation performed by a user on a first task card and instructing a second terminal to perform a second operation corresponding to the first operation on a first application specifically includes the step of receiving a slide-up operation performed by the user on the first task card and instructing the second terminal to clear the first application. After the second terminal clears the first application, the first terminal stops displaying the first task card in the recent task interface.

[0063] In a possible implementation form of the seventh aspect, the recent task interface further includes a first control indicating the first terminal and a second control indicating the second terminal, and the step of receiving a first operation performed by the user on the first task card and instructing the second terminal to perform a second operation corresponding to the first operation on the first application specifically includes receiving an operation by the user of dragging the first task card to the first control and instructing the second terminal to transfer the first application to the first terminal, wherein the first terminal executes the first application.

[0064] In a possible implementation form of the seventh aspect, the first terminal recently runs a second application, and in a recent task interface, a user of the first terminal drags a task card of the second application to a second control to transfer the second application to the second terminal.

[0065] In a possible implementation form of the seventh aspect, the step of receiving a first operation performed by a user on a first task card and instructing a second terminal to perform a second operation corresponding to the first operation on a first application includes a step of receiving an operation by a user dragging the first task card to a second control and instructing the second terminal to run the first application in the foreground.

[0066] According to an eighth aspect, there is provided a task migration method, the method including: a first terminal obtaining an application data stream to be transmitted; the first terminal segmenting the application data stream into a plurality of segment data and determining an index table corresponding to the plurality of segment data, where the index table indicates a storage path and an order relationship of the plurality of segment data in a distributed file system of the first terminal; the first terminal transmitting the plurality of segment data to a second terminal in a multi-thread parallel transmission manner; and the first terminal transmitting the index table to the second terminal.

[0067] According to the task migration method provided in the eighth aspect, in the process of migrating application data between terminals, the application data stream is segmented, an index table for the segment data is established, the segment data is transmitted in parallel through multiple threads in a distributed file system, and the index table is transmitted to a peer terminal. The peer terminal restores the application data based on the received segment data and index table. In this way, the migration of an application data stream of at least 200 KB can be supported, improving the efficiency of application data stream migration and the user experience.

[0068] In a possible implementation form of the eighth aspect, the first terminal segmenting the application data stream into multiple segment data includes the first terminal determining an amount of segments based on a total amount of threads included in a thread pool of the first terminal, and the first terminal segmenting the application data stream into multiple segment data based on the amount of segments.

[0069] For example, the total number of threads included in the thread pool of the first terminal may be determined to be the number of segments. In other words, the number of segments may be the same as the total number of threads included in the thread pool. Alternatively, the number of segments may be determined based on the total number of threads included in the thread pool. In other words, the number of segments may be different from the total number of threads included in the thread pool.

[0070] For example, if the total amount of threads contained in the thread pool may be twice the amount of cores of the CPU of the first terminal, the amount of segments is also twice the amount of cores of the CPU of the first terminal.

[0071] In a possible implementation form of the eighth aspect, if the value of the byte stream is 200 KB or more, the first terminal segments the application data stream into multiple data. If the size of the byte stream is less than 200 KB, the first terminal writes the byte stream into a parcel for RPC transmission to send the byte stream to the second terminal.

[0072] In a possible implementation form of the eighth aspect, the amount of data in each of the multiple segment data is fixed. In this solution, the multiple segment data are transmitted in parallel via multiple threads rather than serially. The multiple segment data may be transmitted separately rather than collectively. A peer device may reconstruct data based on only partial received segment data, or may reconstruct data based on all received segment data. In other words, the segment data are transmitted in a parallel stream transmission manner. In this way, data transmission efficiency can be significantly improved.

[0073] In a possible implementation form of the eighth aspect, the index table includes message header information corresponding to each of the plurality of segment data. In this solution, the message header information corresponding to each segment data includes a correspondence between the segment number and the segment data path of each segment data, and length information, start identifier information, and end identifier information of each segment data. Information or content indicated by the message header field of the segment data is placed in the index table instead of the segment data.

[0074] In a possible implementation form of the eighth aspect, the first terminal transmitting the index table to the second terminal includes the first terminal transmitting the index table to the second terminal by writing the index table to a parcel for an RPC. In other words, the index table is transmitted in an RPC manner. The first terminal stores data of the index table by using an intent, and then writes the intent to a parcel for transmission.

[0075] In a possible implementation form of the eighth aspect, the index table may also be transmitted in the same manner as the segment data. For example, the index table may be segmented based on the amount of segments to obtain segment index table data, the segment index table data may be stored in a distributed file system, and the segment number and the segment index table data path index of each segment index table data may be established, and the index table may be transmitted to the second terminal by transmitting the segment index data in parallel through multiple threads.

[0076] In a possible implementation of the eighth aspect, the amount of data in the application data stream to be transmitted is 200 KB or more.

[0077] In a possible implementation form of the eighth aspect, the application data stream includes at least one of a data stream of a document editing application of the first terminal, a data stream of an audio application, a data stream of a video application, or a data stream of a recently executed application.

[0078] For example, a data stream of recently executed applications of the first terminal (ie, applications executed in the background by the first terminal) may be the recent task information of the first terminal.

[0079] For example, a recent task interface may be displayed on the first terminal. The recent task interface is an interface in the system UI that displays the terminal's recently executed tasks. When the first terminal is triggered to open the recent task interface, the display of the first terminal may display the terminal's recently executed tasks or recently executed applications (recent task information). The first terminal may transmit a data stream of the first terminal's recently executed applications (recent task information data stream) to the second terminal, and the user may view the first terminal's recently used applications on the second terminal or even clear the user's recently used applications of the second terminal.

[0080] According to a ninth aspect, there is provided a task migration method, the method including: a second terminal receiving, in a multi-thread parallel receiving manner, a plurality of segment data transmitted by a first terminal, where the plurality of segment data is obtained by segmenting an application data stream to be transmitted; a second terminal receiving, in a multi-thread parallel receiving manner, an index table transmitted by the first terminal, where the index table indicates a storage path and an order relationship of the plurality of segment data in a distributed file system of the second terminal; and a second terminal restoring, in accordance with the plurality of segment data and the index table, the application data stream.

[0081] According to a task migration method provided in a ninth aspect, in the process of migrating application data between terminals, the application data stream is segmented, an index table for the segment data is established, the segment data is transmitted in parallel through multiple threads in a distributed file system, and the index table is transmitted to a peer terminal. The peer terminal restores the application data based on the received segment data and index table. In this way, the migration of an application data stream of at least 200 KB can be supported, improving the efficiency of application data stream migration and enhancing the user experience.

[0082] In a possible implementation form of the ninth aspect, the amount of data in each of the plurality of segment data is fixed.

[0083] In a possible implementation form of the ninth aspect, the index table includes message header information corresponding to each of the plurality of segment data.

[0084] In a possible implementation form of the ninth aspect, the message header information corresponding to each segment data includes a correspondence between the segment number and the segment data path of each segment data, and length information, start identifier information, and end identifier information of each segment data.

[0085] In a possible implementation form of the ninth aspect, when the application data stream is a data stream of a document editing application, restoring the application data stream based on the plurality of segment data and the index table by the second terminal includes, after receiving all the segment data, restoring the data stream of the document editing application based on the index table by the second terminal. In this solution, the second terminal can restore the document data only after all the segment data has been received.

[0086] In a possible implementation form of the ninth aspect, when the application data stream is an audio application data stream or a video application data stream, the second terminal restoring the application data stream based on the plurality of segment data and the index table includes, after receiving partial segment data, restoring the audio application data stream or the video application data stream based on the index table. In this solution, the second terminal can restore the data before all segment data is received and can start restoring the audio or video application data after receiving partial segment data. In other words, the second electronic device can restore the received segment data simultaneously with receiving the segment data. After restoring the audio or video application data, the user can obtain the current audio or video playback progress on the second terminal and start continuing playback.

[0087] In a possible implementation form of the ninth aspect, the application data stream includes at least one of a data stream of a document editing application of the first terminal, a data stream of an audio application, a data stream of a video application, or a data stream of a recently executed application.

[0088] According to a tenth aspect, a task migration system is provided. The system includes a first terminal and a second terminal, the first terminal and the second terminal being connected via a network. The first terminal is configured to: segment an application data stream to be transmitted into a plurality of pieces of data; determine an index table corresponding to the plurality of pieces of data, the index table indicating a storage path and an order relationship of the plurality of pieces of segment data in a distributed file system of the first terminal; transmit the plurality of pieces of segment data to the second terminal in a multi-threaded parallel transmission manner; and transmit the index table to the second terminal. The second terminal is configured to restore the application data stream based on the received plurality of pieces of segment data and the index table.

[0089] In a tenth aspect of the present invention, a task migration system is provided for migrating application data between terminals. The system segments the application data stream, establishes an index table for the segment data, transmits the segment data in parallel through multiple threads in a distributed file system, and transmits the index table to a peer terminal. The peer terminal restores the application data based on the received segment data and index table. This system can support the migration of application data streams of at least 200 KB, improving the efficiency of application data stream migration and enhancing user experience.

[0090] In a possible implementation form of the tenth aspect, the amount of data in each of the plurality of segment data is fixed.

[0091] In a possible implementation form of the tenth aspect, if the value of the byte stream is 200 KB or more, the first terminal segments the application data stream into multiple data. If the size of the byte stream is less than 200 KB, the first terminal writes the byte stream into a parcel for RPC transmission to send the byte stream to the second terminal.

[0092] In a possible implementation form of the tenth aspect, the index table includes message header information corresponding to each of the multiple segment data, and the message header information corresponding to each segment data includes a correspondence between the segment number and the segment data path of each segment data, and length information, start identifier information, and end identifier information of each segment data.

[0093] In a possible implementation form of the tenth aspect, the first terminal is further configured to transmit the index table to the second terminal by writing the index table into a parcel for a remote procedure call (RPC).

[0094] In a possible implementation of the tenth aspect, the application data stream includes at least one of a data stream of a document editing application of the first terminal, a data stream of an audio application, a data stream of a video application, or a data stream of a recently executed application (i.e., an application executed in the background).

[0095] According to an eleventh aspect, there is provided a task transition system. The system includes a first terminal and a second terminal, and a communication connection is established between the first terminal and the second terminal. The second terminal is configured to execute a first application. The first terminal is configured to receive a user interface option of a first user interface transmitted by the second terminal, the first user interface being a user interface of the first application, detect a first operation performed by a user on the user interface option of the first user interface, display the first user interface, detect a second operation performed by the user in the first user interface, and display a second user interface, the second user interface being a user interface of the first application and different from the first user interface.

[0096] According to the task transition system provided in the eleventh aspect, task transition can be performed between a first terminal and a second terminal, thereby allowing a user to perform a task on the second terminal on the first terminal, thereby improving the user experience.

[0097] In a possible implementation form of the eleventh aspect, the second operation is a back operation, and the second user interface is a parent user interface of the first user interface. In this way, a user can perform the same operation on the first terminal to realize the same user interface display sequence as that on the second terminal.

[0098] In a possible implementation form of the eleventh aspect, before the first terminal displays the first user interface, the first terminal is further configured to receive a task stack transmitted by the second terminal. The task stack includes a first activity record and a second activity record, where the first activity record includes interface data of the first user interface and user data of the first user interface, and the second activity record includes interface data of the second user interface and user data of the second user interface. In this way, the first terminal can restore and display a user interface that was once opened on the second terminal based on the task stack.

[0099] In a possible implementation form of the eleventh aspect, the first activity record and the second activity record are stored adjacent to each other in a task stack, the first activity record is read by the first terminal before the second activity record is read, the first terminal is further configured to generate the first user interface based on interface data of the first user interface and store a state of the first user interface based on the user data of the first user interface before the first terminal displays the first user interface, and the first terminal is further configured to generate the second user interface based on interface data of the second user interface and store a state of the second user interface based on the user data of the second user interface before the first terminal displays the second user interface. In this way, the first terminal can first restore the first user interface based on information stored in the task stack and further store a usage state of the first user interface by the user, and when the user performs a back operation, the first terminal can restore the second user interface and further store a usage state of the second user interface by the user.

[0100] In a possible implementation form of the eleventh aspect, before the first terminal detects a first operation performed by a user on a user interface option of the first user interface, the first terminal is further configured to display a third user interface. The third user interface includes a control and a user interface option of a recently executed application of the second terminal, the control including an identifier of the first terminal and an identifier of the second terminal, and the user interface option of the recently executed application of the second terminal including a user interface option of the first user interface. In this manner, the user can view the recently executed applications of the first terminal and the recently executed applications of the second terminal and can tap the user interface option of the recently executed application of the second terminal to display the first user interface on the first terminal.

[0101] In a possible implementation form of the eleventh aspect, before the first terminal displays the third user interface, the first terminal is further configured to: detect a third operation performed by a user, where the third operation instructs the first terminal to display the third user interface; and send a second request to the second terminal, where the second request instructs the second terminal to send to the first terminal a user interface snapshot captured by the system when the recently executed application runs in the background. In this way, if the user experience is guaranteed, traffic or power consumption caused by synchronizing recent task information can be reduced.

[0102] In a possible implementation form of the eleventh aspect, the first terminal is further configured to send a first request to the second terminal before receiving the task stack transmitted by the second terminal. The first request instructs the second terminal to transmit the task stack to the first terminal. In this way, traffic or power consumption caused by synchronizing recent task information can be reduced while ensuring a good user experience.

[0103] In a possible implementation form of the eleventh aspect, before the first terminal receives the user interface options of the first user interface transmitted by the second terminal, the first terminal is further configured to establish a trusted relationship with the second terminal, thereby protecting user privacy and improving security of the solution.

[0104] In a possible implementation of the eleventh aspect, the system further includes a third terminal, and the third terminal establishes a communication connection with the first terminal. The third terminal is configured to: receive a user interface option of a first user interface sent by the first terminal, the first user interface being a user interface of a first application; detect a first operation performed by a user on the user interface option of the first user interface; display the first user interface; detect a second operation performed by the user in the first user interface; and display a second user interface, the second user interface being a user interface of the first application and different from the first user interface. In this way, the first terminal can also perform task transfer to the third terminal in the same manner.

[0105] According to a twelfth aspect, a task transition method is provided. The method is applied to a first terminal and includes the first terminal receiving a user interface option of a first user interface transmitted by a second terminal. The first user interface is a user interface of a first application, and the first application is a recently executed application of the second terminal. The first terminal detects a first operation performed by a user on a user interface option of the first user interface. The first terminal displays the first user interface. The first terminal detects a second operation performed by the user in the first user interface. The first terminal displays a second user interface. The second user interface is a user interface of the first application and is different from the first user interface.

[0106] In a possible implementation form of the twelfth aspect, the first operation is a back operation, and the second user interface is a parent user interface of the first user interface.

[0107] In a possible implementation form of the twelfth aspect, before the first terminal displays the first user interface, the method includes the first terminal receiving a task stack transmitted by the second terminal, the task stack including a first activity record and a second activity record, the first activity record including interface data of the first user interface and user data of the first user interface, and the second activity record including interface data of the second user interface and user data of the second user interface.

[0108] In a possible implementation form of the twelfth aspect, the first activity record and the second activity record are stored adjacent to each other in a task stack, the first activity record is read by the first terminal before the second activity record, and before the first terminal displays the first user interface, the method further includes the first terminal generating the first user interface based on interface data of the first user interface and storing a state of the first user interface based on the user data of the first user interface, and before the first terminal displays the second user interface, the method further includes the first terminal generating a second user interface based on interface data of the second user interface and storing a state of the second user interface based on the user data of the second user interface.

[0109] In a possible implementation form of the twelfth aspect, before the first terminal detects a first operation performed by a user on a user interface option of the first user interface, the method further includes the first terminal displaying a third user interface, wherein the third user interface includes a control and a user interface option of a recently executed application of the second terminal, the control including an identifier of the first terminal and an identifier of the second terminal, and the user interface option of the recently executed application of the second terminal includes the user interface option of the first user interface.

[0110] In a possible implementation form of the twelfth aspect, before the first terminal displays the third user interface, the method further includes the first terminal detecting a third operation performed by a user. The third operation instructs the first terminal to display the third user interface. The first terminal sends a second request to the second terminal. The second request instructs the second terminal to send to the first terminal a user interface snapshot captured by the system when the recently executed application runs in the background.

[0111] In a possible implementation form of the twelfth aspect, the method further includes, before receiving the task stack transmitted by the second terminal, transmitting a first request from the first terminal to the second terminal, the first request instructing the second terminal to transmit the task stack to the first terminal.

[0112] In a possible implementation form of the twelfth aspect, before the first terminal displays the first user interface, the method further includes the first terminal establishing a trusted relationship with the second terminal.

[0113] According to a thirteenth aspect, a task migration method is provided. The method is applied to a second terminal, and includes receiving a second request sent by the first terminal by the second terminal. The second request instructs the second terminal to send to the first terminal a user interface snapshot captured by the system when a recently executed application runs in the background. The second terminal sends to the first terminal the user interface snapshot captured by the system when the recently executed application runs in the background.

[0114] In a possible implementation form of the thirteenth aspect, the method further includes receiving, by the second terminal, a first request transmitted by the first terminal. The first request instructs the second terminal to transmit a task stack to the first terminal. The second terminal transmits the task stack to the first terminal.

[0115] According to a fourteenth aspect, there is provided a task migration system. The system includes a first terminal, a second terminal, and a third terminal, the first terminal, the second terminal, and the third terminal being connected via a network. The first terminal is configured to: receive a first operation performed by a user, the first operation being used to trigger transmission of a first task instruction to the second terminal; send first information to the second terminal, the first information including information related to the first task instruction; and attempt to hold a second local lock based on the first task instruction, the second local lock being used to ensure that a first application on the second terminal only executes task instructions from one device at a time, and the second local lock can only be held by one device at a time. The third terminal is configured to receive a second operation performed by a user, the second operation being used to trigger transmission of a second task instruction to the second terminal; transmit second information to the second terminal, the second information including information related to the second task instruction; and attempt to hold a second local lock based on the second task instruction. The second terminal is configured to execute the task instruction transmitted by the terminal holding the second local lock. The first terminal or the second terminal holds the second local lock.

[0116] According to a task migration system provided in a fourteenth aspect, a local lock is created on an application of a target device, and the local lock can only be held by one other device at a time. If a specific device successfully holds the local lock, the application on the target device can execute a task from the device. During the period in which the device holds the local lock, the target device does not execute task instructions sent by another device, ensuring that the target device only executes task instructions from one device at a time, avoiding conflicts between multiple cross-device tasks, solving instability problems in cross-device task scenarios, and improving user experience.

[0117] In a possible implementation form of the fourteenth aspect, the second local lock is used to ensure that the first application executes task instructions from only one device at a time, and the second local lock can only be held by one device at a time. In other words, the second local lock is at the application level. The same application on the second terminal can only execute task instructions from one device at a time, and cannot execute task instructions from different devices at the same time.

[0118] In a possible implementation of the fourteenth aspect, the second local lock is used in the second application on the second terminal and the first application to ensure that only one application executes a task command from the same device at the same time. In other words, the second local lock is at the device level. The second local lock is used to ensure that the second terminal executes only a task command from one device at a certain time or period. If a device successfully holds the second local lock, it means that the second terminal can execute a task command sent by the device. Another device that does not hold the second local lock will not send a task command to the second terminal, or even if the device sends a task command to the second terminal, the second terminal will not execute the task command. In other words, the second local lock can be held by only one device, in addition to the second terminal, at the same time.

[0119] In a possible implementation of the fourteenth aspect, the first terminal is further configured to attempt to hold a first local lock of the first terminal based on the first task instruction. The first local lock is used to ensure that the first terminal can send one task instruction to only one device at a time, and the first local lock can be held by only one device at a time. In this solution, the first local lock is used to ensure that the first terminal can send one task instruction to only one device (e.g., the second terminal) at a time, and the first local lock can be a preemptive cross-device task lock. If the first terminal needs to send multiple task instructions (multi-process or multi-threaded tasks) to the second terminal at a time, the first terminal can send the task instruction to the second terminal if the task instruction successfully holds or preempts the first local lock. If the first terminal needs to send only one task instruction to the second terminal at a time, the task instruction holds the first local lock. In other words, the first local lock can be held by only one cross-device task instruction on the first terminal at a given time.

[0120] For example, when a user performs a slide-up operation in an area corresponding to a task card of a video application on a second terminal, a task command to clear the video application on the second terminal is triggered. In addition, the background application manager of the first terminal also sends a task command to the second terminal. The task command is used to clear the music application on the second terminal or to run the video application on the second terminal. In this case, the two task commands may preempt the first local lock, and when the task command preempts the first local lock, the first terminal may send a task command to the second terminal.

[0121] In a possible implementation of the fourteenth aspect, the system further includes a fourth terminal. The fourth terminal is configured to: receive a third operation performed by a user, the third operation being used to trigger transmission of a third task instruction to the first terminal; transmit third information to the first terminal, the third information including information related to the third task instruction; and attempt to hold a first local lock, the first local lock being further used to ensure that the first terminal does not execute a task instruction sent by another device or that the first terminal does not send a task instruction to another device in a process in which the first terminal and the second terminal device cooperate to execute a cross-device task instruction, the first local lock being capable of being held by only one device at a time. The first terminal is further configured to not execute the third task instruction when the fourth terminal fails to hold the first local lock.

[0122] In this solution, a device lock is further set on a device that cooperates with the target device to execute the cross-device task. The device lock can be held by only one device at a time. During the period when the device and the target device cooperate to execute the cross-device task, the device holds the device lock to ensure that the device does not participate in or execute the cross-device task between the device and another device, i.e., the device only participates in the cross-device task between the device and one other device at a time, thereby avoiding conflicts between multiple cross-device tasks, solving instability problems in cross-device task scenarios, and improving user experience.

[0123] In a possible implementation form of the fourteenth aspect, the first terminal is further configured to receive a fourth operation performed by the user, the fourth operation being used to trigger transmission of a fourth task instruction to the second terminal; and to generate a task queue based on the first task instruction and the fourth task instruction, where the sequence of the first task instruction and the fourth task instruction in the task queue is a sequence of corresponding operations, and the first information includes information about the task instructions included in the task queue. In this solution, a local lock is created on the target device, and the local lock can be held by only one device at a time. If the device successfully holds the distributed task lock, the target device receives the task queue from the device and sequentially executes multiple task instructions in the sequence of multiple task instructions included in the task queue to ensure that multiple task instructions from the same device are executed sequentially, which may solve instability problems in cross-device task scenarios and improve user experience.

[0124] In a possible implementation form of the fourteenth aspect, the first information further includes a lock hold timeout period for the second local lock, and the first terminal is further configured to release the two local locks after the length of time that the first terminal holds the second local lock is equal to or greater than the lock hold timeout period.

[0125] In a possible implementation form of the fourteenth aspect, after the second terminal completes execution of the task instruction included in the first information or the second information, the second terminal is further configured to send feedback information to the first terminal or the third terminal, the feedback information indicating that the second terminal has completed execution of the task instruction, and the first terminal or the third terminal is further configured to release the second local lock based on the feedback information.

[0126] For example, if the task instruction in the first information is to clear a video application running in the background by the second terminal, after receiving the feedback information, the first terminal may send a notification to the global task center of the first terminal to instruct the global task center to refresh the recent task interface, and the video application will not be displayed in the refreshed recent task interface or will not be displayed in the recent task list corresponding to the second terminal in the recent task interface.

[0127] In a possible implementation form of the fourteenth aspect, the first terminal is further configured to display, in a recent task interface of the first terminal, an identifier of an application executed by the second terminal in the background. The third terminal is further configured to display, in a recent task interface of the third terminal, an identifier of an application executed by the second terminal in the background. The first task instruction instructs the second terminal to clear the first application running in the background. The second task instruction instructs the second terminal to execute the first application.

[0128] For example, when a user performs a slide-up operation in an area corresponding to a task card of a video application on the second terminal, a task instruction for clearing the video application on the second terminal is triggered. When a user of a third terminal performs a tap gesture in an area corresponding to a task card of the video application on the second terminal, a task instruction for running the video application on the second terminal is triggered.

[0129] In a possible implementation form of the fourteenth aspect, the first terminal is further configured to, when the first terminal fails to hold the second local lock, display a notification message to a user on an interface of the first terminal, The notification message is used to notify the user that execution of the first task instruction has failed.

[0130] In a possible implementation form of the fourteenth aspect, the first task instruction instructs the first terminal to transmit a data stream of a first application to the second terminal, and the third task instruction instructs the first terminal to stop executing the first application. For example, the task instruction sent by the first terminal to the second terminal is to transfer a data stream of a video application on the first terminal to the second terminal. In addition, the task instruction to be sent by the fourth terminal to the first terminal device is to stop executing the video application on the first terminal. In this case, since the fourth terminal failed to hold the device lock of the first terminal, the fourth terminal does not send the task instruction to the first terminal, or even if the fourth terminal sends the task instruction to the first terminal, the first terminal discovers that the fourth terminal does not hold the device lock of the first terminal and does not execute the task instruction.

[0131] According to a fifteenth aspect, there is provided a task migration method, the method being applied to a first terminal and including the steps of: receiving a first operation performed by a user, the first operation being used to trigger a second terminal to send a first task instruction; sending first information to the second terminal, the first information including information related to the first task instruction; attempting to hold a second local lock based on the first task instruction, the second local lock being used to ensure that a first application on the second terminal only executes task instructions from one device at a time, and the second local lock can only be held by one device at a time; and displaying a notification message to a user on a display interface, the notification message being used to notify the user that the first task instruction has failed or been successfully executed.

[0132] According to a method provided in a fifteenth aspect, a local lock is created on an application of a target device, and the local lock can only be held by one other device at a time. If a specific device successfully holds the local lock, the application on the target device can execute a task from the device. During the period in which the device holds the local lock, the target device does not execute task instructions sent by other devices, ensuring that the target device only executes task instructions from one device at a time, avoiding conflicts between multiple cross-device tasks, solving instability problems in cross-device task scenarios, and improving user experience.

[0133] In a possible implementation of the fifteenth aspect, the second local lock is used to ensure that the first application executes task instructions from only one device at a time, and the second local lock can only be held by one device at a time. In other words, the second local lock is at the application level. The same application on the second terminal can only execute task instructions from one device at a time, and cannot execute task instructions from different devices at a time.

[0134] In a possible implementation of the fifteenth aspect, the second local lock is used in the second application on the second terminal and the first application to ensure that only one application executes task instructions from the same device at the same time. In other words, the second local lock is at the device level. The second local lock is used to ensure that the second terminal executes task instructions from only one device at a given time or period. If a device successfully holds the second local lock, it means that the second terminal can execute task instructions sent by the device. Another device that does not hold the second local lock will not send task instructions to the second terminal, or even if the device sends task instructions to the second terminal, the second terminal will not execute the task instructions. In other words, the second local lock can be held by only one device, in addition to the second terminal, at the same time.

[0135] In a possible implementation of the fifteenth aspect, the method includes a step of attempting to hold a first local lock of the first terminal based on the first task command, wherein the first local lock is used to ensure that the first terminal can send one task command to only one device at a time, and the first local lock can be held by only one device at a time.

[0136] In a possible implementation form of the fifteenth aspect, the method further includes receiving third information transmitted by the fourth terminal, the third information including information related to a third task instruction, the first terminal not executing the third task instruction when the first terminal holds the first local lock of the first terminal, the first local lock being used to ensure that the first terminal does not execute a task instruction transmitted by another device or transmit a task instruction to another device in a process in which the first terminal and the second terminal device cooperate to execute a cross-device task instruction, and the first local lock can be held by only one device at a time.

[0137] In a possible implementation form of the fifteenth aspect, when the first terminal holds the second local lock, the first information further includes a lock hold timeout period for the second local lock, and the method further includes a step of releasing the second local lock after the length of time for which the first terminal holds the second local lock is equal to or greater than the lock hold timeout period.

[0138] In a possible implementation form of the fifteenth aspect, when the first terminal holds the second local lock, the method further includes a step of receiving feedback information transmitted by the second terminal, the feedback information indicating that the second terminal has completed execution of the task instruction, and a step of releasing the second local lock based on the feedback information.

[0139] In a possible implementation form of the fifteenth aspect, the method further includes a step of displaying an identifier of an application executed in the background by the second terminal in a recent task interface of the first terminal, wherein the first task instruction instructs the second terminal to clear the first application running in the background.

[0140] In a possible implementation of the fifteenth aspect, the first task instruction instructs the first terminal to transmit a data stream of a first application to a second terminal, and the third task instruction instructs the first terminal to stop execution of the first application. When the first terminal does not hold the second local lock, the notification message is used to notify a user that execution of the first task instruction has failed.

[0141] According to a sixteenth aspect, there is provided a communication apparatus, the communication apparatus including: a unit configured to perform steps performed by a terminal device in any one of the aspects or possible implementation forms of the aspect.

[0142] According to a seventeenth aspect, there is provided a communication apparatus, the communication apparatus including at least one processor and a memory coupled to the processor, the memory storing program instructions, and the program instructions stored in the memory, when executed by the processor, causing the steps performed by the terminal device in any one of the aspects or possible implementation forms of the aspects to be performed.

[0143] According to an eighteenth aspect, there is provided a communication apparatus including at least one processor and an interface circuit, the at least one processor configured to perform steps performed by a terminal device in any one of the aspects or possible implementation forms of the aspect.

[0144] According to a nineteenth aspect, there is provided a terminal device, the terminal device including any communication device provided in the sixteenth, seventeenth or eighteenth aspects.

[0145] According to a twentieth aspect, there is provided a computer program product, the computer program product including a computer program that, when executed by a processor, performs the steps performed by the terminal device in any one of the aspects or possible implementations of the aspects.

[0146] According to a twenty-first aspect, there is provided a computer-readable storage medium storing a computer program, the computer program being capable of executing steps performed by a terminal device in any one of the aspects or possible implementations of the aspects.

[0147] According to a twenty-second aspect, there is provided a chip, the chip including a processor, configured to call and execute a computer program from a memory such that a communications device in which the chip is installed performs the steps performed by a terminal device in any one of the aspects or possible implementations of the aspects. [Brief explanation of the drawings]

[0148] [Figure 1] 1 is a schematic diagram of a communication system applicable to embodiments of the present application; [Figure 2(a)] 1 is a schematic diagram of an interface in which a recent tasks interface is displayed and a slide operation is performed in the recent tasks interface according to the present application; [Figure 2(b)] 1 is a schematic diagram of an interface in which a recent tasks interface is displayed and a slide operation is performed in the recent tasks interface according to the present application; [Figure 2(c)] 1 is a schematic diagram of an interface in which a recent tasks interface is displayed and a slide operation is performed in the recent tasks interface according to the present application; [Figure 3(a)] 1 is a schematic diagram of an interface in which touch operations are performed in a modern task interface according to the present application; [Figure 3(b)] 1 is a schematic diagram of an interface in which touch operations are performed in a modern task interface according to the present application; [Figure 3(c)] 1 is a schematic diagram of an interface in which implementations of recent task lists of the current terminal and another terminal are displayed. [Figure 3(d)] 1 is a schematic diagram of an interface in which implementations of recent task lists of the current terminal and another terminal are displayed. [Figure 3(e)] 1 is a schematic diagram of an interface in which implementations of recent task lists of the current terminal and another terminal are displayed. [Figure 3(f)] 1 is a schematic diagram of an interface in which implementations of recent task lists of the current terminal and another terminal are displayed. [Figure 3(g)] FIG. 1 is a schematic diagram of a scheme for transmitting recent task information via a software module. [Figure 3(h)] FIG. 1 is a schematic diagram of a scheme for transmitting recent task information via a software module. [Figure 3(i)]FIG. 1 is a schematic diagram of a scheme for transmitting recent task information via a software module. [Figure 3(j)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(k)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(l)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(m)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(n)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(o)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(p)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(q)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(r)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(s)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(t)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(u)] 1 is a schematic diagram of an interface through which a first terminal initiates a trusted relationship establishment request to a second terminal. [Figure 3(v)] FIG. 2 is a schematic diagram of an interface through which a second terminal receives a trusted request from a first terminal. [Figure 3(w)]FIG. 2 is a schematic diagram of an interface through which a second terminal receives a trusted request from a first terminal. [Figure 3(x)] FIG. 2 is a schematic diagram of an interface through which a second terminal receives a trusted request from a first terminal. [Figure 3(y)] FIG. 2 is a schematic diagram of an interface through which a second terminal receives a trusted request from a first terminal. [Figure 3(z)] FIG. 2 is a schematic diagram of an interface through which a second terminal receives a trusted request from a first terminal. [Figure 4(a)] FIG. 10 is a schematic diagram of an interface for clearing recently used applications of another terminal; [Figure 4(b)] FIG. 10 is a schematic diagram of an interface for clearing recently used applications of another terminal; [Figure 4(c)] FIG. 1 is a schematic diagram of an interface through which applications are migrated between terminals. [Figure 4(d)] FIG. 1 is a schematic diagram of an interface through which applications are migrated between terminals. [Figure 4(e)] FIG. 1 is a schematic diagram of an interface through which applications are migrated between terminals. [Figure 4(f)] FIG. 10 is a schematic diagram of an interface displaying the usage time of an application on another terminal. [Figure 4(g)] FIG. 10 is a schematic diagram of an interface displaying the usage time of an application on another terminal. [Figure 4(h)] FIG. 10 is a schematic diagram of an interface displaying the usage time of an application on another terminal. [Figure 4(i)] 1 is a schematic flow chart according to an embodiment of the present application. [Figure 4(j)] 3 is another schematic flow chart according to an embodiment of the present application. [Figure 4(k)] 1 is a schematic flowchart of determining a layout in which task cards of another terminal are displayed in a recent tasks interface of a first terminal, according to the present application; [Figure 4(l)]1 is a schematic flowchart of determining a layout in which task cards of another terminal are displayed in a recent tasks interface of a first terminal, according to the present application; [Figure 5(a)] 1A-1C are schematic diagrams of interfaces with different layouts in which task cards of other different terminals are displayed in a recent tasks interface of a first terminal according to the present application; [Figure 5(b)] 1A-1C are schematic diagrams of interfaces with different layouts in which task cards of other different terminals are displayed in a recent tasks interface of a first terminal according to the present application; [Figure 5(c)] 1A-1C are schematic diagrams of interfaces with different layouts in which task cards of other different terminals are displayed in a recent tasks interface of a first terminal according to the present application; [Figure 5(d)] 1A-1C are schematic diagrams of interfaces with different layouts in which task cards of other different terminals are displayed in a recent tasks interface of a first terminal according to the present application; [Figure 6(a)] 1A-1C are schematic diagrams of interfaces with different layouts in which task cards of other different terminals are displayed in a recent tasks interface of a first terminal according to the present application; [Figure 6(b)] 1A-1C are schematic diagrams of interfaces with different layouts in which task cards of other different terminals are displayed in a recent tasks interface of a first terminal according to the present application; [Figure 6(c)] 1A-1C are schematic diagrams of interfaces with different layouts in which task cards of other different terminals are displayed in a recent tasks interface of a first terminal according to the present application; [Figure 6(d)] 1A-1C are schematic diagrams of interfaces with different layouts in which task cards of other different terminals are displayed in a recent tasks interface of a first terminal according to the present application; [Figure 6(e)] 1A-1C are schematic diagrams of interfaces with different layouts in which task cards of other different terminals are displayed in a recent tasks interface of a first terminal according to the present application; [Figure 7(a)]1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(b)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(c)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(d)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(e)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(f)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(g)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(h)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(i)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(j)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(k)]1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(l)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(m)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(n)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(o)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(p)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(q)] 1 is a schematic diagram of an interface of different content displayed on the last task card in the recent tasks interface of the first terminal according to the present application; [Figure 7(r)] 1 is a schematic diagram of an interface in which a lightweight device displays a task card for another device, according to the present application; [Figure 7(s)] 1 is a schematic diagram of an interface in which a lightweight device displays a task card for another device, according to the present application; [Figure 8(a)-1] 1 is a schematic flowchart of determining a display state and an application execution state based on different transition modes when a task card of a remote device is launched in a recent task interface of a first terminal according to the present application; [Figure 8(a)-2]1 is a schematic flowchart of determining a display state and an application execution state based on different transition modes when a task card of a remote device is launched in a recent task interface of a first terminal according to the present application; [Figure 8(b)-1] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(b)-2] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(c)-1] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(c)-2] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(d)-1] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(d)-2] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(e)-1] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(e)-2] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(f)-1] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(f)-2] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(g)-1]1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(g)-2] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(h)-1] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(h)-2] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(i)-1] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(i)-2] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(j)-1] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(j)-2] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(k)] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(l)] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(m)] 1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(n)]1 is a schematic diagram of an interface of the execution state of a first application on different devices based on different migration modes according to the present application; [Figure 8(o)-1] 1 is a schematic diagram of an interface that helps to install an application on another device by manipulating a task card in a recent task interface of a first terminal according to the present application; [Figure 8(o)-2] 1 is a schematic diagram of an interface that helps to install an application on another device by manipulating a task card in a recent task interface of a first terminal according to the present application; [Figure 8(p)-1] 1 is a schematic diagram of an interface that helps to install an application on another device by manipulating a task card in a recent task interface of a first terminal according to the present application; [Figure 8(p)-2] 1 is a schematic diagram of an interface that helps to install an application on another device by manipulating a task card in a recent task interface of a first terminal according to the present application; [Figure 8(q)-1] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(q)-2] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(q)-3] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(r)-1] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(r)-2]1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(r)-3] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(r)-4] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(s)-1] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(s)-2] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(s)-3] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(t)] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(u)-1] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(u)-2] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(u)-3]1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(u)-4] 1 is a schematic diagram of an interface for manipulating different task cards in a recent tasks interface of a first terminal to establish different display forms of multiple task cards according to the present application; [Figure 8(v)] 1 is a schematic diagram of an interface displayed after a task is migrated and the connection between the source device and the target device is interrupted, according to the present application; [Figure 8(w)] 1 is a schematic diagram of an interface displayed after a task is migrated and the connection between the source device and the target device is interrupted, according to the present application; [Figure 9(a)-1] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(a)-2] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(b)-1] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(b)-2] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(c)-1] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(c)-2] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(d)-1]1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(d)-2] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(e)-(f)] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(g)-(h)] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(i)-(j)] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(k)] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(l)] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(m)-(n)] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(o)-(p)] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(q)-(r)] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(s)-(t)]1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 9(u)-(v)] 1 is a schematic diagram of an interface for manipulating task cards and migrating task cards in a recent task interface of a first terminal according to the present application; [Figure 10(a)] 1 is a schematic diagram of an interface in which a target device changes from a screen-off state to displaying an application after the application is migrated to the target device according to the present application; [Figure 10(b)] 1 is a schematic diagram of an interface in which a target device changes from a screen-off state to displaying an application after the application is migrated to the target device according to the present application; [Figure 10(c)] 1 is a schematic diagram of an interface in which a target device changes from a screen-off state to displaying an application after the application is migrated to the target device according to the present application; [Figure 11(a)-1] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(a)-2] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(b)-1] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(b)-2]1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(c)-1] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(c)-2] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(d)-1] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(d)-2] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(e)] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(f)-1] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(f)-2]1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(g)] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(h)-1] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(h)-2] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(h)-3] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(h)-4] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(i)-1] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(i)-2]1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(i)-3] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(i)-4] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(j)-1] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(j)-2] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(j)-3] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(j)-4] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(k)-1]1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(k)-2] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(k)-3] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 11(k)-4] 1 is a schematic diagram of an interface through which an application is executed based on different allocation situations of hardware capabilities used by the application after the application is migrated from a source device to a target device according to the present application; [Figure 12(a)-1] 1 is a schematic diagram of an interface in which a task card from a mobile phone is displayed in a recent task interface of an in-vehicle infotainment system according to the present application; [Figure 12(a)-2] 1 is a schematic diagram of an interface in which a task card from a mobile phone is displayed in a recent task interface of an in-vehicle infotainment system according to the present application; [Figure 12(b)] 1 is a schematic diagram of an interface in which a task card of a PC device is displayed in a recent tasks interface of an in-vehicle infotainment system according to the present application; [Figure 12(c)-1] 1 is a schematic diagram of an interface in which a task card of a mobile phone is displayed in a recent tasks interface of a PC device according to the present application; [Figure 12(c)-2]1 is a schematic diagram of an interface in which a task card of a mobile phone is displayed in a recent tasks interface of a PC device according to the present application; [Figure 13A] 1 is a schematic diagram of an interface in which a task card of a first terminal is transferred to a third terminal in a recent task interface of a second terminal according to the present application; [Figure 13B] 1 is a schematic diagram of an interface in which a task card of a first terminal is transferred to a third terminal in a recent task interface of a second terminal according to the present application; [Figure 13C] 1 is a schematic diagram of an interface in which a task card of a first terminal is transferred to a third terminal in a recent task interface of a second terminal according to the present application; [Figure 14(a)-1] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(a)-2] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(a)-3] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(b)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(c)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(d)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(e)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(f)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(g)]1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(h)-(i)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(j)-(k)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(l)-(m)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(n)-(o)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(p)-(q)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 14(r)-(s)] 1 is a schematic diagram of an interface in which the Super Home Screen is displayed on different devices according to the present application; [Figure 15(a)-(b)] 1 is a schematic diagram of an interface in which the Super Home Screen Entry and Super Home Screen Layout are displayed on different devices in accordance with the present application. [Figure 15(c)] 1 is a schematic diagram of an interface in which the Super Home Screen Entry and Super Home Screen Layout are displayed on different devices in accordance with the present application. [Figure 15(d)-(e)] 1 is a schematic diagram of an interface in which the Super Home Screen Entry and Super Home Screen Layout are displayed on different devices in accordance with the present application. [Figure 15(f)] 1 is a schematic diagram of an interface in which the Super Home Screen Entry and Super Home Screen Layout are displayed on different devices in accordance with the present application. [Figure 15(g)] 1 is a schematic diagram of an interface in which the Super Home Screen Entry and Super Home Screen Layout are displayed on different devices in accordance with the present application. [Figure 16(a)]1 is a schematic diagram of an interface displayed by a terminal device in the process of the terminal device temporarily setting up a super home screen according to the present application; [Figure 16(b)-(c)] 1 is a schematic diagram of an interface displayed by a terminal device in the process of the terminal device temporarily setting up a super home screen according to the present application; [Figure 16(d)-(e)] 1 is a schematic diagram of an interface displayed by a terminal device in the process of the terminal device temporarily setting up a super home screen according to the present application; [Figure 16(f)] 1 is a schematic diagram of an interface displayed by a terminal device in the process of the terminal device temporarily setting up a super home screen according to the present application; [Figure 16(g)] 1 is a schematic diagram of an interface displayed by a terminal device in the process of the terminal device temporarily setting up a super home screen according to the present application; [Figure 16(h)] 1 is a schematic diagram of an interface displayed by a terminal device in the process of the terminal device temporarily setting up a super home screen according to the present application; [Figure 17] 1 is a schematic flow chart according to an embodiment of the present application. [Figure 18] 1 is a schematic diagram of the internal system architecture in the process of a first terminal migrating an application data stream to a second terminal according to the present application; [Figure 19] 1 is an exemplary schematic flow chart according to the present application. [Figure 20] 4 is another exemplary schematic flow chart according to the present application. [Figure 21A-B] FIG. 1 is a schematic diagram of a common task migration scenario according to an embodiment of the present application. [Figure 22A] FIG. 1 is a schematic diagram of another common task migration scenario, according to an embodiment of the present application. [Figure 22B]FIG. 1 is a schematic diagram of another common task migration scenario, according to an embodiment of the present application. [Figure 22C] FIG. 1 is a schematic diagram of another common task migration scenario, according to an embodiment of the present application. [Figure 22D] FIG. 1 is a schematic diagram of another common task migration scenario, according to an embodiment of the present application. [Figure 22E] FIG. 1 is a schematic diagram of another common task migration scenario, according to an embodiment of the present application. [Figure 23A] 1 is a schematic diagram of a group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 23B] 1 is a schematic diagram of a group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 23C] 1 is a schematic diagram of a group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 23D] 1 is a schematic diagram of a group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 23E] 1 is a schematic diagram of a group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 23F] 1 is a schematic diagram of a group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 23G] 1 is a schematic diagram of a group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 24A] FIG. 10 is a schematic diagram of another group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 24B] FIG. 10 is a schematic diagram of another group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 24C] FIG. 10 is a schematic diagram of another group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 24D] FIG. 10 is a schematic diagram of another group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 24E] FIG. 10 is a schematic diagram of another group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 24F] FIG. 10 is a schematic diagram of another group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 24G] FIG. 10 is a schematic diagram of another group of user interfaces in which task migration is performed between different terminal devices according to an embodiment of the present application; [Figure 25A] 1 is a schematic diagram of the principle of performing task migration between different terminal devices according to an embodiment of the present application; [Figure 25B] 1 is a schematic diagram of the principle of performing task migration between different terminal devices according to an embodiment of the present application; [Figure 26] 1 is an exemplary schematic flowchart according to an embodiment of the present application. [Figure 27A] 1 is an exemplary schematic flow chart according to the present application. [Figure 27B] 1 is an exemplary schematic flow chart according to the present application. [Figure 28] 10 is a schematic diagram of an exemplary interface in which a terminal prompts a user for a case in which the sending or execution of a cross-device task instruction fails according to the present application; [Figure 29] FIG. 10 is a schematic diagram of another exemplary interface in which a terminal prompts a user for a case in which the sending or execution of a cross-device task instruction fails according to the present application; [Figure 30A] 4 is another exemplary schematic flow chart according to the present application. [Figure 30B]4 is another exemplary schematic flow chart according to the present application. [Figure 31A] 1 is yet another exemplary schematic flow chart according to the present application. [Figure 31C] 1 is yet another exemplary schematic flow chart according to the present application. [Figure 31B] 1 is yet another exemplary schematic flow chart according to the present application. [Figure 32] 1 is yet another exemplary schematic flow chart according to the present application. [Figure 33] 1 is yet another exemplary schematic flow chart according to the present application. [Figure 34] 2 is a block diagram of the software structure of a terminal according to the present application; [Figure 35] FIG. 2 is a block diagram of the software structure of another terminal according to the present application. [Figure 36] 1 is a schematic diagram of an exemplary hardware structure of a terminal according to the present application; [Figure 37] 1 is a schematic diagram of a chip system according to the present application. DETAILED DESCRIPTION OF THE INVENTION

[0149] Nowadays, users have more types of intelligent terminals, which brings many new user demands.

[0150] For example, when a user plays a video or edits a document on a mobile phone, the screen of the mobile phone is small and inconvenient to use, so it may be more convenient to play the video or edit the document on a large-screen device, so there is a need to seamlessly transfer the video played or the document edited on the mobile phone to another large-screen device.

[0151] As another example, multiple tasks are performed in parallel. For example, a user often shops and chats at the same time on a mobile phone, or watches videos and chats at the same time. In a scenario where multiple tasks are performed in parallel on a mobile phone, the multiple tasks may cause image blocking. Therefore, different tasks may be performed in parallel on multiple devices used by a user, so that the multiple tasks are continuously performed in parallel, thereby avoiding the case where the multiple tasks cause image blocking.

[0152] As yet another example, sometimes a device used by a user needs to be charged, but the user wants to continue an incomplete task on the device, in which case the task on the device can be continued on another device, thereby allowing the user to continue the incomplete task on the device.

[0153] In each of the above scenarios, migration (or continuation) of an application or task to an unused device is performed.

[0154] In consideration of this, the present application provides a task migration system and method. A task card corresponding to an ongoing or previously executed application of another terminal can be displayed on the terminal used by the user, allowing the user to view and manage the historical tasks of another device on the device. This can be applied to almost all applications without requiring the application to be adapted. When the task card of another device is displayed, the task cards of different devices can be laid out in multiple different ways. The user can easily perform operations on the task card to migrate or continue an application and meet the user's requirements for managing and controlling multi-device tasks. In addition, the procedure for continuing an application is further simplified, simplifying the user's operation and improving the user experience.

[0155] The remote device task display and control method provided in this application will be specifically described below.

[0156] It should be noted that in the embodiments of the present application, "terminal device", "electronic device" and "terminal" all represent the same meaning, and their descriptions may be changed.

[0157] An Android system is used as an example. The system provides a system-level interface to display a list of recently accessed tasks. A user may perform an operation to clear recently executed applications or an operation to clear all recently executed applications. In this manner, local applications (APPs) of a terminal may be cleared. In a distributed scenario, it is also necessary to display and clear recently used applications of another terminal.

[0158] In some exemplary embodiments, FIG. 1 is a schematic diagram of a communication system in accordance with the present application and applicable to embodiments of the present application.

[0159] 1 , the communication system 10 may include various terminal devices (in this application, the terminal devices may also be referred to as electronic devices), such as a mobile phone 101, a tablet computer 102, and a large-screen device 103. Optionally, the communication system 10 may further include a smart home device, such as a smart refrigerator 104 or a smart air conditioner 105. When the intelligent terminal is a smart home device, such as a smart refrigerator or an air conditioner, the recently used application may be a task currently being executed or recently executed several times by the smart home device.

[0160] Indeed, the communication system 10 may be integrated with many more terminal devices not shown in FIG. 1 , such as smart sound boxes, in-vehicle devices (sometimes called in-vehicle infotainment systems), notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices, and virtual reality devices. Internet of Things ( IoT ) device.

[0161] The type of terminal device (e.g., mobile phone 101, tablet computer 102, or large-screen device 103) is not particularly limited in this embodiment of the present application. In some embodiments, the terminal device in this embodiment of the present application may be a device such as a mobile phone, a wearable device (e.g., a smart band, a smart watch, or a headset), a tablet computer, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a cellular phone, a personal digital assistant (PDA), or an augmented reality (AR), virtual reality (VR) device, or alternatively, a device such as a television, a large screen, a sound screen, a television, a refrigerator, an air conditioner, an in-car device, a printer, or a projector. Exemplary embodiments of the terminal device include, but are not limited to, a terminal device with iOS®, Android®, Microsoft®, Harmony, or another operating system.

[0162] The terminals in the communication system 10 may be interconnected via a communication network.

[0163] In some exemplary embodiments, the communication network may be a wired network or a wireless network. For example, the communication network may be a local area network (LAN) or a wide area network (WAN), such as the Internet. The communication network may be implemented based on any known network communication protocol. The network communication protocol may be various wired or wireless communication protocols such as Ethernet, universal serial bus (USB), FireWire (FIREWIRE), 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), Bluetooth (registered trademark), wireless fidelity (Wi-Fi), NFC, voice over Internet Protocol (VoIP), a communication protocol supporting a network slice architecture, or any other suitable communication protocol.

[0164] In other words, the terminals in the communication system 10 may form a network (ie, be networked) based on particular communication protocols and networking policies such that the terminals in the audio system may communicate with each other.

[0165] In some exemplary embodiments, terminal devices in communication system 10 may access a Wi-Fi network provided by an access point (AP), such as a router, whereby a Wi-Fi connection is established between the terminal devices. As another example, terminals in communication system 10 may log in to the same account (e.g., a Huawei account) and then be interconnected through one or more servers.

[0166] The recent tasks interface is an interface within a system user interface (UI) that displays the terminal's recently executed tasks. When the terminal is triggered to open the recent tasks interface, the terminal's display may display the terminal's recently executed tasks or recently executed applications. Optionally, for multiple interfaces of the same application, each of the multiple interfaces may be displayed in the recent tasks interface as an independent task. For example, if the terminal opens two Word documents and enters the recent tasks interface, two task cards may be used to display interfaces corresponding to the two Word documents, respectively. For ease of explanation, tasks and applications are not particularly distinguished in this application. In addition, this application does not limit whether multiple interfaces of an application are used as one task card or multiple task cards.

[0167] For example, after a user triggers a terminal to open a first application, the terminal returns to the home screen by using a gesture or a button. In this case, the first application is switched to run in the background. When the user opens a second application and runs the second application, the user triggers the terminal to enter the recent tasks interface. The system function of the terminal can understand that since a program corresponding to the recent tasks interface is currently running in the foreground, the second application is also switched to run in the background. In this case, both the first application and the second application are recently run applications, and information about the first application and the second application appears in the recent tasks interface.

[0168] Information about multiple recently executed applications is displayed in the recent tasks interface. Typically, an identifier and a task card corresponding to the application are displayed in the recent tasks interface. Optionally, the identifier of the application may be the application name or icon of the application represented by using text, the task card is a rectangular box, and a snapshot of the application is present within the box. For example, the system captures a snapshot of the interface that exists when the application is switched to run in the background. The identifier of the application and the task card may be integrated. For example, the identifier may be embedded in the task card as part of the task card, or the identifier of the application and the task card may be separate. This is not limited in the present application. When multiple recently executed applications exist on a terminal, multiple task cards exist. Due to page display or interface settings, some task cards may be fully displayed in the recent tasks interface, some task cards may be partially displayed in the recent tasks interface, and some task cards may be hidden (not displayed) in RecentTasks.

[0169] In some exemplary embodiments, as shown in FIG. 2(a), a user may perform a slide-up gesture from the bottom of the terminal screen on the home screen of the terminal to trigger the display of the terminal to display the recent tasks interface. In actual applications, the display of the terminal may be triggered to display the recent tasks interface by using another gesture or by another operation method (e.g., by tapping the "multitasking" button or touching and holding the "back" button). The method of triggering the terminal to display the recent tasks interface is not limited in this application.

[0170] In some exemplary embodiments, the display of the terminal displays a recent tasks interface as shown in FIG. 2(b). In the recent tasks interface, a task card of a first application is fully displayed, and a task card of a second application is partially displayed. The recently executed applications further include a third application, and the card of the third application is hidden in the recent tasks interface. In the recent tasks interface shown in FIG. 2(b), when a user performs a slide-up gesture on the touch screen, the recent tasks interface displayed on the display of the terminal may be switched to the recent tasks interface shown in FIG. 2(c).

[0171] In some exemplary embodiments, the task card currently fully displayed in the recent tasks interface is switched from the task card of the first application to the task card of the second application, as shown in Figure 2(c). Before the switch, the task card of the first application is fully displayed in the recent tasks interface, and the task card of the second application is partially displayed in the recent tasks interface, as shown in Figure 2(b). After the switch, the task card of the first application is partially displayed in the recent tasks interface, and the task card of the second application is fully displayed in the recent tasks interface, as shown in Figure 2(c). In addition, after the switch, the task card of the third application changes from hidden to partially displayed in the recent tasks interface, as shown in Figure 2(c).

[0172] As shown in FIGS. 2(b) and 2(c), when there are multiple recently performed tasks, the task card of the recently performed task may be fully displayed in the recent task interface, and the task card of another recently performed task may be partially displayed to the left and / or right of the fully displayed task card of the recently performed task, and the fully displayed task card and the partially displayed task card are displayed side by side. In actual applications, task cards may alternatively be displayed in the recent task interface in another manner. For example, the task card of the recently performed task may be fully displayed in the recent task interface, and the task card of another recently performed task may be partially displayed above and / or below the fully displayed task card of the recently performed task, and the fully displayed task card and the partially displayed task card are displayed side by side. In this embodiment of the present application, the manner of displaying task cards in the recent task interface is not limited. The recent task interface may be triggered by an operation to display different task cards through switching, and fully displayed task cards exist before and / or after switching.

[0173] In modern task interfaces, users can perform different operations to achieve different effects.

[0174] In some exemplary embodiments, as shown in FIG. 3(a), when a user performs a tap gesture within an area outside the task cards in the recent tasks interface, the recent tasks interface closes and the device display shows the home screen.

[0175] In some exemplary embodiments, as shown in FIG. 3(b), when a user performs a tap gesture on an area corresponding to a task card of a first application, the recent tasks interface is dismissed, the terminal display displays the interface of the first application, and the first application is switched from running in the background to running in the foreground.

[0176] In Figures 3(a) and 3(b), the responses of the terminal to the user's gestures are used only as an example. In actual applications, the responses may be different responses, which are not limited in this application.

[0177] In addition, in practical applications, as shown in Figures 3(a) and 3(b), the recent tasks interface may further display a control or icon used to clear the memory space occupied by all recently executed applications, such as the trash can icon at the bottom of Figures 3(a) and 3(b). A user can close all recently executed tasks by tapping the icon. In certain implementations, all applications or a specific application running in floating window mode in the recent tasks interface may be closed in other ways. For example, an application may be further closed by using a slide-up gesture, a slide-down gesture, or by tapping a specific control in the task card (e.g., a close button in the task card).

[0178] Optionally, in some embodiments of the present application, when task cards are displayed, information about the memory space occupied by the applications corresponding to some or all of the task cards may be further displayed. For example, a prompt box for the memory space occupied by the applications corresponding to some or all of the task cards may be displayed above or below the task cards, or the memory space occupied by the applications corresponding to different task cards may be displayed in a list or table. For example, the memory space occupied by the application corresponding to a task card may be xx megabytes (M), yy thousands (K), bytes (B), etc. This is not limited in this embodiment of the present application.

[0179] The above describes the content and basic operations included in the recent task interface. In this application, the recent task interface of a terminal not only displays recently executed applications of the terminal, but also may display recently executed applications of another terminal. Furthermore, operations may be further performed on task cards corresponding to one or several applications to implement cross-device application migration, application execution, etc.

[0180] The scenario shown in Fig. 1 is used as an example for explanation. A first terminal (e.g., a mobile phone 101), a second terminal (e.g., a tablet computer 102), a third terminal (e.g., a large-screen device 103), etc. are connected via a network. When a user operates the first terminal to enter a recent task interface, the recent task interface not only displays recently used applications of the first terminal, but also displays recently used applications of the second terminal and the third terminal.

[0181] In a possible implementation, before the technical solution of the present application is executed between different devices, a trusted relationship may be established between the different devices or the different devices may be connected. For example, in the case of the connected mode, the different devices may log in to the same account, may be connected to the same Wi-Fi hotspot, may be logged in to associated accounts, or may be established in the same network to form a local area network device group. In the case of the established mode, device-level authentication may be performed between the different devices in the exemplary modes shown in Figures 3(j) to 3(z), and the trusted relationship may be established. This is not limited in the present application.

[0182] In some exemplary embodiments, as shown in FIG. 3(c), the recent task interface of the first terminal is divided into multiple rows, where the first row is used to display task cards corresponding to recently used applications of the first terminal, and the second and third rows are used to display recent task lists of devices such as the second terminal and the third terminal, respectively. In this case, the first terminal may synchronize the recent task lists of the second terminal and the third terminal in the background, or when a user opens the recent task interface of the first terminal, the first terminal is triggered to obtain the recent task lists of other terminals (the second terminal and the third terminal) connected to the first terminal.

[0183] As shown in FIG. 3(c), for example, the first terminal may be a mobile phone, the second terminal may be a tablet computer, and the third terminal may be a large-screen device. Overlapping applications may exist in applications running on any two devices. For example, as shown in FIG. 3(c), the same applications, i.e., App1 and App3, exist on a mobile phone and a tablet computer. Optionally, the progress or state of App1 running on the mobile phone (or the interface of App1 displayed on the mobile phone) may differ from the progress or state of App1 running on the tablet computer (or the interface of App1 displayed on the tablet computer). The progress or state of App3 running on the mobile phone may also differ from the progress or state of App3 running on the tablet computer. The same application, i.e., App2, exists on the mobile phone and the large-screen device. Optionally, the progress or state of App2 running on the mobile phone may differ from the progress or state of App2 running on the large-screen device. The same application, i.e., App4, exists on the large-screen device and the tablet computer. Similarly, the progress or state of app 4 running on a large screen device may differ from the progress or state of app 4 running on a tablet computer.

[0184] As another example, as shown in FIG. 3(c), the first row indicates three recently executed applications on the mobile phone. For example, the three applications may be three applications with the top three most frequently used applications, or three applications with the top three longest usage times, or three recently used applications, or one application with the most frequently used application, one application with the longest usage time, and one recently used application among multiple recently executed applications on the mobile phone. As another example, when a user performs a slide-up gesture in an area of ​​any row of the task card, the first terminal displays another task card for the device corresponding to that row, or when a user performs a slide-up gesture in an area outside the three rows of the task card, the first terminal displays other task cards corresponding to three devices, respectively.

[0185] In some exemplary embodiments, identifiers of a first terminal and multiple terminals connected to the first terminal (e.g., the multiple terminals and the first terminal are logged in to the same account, connected to the same Wi-Fi hotspot, or logged in to associated accounts) may be further separately displayed in the recent task interface of the first terminal. When the identifier of the first terminal or the identifier of a terminal connected to the first terminal is selected, a recent task list corresponding to the terminal is displayed in the recent task interface. In some exemplary embodiments, as shown in FIG. 3(d), when the identifier of the current terminal (first terminal) is selected, a local recent task list of the first terminal is displayed in the recent task interface. In some exemplary embodiments, as shown in FIG. 3(e), when the first terminal receives a user's command and an identifier of a second terminal is selected, a recent task list of the second terminal is displayed in the recent task interface. In this case, the first terminal may have completed synchronizing the recent task list of the second terminal and caching this portion of data in the background. When the user taps the identifier of the second terminal, the first terminal displays the recent task list of the second terminal in the recent task interface based on the cached data. Alternatively, the first terminal displays the recent task list of the second terminal in the recent task interface based on the cached data. Task List may not be synchronized in the background, and instead, when the user taps the identifier of the second terminal, the first terminal obtains the recent task list of the second terminal and displays the task list in a recent task interface corresponding to the identifier of the second terminal.

[0186] When a policy is used in which a first terminal acquires the recent task list of another terminal, including a second terminal, in the background, after a user taps to enter the recent task interface of the first terminal or taps an identifier of the other terminal in the recent task interface, information about the recent task list of the other terminal is pre-cached, so that the user can quickly load the recent task list of the other terminal in the recent task interface, thereby allowing the user to acquire the recent task list corresponding to the other terminal more quickly and improving the user experience. However, when a user opens the recent task interface of the first terminal or taps an identifier of the other terminal in the recent task interface, synchronization of the recent task list of the other terminal is triggered, reducing network traffic and power consumption generated when the first terminal and the other terminal synchronize their recent task lists and saving resources.

[0187] In some exemplary embodiments, different synchronization policies may be used based on the state of the first terminal. For example, when the first terminal is connected to a wireless fidelity (Wi-Fi) or has sufficient power, the first terminal may obtain the recent task list of another terminal connected to the first terminal in the background, since there is no need to worry about network traffic or power consumption issues. When the first terminal is connected to a network via a cellular network connection or is in a low power state, synchronization of the recent task list of another terminal may be triggered when the user opens the recent task interface of the first terminal or taps the identifier of another terminal in the recent task interface, thereby saving network traffic or power.

[0188] In some exemplary embodiments, in actual use, a user of a first terminal may use other terminals with different usage frequencies, and different recent task information synchronization policies may be set for the terminals connected to the first terminal. For example, if the first terminal is a mobile phone, a tablet computer connected to the mobile phone via a network may be highly relevant to the mobile phone, while a backup mobile phone similarly connected to the mobile phone may be less relevant. In this case, when a user enters the recent task interface, the recent tasks of the tablet computer, which are highly relevant to the mobile phone, are directly displayed, and only the identifier of the backup mobile phone, which is less relevant to the mobile phone, is displayed. When the user taps the identifier of the backup mobile phone, the first terminal is triggered to retrieve the recent tasks of the backup mobile phone.

[0189] In some exemplary embodiments, FIG. 3(f) is another schematic diagram showing recent task lists of multiple terminals connected to a first terminal. As shown in FIG. 3(f), the recent task interface of the first terminal no longer distinguishes between the recent tasks of the first terminal and those of other terminals. Instead, the recent task interface of the first terminal displays the recent tasks of the first terminal and those of other terminals after merging and deduplication. For example, if the first terminal (i.e., the current terminal) recently ran app 1, app 2, and app 3, the second terminal (assumed to be a Huawei P30 mobile phone) recently ran app 1, app 3, and app 4, and the third terminal (assumed to be a Huawei P40 mobile phone) recently ran app 2, app 4, and app 5, the recent task interface of the first terminal will display app 1 to app 5 (only app 3, app 4, and app 5 are shown in the figure).

[0190] In some exemplary embodiments, the terminal device corresponding to each application may optionally be displayed around the task card corresponding to the application in the recent task view to notify the user of the first terminal of the particular terminal device that recently used the application displayed in the recent task view. As shown in Figure 3(f), the identifier of the second terminal (P30) and the identifier of the third terminal (P40) are displayed around the task card for app 4.

[0191] All applications are arranged in the recent task interface in the order in which they are opened. Therefore, when another terminal in the network sends information about recently used applications to a first terminal, the terminal may also send the time at which the application was opened to the first terminal to more accurately arrange all recent applications in the recent task interface of the first terminal. For example, if a second terminal opens the album application at 11:26 and a third terminal opens the settings application at 11:27, the second terminal and the third terminal each send recent task information to the first terminal. The recent task information includes information about the time at which the second terminal opened the album application and information about the time at which the second terminal opened the settings application. After the global task center of the first terminal receives the recent task information of the second terminal and the third terminal, it may be determined that the album application was opened before the settings application. Therefore, in the recent task interface, the album application is located before the settings application.

[0192] When the first terminal attempts to synchronize the recent task list of the second terminal, for example, when the user operates the first terminal to enter a recent task interface or taps an identifier of the second terminal in the recent task interface, the first terminal sends a task synchronization request to the second terminal. The task synchronization request is used to notify the second terminal to send information (recent task information) about recently executed applications of the second terminal to the first terminal.

[0193] In some demonstrative embodiments, as shown in FIG. 3(g), the first terminal 1010 and the second terminal 1020 each include a global task center and a distributed scheduling subsystem. Optionally, the global task center runs at the application layer and is configured to manage and display recently used applications of the terminals in the network, and the distributed scheduling subsystem runs at the lower system service layer and is configured to obtain information about recently used applications of the current terminal and exchange recent task information with another terminal.

[0194] The distributed scheduling subsystem 1022 of the second terminal 1020 obtains recent task information of the second terminal 1020 from the local task management module 1023, and a listener for changes in the local task information is registered. The listener is configured to obtain changes in recently used applications of the second terminal. After obtaining the recent task information of the second terminal 1020, the distributed scheduling subsystem 1022 of the second terminal 1020 sends the task information to the global task center 1011 of the first terminal 1010, so that the first terminal 1010 can display a recent task list of the second terminal 1020 in a recent task interface. In some demonstrative embodiments, as shown in FIGS. 3(h) and 3(i), the distributed scheduling subsystem 1022 of the second terminal 1020 may send the task information to the global task center 1011 of the first terminal 1010 in the following two ways:

[0195] In some demonstrative embodiments, as shown in FIG. 3(h), after receiving a task synchronization request from the first terminal 1010, the distributed scheduling subsystem 1022 of the second terminal 1020 sends the recent task information of the second terminal 1020 from the local task management module 1023 to the distributed scheduling subsystem 1012 of the first terminal 1010, and then the distributed scheduling subsystem 1012 of the first terminal 1010 sends the recent task information of the second terminal 1020 to the global task center 1011 of the first terminal 1010.

[0196] Because the distributed scheduling subsystem is located at the lowest layer, after the first terminal 1010 and the second terminal 1020 are networked, the first terminal 1010 may maintain a list of identifiers in the network. When the first terminal 1010 needs to obtain recent task information of the second terminal 1020, the first terminal 1010 may send a task synchronization request to the second terminal 1020 via the distributed scheduling subsystem 1022, receive the recent task information of the distributed scheduling subsystem 1012 of the second terminal 1020, and conveniently complete synchronization of the recent task information of the second terminal 1020.

[0197] In some demonstrative embodiments, as shown in FIG. 3(i), after receiving a recent task information synchronization request from the first terminal 1010, the distributed scheduling subsystem 1022 of the second terminal 1020 can send the recent task information of the second terminal 1020 from the local task management module 1023 to the global task center 1021 of the second terminal 1020, and then the global task center 1021 of the second terminal 1020 sends the recent task information to the global task center 1011 of the first terminal 1010.

[0198] When this implementation is used, the global task center is located at the application layer and cannot directly perceive other terminals or obtain information from other terminals. When the global task center 1021 of the second terminal 1020 needs to send information to the global task center 1011 of the first terminal 1010, the global task center 1021 of the second terminal 1020 needs to obtain the identifier of the first terminal 1010 and the identifier of the global task center. When a message including recent task information is sent, the message carries the identifier of the first terminal 1010 and the identifier of the global task center. Therefore, after receiving the recent task information from the second terminal 1020, the first terminal 1010 can forward the recent task information to the global task center of the first terminal.

[0199] Optionally, when transmitting the recent task information to the first terminal, the second terminal may perform the transmission in multiple formats. For example, a possible transmission method uses a remote procedure call (RPC). RPC is a computer communication protocol that allows a program on one computer to call a subprogram in another address space. A programmer does not need to program this interaction function additionally, as in the case of calling a local program. RPC is a server-client Tomo The conventional implementation is a system where information interaction is performed by sending request-acceptance responses.

[0200] In another possible transmission scheme, the second terminal and the first terminal may jointly maintain a shared database. When the second terminal needs to transmit data to the first terminal, the second terminal may place the data to be transmitted in the shared database. When the content in the shared database changes, the first terminal may recognize the change, extract the content placed in the shared database by the second terminal, and transfer the content to the global task center of the first terminal.

[0201] In yet another possible transmission scheme, when a second terminal needs to transmit data (e.g., including a data stream of recent task information or a recently executed application) to a first terminal, the second terminal may segment the data stream, establish an index table for the segment data, transmit the segment data in parallel through multiple threads in a distributed file system, and transmit the index table to the first terminal (e.g., the index table is transmitted to the first terminal by being written into a parcel for RPC transmission). The first terminal restores the application data based on the received segment data and index table to finally implement the transmission of the recent task information or the data of the recently executed application between unused devices. For a specific process of performing transmission in this manner, please refer to the description of the exemplary embodiment shown in Figures 18 to 20.

[0202] In yet another possible transmission scheme, when a second terminal needs to transmit data (e.g., including recent task information or a data stream of a recently executed application) to a first terminal, the local task stack restoration mechanism of the second terminal is extended to a distributed scenario, thereby 1 The first terminal and the second terminal may perform task migration (i.e., transmission of recent task information or data of recently executed applications) based on stack migration. In this way, the first terminal may store and restore context information (Context) of the local task stack of the second terminal, allowing a user to perform a task on the second terminal through a seamless hop on the first terminal and ultimately perform transmission of recent task information or data of recently executed applications between unused devices. For specific processes of performing transmission in this manner, please refer to the descriptions of the exemplary embodiments shown in Figures 23A to 23G, 24A to 24G, 25A and 25B, and 26.

[0203] The transmitted recent task information includes a stack that records recent task information, snapshot information of recently used applications, identifiers, state information, etc. The stack is a data structure used to record recently used applications and sequences, and a threshold for the amount of recently used applications recorded by the terminal is determined for the setting of the stack. When the threshold is exceeded, the application with the earliest usage time is removed from the recent task list. The state information is used to record the state of each application before the background application is terminated, and includes window mode information, intent information, etc. Optionally, the window mode information indicates the display mode that exists when the application is executed in the foreground. For example, when the value of the window mode information is 1, it indicates that the previous display mode of the application is full-screen display. When the value of the window mode information is 101, it indicates that the display mode of the application is split-screen display. The intent information includes information required when the application is opened, such as one or more items of data: a remote device ID, an application's package name, class name, or clear mode. In addition, additional user data may be stored. For example, a video application may store Uniform Resource Identifiers (URIs) and progress data on a remote device to "seamlessly switch" (also called a hop or transition) between videos being played by a local device.

[0204] The first terminal obtains the status information of the recently used application of the second terminal, and the user can instruct the first terminal to execute the application based on the status information of the application. For example, the user can directly open the interface that exists when the application enters the background on the second terminal.

[0205] In addition, in a possible implementation, the state information of the application may further include a feature ability (FA) file. Even if the application is not installed on the first terminal, the application can be directly executed based on the FA file.

[0206] Optionally, in this application, a first terminal needs to obtain recent task information of another terminal in a network, and the recent task information is related to user privacy issues. Therefore, before the first terminal exchanges the recent task information with the second terminal, a trusted relationship may be established between the first terminal and the second terminal. In other words, the first terminal and the second terminal are bound or a device-level authentication relationship is established.

[0207] For ease of understanding, the following describes the device-level authentication user interface provided in this embodiment of the present application by using an example in which mobile phone A is the first terminal and mobile phone B is the second terminal.

[0208] Optionally, in some exemplary embodiments, as shown in FIG. 3(j), a user may enter the intelligent collaboration interface 701 from a settings application. The intelligent collaboration interface 701 may include a list named "My Devices." "My Devices" includes the current terminal (i.e., mobile phone A), kiki's Matepad, and kiki's Matebook pro. The current terminal, kiki's Matepad, and kiki's Matebook pro may be devices with the same account (e.g., devices sharing one Huawei account). Alternatively, the current terminal, kiki's Matepad, and kiki's Matebook pro may be devices with different accounts but that are authenticated (see the related description below for the authentication process).

[0209] Optionally, the intelligent collaboration interface 701 may include a "Bind another device" button 702. In this embodiment of the present application, binding refers to establishing a trusted relationship between two devices to perform operations such as viewing recently used applications between the devices. As shown in FIG. 3(k), mobile phone A may display a "Tap to add" button 703 and a "Scan to add" button 704 in response to an operation (e.g., a tap operation) performed by a user on the "Bind another device" button 702. U corresponding to FIGS. 3(j) and 3(k) Inside I It should be understood that the positions, names, and shapes of the elements (e.g., buttons, icons, and words) are not fixed and can be freely combined or designed based on requirements. For example, button 702 in Figure 3(j) may be replaced with button 703 and button 704 in Figure 3(k).

[0210] For example, as shown in FIG. 3(l), mobile phone A may display a "tap to add" interface 705 in response to a user tapping on the "tap to add" button 703. The "tap to add" interface 705 may display a pop-up box 706. The pop-up box 706 includes a prompt image and prompt information. For example, the prompt information may be "Tap to add: After enabling NFC on your mobile phone, use the back of your mobile phone to tap the ontag label on your device." The user can perform an operation based on the prompt information to add a new device via a "tap." As another example, as shown in FIG. 3(m), mobile phone A may display a "scan to add" interface 707 in response to a user tapping on the "scan to add" button 704. The "scan to add" interface 707 may include a prompt image and prompt information. The prompt information may be, for example, "Scan the two-dimensional code on the device or package." The user can perform an operation based on the prompt information to add a new device via a "scan."

[0211] Optionally, in some exemplary embodiments, if mobile phone A does not support adding a new device via "tap" or "scan," in response to a user tapping the "Bind another device" button 702 in the intelligent collaboration interface 701, as shown in FIG. 3(n), mobile phone A may display a pop-up box 708, as shown in FIG. 3(o). The pop-up box 708 includes prompt information "Please make sure the device is enabled and near your mobile phone." The pop-up box 708 may further include devices detected by mobile phone A via a short-range communication network (e.g., a Wi-Fi network or a Bluetooth network), such as a room TV, a HUAWEI P30, or a Matebook X Pro. Each device corresponds to a "Bind" button. In response to a user operating the "Bind" button 709 corresponding to the HUAWEI P30, prompt information 710 "Waiting for peer end confirmation" may be displayed below the identifier of the HUAWEI P30, as shown in FIG. 3(p). The pop-up box 708 may further include a "Cancel" button 711. In response to the user tapping the "Cancel" button 711, mobile phone A may return to the interface shown in FIG. 3(n).

[0212] If the peer device provides confirmation (e.g., the user of the peer device agrees to establish a trusted relationship), in a possible implementation, the peer device establishes a trusted relationship with mobile phone A in response to the peer device's confirmation command, thereby allowing mobile phone A to view the peer device's recent task information. In another possible implementation, to complete the establishment of the trusted relationship, mobile phone A must further scan the two-dimensional code displayed by the peer device, thereby further improving security and protecting privacy. As shown in FIG. 3(q), mobile phone A may display a "Bind New Device" interface 712, which may include prompt information such as "Please scan the two-dimensional code displayed on the peer device." The user may perform an operation based on the prompt information to add a new device. Different U I space It should be understood that the jump relationship between the two is not limited in this embodiment of the present application. For example, as shown in Fig. 3(o), in response to a user tapping the "Bind" button 709, the mobile phone may directly display the scan interface 712 as shown in Fig. 3(q).

[0213] If the peer device does not provide confirmation (e.g., the peer device does not have the bind function, the bind timeout occurs, the peer device is busy, or the user of the peer device does not agree to the bind), optionally, as shown in FIG. 3(r), mobile phone A may display a pop-up box 721 to prompt the user with "Device authentication failed." Pop-up box 721 may be hidden in response to the user tapping an "OK" button 722. Alternatively, pop-up box 721 may be hidden after a preset period (e.g., 3 seconds). In another possible design, as shown in FIG. 3(s), mobile phone A displays a pop-up box 723 to prompt the user with "Peer end is busy. Please start binding later." Pop-up box 723 may be hidden in response to the user tapping an "OK" button 724. Alternatively, pop-up box 723 may be hidden after a preset period (e.g., 3 seconds). In yet another possible design, as shown in FIG. 3(t), mobile phone A may display a pop-up box 725 to prompt the user, "The peer end has refused to trust this device, and binding has failed." The pop-up box 725 may be hidden in response to the user tapping an "OK" button 726. Alternatively, the pop-up box 725 may be hidden after a preset period (e.g., three seconds). Alternatively, as shown in FIG. 3(u), mobile phone A may display a pop-up box 727 on interface 712 to prompt the user, "The peer end's two-dimensional code is invalid, device authentication cannot be completed, and binding has failed." The pop-up box 727 may be hidden in response to the user tapping a button 728.

[0214] Assume that the peer device is mobile phone B (for example, the peer device may be a HUAWEI P30). In some exemplary embodiments, when mobile phone B receives a binding request from mobile phone A while displaying home screen 730, mobile phone B may display a pop-up box 731, as shown in FIG. 3(v). The pop-up box 731 may include prompt information 732, such as "HUAWEI MATE30 is requesting to bind with your current terminal. Do you want to trust this device?" The pop-up box 731 may further include a "Don't Trust" button 733 and a "Trust" button 734. A countdown (for example, 14 seconds) may also be displayed on the "Don't Trust" button. If the user does not tap either button when the countdown ends, the pop-up box 731 may be automatically hidden. In response to the user tapping the "Trust" button 734, mobile phone A may perform an authentication process with mobile phone B, thereby binding mobile phone A to mobile phone B.

[0215] In some exemplary embodiments, when mobile phone B receives a binding request from mobile phone A in a screen-off state or a screen-locked state, mobile phone B may display a pop-up box 736 on the lock screen interface 735, as shown in FIG. 3(w). The pop-up box 736 may prompt the user in the case where the intelligent collaboration application receives a device binding request at 7:30 a.m., and the device binding request may specifically be, "HUAWEI MATE30 (i.e., mobile phone A) is requesting to bind with the current terminal. Do you want to trust this device?" In response to the user entering the home screen from the screen-locked state (e.g., entering a password or a fingerprint), the pop-up box 736 in FIG. 3(w) may be replaced with the form of the pop-up box 731 in FIG. 3(v), and the user may select whether to trust or not trust the HUAWEI MATE30 (e.g., mobile phone A).

[0216] In some exemplary embodiments, if mobile phone B receives a binding request from mobile phone A while in a video playback state or a game state, mobile phone B may display a pop-up box 741 on the video interface or game interface 740, as shown in FIG. 3(x). The pop-up box 741 may prompt the user about the case where the intelligent collaboration application receives a device binding request, and the device binding request may specifically be, "HUAWEI MATE30 is requesting to bind with the current terminal. Do you want to trust this device?" In response to the user tapping the drop-down control 742, the pop-up box 741 may display more information, such as a "Don't Trust" button 743 and a "Trust" button 744, as shown in FIG. 3(y). The "Don't Trust" button 743 may also display a countdown (e.g., 14 seconds). If the user does not tap either button when the countdown expires, the pop-up box 741 may be automatically hidden. In response to the user tapping the "Trust" button 744, mobile phone A may perform an authentication process with mobile phone B.

[0217] In some exemplary embodiments, in response to the user tapping the “Trust” button, as shown in FIG. 3(z), mobile phone B may return to home screen 730 and display pop-up box 750. Pop-up box 750 may include a two-dimensional code 751 generated by mobile phone B and may further include prompt information 752, “Scan to bind. Please scan to allow HUAWEI MATE30 to bind with the current device.” In this case, the user of mobile phone A may use mobile phone A to scan the two-dimensional code displayed by mobile phone B, thereby binding mobile phone A to mobile phone B. Pop-up box 750 may further include a “Cancel” button 753, and pop-up box 750 may be hidden in response to the user tapping the “Cancel” button 753.

[0218] In some exemplary embodiments, when mobile phone A and mobile phone B are logged into the same account (e.g., a Huawei account), mobile phone A can be directly bound to mobile phone B. For example, directly tap the "Bind" button corresponding to mobile phone B on mobile phone A without waiting for mobile phone B to provide confirmation.

[0219] It should be noted that, to implement the solution in this embodiment of the present application, the intercommunication between devices can be performed based on the same network, or based on a previous trust relationship between the devices, such as a common account, an associated account, or a binding relationship, or based on the case where the same network and trust relationship have been established, which is not limited in the present application.

[0220] For example, a first terminal, a second terminal, and a third terminal may be networked to form a local area network device group, and multiple devices in the local area network device group are trusted devices. In this case, the local area network device including the first terminal, the second terminal, and the third terminal may be referred to as a "super device."

[0221] As another example, a first terminal, a second terminal, and a third terminal may each separately log into the same account.

[0222] As another example, a first terminal, a second terminal, and a third terminal each log in to a different account, but these three accounts are related accounts, home accounts, etc. that are mutually trusted.

[0223] As yet another example, at least one device among the first terminal, the second terminal, and the third terminal may be logged into an account, and at least one device may not have an account, and a device-level authentication relationship may be established between the device with the account and the device without the account. The specific expression by which the trusted relationship is established among the first terminal, the second terminal, and the third terminal is not limited by this application.

[0224] The recent task interface of the first terminal not only displays recently used applications of the first terminal, but also displays recently used applications of the second terminal and the third terminal. When a historical task card of another device is displayed in the recent task interface of the first terminal, identifiers of the first terminal and multiple terminals (including the second terminal and the third terminal) connected to the first terminal (for example, the multiple terminals and the first terminal are logged in to the same account, connected to the same Wi-Fi hotspot, or logged in to associated accounts) may be separately displayed in the recent task interface of the first terminal. When the identifier of the first terminal or the identifier of the terminal connected to the first terminal is selected, a recent task list corresponding to the terminal is displayed in the recent task interface.

[0225] When the recently used applications of the second terminal change, the recent task list displayed in the recent task interface of the first terminal also needs to be updated. The following describes a method for updating the task interface of the first terminal.

[0226] For example, a user of a second terminal opens a clock application on the second terminal. In this case, for the second terminal, Clock becomes the most recently used application of the second terminal. In the above process, a listener of the task management module of the second terminal is registered with the distributed scheduling subsystem of the second terminal. Therefore, when the most recently used application of the second terminal changes, the listener can obtain information about the change and send the information to the distributed scheduling subsystem of the second terminal.

[0227] After receiving the information indicating that the Clock application has become a recent application, the second distributed scheduling subsystem may further transmit the information to the distributed scheduling subsystem of the first terminal. After receiving the information, the distributed scheduling subsystem of the first terminal updates its cache of recent task information and notifies the global task center of the first terminal to obtain the updated recent task information. In this case, when the user of the first terminal views the global task center of the first terminal, the user can see that the Clock application has also been added to the recent task list corresponding to the second terminal.

[0228] In a possible implementation, snapshot information and intent information related to the clock application may also be sent from the second terminal to the global task center of the first terminal. In the recent tasks interface of the first terminal, a task card corresponding to "Clock" displays a snapshot captured by the system when the application enters the background. In addition, when the task card corresponding to "Clock" is tapped, the clock application may be entered on the first terminal based on the usage state of the clock application on the second terminal.

[0229] In some exemplary embodiments, for some frequently used applications, if the application is frequently opened on the second terminal, the application's position in the recent tasks interface, the snapshot information captured when the application enters the background, and the intent information change each time the application is opened or backgrounded. If all information related to the application needs to be sent from the second terminal to the first terminal, significant resources are consumed. In this case, each time recent task information needs to be synchronized, the second terminal may compare the information that needs to be sent at the current time with the information that needs to be sent at the previous time, deduplicate the information that needs to be sent based on a deduplication algorithm, and send only the recent task information that has changed to the distributed scheduling subsystem of the first device to reduce the amount of data exchanged between the second terminal and the first terminal. For example, only task information fields such as taskID, userID, windowMode, or displayID may be selected, and fields such as the isRunning field may not be focused. For example, even if the isRunning field changes, the change is not notified or synchronized to the remote device. In this manner, the amount of data that needs to be transmitted between the first device and the second device due to synchronization of recent task information may be reduced, saving network resources.

[0230] The above-described synchronization of recent task information is explained by using an example in which the second terminal automatically transmits information to the first terminal in the background. In another possible implementation, when the listener of the second terminal learns that a recently used application of the second terminal has changed, this portion of data is transmitted to the distributed scheduling subsystem of the second terminal. The recent task information of the second terminal may change frequently, and the user of the first terminal may not always query the recent task information of the second terminal in the recent task interface of the first terminal. Therefore, the distributed scheduling subsystem of the second terminal may temporarily not transmit this portion of data to the first terminal. When the user of the first terminal operates the first terminal to enter the recent task interface or taps the identifier of the second terminal in the recent task interface, the global task center of the first terminal may be triggered to transmit a request to the distributed scheduling subsystem of the second terminal via the distributed scheduling subsystem of the first terminal, requesting the second terminal to transmit the latest recent task information to the first terminal. The second terminal executes the aforementioned task information synchronization procedure and transmits the currently acquired recent task information to the first terminal, thereby allowing the user of the first terminal to browse to the recent task information of the second terminal. In this case, the second terminal does not need to actively synchronize the recent information with the first terminal. Instead, the recent task information is synchronized when a preset trigger condition occurs, for example, when the user of the first terminal operates the first terminal to enter a recent task interface or taps an identifier of the second terminal in the recent task interface. The user of the first terminal does not need to always know the recent task status of the second terminal and usually does not need to spend much time synchronizing the recent task information. Therefore, while ensuring the user experience, the number of times the recent task information of the first terminal and the second terminal is synchronized is reduced, the amount of data required for synchronizing the recent task information is reduced, and network resources are saved.

[0231] Whether recent task information is automatically synchronized in the background or triggered based on preset conditions may be preset by the first terminal and / or the second terminal. In other words, after the first terminal is connected to the second terminal and this function is enabled, whether recent task information is automatically synchronized in the background or triggered based on preset conditions is determined. Alternatively, whether synchronization is performed automatically in the background or triggered based on preset conditions may be used as an option that can be set by the user, and the user may set a specific synchronization mode to be used by the first terminal and / or the second terminal based on the actual usage requirements or status of the first terminal and / or the second terminal.

[0232] When a user of a first terminal is using the first terminal, not only can the user view recently used applications of another terminal in the recent task interface, but also can clear applications running in the background of the other terminal. For example, if a second terminal is currently playing music in the background and the user of the first terminal expects the second terminal to be able to stop playing the music, the user of the first terminal can conveniently clear the music application of the second terminal in the recent task interface of the first terminal according to the technical solution provided in this application. For example, the user of the first terminal can drag and slide up the card of the music application in the recent task list corresponding to the second terminal. After receiving the user's command, the first terminal can send information about the application to be cleared to the distributed scheduling subsystem of the second terminal via the distributed scheduling subsystem of the first terminal. After receiving the task information to be cleared, the distributed scheduling subsystem of the second terminal stops the music application, and after the music application is stopped, sends feedback information to the distributed scheduling subsystem of the first terminal. The feedback information indicates that the music application of the second terminal has been cleared. After receiving the feedback information, the distributed scheduling subsystem of the first terminal sends a notification to the global task center of the first terminal to instruct the global task center to refresh a recent task interface, and the music application does not appear in the refreshed recent task interface or in a recent task list corresponding to the second terminal in the recent task interface.

[0233] When a user of a first terminal wishes to clear all background applications of a second terminal to reduce the energy consumption and currently occupied processor and memory resources of the second terminal, the user may tap an icon indicating that all background applications should be cleared in the recent task interface. After the icon is tapped, the global task center of the first terminal sends a notification to the distributed scheduling subsystem of the second terminal via the distributed scheduling subsystem of the first terminal. The notification instructs the second terminal to clear all current background tasks. After the clearing is completed, feedback information is sent to the first terminal, allowing the global task center of the first terminal to refresh the recent task interface, and the user of the first terminal knows that the recently used background applications of the second terminal have been cleared.

[0234] A method for clearing recently used applications of a second terminal in a recent task interface of a first terminal is used as an example for explanation. For example, a second terminal (P30) has recently been running app1, app3, app4, and app5. As shown in FIG. 4(a), a user may view the recently run applications of the second terminal in the recent task interface of the first terminal. For example, if the user wants to clear app3, the user may perform a slide-up gesture on the task card corresponding to app3. After receiving an instruction from the user, the first terminal may instruct the second terminal to clear app3. After clearing app3, the second terminal may send feedback information to the first terminal to indicate that app3 has been cleared. As shown in FIG. 4(b), after receiving the feedback information, the first terminal stops displaying app3 in the recent task interface and displays app1, app4, and app5 other than app3.

[0235] In another possible implementation, recently used applications of all terminals are displayed together. In this case, when a user of a first terminal operates the first terminal to enter a recent task interface, each application in the displayed recent task list is a recently used application of one or more terminals in the network. Correspondingly, when a user wants to clear an application, it may mean that the user wants to clear the application on all terminals that recently used the application. For example, when a user slides up the task card of an application to instruct the user to clear the application, the first terminal obtains information indicating specific terminals in the network that run the application to be cleared in the background based on information recorded in the global task center. For example, if a user wants to clear the Taobao® application, the global task center determines based on the recorded information that the Taobao application is running in the background of a second terminal and a third terminal. In this case, the global task center of the first terminal may send a clear request to each of the second terminal and the third terminal via the distributed scheduling subsystem of the first terminal. The clear request instructs each of the second terminal and the third terminal to clear the Taobao application running in the background.

[0236] After the second terminal and the third terminal each clear all background applications, feedback information may be sent to the first terminal. In a possible implementation, the global task center of the first terminal receives feedback information from the second terminal but does not receive feedback information from the third terminal. In this case, it is not determined whether the third terminal has cleared the corresponding application, so the task card for the Taobao application may continue to be retained in the recent task view. Optionally, when the corresponding identifier of the terminal is displayed around the task card, since the second terminal has cleared the Taobao application in the background, the identifier of the second terminal around the Taobao application may be removed to notify the user that the second terminal has cleared the Taobao application in the background. Optionally, after the global task center of the first terminal subsequently receives feedback information from the third terminal, it is determined that all terminals running the Taobao application in the background have cleared the application, so information about the Taobao application may be deleted in the recent task interface of the first terminal.

[0237] In the above, a case has been described in which a first terminal needs to first establish a trust relationship between the first terminal and another terminal when obtaining recent task information of the other terminal in the network. In some exemplary embodiments, the first terminal: A trusting relationship was established To view and even clear recently used applications on another device No permissionAfter obtaining permission, applications for which the first terminal can obtain permission may be restricted to prevent malware from using the permission to perform behavior undesirable to the user. For example, only applications such as a global task center may be configured to be authorized to obtain permission, and corresponding operations may be performed. In this case, after receiving the clear command, the distributed scheduling subsystem of the first terminal may first perform permission verification to determine whether the clear command is from an application authorized to obtain permission. If it is determined that the clear command is from an authorized application, the clear command may be forwarded to the distributed scheduling subsystem of the terminal corresponding to the clear command. If it is determined that the clear command is not from an authorized application, the clear command is discarded.

[0238] It should be understood that the foregoing description of the permission verification method for an application is merely an example. In some exemplary embodiments, whether an application can be authorized to obtain permission to view and / or clear recently used applications of another terminal may be preset by the first terminal or may be set by a user of the first terminal. Verification of whether the application sending the clear command has permission may be completed by the distributed scheduling subsystem of the first terminal, the distributed scheduling subsystem of the other terminal, or another application on the first terminal. The foregoing scheme is not limited in this application.

[0239] In some demonstrative embodiments, the first terminal may not only view or clear recently used applications of another terminal, but may also migrate recently used applications of another terminal to the first terminal, migrate recently used applications of the first terminal to another terminal, or change an application running in the background to run in the foreground.

[0240] In some exemplary embodiments, as shown in Figure 4(c), a user of a first terminal opens a recent tasks interface of the first terminal, which is an interface that displays a recent task list of a second terminal (P30). Information about recently used applications of the second terminal is sent to the first terminal, so that the user can migrate applications on the second terminal to the first terminal and open the applications on the first terminal.

[0241] In some exemplary embodiments, a user may drag a task card corresponding to App 3 onto the icon of "Current Terminal" to instruct the first terminal to execute App 3. When the first terminal is connected to both the second terminal and the third terminal (P40), the recent tasks interface of the first terminal displays icons corresponding to the three terminals, as shown in FIG. 4(d). In this case, the first terminal can not only transfer applications on the second terminal to the first terminal, but also drag a task card corresponding to App 3 onto the icon of "P40" to instruct the first terminal to transfer App 3 to the third terminal.

[0242] Since the first terminal obtains the state information of the recently used application of another terminal, when the application on the second terminal is migrated to the first terminal or a third terminal, the first terminal or the third terminal can directly open the interface that exists when the application enters the background to run on the second terminal. The state information of the application may further include an FA file. Even if the application is not installed on the first terminal or the third terminal, the application can be directly executed based on the FA file.

[0243] In some embodiments, a first terminal may send page element information and page resources of a shared page, including an application, to another device in the form of an FA file, and the other device may execute the FA file by using an FA runtime module to perform application migration. The FA runtime module may convert source code into a user interface. Therefore, the FA file may be independently packaged and released and may have one or more of the following capabilities: installation-free, off-application independent execution, cross-device UI migration, and cross-device binary migration, thereby making it more convenient to share content between devices.

[0244] Optionally, migrating the application from the second terminal to the first terminal may be opening the application on the first terminal. In another possible implementation, migrating the application from the second terminal to the first terminal may be transmitting an interface of the application to the first terminal by projection. In this implementation, when a small amount of data is transmitted, a user of the first terminal can obtain information about the application executed by the second terminal.

[0245] In some exemplary embodiments, the user of the first terminal may further perform an operation, such as tapping a task card corresponding to the application in a recent task list interface of the second terminal or dragging the task card to an icon of the second terminal in the interface, to instruct the second terminal to change the application running in the background to run in the foreground. In response to this operation, the interface of the application may be displayed on the display of the second terminal, thereby allowing the user to view the application.

[0246] In some exemplary embodiments, as shown in FIG. 4(e), a user of a first terminal opens a recent tasks interface of the first terminal, which is within an interface displaying a recent task list of the first terminal (current terminal). In the interface, the user may migrate recently executed applications of the first terminal to another terminal. For example, the user may drag a task card corresponding to app2 to an icon corresponding to the second terminal to send status information of app2 to the second terminal and execute app2 on the second terminal.

[0247] It should be noted that to transfer an application to a terminal, a task card corresponding to the application is dragged onto the terminal's icon. This is merely an example of an operation method, and is not limited to this application. In practice, application transfer may alternatively be indicated in another manner. For example, an operation method may be set in which, when a task card is touched and held in the recent task interface, an option to transfer the application corresponding to the task card to another terminal is displayed.

[0248] In this application, an explanation is provided by using an example in which recent task information of another terminal is viewed. In practice, in this application, not only the recently used applications of another terminal can be viewed, but also other information about applications on another terminal can be viewed, and more functions can be implemented.

[0249] In some exemplary embodiments, the first terminal may further acquire usage time information and / or usage time amount information of an application on the second terminal. The usage time in this specification may be the total usage time of the application on the second terminal, or the usage period of the application by the second terminal in a preset period, for example, in one day or one week. The usage frequency may be the total number of times the second terminal opens the application, or the number of times the second terminal opens the application within a preset period. Optionally, usage time is used as an example for explanation. As shown in FIG. 4(f), in the recent task interface, the usage time of the application corresponding to the task card may be displayed next to the task card. Alternatively, as shown in FIG. 4(g), the usage time of the application on the second terminal may be displayed in a separate interface. To help the user of the first terminal more directly know the usage status of the application on the second terminal, data analyzed based on preset rules may be further displayed on the first terminal. For example, as shown in FIG. 4(h), a user of a first terminal may instruct the first terminal to analyze applications on a second terminal based on usage duration, and display the identifiers of several applications with the longest usage time on the second terminal and the corresponding usage time. Optionally, the system of the first terminal or the user of the first terminal may set the number of applications that need to be displayed. For example, the three applications with the longest usage time and the usage time of these three applications may be set. In this way, the user of the first terminal can not only know the recently used applications of the second terminal, but also know the applications with the longest usage time or the largest amount of usage time on the second terminal, thereby better controlling the usage status of applications on the second terminal.

[0250] In some exemplary embodiments, FIG. 4(i) is a schematic flow chart of an embodiment of the present application.

[0251] As shown in FIG. 4(i), this embodiment includes the following steps:

[0252] S1401: A first terminal receives recent task information from a second terminal.

[0253] As described above, after the first terminal and the second terminal are connected via a network, the first terminal may receive recent task information from the second terminal, where the recent task information includes information about a first application recently executed by the second terminal, and the information about the first application includes an identifier of the first application.

[0254] S1402: A first terminal receives a first command from a user.

[0255] After the first terminal obtains the recent task information of the second terminal, the user may send a first instruction to the first terminal to instruct the first terminal to open a recent task interface, so that recently used applications of the second terminal can be viewed in the recent task interface.

[0256] In one possible implementation, the recent tasks interface of the first terminal includes at least two controls, including a first control corresponding to the first terminal and a second control corresponding to the second terminal, wherein tapping the corresponding control allows viewing of recently used applications of the corresponding terminal.

[0257] In another possible implementation, both the recently used applications of the first terminal and the recently used applications of the second terminal are displayed in the recent tasks interface of the first terminal without the need to tap a control to view the recently used applications of the terminal.

[0258] The two implementations are examples. The presentation format of the current task interface is not limited in this application.

[0259] S1403: The first terminal displays an identifier of the first application in a recent task interface.

[0260] Upon entering the recent task interface, the screen of the first terminal displays the identifier of the first application recently used by the second terminal.

[0261] It should be understood that the order of steps is merely a possible implementation and is not limited in this application. For example, step S1402 may be performed before step S1401. Specifically, upon receiving a first command or a second command from a user, the first terminal sends a first request to the second terminal, which is used to request recent task information of the second terminal, and then receives the recent task information from the second terminal.

[0262] Optionally, this embodiment may further include the first terminal further receiving an instruction to clear the first application from the user and sending a second request to the second terminal. The second request instructs the second terminal to clear the first application. After the second terminal clears the first application, the first terminal may further receive feedback information from the second terminal. The feedback information indicates that the first application needs to be cleared.

[0263] In the recent task interface of the first terminal, the user may further drag the task card corresponding to the first application to a preset position (e.g., an identifier of the first terminal in the recent task interface), thereby causing the first terminal to execute the first application based on the information about the first application received from the second terminal.

[0264] Since the recent task information of the second terminal acquired by the first terminal is related to privacy issues of the user of the second terminal, a trusted relationship may be first established between the first terminal and the second terminal before the first terminal receives the recent task information of the second terminal.

[0265] FIG. 4(j) is a schematic flow chart of another embodiment of the present application.

[0266] As shown in FIG. 4(j), this embodiment includes the following steps:

[0267] S1501: A second terminal receives a first request from a first terminal, where the first request is used to request recent task information of the second terminal, and the recent task information includes recently used applications of the second terminal.

[0268] S1502: Recent task information is transmitted to the first terminal.

[0269] Optionally, the second terminal may further receive a second request from the first terminal. The second request instructs the second terminal to clear the application in the recent task information. In response to the second request, the second terminal clears the corresponding application and sends feedback information to the first terminal. The feedback information indicates that the application has been cleared.

[0270] In another embodiment of the present application, the first terminal can further receive other task information from the second terminal, for example, information about the application of the second terminal that has the longest execution time within a preset period, to better understand the usage status of the application of the second terminal.

[0271] In some demonstrative embodiments, when a recent tasks interface of a first terminal displays recently used applications of another terminal (in other words, displays recent task snapshots of another terminal, or displays recent task cards, history task cards, etc. of another terminal), the task cards of the other terminal may be laid out in the recent tasks interface of the first terminal based on a frequently used usage state of the other terminal. For example, frequently used usage states of the other terminal include landscape mode usage, portrait mode usage, portrait mode usage with a folding screen unfolded, landscape mode usage with a folding screen unfolded, landscape mode usage with a folding screen folded, portrait mode usage with a folding screen folded, etc. Alternatively, the task cards of the other terminal may be laid out in the recent tasks interface of the first terminal based on a usage state of the other terminal by a single user. Alternatively, the task cards of another terminal may be laid out in the recent tasks interface of the first terminal based on the screen status (e.g., size) and usage status (e.g., landscape mode or portrait mode) of the first terminal. Alternatively, the task cards of another terminal may be laid out in the recent tasks interface of the first terminal based on the user's settings for the first terminal. This is not a limitation of the present application.

[0272] In some exemplary embodiments, the circumstances under which historical task cards of device A are displayed and laid out in the recent tasks interface of another device may be determined based on the procedures shown in Figures 4(k) and 4(l).

[0273] As shown in FIG. 4(k), if device A is a foldable screen device (e.g., a foldable screen mobile phone), it is determined whether the frequently used state of device A in the previous period was the unfolded state. If the frequently used state of device A in the previous period was the unfolded state, it is further determined whether the frequently used state of device A in that period was the unfolded portrait mode. If the frequently used state of device A in that period was the unfolded portrait mode, the historical task card of device A is displayed (or laid out) in the recent task interface of another device based on the unfolded portrait mode manner of device A. If the frequently used state of device A is the unfolded landscape mode manner of device A, the historical task card of device A is displayed in the recent task interface of another device based on the unfolded landscape mode manner of device A.

[0274] If the frequently used usage state is the folded state, it is further determined whether the frequently used usage state is the use of the folded state in portrait mode during the period, and if the frequently used usage state is the use of the folded state in portrait mode during the period, the historical task card of device A is displayed in the recent task interface of another device based on the folded state portrait mode manner of device A. If the frequently used usage state is the folded state in landscape mode, the historical task card of device A is displayed in the recent task interface of another device based on the folded state landscape mode manner of device A.

[0275] As shown in FIG. 4(l), if device A is a non-folding screen device (e.g., a non-folding screen mobile phone or tablet computer), it is determined whether the frequently used state of device A in the previous period was portrait mode, and if the frequently used state of device A in the previous period was portrait mode, the historical task card of device A is displayed in the recent task interface of another device based on the portrait mode of device A. If the frequently used state is landscape mode, the historical task card of device A is displayed in the recent task interface of another device based on the landscape mode of device A.

[0276] It should be understood that in the decision steps shown in Figures 4(k) and 4(l), any branching steps may be performed separately, and the decision need not be performed sequentially based on all steps shown in Figure 4(k) or 4(l). In other words, in the decision steps shown in Figures 4(k) and 4(l), any step may be an independent solution.

[0277] In some exemplary embodiments, when the task card of the first terminal and the task card of the other device are displayed on the first terminal, the user may further select a task card layout. After the user selects a layout, the first terminal may display the task card of the first terminal and the task card of the other device on the first terminal in the layout format selected by the user. For example, layout formats that may be selected by the user include a horizontal list mode (List), a grid mode (Grid), a stack mode (Stack), a vertical list mode (Vertical list), a slim list mode (Slim list), etc. This is not limited in the present application.

[0278] In the following, descriptions will be provided separately with reference to different examples. It should be understood that the following examples in Figures 5(a) to 6(e) may be part of the flowchart shown in Figure 4(k) or Figure 4(l), or may be independent solutions, which are not limited in this embodiment of the present application.

[0279] Example 1: Assume that the first terminal is a tablet computer, the second terminal is another tablet computer, the third terminal is a non-foldable screen mobile phone, and the fourth terminal is a foldable screen mobile phone.

[0280] In some exemplary embodiments, FIG. 5(a) is a schematic diagram illustrating displaying a historical task card of a second terminal in the recent task interface of a first terminal (current terminal). As shown in FIG. 5(a), the layout of the historical task card of the second terminal displayed in the recent task interface of the first terminal is displayed as a multitasking layout based on the use of landscape mode on the second terminal. In FIG. 5(a), identifiers (icons) of the first terminal and multiple terminals connected to the first terminal (e.g., the multiple terminals and the first terminal are logged in to the same account, connected to the same Wi-Fi hotspot, or logged in to associated accounts) are separately displayed in the recent task interface of the first terminal. When the identifier of the first terminal or the identifier of a terminal connected to the first terminal is selected, the historical task card corresponding to the terminal is displayed in the recent task interface. As shown in FIG. 5(a), when the first terminal receives a user's instruction to select the identifier of a second terminal (MatePad), the historical task card of the second terminal is displayed in the recent task interface of the first terminal. When the historical task cards of the second terminal (MatePad) are displayed in the recent task interface of the first terminal (current terminal), the historical task cards of the second terminal (MatePad) are displayed in a single row based on the landscape mode usage of the second terminal (MatePad). In this implementation, when the historical task cards of a tablet computer are displayed in the recent task interface of another tablet computer, the historical task cards of the tablet computer in landscape mode are displayed in a single row based on the landscape mode usage of the tablet computer. This conforms to the user's usage habits for tablet computers and the normal display rules of tablet computers, is user-friendly, and improves the user experience. It should be further understood that the solution shown in FIG. 5(a) can be an independent solution.

[0281] In a possible implementation, as shown in FIG. 5(b), when a historical task card of a second terminal (MatePad) is displayed in the recent task interface of a first terminal (current terminal), the historical task card of the second terminal (MatePad) may be displayed in two lines based on the landscape mode of the second terminal (MatePad). In this implementation, when a historical task card of a tablet computer is displayed in the recent task interface of another tablet computer, the historical task card of the second terminal is displayed in more than two lines (e.g., three lines) based on the landscape mode of the tablet computer. This conforms to the user's usage habits for tablet computers and the normal display rules of tablet computers, is user-friendly, and improves the user experience. It should be further understood that the solution shown in FIG. 5(b) may be an independent solution.

[0282] In a possible implementation, FIG. 5(c) is a schematic diagram illustrating displaying a historical task card of a third terminal (P40) in the recent task interface of a first terminal (current terminal). As shown in FIG. 5(c), when the historical task card of the third terminal (P40) is displayed on the first terminal (current terminal), the historical task card of the third terminal (P40) is displayed based on the portrait mode of the third terminal (P40). In this implementation, when the historical task card of a non-folding screen mobile phone is displayed on the recent task interface of a tablet computer, the historical task card of the non-folding screen mobile phone is displayed based on the portrait mode of the non-folding screen mobile phone. This conforms to the user's usage habits for non-folding screen mobile phones and the normal display rules of tablet computers, is user-friendly, and improves the user experience. It should be further understood that the solution illustrated in FIG. 5(c) can be an independent solution.

[0283] In a possible implementation, FIG. 5(d) is a schematic diagram illustrating displaying a historical task card of a fourth terminal (Mate X2) in a recent task interface of a first terminal (current terminal). The fourth terminal (Mate X2) is a foldable screen device. Therefore, in a possible implementation, as shown in FIG. 5(d), when the historical task card of the fourth terminal (Mate X2) is displayed on the first terminal (current terminal), the historical task card of the fourth terminal (Mate X2) is displayed in a single row based on the portrait mode of the unfolded state of the foldable screen of the fourth terminal (Mate X2). Optionally, in another possible implementation, if the screen of the first terminal (current terminal) has height, the historical task card of the fourth terminal (Mate X2) may be displayed in multiple rows based on the portrait mode of the unfolded state of the foldable screen of the fourth terminal (Mate X2). In this implementation, when the historical task card of the foldable screen mobile phone is displayed in the recent task interface of the tablet computer, the historical task card of the foldable screen mobile phone is displayed based on the portrait mode usage of the foldable screen mobile phone in the unfolded state. This conforms to the user's usage habits for the foldable screen mobile phone and the normal display rules of the tablet computer, is user-friendly, and improves the user experience. It should be further understood that the solution shown in FIG. 5(d) can be an independent solution.

[0284] Example 2: Assume that the first terminal is a non-folding screen mobile phone, the second terminal is a tablet computer, and the third terminal is a folding screen mobile phone.

[0285] In some exemplary embodiments, FIG. 6( a) is a schematic diagram illustrating displaying a historical task card of a second terminal (MatePad) in a recent tasks interface of a first terminal (current terminal). As shown in FIG. 6( a), when the historical task card of the second terminal (MatePad) is displayed on the first terminal (current terminal), the historical task card of the second terminal is displayed in two rows based on the use of the landscape mode of the second terminal (MatePad). Optionally, when the historical task card of the second terminal (MatePad) is displayed on the first terminal (current terminal), the historical task card of the second terminal may alternatively be displayed in a single row based on the use of the landscape mode of the second terminal (MatePad). In this implementation, when the historical task card of the tablet computer is displayed in a recent tasks interface of a non-folding screen mobile phone, the historical task card of the tablet computer is displayed in two rows or a single row based on the use of the landscape mode in the unfolded state of the tablet computer. This conforms to the user's usage habits for tablet computers and the normal display rules of folding screen mobile phones, is user-friendly, and improves the user experience. It should be further understood that the solution shown in Figure 6(a) can be an independent solution.

[0286] In a possible implementation, FIG. 6(b) is a schematic diagram illustrating displaying a historical task card of a third terminal (Mate X2) in the recent task interface of a first terminal. The third terminal (Mate X2) is a foldable screen device. Therefore, in a possible implementation, as shown in FIG. 6(b), when the historical task card of the third terminal (Mate X2) is displayed on the first terminal (current terminal), the historical task card of the third terminal (Mate X2) is displayed in a single row based on the use of portrait mode in the expanded state of the third terminal (Mate X2). Optionally, if the screen of the first terminal (current terminal) has height, the historical task card of the third terminal (Mate X2) may be displayed in multiple rows based on the use of portrait mode in the expanded state of the third terminal (Mate X2).

[0287] Example 3: Assume that the first terminal is a non-folding screen mobile phone, the second terminal is a tablet computer, and the third terminal is a folding screen mobile phone. In addition, the first terminal is in a landscape mode display state. In this implementation, when the historical task cards of the folding screen mobile phone are displayed in the recent task interface of the non-folding screen mobile phone, the historical task cards of the folding screen mobile phone are displayed in a single row based on the portrait mode usage of the unfolded state of the folding screen mobile phone. This conforms to the user's usage habits for folding screen mobile phones and the normal display rules of non-folding screen mobile phones, is user-friendly, and improves the user experience. It should be further understood that the solution shown in FIG. 6(b) can be an independent solution.

[0288] In some exemplary embodiments, Figure 6(c) is a schematic diagram of displaying a historical task card of a first terminal (e.g., P40) in a recent task interface of the first terminal (current terminal). As shown in Figure 6(c), since the first terminal is displayed in landscape mode, the historical task card of the first terminal (current terminal) is displayed based on the first terminal's (current terminal's) use of landscape mode.

[0289] In a possible implementation, Fig. 6(d) is a schematic diagram of displaying a historical task card of a second terminal (MatePad) in the recent task interface of a first terminal (current terminal). As shown in Fig. 6(d), since the first terminal is displayed in landscape mode, the historical task card of the second terminal (MatePad) is displayed based on the use of landscape mode of the first terminal (current terminal).

[0290] Optionally, in the implementations shown in FIG. 6(c) and FIG. 6(d), when the historical task card of the non-folding screen mobile phone is displayed in the recent task interface of the non-folding screen mobile phone, the historical task card of the non-folding screen mobile phone is displayed on the non-folding screen mobile phone based on the usage state (landscape mode display or portrait mode display) of the non-folding screen mobile phone (landscape mode use, landscape mode display; portrait mode use, portrait mode display). This adapts to different usage habits of users. The task card of the non-folding screen mobile phone is displayed to the user without the user needing to switch between landscape mode and portrait mode, improving the user experience. It should be further understood that the solutions shown in FIG. 6(c) and FIG. 6(d) can be independent solutions.

[0291] In a possible implementation, FIG. 6(e) is a schematic diagram illustrating displaying a historical task card of a third terminal (Mate X2) in the recent task interface of a first terminal (current terminal). As shown in FIG. 6(e), since the first terminal is displayed in landscape mode, the historical task card of the third terminal (Mate X2) is displayed based on the first terminal (current terminal) using landscape mode, and the historical task card of the third terminal (Mate X2) is displayed in a single row based on the use of portrait mode with the folding screen in the unfolded state. Optionally, the historical task card of the third terminal (Mate X2) may alternatively be displayed based on the use of portrait mode with the folding screen in the folded state, or the use of landscape mode with the folding screen in the folded state, or the use of landscape mode with the unfolded state. This is not a limitation of the present application.

[0292] In the implementation shown in FIG. 6(e), when the historical task card of the foldable screen mobile phone is displayed in the recent task interface of the non-foldable screen mobile phone, the task card of the foldable screen mobile phone is displayed based on the user's usage state of the non-foldable screen mobile phone (landscape mode or portrait mode) and based on the user's usage state of the foldable screen mobile phone (portrait mode) with the foldable screen unfolded or portrait mode with the foldable screen folded. This adapts to different user usage habits. The historical task card of the foldable screen mobile phone is displayed based on the user's most frequently used usage state of the foldable screen mobile phone without requiring the user to switch between landscape mode and portrait mode, improving the user experience. It should be further understood that the solution shown in FIG. 6(e) can be an independent solution.

[0293] It should be understood that the above example is merely an example and should not impose any limitations on the layout of the historical task card of another device displayed in the recent task interface of the current device in this application. In another embodiment of this application, a different layout from the above example may alternatively be used for display. This is not a limitation in this application.

[0294] In this embodiment of the present application, when a historical task card of another device is displayed in the recent task interface of a first terminal (current terminal or local device), one or more last historical task cards of the other device may display a home screen snapshot (or a foreground home screen snapshot) of the device, or a home screen snapshot and a floating bubble of the device, or a home screen snapshot and a floating window of the device, or a home screen snapshot of the device. The home screen snapshot may display a task card, or a remote control for controlling the device, or an ongoing task of the device, or similar. Hereinafter, a description will be given with reference to specific examples.

[0295] Example 4: Assume that the first terminal (current terminal) is a tablet computer. FIG. 7(a) is a schematic diagram illustrating viewing a history task card of a non-folding screen mobile phone (P40) in a recent task interface of the first terminal. As shown in FIG. 7(a), the last task card in the history task card of the mobile phone P40 displays a home screen snapshot of the mobile phone P40, and a feature ability (FA) card may also be present on the home screen snapshot. The FA card may be a card corresponding to an application or a task. A user may tap an "FA card" on the home screen snapshot of the mobile phone P40. In a possible implementation, after the FA card is tapped, the application or task corresponding to the FA card is displayed on the screen of the first terminal. In other words, the application or task corresponding to the FA card is opened on the first terminal. Alternatively, in another possible implementation, after the FA card is tapped, the home screen of the mobile phone P40 is displayed on the screen of the first terminal, and the FA card is displayed on the home screen of the mobile phone P40. The user can tap the FA card, and the application or task corresponding to the FA card is displayed on the screen of the first terminal.

[0296] Example 5: Assume that the first terminal (current terminal) is a tablet computer. Figure 7(b) is a schematic diagram showing the state of viewing the history task cards of a non-folding screen mobile phone (mobile phone P40) in the recent task interface of the first terminal. As shown in Figure 7(b), the last several task cards in the history task cards of the mobile phone P40 each display a first screen snapshot of the home screen of the mobile phone P40. When the user performs a left slide gesture on the first screen snapshot of the home screen of the mobile phone P40, the last task card in the recent task interface of the first terminal is switched to a second screen snapshot of the home screen of the mobile phone P40, as shown in Figure 7(c). Optionally, the user may tap the first screen snapshot of the home screen of the mobile phone P40 or the second screen snapshot of the home screen, and the first screen snapshot of the home screen of the mobile phone P40 or the second screen snapshot of the home screen of the mobile phone P40 is displayed on the first terminal. The user may tap an application icon on the first screen snapshot or the second screen snapshot of the home screen of the mobile phone P40 to open an application on the first terminal. Alternatively, in another possible implementation, as shown in FIG. 7(c), the user may tap a blank area (an area other than the application icon on the home screen snapshot) on the first screen snapshot or the second screen snapshot of the home screen of the mobile phone P40. After the user taps the blank area, the first screen interface or the second home screen of the home screen of the mobile phone P40 is displayed on the screen of the first terminal. The user may tap an application icon on the home screen of the mobile phone P40 to open an application on the current terminal.

[0297] Example 6: Assume that the first terminal (current terminal) is a tablet computer. FIG. 7(d) is a schematic diagram showing the state of viewing the history task card of a non-folding screen mobile phone (e.g., P40) in the recent task interface of the first terminal. As shown in FIG. 7(d), the last task card in the history task card of the mobile phone P40 displays a home screen snapshot of the mobile phone P40, and the home screen snapshot of the mobile phone P40 displays a floating window of a task or application. Optionally, a user may tap the floating window on the home screen snapshot of the mobile phone P40 and tap the floating window. In a possible implementation, the application or task corresponding to the floating window is displayed on the first terminal. In other words, the application or task corresponding to the floating window is opened on the first terminal. Alternatively, in another possible implementation, after the floating window is tapped, the interface of the home screen of P40 is displayed on the first terminal. Optionally, the floating window exists in the interface of the home screen of P40. After the user taps the floating window on the home screen of the P40, the application or task corresponding to the floating window is opened on the first terminal.

[0298] Example 7: Assume that the first terminal (current terminal) is a tablet computer. FIG. 7(e) is a schematic diagram showing the state of viewing the history task card of a non-folding screen mobile phone (e.g., P40) in the recent task interface of the first terminal. As shown in FIG. 7(e), the last task card in the history task card of the mobile phone P40 displays a home screen snapshot of the mobile phone P40, and the home screen snapshot of the mobile phone P40 displays a floating bubble of a task or application. Optionally, the user may tap the floating bubble on the home screen snapshot of the mobile phone P40. In a possible implementation, after the floating bubble is tapped, the application or task corresponding to the floating bubble is displayed on the first terminal (e.g., displayed in full screen or in the form of a floating window). In other words, the application or task corresponding to the floating bubble is opened on the first terminal. Alternatively, in another possible implementation, after the user taps the floating bubble, the home screen of the P40 is displayed on the first terminal. Optionally, the floating bubble is present in an interface of a home screen of the P40. After a user taps the floating bubble on the home screen of the P40, an application or task corresponding to the floating bubble is opened on the first terminal.

[0299] Example 8: Assume that the first terminal (current terminal) is a tablet computer. FIG. 7(f) is a schematic diagram illustrating viewing a history task card of a large-screen device (HUAWEI TV) in the recent task interface of the first terminal. As shown in FIG. 7(f), the last task card in the history task card of the large-screen device displays a snapshot of the remote control of the large-screen device. Optionally, as shown in FIG. 7(f), the user may tap a blank area (an area outside the control buttons on the snapshot of the remote control) on the snapshot of the large-screen device's remote control. After the user taps the blank area, details of the remote control of the large-screen device are displayed on the first terminal. The user may directly control the large-screen device through the remote control of the large-screen device on the first terminal. Alternatively, the user may directly tap a control button on the snapshot of the remote control of the large-screen device to control the large-screen device.

[0300] Example 9: Assume that the first terminal (current terminal) is a mobile phone. FIG. 7(g) is a schematic diagram illustrating viewing historical task cards of multiple other devices in a recent task interface of the first terminal. Optionally, the icon of one device (e.g., the last device) among the multiple devices is an icon of a lightweight device type device. The lightweight device is a general term for devices such as Internet of Things (IOT) devices, wearable devices, and smart home devices. For example, the lightweight device may include a smart refrigerator, a smart air conditioner, a smart wok, a smart kitchen hood, a smart sound box, a smart watch, etc. After the user taps the "lightweight device" icon in FIG. 7(g), task cards corresponding to ongoing tasks of these lightweight devices (kitchen appliances) may be displayed on one or more task cards in the recent task interface of the first terminal, as shown in FIG. 7(h). When a user performs a left slide gesture on the task card of the lightweight device in Figure 7(h), the task card in the recent tasks interface of the first terminal displays the task card of another lightweight device (e.g., a portable device), as shown in Figure 7(i).

[0301] In the example shown in FIGS. 7(g) to 7(i), all lightweight devices are integrated and displayed using a single icon labeled "Lightweight Device" at the top of the screen. In some other embodiments of the present application, each lightweight device may alternatively correspond to a device icon for the lightweight device, and the device icon is displayed at the top of the screen. That is, one lightweight device corresponds to one device icon. Alternatively, lightweight devices may be categorized. One type of lightweight device corresponds to one icon. For example, multiple kitchen-type lightweight devices correspond to one device icon, and multiple living room-use-type lightweight devices correspond to one device icon. Alternatively, a user may independently provide settings for one or several lightweight devices so that they jointly correspond to one device icon, etc. This is not a limitation of the present application.

[0302] In some exemplary embodiments, in the interfaces shown in FIG. 7(h) and FIG. 7(i), in a possible implementation, the user may h ) and a blank area (i.e., an area outside the control buttons on any card) on any lightweight device shown in FIG. 7(i). For example, if a user performs a tap operation in a blank area on a task card of a smartwatch as shown in FIG. 7(j), the interface displayed by the first terminal will be as shown in FIG. 7(k). After the tap is performed, details of the ongoing task of the smartwatch may be displayed on the interface of the first terminal, and the user may remotely perform task control in the detailed interface.

[0303] As another example, if a user taps on a blank area on the task card of a Huawei watch (HUAWEI WATCH GT2) as shown in Fig. 7(l), the interface displayed by the first terminal will be as shown in Fig. 7(m). After the tap is performed, details of the ongoing task of the music player may be displayed on the interface of the first terminal, and the user may remotely control the task in the detailed interface.

[0304] In some exemplary embodiments, in the interfaces shown in Figures 7(h) and 7(i), in another possible implementation, a user may perform a tap operation on a blank area on any card of any lightweight device shown in Figures 7(i) and 7(j). After the tap is performed, details of the smartwatch (i.e., the lightweight device) may be displayed on the interface of the first terminal.

[0305] In some exemplary embodiments, in the interfaces shown in FIG. 7(h) and FIG. 7(i), in another possible implementation, the user can directly tap a control button on any lightweight device card. In other words, the user directly taps the corresponding control button on the lightweight device card to perform remote task control. For example, as shown in FIG. 7(n), when the user taps the "OFF" button on the smartwatch task card, the smartwatch stops operating.

[0306] In some exemplary embodiments, when the task card of another lightweight device is displayed in the recent task interface of the first terminal, if a small amount of corresponding operations are performed on the lightweight device, a standard device card may be used to display the task card of the lightweight device. For example, in Figures 7(h) and 7(i), the portable cards corresponding to the smart wok, smart kitchen hood, Huawei watch (HUAWEI WATCH GT2), and smart washing machine are all standard device cards.

[0307] Optionally, in another possible implementation, when a task card of another lightweight device is displayed in the recent task interface of the first terminal, if a large number of corresponding operations are performed on the lightweight device, more functions may be displayed on the task card of the lightweight device. For example, assuming that the lightweight device is a smart wok, simmering, frying, adjusting the heat, or switching to visually checking the status of ingredients in the smart wok can be quickly performed. Therefore, task cards corresponding to the lightweight device may be displayed by using immersive task cards. For example, as shown in FIG. 7(o), task cards corresponding to the smart wok and smart kitchen hood in the recent task interface of the first terminal are immersive task cards.

[0308] In some exemplary embodiments, when a task card of another lightweight device is displayed in a recent tasks interface of the first terminal, a user may further drag the task card of the lightweight device to an icon of another intelligent device (e.g., a MatePad and a Mate X2) in the recent tasks interface of the first terminal. Thus, the task card of the lightweight device is displayed in the recent tasks interface of the other intelligent device or on a home screen of the other intelligent device. Optionally, after the intelligent device receives information about the task card of the lightweight device, the intelligent device may further add the task card of the lightweight device to a RecentTasks center of the intelligent device or add the task card of the lightweight device to a home screen of the intelligent device.

[0309] Example 10: Assume that the first terminal (current terminal) is a mobile phone. When the recent task interface of the first terminal displays historical task cards of multiple other devices, one or more last task cards may display a home screen application icon of the device. For example, Figure 7(p) is a schematic diagram showing a historical task card of a mobile phone P40 displayed in the recent task interface of the first terminal. The last task card displays a home screen application icon of the mobile phone P40.

[0310] In the example shown in Figure 7(p), in a possible implementation, the user may tap a blank area on the task card to display the home screen applications of the mobile phone P40 on the first terminal as shown in Figure 7(q). The user may drag application icons in the interface shown in Figure 7(q) to help the mobile phone P40 manage applications (e.g., sort applications, create folders, or delete applications).

[0311] In the example shown in FIG. 7(p), in another possible implementation, the user may alternatively perform operations directly on the task card of the home screen application of the mobile phone P40, for example, by dragging an application icon on the task card of the home screen application of the mobile phone P40 to help the mobile phone P40 manage the application without first having to display the home screen application of the mobile phone P40 on the first device.

[0312] In some exemplary embodiments, in addition to the case where a task card of another lightweight device is displayed in the recent tasks interface of a terminal device used by a user, task cards of another intelligent device (including another lightweight device and an intelligent terminal used by a user, e.g., a mobile phone or a tablet computer) with the same account or associated accounts may also be viewed on the lightweight device, and the task cards may be further manipulated on the lightweight device to remotely control another intelligent terminal device on the lightweight device.

[0313] For example, when a user views a task card of another intelligent terminal with the same account or an associated account on a lightweight device, the user's identity authentication may be supported using sensors, cameras, microphones, etc. of the lightweight device, or sensors, cameras, microphones, etc. of the lightweight device and another nearby device (e.g., a smart watch carried by the user or a large-screen device in the home) may be supported. After the user's identity authentication is successful, the user may view the task card of another device displayed on the lightweight device and perform operations on the task card to remotely control the other intelligent terminal device and the other lightweight device on the lightweight device. The following describes specific examples.

[0314] Example 11: As shown in FIG. 7(r), assume that the lightweight device used by a user is a smart kitchen hood. When the user taps the "Lightweight Device" button on the screen of the smart kitchen hood, the ongoing task cards of another lightweight device with the same account or an associated account as the kitchen hood's account may be displayed on the screen of the smart kitchen hood. As shown in FIG. 7(r), after the user taps the "Lightweight Device" button, the displayed task cards of the lightweight devices include a task card of a smart wok and a task card of a smart washing machine. When the task cards of another lightweight device are displayed on the screen of the smart kitchen hood, the task cards may be adaptively displayed based on the screen of the smart kitchen hood (i.e., the task cards are responsively laid out based on the screen). When the user slides the task card leftward or rightward, task cards of more lightweight devices with different accounts or associated accounts can be viewed. Optionally, when the user taps a blank area on the task card (the area outside the control buttons on the task card), the detailed content of the task card is displayed full screen or adaptively displayed based on the screen on the display. The user can remotely perform task control in the detailed interface. Alternatively, the user may directly tap a control button on the task card of any lightweight device, i.e., the user directly taps the corresponding control button on the card of the lightweight device to perform remote task control.

[0315] Example 12: As shown in FIG. 7(s), assume that the lightweight device used by the user is a smart kitchen hood, and the user taps the "Lightweight Device" button on the screen of the smart kitchen hood. In this case, the smart kitchen hood may call the sensors, cameras, microphones, etc. of the smart kitchen hood and another nearby device (e.g., a smart watch carried by the user or a large-screen device in the home) to assist in authenticating the user's identity. After the user's identity is successfully authenticated, the ongoing task cards of other lightweight devices with the same or associated accounts as the smart kitchen hood's account are displayed on the screen of the smart kitchen hood. Optionally, one lightweight device may correspond to one ongoing task card. The user slides the ongoing task card to the left. The last few task cards are icons of intelligent terminals with the same or associated accounts as the kitchen hood's account. For terminal 1 and terminal 2 as shown in FIG. 7(s), the user selects the icon of the intelligent terminal they need to view. Assuming that the intelligent terminal they need to view is terminal 1 and the user taps the "Terminal 1" icon, multiple task cards of terminal 1 are displayed on the screen of the smart kitchen hood. Optionally, the multiple task cards of terminal 1 include a history task card and a foreground task card of terminal 1, and the foreground task card is a task card corresponding to an application displayed on the screen of terminal 1. For example, when a video is being played on the screen of terminal 1, the task card corresponding to the video application is the foreground task card. Optionally, a task card corresponding to a floating window displayed on the screen of terminal 1 may also be a foreground task card of terminal 1, and the history task cards include task cards corresponding to applications run in the background by terminal 1.

[0316] Optionally, when a user taps a blank area on a task card, the detailed content of the task card is displayed in full screen or adaptively displayed based on the screen on the display of the smart kitchen hood. The user can remotely perform task control in the detailed interface. Alternatively, the user may directly perform a tap operation on a control button on the card of any device. In other words, the user directly taps the corresponding control button on the task card of the device to perform remote task control.

[0317] When a historical task card of another device (remote device) is displayed in the recent task interface of a first terminal (current terminal), a user can tap the task card on the first terminal, and the task or application corresponding to the task card is displayed (or executed) on the first terminal. This process may be referred to as launching the task card of the remote device on the first terminal.

[0318] In some exemplary embodiments, when a task card of a remote device is launched in the recent tasks interface of a first terminal, the task card may be launched based on the rules shown in Figures 8(a)-1 and 8(a)-2.

[0319] It should be understood that in the decision steps shown in Figures 8(a)-1 and 8(a)-2, any branching step can be performed separately, and the decision does not need to be performed sequentially based on all steps shown in Figures 8(a)-1 and 8(a)-2. In other words, in the decision steps shown in Figures 8(a)-1 and 8(a)-2, any step can be an independent solution.

[0320] As shown in FIGS. 8(a)-1 and 8(a)-2, when an application on a remote device is migrated to the recent task interface of a first terminal in a duplicate mode, in other words, when a task card in the recent task interface of the first terminal is obtained from the application on the remote device in a duplicate mode, after the task card is launched on the first terminal, the first terminal and the remote device can simultaneously display (or run) the application. In addition, the states of the application displayed by the first terminal and the remote device are synchronized (e.g., both the first terminal and the remote device display the same page of the same PPT file), and the data of the application on the first terminal and the remote device are synchronized. When displaying the application, the first terminal and the remote device may adaptively display the application based on the characteristics of their respective screens. In the present application, adaptive display may be understood to mean that, in the display process, different devices may adjust the size and layout of the application displayed on the screen based on the size of their respective screens. In other words, the layout and size of the application displayed on the screen may be resizable. For example, one of the first terminal and the remote device may display the application in full screen, while the other of the first terminal and the remote device displays the application in non-full screen, or one of the first terminal and the remote device may display the application in landscape mode, while the other of the first terminal and the remote device displays the application in portrait mode. An application is not pulled back when a task card for the application is tapped in a recent tasks interface of the remote device or when an icon for the application is tapped on a home screen of the remote device. "Pulling back an application" may be understood as performing an operation on the application's source device (in this example, the source device is the remote device) and transitioning the application back to the source device.The application does not appear in the recent tasks interface or home screen of the other device, or run on the other device.

[0321] If the application of the remote device is not migrated to the recent tasks interface of the first terminal in the duplicate mode, it is further determined whether the application is displayed in the recent tasks interface of the first terminal in a migration mode based on a window projection technique. In the migration mode based on a window projection technique, the application does not need to be installed on the first terminal. If the application is displayed in the recent tasks interface of the first terminal in the migration mode based on a window projection technique, it is further determined whether the application supports multiple instances.

[0322] If an application supports multiple instances, the application may be displayed (or executed) simultaneously on the first terminal and the source device (remote device). The application data on the first terminal and the remote device is synchronized. When the first terminal and the remote device display the application, they may adaptively display the application based on the characteristics of their respective screens. However, the state of the application displayed by the first terminal and the remote device may not be synchronized (e.g., one device displays the first page of a PPT file and the other device displays the second page of the PPT file). The application is not pulled back when the application's task card is tapped in the recent tasks interface of the remote device or when the application's icon is tapped on the home screen of the remote device.

[0323] If an application does not support multiple instances, the application cannot be displayed simultaneously on the first device and the remote device. If the application is the foreground task or foreground application (a task or application displayed and running in the remote device's interface) on the remote device, after the application is migrated to the first device, the remote device automatically ends the task and the remote device's home screen is displayed on the remote device's screen. The application is pulled back when the application's task card is tapped in the remote device's recent tasks interface or when the application's icon is tapped on the remote device's home screen.

[0324] If an application of the remote device is not displayed in the recent tasks interface of the first terminal in the transition mode based on the window projection technology, but is instead displayed in the recent tasks interface of the first terminal in the transition mode based on the FA technology, the first terminal must first install the application or the application's FA, and then, only after the installation is complete, can the task card of the application be displayed in the recent tasks interface of the first terminal. After the application or the application's FA is installed on the first terminal, the data of the application on the first terminal and the remote device are synchronized. When the first terminal and the remote device display the application, the first terminal and the remote device may adaptively display the application based on the characteristics of their respective screens. However, the state of the application displayed by the first terminal and the remote device may not be synchronized. The application is not pulled back even if the task card of the application is tapped in the recent tasks interface of the remote device or the application's icon is tapped on the home screen of the remote device.

[0325] The following description will be given with reference to specific examples. It should be understood that the following examples in Figures 8(b)-1 and 8(b)-2 to 8(n) may be part of the flowcharts shown in Figures 8(a)-1 and 8(a)-2, or may be independent solutions, which are not limited in the present application.

[0326] Example 13: Assume that the first terminal (current terminal) is a tablet computer. FIGS. 8(b)-1 and 8(b)-2 are schematic diagrams illustrating viewing historical task cards of multiple other devices in the recent task interface of the first terminal. As shown in FIGS. 8(b)-1 and 8(b)-2, assume that the magazine lock screen application of the remote device (i.e., the source device of the task) is displayed in the recent task interface of the first terminal in a duplicate mode. In other words, assume that the task card of the magazine lock screen application in the recent task interface of the first terminal is obtained from the device P40 in a duplicate mode. The user taps the task card of the magazine lock screen application in the recent task interface of the first terminal. In other words, after the task card is launched on the first terminal, the first terminal and P40 can simultaneously display the magazine lock screen application, as shown in FIGS. 8(c)-1 and 8(c)-2. In addition, the application states displayed by the first terminal and the remote device are synchronized, and both the first terminal and the device P40 display the magazine lock screen application. screenThe application displays image 3. The application data on the first terminal and device P40 are synchronized. For example, if a user edits image 3 on the first terminal, the editing state is automatically synchronized to device P40. When displaying the magazine lock screen application, the first terminal and device P40 may adaptively display the magazine lock screen application based on the characteristics of their respective screens (e.g., P40 displays the magazine lock screen application in portrait mode, and the first terminal displays the magazine lock screen application in landscape mode). In this implementation, the application on the remote device is migrated to the first terminal device in duplicate mode. The remote device and the first terminal may simultaneously display the application. The application states (data) displayed on the two devices are synchronized. Operations performed by a user on applications on any device are synchronized to the two devices, which can facilitate user operations and improve the user experience. It should be further understood that the solution described in Example 13 may be an independent solution.

[0327] A possible implementation is described in Example 14.

[0328] Example 14: Assume that the first terminal (local device) is a tablet computer. Figures 8(d)-1 and 8(d)-2 are schematic diagrams illustrating browsing the historical task cards of multiple other devices in the recent task interface of the first terminal. As shown in Figures 8(d)-1 and 8(d)-2, assume that the magazine lock screen application of the remote device is displayed in the recent task interface of the first terminal in a transition mode based on window projection technology, and the magazine lock screen application supports multiple instances, or the magazine lock screen application of the remote device is displayed in the recent task interface of the first terminal in a transition mode based on FA technology. In both cases, the application data on the first terminal and the device P40 are synchronized. The user taps the task card of the magazine lock screen application in the recent task interface of the first terminal. Assume that after a user taps image 2 on the task card of the magazine lock screen application, that is, after the task card is launched on the first terminal, the first terminal displays image 2 of the magazine lock screen application, and device P40 still displays image 3 of the magazine lock screen application, as shown in FIG. 8(e)-1 and FIG. 8(e)-2. In other words, the states of the magazine lock screen applications displayed by the first terminal and P40 are not synchronized, and the states of the magazine lock screen applications displayed by the two devices do not affect each other. In addition, when displaying the magazine lock screen application, the first terminal and device P40 may adaptively display the magazine lock screen application based on the characteristics of their respective screens (for example, P40 displays the magazine lock screen application in portrait mode, and the first terminal displays the magazine lock screen application in landscape mode).In this embodiment, an application of a remote device is displayed in a recent task interface of a first terminal in a transition mode based on FA technology, or an application of a remote device is displayed in a recent task interface of a first terminal in a transition mode based on window projection technology, and the application supports multiple instances. The remote device and the first terminal can simultaneously display the application. The states (data) of the applications displayed on the two devices are not synchronized, and operations performed by a user on the application on any device are independent, and the states of the applications displayed on the two devices do not affect each other. This facilitates user operation, allowing the user to flexibly operate applications on different devices, improving the user experience. It should be further understood that the solution described in Example 14 can be an independent solution.

[0329] In some exemplary embodiments, when an application of device P40 is displayed in the recent tasks interface of the first terminal in a migration mode based on FA technology, prompt information of the source device of the application may not be displayed on the first terminal after the user launches the card of the application on the first terminal. For example, the prompt "From P40" may not be displayed on the first terminal.

[0330] A possible implementation is described in Example 15.

[0331] Example 15: Assume that the first terminal (current terminal) is a tablet computer. Figures 8(f)-1 and 8(f)-2 are diagrams of an interface displayed on the first terminal after launching the "Huawei Video" app of the remote device (P40) on the first terminal. A video of the "Huawei Video" app of device P40 is being played on the first terminal. Assume that the "Huawei Video" application of device P40 is displayed in the recent tasks interface of the first terminal in transition mode based on window projection technology, and the "Huawei Video" application does not support multiple instances. When a user wants to pull back an application on device P40, the user can tap the "Huawei Video" icon on the home screen of device P40, or select the "Huawei Video" task card of device P40 in the recent tasks interface of device P40, tap the task card, and pull back the application "Huawei Video." Figures 8(f)-1 and 8(f)-2 illustrate a case where the user taps the "Huawei Video" icon on the home screen of device P40. After the user pulls back the application "Huawei Video," as shown in FIG. 8(g)-1 and FIG. 8(g)-2, the first terminal stops playing the video of the app "Huawei Video" and instead displays the home screen of the first terminal. The device P40 continues playing the video by continuing the state of the video previously played on the first terminal (for example, if the first terminal played a video up to moment t of the video before the app "Huawei Video" was pulled back, after the app "Huawei Video" was pulled back, the device P40 continues playing the video after moment t). In this implementation, the application of the remote device is displayed in the recent tasks interface of the first terminal in a transition mode based on window projection technology, and the application does not support multiple instances.After the user pulls back the application on the remote device, the first terminal does not display the application, so the user can pull back the application at any time, and the user's operation is simple. It should be further understood that the solution described in Example 15 can be an independent solution.

[0332] A possible implementation is described in Example 16.

[0333] Example 16: Assume that the first terminal (current terminal) is a tablet computer. Figures 8(h)-1 and 8(h)-2 are diagrams of interfaces displayed on the first terminal after the app "Huawei Video" of the remote device (P40) is launched on the first terminal. A video of the app "Huawei Video" of the device P40 is being played on the first terminal. Assume that the application "Huawei Video" of the device P40 is displayed in the recent tasks interface of the first terminal in a duplicate mode, or the application "Huawei Video" of the device P40 is displayed in the recent tasks interface of the first terminal in a transition mode based on window projection technology, and the application "Huawei Video" supports multiple instances, or the application "Huawei Video" of the device P40 is displayed in the recent tasks interface of the first terminal in a transition mode based on FA technology. The application "Huawei Video" is not pulled back when the user taps the "Huawei Video" icon on the home screen of the device P40 or selects the task card of "Huawei Video" of the device P40 in the recent tasks interface of the device P40 and taps the task card. Figures 8(h)-1 and 8(h)-2 show a case where a user taps the "Huawei Video" icon on the home screen of device P40. After the user taps the "Huawei Video" icon, the "Huawei Video" app enters a new video selection interface, as shown in Figures 8(i)-1 and 8(i)-2. When the user taps another video (assuming it is Video 2) for playback, in other words, when the user starts a new video task (Video 2) on device P40, the new task does not affect the video (i.e., Video 1) in the "Huawei Video" app on device P40 that is being played on the first terminal.As shown in FIG. 8(i)-1 and FIG. 8(i)-2, a new task (Video 2) executed by a user on device P40 and a video (i.e., Video 1) of the app "Huawei Video" migrated from device P40 to the first terminal do not affect each other. In this implementation, an application on the remote device is displayed in the recent tasks interface of the first terminal in a duplicate mode, or the application on the remote device is displayed in the recent tasks interface of the first terminal in a migration mode based on window projection technology, and the application supports multiple instances, or the application on the remote device is displayed in the recent tasks interface of the first terminal in a migration mode based on FA technology. After the user pulls back the application on the remote device, the first terminal may continue to display the application. The states of applications displayed or executed on the two devices (the remote device and the first terminal) do not affect each other. A user can perform operations on an application on any device, and the user can perform independent operations on each of the two devices for an application on either one of the two devices, thereby meeting the user's requirements for the case where an application has different execution states at the same time, and improving the user experience. The solution described in Example 16 can be an independent solution.

[0334] In some exemplary embodiments, when the local device is a small-screen device and the remote device is a large-screen device, after the task card of the remote device is launched on the local device, the application corresponding to the task card is displayed on the screen of the local device. In the process of the application being displayed on the local device, the application may be displayed on the display of the local device based on one of the following rules:

[0335] Rule 1: Adaptively display the application on the local device based on the screen size of the local device.

[0336] Optionally, in this embodiment of the present application, if the local device is a widescreen device and the remote device is a narrowscreen device, after the task card of the remote device is launched on the local device, the application corresponding to the task card may be displayed on the display of the local device based on Rule 2.

[0337] Rule 2: Automatically display the application in a side-by-side horizontal fashion on the local device.

[0338] In this embodiment of the present application, the parallel horizontal display mode can be understood as an application split-screen function that supports displaying one application on two screens. When a user's terminal is in landscape mode, the user can display the same application in two windows. The user operates and views the two windows simultaneously, and the two windows do not affect each other. For example, when a user uses chat software while the terminal is in landscape mode, the system can enter parallel horizontal mode, allowing the user to easily reply to chat information while viewing an official account post or moment, or while shopping online, the user can continue to browse lists of other products while viewing details of a favorite product.

[0339] In some exemplary embodiments, if the local device is a narrow-screen device and the remote device is a wide-screen device, after a task card of the remote device is launched on the local device, an application corresponding to the task card may be displayed on the display of the local device based on Rule 3.

[0340] Rule 3: Automatically disable side-by-side horizontal mode on the local device and adaptively display applications based on the local device's screen size.

[0341] In some exemplary embodiments, if the local device is a narrow-screen device and the remote device is a wide-screen device, after a task card of the remote device is launched on the local device, the application corresponding to the task card may be displayed on the display of the local device based on Rule 4.

[0342] Rule 4: Display the application full screen on the local device and do not switch between landscape and portrait mode, i.e., display the application on the local device screen based on the display state of the application on the remote device.

[0343] Hereinafter, a specific example will be described.

[0344] A possible implementation is described in Example 17.

[0345] Example 17: Assume that the first terminal (local device) is a mobile phone (e.g., P40) and the remote device is a tablet computer. After a task card of a magazine lock screen app of the tablet computer is launched on P40, a magazine lock screen interface corresponding to the task card is displayed on the screen of P40. As shown in FIGS. 8(j)-1 and 8(j)-2, the magazine lock screen interface displayed on the tablet computer is displayed in full screen, and the magazine lock screen interface is also adaptively displayed in full screen on the device P40. As shown in FIGS. 8(j)-1 and 8(j)-2, when a task card of a magazine lock screen app of the device P40 is launched on the tablet computer, a magazine lock screen interface corresponding to the task card is displayed in full screen on the screen of the tablet computer.

[0346] In this implementation, after the application of the remote device is migrated to the local device, the remote device and the local device can each adaptively display the application based on their respective screens, improving the user experience. It should be further understood that the solution described in Example 17 can be an independent solution.

[0347] A possible implementation is described in Example 18.

[0348] Example 18: Assume that the first terminal (local device) is a tablet computer and the remote device is a mobile phone (e.g., P40). The local device is a widescreen device, and the remote device is a narrowscreen device. After a task card of the newsbrowsing app of P40 is launched on the tablet computer, a newsbrowsing interface corresponding to the task card is displayed on the screen of the tablet computer. As shown in FIG. 8(k), the newsbrowsing interface displayed on the tablet computer is automatically displayed in a parallel horizontal format, and the newsbrowsing interface displayed on the screen of P40 is automatically displayed by disabling the parallel horizontal format, i.e., in a normal display state.

[0349] As shown in FIG. 8(k), when a task card of a newsbrowser app on the tablet computer is launched on P40, a newsbrowser interface corresponding to the task card is displayed on the screen of P40. The newsbrowser interface displayed on the tablet computer is automatically displayed in a parallel horizontal format, and the newsbrowser interface displayed on the screen of P40 is automatically displayed in a normal display state (e.g., adaptively displayed in full screen) by automatically disabling the parallel horizontal format. In this implementation, after an application on the remote device is migrated to the local device, the remote device and the local device may automatically display the application in a parallel horizontal format on a device with a wide screen and in a normal display mode on a device with a narrow screen based on the characteristics of their respective screens, thereby displaying the application by fully utilizing the characteristics of each screen and improving the user experience. It should be further understood that the solution described in Example 18 may be an independent solution.

[0350] Example 19: Assume that the first terminal (local device) is a mobile phone (e.g., P40) and the remote device is a tablet computer. After a task card of a video-type application of the tablet computer is launched on P40, the video corresponding to the task card is displayed on the screen of P40. As shown in FIG. 8(l), the video displayed on the tablet computer is displayed in landscape mode, so that the video is also displayed in landscape mode on device P40. That is, no switching between landscape mode and portrait mode is performed.

[0351] As shown in FIG. 8(l), after a task card of a video-type app on device P40 is launched on the tablet computer, a video corresponding to the task card is displayed on the screen of the tablet computer. Since the video displayed on device P40 is displayed in landscape mode, it is also displayed in landscape mode on the tablet computer. That is, no switching between landscape mode and portrait mode is performed. In this implementation, after an application on a remote device is migrated to a local device, the local device displays the application on the local device in the manner in which the remote device displays the application (when the remote device displays the application in landscape mode, the local device displays the application in landscape mode, and when the remote device displays the application in portrait mode, the local device displays the application in portrait mode). Because no switching between landscape mode and portrait mode is performed, the user does not notice a significant change between the display states before and after the application migration. This is user-friendly and improves the user experience. It should be further understood that the solution described in Example 19 can be an independent solution.

[0352] In some exemplary embodiments, when the local device is a large-screen device and the remote device is a small-screen device, after a task card of the remote device is launched on the local device, an application corresponding to the task card is displayed on the screen of the local device. In the process of displaying the application, the application corresponding to the task card may alternatively be displayed on the screen of the local device in the form of a floating window. Furthermore, if the local device supports adaptive display, when the application corresponding to the task card is displayed on the screen of the local device in the form of a floating window, the application corresponding to the task card may be displayed in a landscape or wide floating window, or if the local device does not support adaptive display, the application corresponding to the task card may be displayed in a portrait or narrow floating window.

[0353] In some exemplary embodiments, if the local device is a PC device, after the task card of an application on a remote device is launched on the local device, the application may be displayed in a floating window on the local device by default, as shown, for example, in Example 20.

[0354] A possible implementation is described in Example 20.

[0355] Example 20: As shown in FIG. 8(m), a user taps a task card corresponding to App2 of device P40 in the recent tasks interface of the PC device, thereby launching the task card on the PC device. When App2 is displayed on the PC device, as shown in FIG. 8(m), there may be two types of floating window display formats: a vertical or narrow floating window display and a horizontal or wide floating window display. In this implementation, after an application of a remote device with a small screen is migrated to a local device with a large screen, the local device may display the application in a floating window to improve screen usage efficiency. It should be further understood that the solution described in Example 20 may be an independent solution.

[0356] If the local device is a PC device, after the task card of the application of the remote device is launched on the local device, when the application is displayed on the local device, a selection interface may be optionally configured to allow the user to select display in full screen or in a floating window. An example is shown in Example 21.

[0357] Example 21: As shown in FIG. 8(n), a user taps a task card corresponding to App2 of device P40 in the recent task interface of the PC device, thereby launching the task card on the PC device. When App2 is displayed on the PC device, as shown in FIG. 8(n), there are two display modes available: full-screen display and floating window display. The user can select full-screen display or floating window display based on the user's request. After the user taps and selects the corresponding option, App2 can be correspondingly displayed on the PC device based on the user's selection. In this implementation, after an application on a remote device with a small screen is migrated to a local device with a large screen, the local device can display the application in a floating window or full-screen, allowing the user to flexibly make a selection. This is user-friendly and improves the user experience. It should be further understood that the solution described in Example 21 can be an independent solution.

[0358] In this embodiment of the present application, in addition to displaying the task card of another device and the task card of the local device in the recent tasks interface of the local device used by the user, the user may further perform an operation on the task card in the recent tasks interface so that an application corresponding to the task card is installed on the local device or another device. The following describes with reference to specific examples.

[0359] Example 22: Assume that the local device (current terminal) used by the user is a mobile phone (e.g., P40). FIGS. 8(o)-1 and 8(o)-2 are schematic diagrams of displaying a task card of another device in the recent task interface of P40. In the example shown in FIGS. 8(o)-1 and 8(o)-2, the user views the task card of tablet computer 1 (MatePad1) in the recent task interface of the current terminal. If the user touches and holds the task card corresponding to app2 for a long period of time, prompt boxes for "Download to current terminal," "Open in floating window," and "Open in split screen" may pop up. When the user taps "Download to current terminal," the current terminal P40 may automatically download and install app2. Optionally, after app2 is installed, app2 is automatically opened on the current terminal. When the user taps "Open in floating window," app2 is opened in a floating window on the screen of the current terminal P40 (i.e., after app2 is launched on the current terminal, app2 is displayed in a floating window). When the user taps "Open in Split Screen", App2 is opened in split screen on the screen of the current device P40 (i.e., after App2 is launched on the current device, App2 is displayed in split screen).

[0360] Example 23: Assume that the local device (current terminal) used by the user is a tablet computer 1 (MatePad1). Figures 8(p)-1 and 8(p)-2 are schematic diagrams of displaying a task card of another device in the recent task interface of MatePad1. In the example shown in Figures 8(p)-1 and 8(p)-2, the user views the task card of P40 in the recent task interface of the current terminal. The user long-presses the task card corresponding to App2 and drags the task card to the icon position of the device Mate X2 to transfer App2 from the device P40 to the device Mate X2. In addition, prompt boxes for "Download to Mate X2," "Open in floating window," "Open in split screen," and "Open in full screen" may further pop up on the current terminal. When the user taps "Download to Mate X2," the Mate X2 may automatically download and install App2. Optionally, after App2 is installed, the Mate X2 may automatically open App2. If the user taps "Open in floating window", App2 will open in a floating window on the current device screen (i.e., after App2 is launched on the current device, App2 will be displayed in a floating window). If the user taps "Open in split screen", App2 will open in split screen on the current device screen (i.e., after App2 is launched on the current device, App2 will be displayed in split screen). If the user taps "Open in full screen", App2 will open in full screen on the current device screen (i.e., after App2 is launched on the current device, App2 will be displayed in full screen).

[0361] In some exemplary embodiments, in the process in which a task card of another device and a task card of a local device are displayed in the recent tasks interface of the local device used by the user, the user may further perform operations on multiple task cards of the same device, or perform operations on task cards of different devices, so as to simultaneously display applications corresponding to the multiple task cards in a split screen on the screen of the local device or the remote device, or to display one task in full screen and the other task in a floating window or floating bubble, or to display each of the multiple task cards in a floating window. Hereinafter, a description will be given with reference to specific examples.

[0362] Example 24: Assume that the local device (current terminal) used by the user is a mobile phone (e.g., P40). FIGS. 8(q)-1 to 8(q)-3 are schematic diagrams illustrating the display of a task card for another device in the recent task interface of the P40. In the example shown in FIGS. 8(q)-1 to 8(q)-3, the user browses the task cards for the current terminal in the recent task interface of the current terminal. The user uses his / her left hand to long-press the task card corresponding to app 2 on the current terminal, and slides the task card leftward with his / her right hand to switch to a task card corresponding to another application on the current terminal and select the task card. Assume that the user selects the task card corresponding to app 5 on the current terminal, and then uses his / her right hand to long-press the task card corresponding to app 5 on the current terminal, drags the task card corresponding to app 5 to overlap the task card corresponding to app 2, and then releases the task card. In this case, app 2 and app 5 can be displayed in a split screen on the current terminal.

[0363] In some exemplary embodiments, when App2 and App5 are displayed on the current terminal, optionally, App2 is displayed in full screen and App5 is displayed in a floating window, or App5 is displayed in full screen and App2 is displayed in a floating window, or App2 and App5 are each displayed in a floating window, which is not limited in the present application.

[0364] Example 25: Assume that the local device (current terminal) used by the user is a mobile phone (e.g., P40). FIGS. 8(r)-1 to 8(r)-4 are schematic diagrams illustrating the display of task cards for another device in the recent task interface of P40. In the example shown in FIGS. 8(r)-1 to 8(r)-4, the user views the task cards for the current terminal in the recent task interface of the current terminal. The user uses his / her left hand to long-press the task card corresponding to app 2 on the current terminal, taps the device icon of MatePad1 with his / her right hand to switch to the task card corresponding to MatePad1, and slides the task card corresponding to MatePad1 left or right with his / her right hand to select the task card. Assume that the user selects the task card corresponding to app 4 on MatePad1, long-presses the task card corresponding to app 4 on MatePad1 with his / her right hand, drags the task card corresponding to app 4 to overlap the task card corresponding to app 2, and then releases the task card. In this case, app 2 of the current terminal and app 4 of MatePad1 can be displayed in a split screen on the current terminal.

[0365] In some exemplary embodiments, when App2 and App4 are displayed on the current terminal, optionally, App2 is displayed in full screen and App4 is displayed in a floating window, or App4 is displayed in full screen and App2 is displayed in a floating window, or App2 and App4 are each displayed in a floating window, which is not limited in the present application.

[0366] Example 26: Assume that the local device (current terminal) used by the user is a mobile phone (e.g., P40). FIGS. 8(s)-1 to 8(s)-3 are schematic diagrams illustrating displaying a task card of another device in the recent task interface of P40. In the example shown in FIGS. 8(s)-1 to 8(s)-3, the user views the task card of the current terminal in the recent task interface of the current terminal. The user uses his / her left hand to long-press the task card corresponding to app 2 of the current terminal, taps the device icon of MatePad1 with his / her right hand to switch to the task card of MatePad1, and slides the task card of MatePad1 left or right with his / her right hand to select the task card. Assume that the user selects the task card corresponding to app 4 of MatePad1, and then uses his / her right hand to long-press the task card corresponding to app 4 of MatePad1. In this case, the user may slide both the task card corresponding to app 2 and the task card corresponding to app 4 onto the icon of the target device (mobile phone P30), and then release the task card corresponding to app 2 and the task card corresponding to app 4. In this case, app 2 and app 4 can be displayed on the screen of P30. In other words, apps corresponding to different devices are simultaneously transferred to the target device.

[0367] When app 2 and app 4 are displayed on the screen of P30, optionally, as shown in FIG. 8(t), app 2 and app 4 may be displayed in split screen, or app 2 may be displayed in full screen and app 4 may be displayed in a floating window, or app 4 may be displayed in full screen and app 2 may be displayed in a floating window, or app 2 and app 4 may be displayed in floating windows, respectively.

[0368] Optionally, in Example 26, after the user uses his left hand to long press the task card corresponding to App 2 of the current terminal, the user may use his right hand to slide the task card leftward to switch to a task card corresponding to another application of the current terminal and select the task card. After the selection is completed, the user slides both the task card corresponding to App 2 of the current terminal and the task card corresponding to the other application to the target device, and releases the task card corresponding to App 2 and the task card corresponding to the other application. In this case, two different Apps 2 of the current terminal can be displayed on the target device.

[0369] Example 27: Assume that the local device (current terminal) used by the user is a mobile phone (e.g., P40). FIGS. 8(u)-1 to 8(u)-4 are schematic diagrams illustrating displaying a task card for another device in the recent task interface of P40. In the example shown in FIGS. 8(u)-1 to 8(u)-4, optionally, the user uses their left hand to long-press the task card corresponding to app 2 on the current terminal, taps the device icon of MatePad1 with their right hand to switch to the task card for MatePad1, and slides the task card on MatePad1 left or right to select the task card. Assume that the user selects the task card corresponding to app 4 on MatePad1, long-presses the task card corresponding to app 4 on MatePad1, drags the task card corresponding to app 4 to overlap the task card corresponding to app 2, and then releases the task card. In this case, the task card corresponding to app 4 and the task card corresponding to app 2 form a new task card (split-screen task card), and the new task card is displayed in the recent task interface of the current terminal. The task cards include a task card corresponding to application 4 and a task card corresponding to application 2.

[0370] Optionally, in Example 27, after the user uses his left hand to long press the task card corresponding to app 2 of the current terminal, the user may use his right hand to further slide the task card leftward to switch to a task card corresponding to another application of the current terminal and select the task card. After the selection is completed, the task card corresponding to the other application of the current terminal is dragged to overlap the task card corresponding to app 2 and then released. In this case, the task cards corresponding to the two different applications of the current terminal form a new task card, and the new task card is displayed in the recent tasks interface of the current terminal.

[0371] In some exemplary embodiments, when a task (application) traverses devices in a transition mode based on a window projection technique, after the distance between the local device (the device displaying the task card of the remote device) and the remote device (the source device of the task card) exceeds a threshold or the quality of the network between the local device and the remote device falls below a preset threshold, the communication connection between the local device and the remote device is interrupted. In this case, a “capsule” prompt may be generated on the local device to prompt the user of the case in which the local device and the remote device will be disconnected. In addition, the user may perform an operation (e.g., a slide-up operation or a slide-down operation) on the “capsule.” The “capsule” prompt may be hidden after an operation is performed on the “capsule” prompt, or may be automatically hidden after a preset display time period. After the “capsule” prompt is hidden for a preset time period, if the distance between the local device and the remote device still exceeds a threshold or the quality of the network between the local device and the remote device still falls below a preset threshold, the “capsule” prompt may be generated again. Optionally, after the “capsule” prompt is generated again, the “capsule” prompt may be hidden or may be automatically hidden by a user operation. Additionally, the prompt for the source device (remote device) exists on the local device.

[0372] In some exemplary embodiments, when a task traverses devices in a migration mode based on FA technology, after the distance between the local device and the remote device exceeds a threshold or the quality of the network between the local device and the remote device falls below a preset threshold, the communication connection between the local device and the remote device is interrupted. In this case, optionally, a "capsule" prompt may not occur on the local device. In other words, there is no "capsule" prompt on the local device. In addition, an application can be used remotely and independently on the local device. Optionally, a prompt of the source device (remote device) is not present on the local device.

[0373] Hereinafter, a specific example will be described.

[0374] Example 28: Assume that the first terminal (local device) is a tablet computer. FIG. 8(v) is a diagram of...

Claims

1. A task transition system comprising a first terminal and a second terminal, The second terminal running a first application; switching the first application to run in the background when a first user interface of the first application is displayed; configured to: The first terminal receiving task information from the second terminal, the task information including information about an application executed in the background by the second terminal; Receiving a first operation from a user; Opening a recent tasks interface based on the first operation, the recent tasks interface including a control, the control including an identifier of the second terminal; and In response to a second operation performed by the user on the identifier of the second terminal, displaying at least one task card in the recent tasks interface corresponding to the application executed in the background by the second terminal, the at least one task card including a first task card corresponding to the first application; executing the first application and displaying the first user interface in response to a third operation performed by the user on the first task card; displaying a second user interface in response to a fourth operation performed by the user on the first user interface, the fourth operation being a back operation, and the second user interface being a parent user interface of the first user interface; receiving a fifth operation performed by the user, the fifth operation being used to trigger transmission of a first task instruction to the second terminal, the first task instruction instructing the second terminal to clear the first application; A system configured to:

2. The first terminal displaying a second task card in the recent tasks interface corresponding to a recently executed application of the first terminal; and stopping the display of the second task card in response to the second operation; The system of claim 1 , further configured to:

3. The second terminal Segmenting an application data stream of the first application into a plurality of segment data, and determining an index table corresponding to the plurality of segment data, wherein the index table indicates a storage path and an order relationship of the plurality of segment data in a distributed file system of the second terminal; Transmitting the plurality of segment data to the first terminal in a multi-thread parallel transmission manner; transmitting the index table to the first terminal; further configured to: The first terminal restoring the application data stream of the first application based on the received plurality of segment data and the index table; after receiving the third operation, executing the first application based on the third operation and the application data stream of the first application; The system of claim 1 or 2, further configured to:

4. The at least one task card further includes a third task card corresponding to a first screen snapshot of a home screen of the second terminal, and at least one of a feature ability (FA) card, a floating window, and a floating bubble is present on the third task card; the first terminal is further configured to display the at least one task card in a single row or multiple rows in the recent tasks interface of the first terminal based on one of the second terminal's use of landscape mode, portrait mode, portrait mode with a folding screen in an unfolded state, landscape mode with the folding screen in an unfolded state, landscape mode with the folding screen in a folded state, and portrait mode with the folding screen in a folded state; 3. The system according to claim 1 or 2.

5. The first terminal Executing the first application based on the hardware capabilities of the first terminal; or Executing the first application based on the hardware capabilities of the second terminal; or Executing the first application based on hardware capabilities of the first terminal and hardware capabilities of the second terminal. The system of claim 1 or 2, further configured to:

6. A task migration method, applied to a first terminal, comprising: receiving task information from a second terminal, the task information including information about an application executed in the background by the second terminal; receiving a first operation from a user; opening a recent tasks interface based on the first operation, the recent tasks interface including a control, the control including an identifier of the second terminal; In response to a second operation performed by the user on the identifier of the second terminal, displaying at least one task card in the recent task interface corresponding to the application executed in the background by the second terminal, wherein the at least one task card includes a first task card corresponding to a first application executed in the background by the second terminal; executing the first application and displaying a first user interface of the first application in response to a third operation performed by the user on the first task card; displaying a second user interface in response to a fourth operation performed by the user on the first user interface, the fourth operation being a back operation, and the second user interface being a parent user interface of the first user interface; receiving a fifth operation performed by the user, the fifth operation being used to trigger sending a first task instruction to the second terminal, the first task instruction instructing the second terminal to clear the first application; A method comprising:

7. before the second operation, displaying, by the first terminal, in the recent task interface, a second task card corresponding to a recently executed application of the first terminal; after the second operation, stopping display of the second task card in the recent tasks interface by the first terminal; The method of claim 6 further comprising:

8. Before the step of displaying a first user interface by the first terminal, the method further comprises: receiving a task stack transmitted by the second terminal, the task stack including a first activity record and a second activity record; further comprising the first activity record includes interface data of the first user interface and user data of the first user interface, and the second activity record includes interface data of the second user interface and user data of the second user interface; The method of claim 6.

9. The first activity record and the second activity record are stored adjacent to each other in the task stack, and the first activity record is read by the first terminal before the second activity record, and before the step of displaying a first user interface by the first terminal, the method includes: generating the first user interface based on the interface data of the first user interface and storing a state of the first user interface based on the user data of the first user interface; further comprising Before the step of displaying a second user interface by the first terminal, the method further comprises: generating the second user interface based on the interface data of the second user interface and storing a state of the second user interface based on the user data of the second user interface; The method of claim 8 further comprising:

10. receiving a plurality of segment data transmitted by the second terminal in a multi-thread parallel receiving manner, wherein the plurality of segment data are obtained by segmenting an application data stream of the first application; receiving an index table sent by the second terminal, the index table indicating a storage path and an order relationship of the plurality of segment data in a distributed file system of the second terminal; restoring the application data stream of the first application based on the received plurality of segment data and the index table; after the third operation is detected, executing the first application based on the third operation and the application data stream of the first application; The method of claim 6 further comprising:

11. the data amount of each of the plurality of segment data is fixed, and / or the index table includes message header information corresponding to each of the plurality of segment data; The message header information corresponding to each segment data includes a correspondence relationship between a segment number and a segment data path of each segment data, and length information, start identifier information, and end identifier information of each segment data; The method of claim 10.

12. transmitting first information to the second terminal, the first information including information related to the first task instruction; attempting to hold a second local lock based on the first task instruction, the second local lock being used to ensure that the first application on the second terminal executes task instructions from only one device at a time, and the second local lock can only be held by one device at a time; The method of claim 6 further comprising:

13. executing, by the first terminal, the first application based on the hardware capabilities of the first terminal; or executing, by the first terminal, the first application based on the hardware capabilities of the second terminal; or executing, by the first terminal, the first application based on the hardware capabilities of the first terminal and the hardware capabilities of the second terminal; The method of claim 6 further comprising:

14. 14. A terminal comprising a processor and a memory, the memory configured to store instructions, the processor configured to read the instructions and to perform the method of any one of claims 6 to 13.

15. 14. A computer-readable storage medium storing a computer program, the computer program comprising program instructions that, when executed by a processor, enable the processor to perform the method of any one of claims 6 to 13.

Citation Information

Patent Citations

  • Synchronization method and electronic equipment

    CN111031108A

  • Device, and method for displaying menu, and program

    JP2010250554A

  • Information processing terminal and control method therefor

    JP2012069060A

  • Application switcher

    JP2015508531A

  • Information processing apparatus and control method therefor, and program

    JP2017038161A