Method and electronic device for returning application

By determining the task type on the electronic device and projecting it onto a virtual screen for continued execution, the problems of hot updates and waiting task interruptions are solved, and the user experience is improved by being able to freely use other applications during the task.

CN119236387BActive Publication Date: 2025-09-05HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410245244.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2025-09-05
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

During the application update process, especially hot updates, the task is interrupted after the user exits the application, resulting in the inability to continue using other applications, or the inability to promptly receive notification of task completion while waiting for the task, affecting the user experience.

Method used

By determining the task type when the user exits the app, if it is a preset task (such as a hot update or waiting task), the task is projected onto the virtual screen to continue execution, and the user is prompted to return to the app after completion, ensuring that the task is not interrupted and the user is notified in a timely manner.

Benefits of technology

This improves the user experience, allowing users to freely use other applications during task execution, avoiding task interruptions and missing important time nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119236387B_ABST
    Figure CN119236387B_ABST
Patent Text Reader

Abstract

The present application provides a method and electronic device for returning to an application. When a user switches a first application to the background, the method determines whether the first task currently being executed by the first application is a preset task. If the first task is a preset task, the method continues to execute the first task by projecting the first task onto a virtual screen. During the execution of the first task, the method detects the execution progress of the first task and prompts the user once the first task is completed, so that the user can return to the first application from the display interface of other applications in a timely manner. This solution ensures that the task is not interrupted and can promptly remind the user to return to the application by increasing the judgment of the task type of the currently executing task and continuing the execution of the preset task with a special execution process. This allows the user to safely use other applications during the task execution period instead of just waiting, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic devices, and in particular to a method for returning an application and an electronic device. Background Art

[0002] App updates are becoming increasingly frequent, and there are two ways to update apps: offline updates (also known as cold updates), which require re-downloading the installation package, then exiting the app and reinstalling it. Online updates (also known as hot updates) involve downloading the update package after launching the app and then reinstalling it. This means the app needs to be updated while it's running. During a hot update, if the user exits the update screen and switches the app to the background, the update is interrupted. This forces the user to remain on the update screen, unable to perform other operations, and resulting in a poor user experience.

[0003] Furthermore, for highly interactive apps like gaming, where multiple people often interact, users are stuck on a specific screen while others are selecting characters, waiting to form teams, and other interactive tasks. Due to this long wait time, many users temporarily switch the gaming app to the background and use other apps, such as chat, video, or shopping. This can cause users to forget about ongoing gaming tasks, leading to missed match starts and other issues, resulting in a poor user experience.

[0004] Therefore, for tasks that require users to wait for a long time, how to provide a solution that allows users to temporarily exit the application but ensures that users can return to the application in time after the task is completed, so as to improve the user experience, is a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The present application provides a method and electronic device for returning to an application. For tasks that require the user to wait for a long time, the method allows the user to temporarily exit the application, but ensures that the user can return to the application in time after the task is completed through timely reminders, thereby improving the user's usage experience.

[0006] In a first aspect, a method for returning to an application is provided, the method comprising: starting and running a first application on an electronic device, and displaying a first interface of the first application on a physical screen; in response to a first operation of a user in the first interface, displaying a running interface of a second application on the physical screen, the first operation being used to switch the first application to the background; in response to the first operation, determining whether a first task belongs to a preset task, the first task being a task being executed by the first application corresponding to the first interface, the execution duration of the preset task being greater than or equal to a preset duration threshold; when the first task is a preset task, projecting the execution process of the first task onto a virtual screen and continuing to execute the first task; detecting the execution progress of the first task, and when it is detected that the first task is completed, displaying a prompt message on the physical screen, the prompt message being used to indicate that the first task is completed; in response to a second operation of the user, displaying a second interface of the first application on the physical screen, the second interface corresponding to the running interface after the first task is completed.

[0007] In the technical solution of the present application, when the user executes the operation of switching the first application to the background, it will be determined whether the first task currently executed by the first application is a preset task. If the first task is a preset task, the first task will continue to be executed by projecting the first task onto a virtual screen, and during the execution of the first task, its execution progress will be detected. Once the first task is completed, the user will be prompted to facilitate the user to return to the first application in a timely manner from the display interface of other applications. This solution increases the judgment of the task type of the currently executing task and adopts a special execution process to continue the execution of the preset task to ensure that the task is not interrupted and the user can be reminded to return to the application in a timely manner, so that the user can safely use other applications during the task execution time period instead of just waiting, thereby improving the user experience.

[0008] In combination with the first aspect, in certain implementations of the first aspect, when determining whether the first task belongs to a preset task in response to the first operation, it may include: obtaining and determining whether the first task belongs to any one of the preset tasks based on the task identifier of the first task; or, when the task identifier of the first task cannot be used to indicate the task type of the first task, determining whether the first task belongs to the preset task by detecting the data packet of the first task. In this implementation, when the task identifier of the first task can be obtained and the task identifier of the first task can indicate the task type, determining whether it belongs to the preset task is determined by obtaining the task identifier of the first task; when the task identifier of the first task cannot be obtained, or the task identifier of the first task can be obtained but the task identifier cannot indicate the task type, identifying the task type of the first task and determining whether the first task belongs to the preset task is determined by detecting and analyzing the data packet of the first task. This implementation enables the application to identify the task type of the task it is executing regardless of whether it can obtain the task identifier, thereby improving the versatility of the solution of this application, so that the scope of application is no longer limited to only being able to know the task type through the task identifier.

[0009] In conjunction with the first aspect, in certain implementations of the first aspect, the preset task includes a hot update task. When the task identifier of the first task cannot be used to indicate the task type of the first task, the step of determining whether the first task belongs to the preset task by detecting the data packet of the first task may include: detecting the data packet reception information of the first application, the data packet reception information being used to indicate whether the first application receives a data packet through a network service; when the data packet reception information indicates that the first application is downloading update data, determining that the first task is a hot update task; or, when the data packet reception information indicates that the first application is not downloading update data, determining that the first task is not a hot update task. In this implementation, for the hot update task, whether it is a hot update task is determined by detecting whether the application receives a data packet through a network service. Because a hot update necessarily requires downloading an update data packet and performing an update, detecting whether an update data packet is being downloaded can determine whether the hot update task is being executed.

[0010] In conjunction with the first aspect, in certain implementations of the first aspect, the preset task includes a hot update task. When detecting the execution progress of the first task and displaying a prompt message on the physical screen upon detecting completion of the first task, the process may include: continuously detecting data packet reception information starting from the determination that the first task is a hot update task; and determining the execution progress of the hot update task based on the reception progress indicated by the data packet reception information. In this implementation, once the current task is confirmed to be a hot update task, the data packet reception information is continuously detected to determine the execution progress of the hot update task, thereby timely locking the time point of execution completion.

[0011] In conjunction with the first aspect, in certain implementations of the first aspect, the method further includes: when the hot update task is determined to have completed execution based on the data packet reception information, stopping the continuous monitoring of the data packet reception information. In this implementation, the continuous monitoring of the data packet reception information begins when the hot update task is determined to have completed execution and ends when the hot update task has completed execution, ensuring that no detection is missed and promptly releasing operating resources.

[0012] In combination with the first aspect, in certain implementations of the first aspect, the preset task includes a waiting task. When the task identifier of the first task cannot be used to indicate the task type of the first task, the step of determining whether the first task belongs to the preset task by detecting the data packet of the first task may include: obtaining image data of the first interface; identifying whether the first interface includes a progress bar by performing image feature analysis on the image data of the first interface; when it is detected that the first interface includes a progress bar, determining that the first task is a waiting task with a progress bar; or, when it is detected that the first interface does not include a progress bar, identifying whether the first task is a waiting task by performing image feature analysis on the image data of the first interface. In this implementation, for the waiting task, image analysis will be used to determine whether it is a waiting task. For a task with a progress bar, it is only necessary to identify whether it includes a progress bar. For a task without a progress bar, other features in the image can be identified to determine whether it is a waiting task.

[0013] In conjunction with the first aspect, in certain implementations of the first aspect, the preset task includes a waiting task. When detecting the execution progress of the first task and displaying a prompt message on the physical screen after detecting that the first task has been completed, it can include: starting from determining that the first task is a waiting task, continuously obtaining image data of each frame of the display interface during the execution of the first task; when it is detected that the image difference between the current frame display interface and the previous frame display interface is greater than or equal to a preset difference threshold, determining that the first task is completed and stopping obtaining image data of the display interface of the first task. In this implementation, the time node of task completion is locked by continuously obtaining image data of the display interface and performing image analysis, and the instantaneous changes at the time of completion are captured by detecting the difference between two consecutive frames of the display interface image, thereby locking the time node of task completion. It should be understood that regardless of whether the waiting task has a progress bar or not, it can be determined whether the execution is completed by identifying the image difference between two consecutive frames of the display interface.

[0014] In conjunction with the first aspect, in certain implementations of the first aspect, detecting the execution progress of a first task and, upon detecting completion of the first task, displaying a prompt message on a physical screen may include: when the first task is a waiting task with a progress bar, determining the execution progress of the first task by identifying the progress indicated by the progress bar on each frame of the display interface, and stopping acquiring image data of the display interface of the first task after detecting completion of the first task. In this implementation, for a waiting task with a progress bar, the progress can be determined by identifying the progress bar. Identifying only changes in the progress bar can reduce the amount of image data that needs to be analyzed during the identification process.

[0015] In combination with the first aspect, in certain implementations of the first aspect, the preset task includes a waiting task, and the above method further includes: when the first task is determined to be a waiting task based on the task identifier of the first task, and the first task also includes preset execution duration information, the moment when the first task is completed is determined based on the preset execution duration information, and when the remaining duration of the waiting task is less than or equal to the preset remaining duration threshold, the remaining duration information is displayed on the physical screen. In this implementation, for special waiting tasks such as waiting tasks with known execution durations, when locking the time node when the task is completed, this known execution duration can be directly used, and an advance reminder can be given to make the user's return more timely. However, it should be understood that this implementation can only be implemented for waiting tasks with known execution durations. For waiting tasks with unknown execution durations, it is also necessary to lock the time node when the task is completed through image analysis.

[0016] In conjunction with the first aspect, in certain implementations of the first aspect, the method further includes: when it is determined that the first task does not belong to a preset task, switching the first application to the background and suspending it. In this implementation, for situations where the first task does not belong to a preset task, a fallback is provided according to the execution process of the traditional solution, thereby combining the solution of the present application with the traditional solution. Thus, for all tasks, when the first operation occurs during execution, a corresponding processing strategy can be used to handle it.

[0017] In combination with the first aspect, in some implementations of the first aspect, the second operation is a click operation on the prompt information, or the second operation is a click operation on the first control, the first control is a control displayed synchronously with the prompt information, and the first control is used to switch the display interface in the physical screen back to the running interface of the first application; the prompt information is displayed through a pop-up window or a floating capsule.

[0018] In a second aspect, a return application device is provided, which includes a unit composed of software and / or hardware for executing any one of the methods of the first aspect.

[0019] In a third aspect, an electronic device is provided, the electronic device comprising: one or more processors, and a memory;

[0020] The memory is coupled to the one or more processors, and is used to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the electronic device to implement any one of the methods of the first aspect.

[0021] In a fourth aspect, a chip system is provided, which is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device can implement any one of the methods of the first aspect.

[0022] Optionally, the chip system also includes a memory, which is electrically connected to the processor.

[0023] Optionally, the chip system may further include a communication interface.

[0024] In a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes instructions, and when the instructions are executed on an electronic device, the electronic device is enabled to implement any one of the methods of the first aspect.

[0025] In a sixth aspect, a computer program product is provided, which includes a computer program, and when the computer program is executed by an electronic device, it can implement any one of the methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 The diagram is a schematic diagram of the interactive process of application switching in a hot update task.

[0027] Figure 2 This is a schematic diagram of the interactive process of returning to an application in a hot update task in an embodiment of the present application.

[0028] Figure 3 It is a schematic diagram of the interactive process of application switching during the waiting task.

[0029] Figure 4 This is a schematic diagram of an interactive process of returning to an application in a waiting task in an embodiment of the present application.

[0030] Figure 5 This is a schematic flowchart of a method for returning to an application in an embodiment of the present application.

[0031] Figure 6 This is a schematic diagram of the execution process of returning to an application under a hot update task in an embodiment of the present application.

[0032] Figure 7 This is a schematic diagram of the execution process of returning to an application under a loading task in an embodiment of the present application.

[0033] Figure 8 This is a schematic diagram of a device for returning an application according to an embodiment of the present application.

[0034] Figure 9 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0035] The following describes the solutions of the embodiments of the present application with reference to the accompanying drawings.

[0036] Figure 1 This is a schematic diagram of the interactive process of application switching in a hot update task. Figure 1 As shown, electronic device A can be a mobile phone, tablet computer or other electronic device. Figure 1 For example, when a user is using an application, he wants to temporarily exit the application and switch to another application. However, when the user returns to the application, the hot update task that was being executed when the application exited is interrupted, resulting in a poor user experience. Figure 1The following example illustrates an application in which a user is using and subsequently returning to a game application. As shown in interface 101, assume that a user launches Game B (an example of a first application) by clicking its desktop icon or hot-launching the application by clicking its snapshot. Upon triggering a user-selected action (an action to confirm the updated version), a hot update of the application begins, and the update interface shown in interface 101 appears. During the hot update process, the overall image of the update interface remains essentially unchanged; only the progress bar changes. For example, if the update progress shown in interface 101 is 15%, then interface 102 appears after a period of updating, indicating that the update progress has reached 50%, with only the progress bars of the two interfaces changing. Assuming that the user exits Game B by swiping up in interface 102, electronic device A displays interface 103 in response to the user's swipe-up action. As shown in interface 103, a snapshot of the suspended application is displayed, and a snapshot of interface 102 is also generated and saved. Suppose a user clicks on a snapshot of another application in interface 103, exemplified here by the snapshot of application C (a second application). In response to this click, interface 104 is displayed on the electronic device, showing application C's running interface #1. The user begins using application C, and after a period of time (e.g., several minutes, ten minutes, etc.), application C's running interface #2 appears, as shown in interface 105. Suppose the user exits application C by swiping up on interface 105. In response to this swiping up, the electronic device displays interface 106. Suppose the user clicks on the snapshot of game B in interface 106, reentering game B—that is, returning to game B. In response to this click, electronic device A displays interface 107, which shows that the hot update task for game B was interrupted by the swiping up to send it to the background in interface 102. Therefore, when the user re-enters interface 107, the update progress remains at 50%.

[0037] exist Figure 1 In the example shown, when the user is using game B and game B needs to be hot updated, electronic device A can only stay in the state of displaying the update interface, but cannot exit game B to use other applications. Once game B is exited to the background, the update is interrupted, affecting the user experience.

[0038] It should be understood that hot update (online update) and offline update are two completely different update methods. Offline update is to remind the user to exit the application and reinstall the application after the installation package is downloaded, while hot update is actually performed while the application is running after it is started, and will be interrupted once the application is exited.

[0039] In response to the above problems, this application provides a new method for returning to the application. For tasks such as hot updates that will be interrupted due to retreating to the background, a virtual screen will be created to ensure that the hot update task can still be executed when the application retreats to the background, and the user will be prompted to return to the application after the execution is completed, so that the user no longer needs to stay in the task execution interface and cannot perform other operations, thereby improving the user experience.

[0040] Figure 2 This is a schematic diagram of the interactive process of returning to the application in a hot update task in an embodiment of the present application. For ease of comparison, Figure 2 In Figure 1 As an example, we make improvements based on the interaction scenario shown in the figure. Figure 2 As shown, the interaction process between interface 101 and interface 104 can refer to Figure 1 When the user exits the game B in the interface 102, the game will not be Figure 1 Instead of directly exiting Game B to the background as in the traditional solution shown, an operation is performed to identify the task currently being executed by Game B. When it is determined that the currently executed task is a hot update task (one of the preset tasks), a virtual screen is created and the hot update task is continued in the background. During the hot update, a screen display is required, and this display is carried by the virtual screen, not the physical screen. This ensures that the user can continue to use other applications on the physical screen, and the hot update task can continue to be executed in the background, rather than having to interrupt the hot update task.

[0041] Assume that a user clicks on the snapshot of application C in interface 103 to enter application C and uses it for a period of time. During this period, the hot update task continues to be executed in the background, and after the execution is completed, a prompt message pops up to inform the user that the update has been completed. As shown in interface 110, while the running interface #3 of application C is displayed, the hot update task of game B is completed, and a pop-up window pops up, displaying "Game B has been updated, do you want to switch back to game B?" The pop-up window also includes two controls, of which the "Confirm" control is used to trigger a return to game B. Assuming that the user clicks the confirmation control in interface 110, the user can return to the running interface of game B, as shown in interface 111. It can be seen from interface 111 that the display interface of game B is no longer the update interface, but a new display interface. Alternatively, the user can return to game B by clicking on the pop-up window. The prompt information can also be displayed using a floating capsule, and the user can return to game B in response to clicking on the floating capsule or the confirmation control therein.

[0042] It should be noted that Figures 1-4 The display contents of different interfaces are distinguished by means of fill colors and text descriptions. For example, the fill color of the game update interface in interface 102 is different from the fill color of interface #4 in interface 111.

[0043] In addition to the hot update tasks mentioned above, which will be interrupted due to being exited to the background, other tasks that require users to wait for a long time may also affect the user experience. Although the latter tasks will not be interrupted after exiting the background, the user will miss other subsequent interactions that require user participation because the user cannot know when the task has been completed. Figure 3 and Figure 4 Provide explanation.

[0044] Figure 3 It is a schematic diagram of the interactive process of application switching during the waiting task. Figure 3 As shown, electronic device A can be a mobile phone, tablet computer or other electronic device, Figure 3When a user is using an application, he wants to temporarily exit the application and use other applications. However, when returning to the application from other applications, the task being executed by the application at the time of exiting is completed too early, causing the user to miss other tasks with time limits, or the task is still being executed, causing the user to have to wait, and the user experience is poor. Assuming that the user starts the application by clicking on the desktop icon of game B (an example of the first application) or performs some interactive operations after hot starting the application by clicking on its snapshot. As shown in interface 201, it is the role selection stage in the game (that is, the casting team task). This stage requires multi-person interaction and waits for all the people participating in the interaction to complete their selection before data loading and opening can be performed. Assuming that the user exits game B by sliding up in interface 202, in response to the user's sliding up operation, interface 103 is displayed on electronic device A. As shown in interface 203, a snapshot of the suspended application in the background is displayed, and interface 202 is also saved by generating a snapshot. Suppose a user clicks on a snapshot of another application in interface 203. Here, we use the snapshot of application C (an example of a second application) as an example. In response to this click, interface 204 is displayed on the electronic device. Interface 204 is application C's running interface #1. The user starts using application C, and after a while, application C's running interface #2 appears, as shown in interface 205. Because the user cannot know when the character selection task (i.e., the casting and teaming task) in interface 201 will end, it is easy to return to the game too late. Suppose the user exits application C by swiping up in interface 205. In response to this swiping up, the electronic device displays interface 206. Suppose the user clicks on the snapshot of game B in interface 206, entering game B again, that is, returning to game B. In response to this click, electronic device A displays interface 207. As can be seen from interface 207, the waiting task for game B has already ended, and is now displayed as interface #5. Here, it is assumed that interface #5 corresponds to the corresponding interface after the game has started for a while. This results in a late return (the game has already started for a while), resulting in a poor user experience. In other cases, the return may be too early (for example, someone has not yet selected a role), causing the user to continue waiting.

[0045] To address the above issues, this application provides a new method for returning to an application. For such waiting tasks that require users to wait for a long time, this application creates a virtual screen to ensure that the waiting task can continue to be executed when the application retreats to the background. After the execution is completed, the user is promptly prompted to return to the application, allowing the user to return to the application at a more appropriate time, thereby improving the user experience. It should be understood that although such waiting tasks are also executed in the background in traditional solutions, the user is not notified of the completion of the task at the appropriate time point, causing the user to miss subsequent interactive operations.

[0046] Figure 4 This is a schematic diagram of the interactive process of returning to the application in a waiting task in an embodiment of the present application. For ease of comparison, Figure 4 In Figure 3 As an example, we make improvements based on the interaction scenario shown in the figure. Figure 2 As shown, the interaction process between interface 201 and interface 204 can refer to Figure 3 When the user exits game B in interface 202, the game will not be Figure 3 Instead of directly exiting Game B to the background as in the traditional solution shown, an operation is performed to identify the task currently being executed by Game B. When it is determined that the currently executed task is a waiting task (one of the preset tasks), a virtual screen is created and the current task is continued in the background. During the execution of the current waiting task, the content to be displayed is carried by the virtual screen instead of the physical screen. This ensures that the user can continue to use other applications on the physical screen, while the current task can continue to be executed in the background, and electronic device A will continue to detect the execution progress of the current task and notify the user when the execution is completed.

[0047] Assume that a user clicks on the snapshot of application C in interface 203 to enter application C and uses it for a period of time. During this period, the background continues to execute the current task, and after detecting that the execution is completed, an indication message pops up to inform the user that the casting is completed. As shown in interface 210, while the running interface #3 of application C is displayed, the waiting task of game B (here, the casting and teaming task) is completed and is about to start. A pop-up window pops up, and the pop-up window displays "Game B is about to start, do you want to switch back to game B?", and the pop-up window also includes two controls, of which the "Confirm" control is used to trigger the return to game B. Assuming that the user clicks the confirmation control in interface 110, it can return to the running interface of game B, as shown in interface 211. It can be seen from interface 211 that the display interface of game B happens to be the starting interface, which prevents the user from missing the time node when the game starts after the team is completed, and avoids the user from missing subsequent interactions. The execution process of the above-mentioned casting team task requires multiple people to operate separately, and it can only be completed after everyone has completed the operation. This process can be regarded as a waiting task. During the waiting task execution, the screen changes little. For example, as shown in interface 201 and interface 202, only the avatar icon in the selected character display area changes, and the content of other character selection interfaces remains unchanged. When other tasks are executed, there will be a sudden change in the screen, so you can determine whether the waiting task has been completed by locking the change in the screen.

[0048] It should also be understood that Figures 1-4 For example, temporarily exiting game B while using game B, switching to application C, and then returning to game B, but in reality, it is also possible to use multiple other arbitrary applications after exiting game B, and there is no limitation.

[0049] This application mainly involves two types of preset tasks, one is a task that cannot be continued when the application exits the background, and the other is a task that will continue to be executed after exiting the background, but the execution time is long, which makes it easy for users to miss the return. The second type of task can include loading progress tasks (waiting tasks that will display a progress bar) and ordinary waiting tasks (tasks that do not display a progress bar). However, it should be understood that for the second type of task (waiting task), since the screen changes greatly before and after the execution is completed, the end time can be locked by comparing the degree of screen change. Figure 3 and Figure 4 As can be seen from the waiting task shown, in interface 210 and interface 202, that is, in the process of all users selecting roles, only the small avatar in the "selected role display area" will change, and the alternative role display area will not change when the user who is not using electronic device A selects the role. Therefore, during the entire process of waiting for others to select roles, the changes in the screen are relatively small until the team is formed, as shown in interface 211. The degree of change in the screen of the interface is large, and the end moment (the moment when the execution is completed) can be detected.

[0050] It should also be noted that the solution using the embodiment of the present application will first identify the task type, and the result of the identification may be a certain preset task or may not be any preset task. When the task being executed by the application is identified as not belonging to any preset task, the application can be exited and suspended in the background when triggered by a swipe-up operation.

[0051] Figure 5 This is a schematic flow chart of a method for returning to an application in an embodiment of the present application. Figure 5 The steps shown are introduced.

[0052] S501: Start and run a first application on an electronic device, and display a first interface of the first application on a physical screen.

[0053] The electronic device may be a mobile phone, a tablet computer or other electronic device.

[0054] Since this application involves creating a virtual screen, to distinguish between a virtual screen and an actual screen, the actual screen of electronic device A is referred to as a physical screen, while the screen not presented to the user is referred to as a virtual screen. The aforementioned game B can be considered an example of a first application, and interfaces 102 and 202 can be considered examples of first interfaces.

[0055] S502: In response to a first operation of the user in the first interface, displaying a running interface of the second application on the physical screen, wherein the first operation is used to switch the first application to the background.

[0056] The first operation can be, for example, an upward swipe operation or a continuous left swipe operation, as long as it can trigger the application to be switched to the background. It should also be understood that in traditional solutions, when the first operation occurs, the first application will be directly switched to the background and suspended. However, in the solution of the present application, although the function of the first operation is to exit the current application, a judgment will be made before the exit is executed to first determine whether the first task currently being executed belongs to the preset task, and then decide whether to exit to the background and suspend or create a virtual screen to continue executing the first task.

[0057] The above-mentioned application C can be regarded as an example of the second application.

[0058] S503: In response to the first operation, determine whether the first task is a preset task.

[0059] The first task is a task being executed by the first application corresponding to the first interface. The execution time of the preset task is greater than or equal to the preset time threshold.

[0060] Preset tasks require users to wait for a long time. For example, the wait time may be several minutes or even more than ten minutes. The waiting time for preset tasks may also be uncertain. For example, the waiting time for update tasks and loading progress tasks is uncertain. Another example is the waiting time for casting and team formation tasks, which may be uncertain for other users.

[0061] In one implementation, when determining whether the first task belongs to a preset task in response to a first operation, it may include: obtaining and determining whether the first task belongs to any one of the preset tasks based on the task identifier of the first task; or, when the task identifier of the first task cannot be used to indicate the task type of the first task, determining whether the first task belongs to a preset task by detecting the data packet of the first task. In this implementation, when the task identifier of the first task can be obtained and the task identifier of the first task can indicate the task type, determining whether it belongs to a preset task is determined by obtaining the task identifier of the first task; when the task identifier of the first task cannot be obtained, or the task identifier of the first task can be obtained but the task identifier cannot indicate the task type, identifying the task type of the first task and determining whether the first task belongs to a preset task is determined by detecting and analyzing the data packet of the first task. This implementation enables the application to identify the task type of the task it is executing regardless of whether it can obtain the task identifier, thereby improving the versatility of the solution of this application, so that the scope of application is no longer limited to only being able to know the task type through the task identifier.

[0062] In one implementation, the preset task may include at least one of a hot update task and a waiting task. The introduction of the hot update task can refer to the above. The waiting task can be understood as a task that takes a long time to execute (the execution time is greater than or equal to the preset time threshold, for example, a waiting time of more than one minute (an example of the preset time threshold)), does not require the user to perform interactive operations during execution and only requires the user to wait, and the screen changes slightly during execution. The waiting task may or may not include a progress bar. For waiting tasks with a progress bar, it can be determined whether it is a waiting task by identifying whether there is a progress bar in the image of the display interface. For waiting tasks without a progress bar, the currently executing task can be determined by identifying other information in the image of the interface. For example, the image data can be identified with a trained neural network model to determine whether the image is a waiting task. The trained neural network model has the ability to identify whether the task corresponding to the image is a waiting task. In one example, the initial neural network model can be trained using training samples to obtain a trained neural network model. The training samples can include image samples and labels corresponding to whether each image sample is a waiting task. The image samples include images of different display interfaces of the application. Waiting tasks can also include preset execution duration information, that is, they have a fixed execution duration (known execution duration), but there are also many tasks that do not have a fixed execution duration. For example, the above-mentioned role selection task has an unfixed execution duration. It depends on various factors such as network conditions, other users' thinking time, operation time, etc., so the specific execution time is not fixed.

[0063] In one implementation, the preset task includes a hot update task. When the task identifier of the first task cannot be used to indicate the task type of the first task, the step of determining whether the first task belongs to the preset task by detecting the data packet of the first task may include: detecting the data packet reception information of the first application, the data packet reception information is used to indicate whether the first application receives a data packet through a network service; when the data packet reception information indicates that the first application is downloading update data, determining that the first task is a hot update task; or when the data packet reception information indicates that the first application is not downloading update data, determining that the first task is not a hot update task. In this implementation, for the hot update task, whether it is a hot update task is determined by detecting whether the application receives a data packet through a network service. Because a hot update necessarily requires downloading an update data packet and performing an update, detecting whether an update data packet is being downloaded can determine whether the hot update task is being executed.

[0064] It should be understood that updates are further divided into online updates and hot updates, but the hot updates are detected here.

[0065] In another implementation, the preset task includes a waiting task. When the task identifier of the first task cannot be used to indicate the task type of the first task, the step of determining whether the first task belongs to the preset task by detecting the data packet of the first task may include: obtaining image data of the first interface; identifying whether the first interface includes a progress bar by performing image feature analysis on the image data of the first interface; when it is detected that the first interface includes a progress bar, determining that the first task is a waiting task with a progress bar; or, when it is detected that the first interface does not include a progress bar, identifying whether the first task is a waiting task by performing image feature analysis on the image data of the first interface. In this implementation, for the waiting task, image analysis will be used to determine whether it is a waiting task. For a task with a progress bar, it is only necessary to identify whether it includes a progress bar. For a task without a progress bar, other features in the image can be identified to determine whether it is a waiting task.

[0066] In another implementation, the preset task includes a waiting task, and the above method further includes: when the first task is determined to be a waiting task based on the task identifier of the first task, and the first task also includes preset execution duration information, the moment when the first task is completed is determined based on the preset execution duration information, and when the remaining duration of the waiting task is less than or equal to the preset remaining duration threshold, the remaining duration information is displayed on the physical screen. In this implementation, for special waiting tasks such as waiting tasks with known execution durations, when locking the time node when the task is completed, this known execution duration can be directly used, and an advance reminder can be given, so that the user's return is more timely. For example, the user can be reminded of the remaining time when there are 5 seconds or 10 seconds left, and a countdown information can also be displayed. However, it should be understood that this implementation can only be implemented for waiting tasks with known execution durations. For waiting tasks with unknown execution durations, it is also necessary to lock the time node when the task is completed through image analysis.

[0067] S504: When the first task is a preset task, project the execution process of the first task onto the virtual screen and continue to execute the first task.

[0068] That is, a virtual screen is created, and the first task is projected onto the virtual screen for continued execution. The virtual screen is not displayed to the user.

[0069] S505: Detect the execution progress of the first task, and when it is detected that the first task is completed, display a prompt message on the physical screen, where the prompt message is used to indicate that the first task is completed.

[0070] By detecting the execution progress of the first task, it is ensured that the time node of the first task completion is locked in time.

[0071] In one implementation, the preset tasks include a hot update task. When detecting the execution progress of a first task and displaying a prompt message on a physical screen upon detecting completion of the first task, the process may include: continuously detecting data packet reception information starting from the moment the first task is determined to be a hot update task; and determining the execution progress of the hot update task based on the reception progress indicated by the data packet reception information. In this implementation, once the current task is determined to be a hot update task, the data packet reception information is continuously detected to determine the execution progress of the hot update task, thereby promptly locking in the time point of completion.

[0072] In one example, when the data packet reception information includes an indication of the reception progress, the reception progress is determined according to the indication. Figure 1 and Figure 2 If the update progress is contained in the data packet, the current reception progress can be determined by parsing the information.

[0073] In another example, when the packet reception information doesn't include an indication of reception progress, the hot update task can be considered complete based on whether packets were received at two consecutive moments. Specifically, if no packet was received at the current moment but received at the previous moment, reception is considered complete, and the hot update task is complete. In this example, although the completion of reception is detected a moment later, the impact of this short delay is largely negligible because subsequent data updates are performed after receiving the packet during the hot update process.

[0074] In one implementation, the method further includes: when the hot update task is determined to have completed execution based on the data packet reception information, stopping the continuous monitoring of the data packet reception information. In this implementation, the continuous monitoring of the data packet reception information begins when the hot update task is determined to have completed execution and ends when the hot update task has completed execution, ensuring that no detection is missed and releasing operational resources in a timely manner.

[0075] In one implementation, the preset task includes a waiting task. When detecting the execution progress of the first task and displaying a prompt message on the physical screen after detecting that the first task has been completed, it can include: starting from determining that the first task is a waiting task, continuously obtaining image data of each frame of the display interface during the execution of the first task; when it is detected that the image difference between the current frame display interface and the previous frame display interface is greater than or equal to a preset difference threshold, it is determined that the first task is completed and the acquisition of image data of the display interface of the first task is stopped. In this implementation, the time node of task completion is locked by continuously obtaining image data of the display interface and performing image analysis, and the instantaneous changes at the time of completion are captured by detecting the difference between two consecutive frames of the display interface image, thereby locking the time node of task completion. It should be understood that regardless of whether the waiting task has a progress bar or not, it can be determined whether the execution is completed by identifying the image difference between two consecutive frames of the display interface.

[0076] In one example, the image difference between two consecutive frames of the display interface image may be compared using a grayscale histogram.

[0077] In another implementation, detecting the execution progress of a first task and displaying a prompt message on a physical screen after detecting completion of the first task may include: when the first task is a waiting task with a progress bar, determining the execution progress of the first task by identifying the progress indicated by the progress bar on each frame of the display interface, and stopping acquiring image data of the display interface of the first task after detecting completion of the first task. In this implementation, for waiting tasks with a progress bar, the progress can be determined by identifying the progress bar. Identifying only changes in the progress bar can reduce the amount of image data that needs to be analyzed during the identification process.

[0078] When the preset tasks include hot update tasks and waiting tasks, when judging whether the first task belongs to the preset tasks, you can first judge whether it is a hot update task, and then judge whether it is a waiting task; you can also first judge whether it is a waiting task, and then judge whether it is a hot update task; you can also judge the two preset tasks simultaneously.

[0079] S506 : In response to a second operation of the user, display a second interface of the first application on the physical screen, where the second interface corresponds to a running interface after the first task is completed.

[0080] The second operation is used to switch back to the first application, that is, to switch the first application to the foreground and display the running interface of the first application on the physical screen.

[0081] In one implementation, the second operation is a click operation on the prompt information, or the second operation is a click operation on the first control, the first control is a control displayed synchronously with the prompt information, and the first control is used to switch the display interface in the physical screen back to the running interface of the first application; the prompt information is displayed through a pop-up window or a floating capsule. Figure 2 and Figure 4 The pop-up window in the example can be seen as an example of how to carry prompt information. Figure 2 and Figure 4 The "Confirm" control in can be seen as an example of the first control.

[0082] In the traditional solution, you can return to the first application by clicking a snapshot of the first application or the desktop icon of the first application, but the interface actually displayed is no longer related to the first task, and it depends on the task that the first application is executing when you re-enter the first application.

[0083] In another implementation, the method further includes: when it is determined that the first task does not belong to the preset task, switching the first application to the background and suspending it. In this implementation, for situations where the task does not belong to the preset task, a fallback is performed according to the execution process of the traditional solution, thereby combining the solution of the present application with the traditional solution. Thus, for all tasks, when the first operation occurs during execution, a corresponding processing strategy can be used to handle it.

[0084] Figure 5 In the solution shown, when the user executes the operation of switching the first application to the background, it will determine whether the first task currently executed by the first application is a preset task. If the first task is a preset task, the first task will continue to be executed by projecting the first task onto a virtual screen. During the execution of the first task, its execution progress will be detected. Once the first task is completed, the user will be prompted to facilitate the user to return to the first application from the display interface of other applications in a timely manner. This solution ensures that the task is not interrupted and can promptly remind the user to return to the application by adding a judgment on the task type of the currently executing task and continuing the execution of the preset task with a special execution process. This allows users to safely use other applications during the task execution period instead of just waiting, thereby improving the user experience.

[0085] Figure 6 This is a schematic diagram of the execution process of returning to an application under a hot update task in an embodiment of the present application. Figure 6 Take the game application as an example. Figure 6 As shown, the application layer includes game application A and game manager (game assistant), the framework layer ( Figure 6The FWK layer in the , including the activity manager service (AMS), the game service (here Figure 6 The native layer includes the GameKit (here is the GameKit) and the network service (HnChrSevice). The network service module is used to provide network maintenance and testing services (maintenance and testing), so it can detect the data packets of the game application in the background, that is, it can use the network service to perform background packet statistics of the game, so as to know the data packet reception status of the game application (data packet reception information). Figure 6 The GUE service in , which can also be called the game super engine) and the layer compositor (SurfaceFlinger).

[0086] When a user switches Game App A to the background in the application layer's UI, the AMS in the FrameWorks Framework (FWK) layer detects the switch action and reports it to GameKit. GameKit then reports the switch action to the network service. Triggered by this action, the network service checks for packet reception, detecting whether update packets are being received and the progress of those packets, and reports this status back to GameKit. When the network service detects that an update packet is being received, it reports this status to GameKit. Upon receiving this notification, GameKit confirms that a hot update is in progress and sends a request to the GUE service to create a virtual display. The GUE service calls SurfaceFlinger to create the virtual display, and SurfaceFlinger is responsible for continuing the update process on the virtual display during the hot update. When the network service detects that data packets have been received, it sends GameKit a packet reception status indicating that the update is complete. GameKit then sends a notification to Game Manager, which then notifies the user of the update completion via a pop-up window.

[0087] Figure 7 This is a schematic diagram of the execution process of returning to an application under a loading task in an embodiment of the present application. Figure 7 Taking the game application as an example, the loading task is an example of a waiting task. The loading task here meets the following characteristics of the waiting task mentioned above: small screen changes, no user interaction during the period, long execution time, and a loading progress bar. Figure 7 As shown, the application layer includes game application A and game manager (game assistant), the framework layer ( Figure 7The FWK layer in the , including the activity manager service (AMS), the game service (here Figure 7 The native layer includes the game service (here is GameKit). Figure 7 The GUE service in , which can also be called the game super engine) and the layer compositor (SurfaceFlinger). For related content, please refer to Figure 6 introduce.

[0088] When the user inputs a switch operation on the interactive interface of game application A in the application layer, that is, the operation of switching game application A to the background, the AMS in the FWK layer obtains the switch operation and reports it to GameKit. After GameKit determines that the current task is a loading task, it sends a request to the GUE service to create a virtual screen. The GUE service calls SurfaceFlinger to create a virtual screen. SurfaceFlinger is responsible for continuing to execute the current task on the virtual screen during the execution of the current task (loading task) and performing feature detection on the interface image to determine the execution progress of the current task. When SurfaceFlinger detects that the current task has been completed, it sends a loading task completion notification to GameKit. GameKit sends a notification of the completion of the current task to the game manager. The game manager or the native SystemUI notifies the user of the completion of the current task through a pop-up window.

[0089] Should understand Figure 6 and Figure 7 This is just an example of the internal execution process. In practice, the software architecture of the electronic device may also include other modules, or call other modules with the same functions according to actual conditions. For example, when the application is not a game application, GameKit is replaced by the management module of the actual application. As long as the module can execute steps such as sending a request for a virtual screen, it will not be repeated here.

[0090] The above mainly introduces the method of the embodiment of the present application in conjunction with the accompanying drawings. It should be understood that although the various steps in the flowcharts involved in the various embodiments described above are shown in sequence, these steps are not necessarily performed in sequence in the order shown in the figures. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the steps or stages in other steps. The device of the embodiment of the present application is introduced below in conjunction with the accompanying drawings.

[0091] Figure 8 Schematic diagram of a device for returning an application according to an embodiment of the present application. Figure 8 As shown, the device 2000 includes a display unit 2001 and a processing unit 2002. The device 2000 can be integrated into electronic devices such as mobile phones, tablet computers, touch-screen laptops, etc.

[0092] The device 2000 can be used to perform any of the above methods. For example, the display unit 2001 can be used to perform steps S501 and S506, and the processing unit 2002 can be used to perform steps S502-S505. The device 2000 can also be used to perform Figure 6 and Figure 7 Each step. The device 2000 can also be used to perform Figure 2 and Figure 4 The interactive process shown.

[0093] In one implementation, the apparatus 2000 may further include a storage unit for storing relevant data. The storage unit may be integrated into any one of the above units or may be a unit independent of all the above units.

[0094] Figure 9 FIG is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. Figure 9As shown, the electronic device 900 may include a processor 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management module 941, a battery 942, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, a speaker 970A, a receiver 970B, a microphone 970C, an earphone interface 970D, a sensor module 980, a button 990, a motor 991, an indicator 992, a camera 993, a display screen 994, and a subscriber identification module (SIM) card interface 995, etc.

[0095] Among them, the sensor module 980 may include a pressure sensor 980A, a gyroscope sensor 980B, an air pressure sensor 980C, a magnetic sensor 980D, an acceleration sensor 980E, a distance sensor 980F, a proximity light sensor 980G, a fingerprint sensor 980H, a temperature sensor 980J, a touch sensor 980K, an ambient light sensor 980L, a bone conduction sensor 980M, etc.

[0096] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0097] For example, Figure 9 The processor 910 shown may include one or more processing units. For example, the processor 910 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0098] The controller may be the nerve center and command center of the electronic device 900. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0099] In the embodiment of the present application, the processor 910 is mainly used to detect the task type, perform image feature analysis, and respond to interactive operations input by the user.

[0100] Processor 910 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 910 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 910. If processor 910 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 910 latency, and thus improves system efficiency.

[0101] Electronic device 900 implements display functionality through a GPU, display screen 994, and an application processor. The GPU is a microprocessor for image processing that connects display screen 994 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 910 may include one or more GPUs that execute program instructions to generate or modify display information.

[0102] The display screen 994 is used to display images, videos, etc. The display screen 994 includes a display panel. In some embodiments, the electronic device 900 may include one or N display screens 994, where N is a positive integer greater than one.

[0103] In the embodiment of the present application, each interface is presented to the user mainly through the display screen 994, for example Figures 1-4 Each interface in .

[0104] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in electronic device 900, such as image recognition, face recognition, voice recognition, and text comprehension.

[0105] In an embodiment of the present application, the trained neural network model can be used to identify waiting tasks with the help of the NPU.

[0106] Pressure sensor 980A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 980A can be located on display screen 994. There are many types of pressure sensors 980A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force is applied to pressure sensor 980A, the capacitance between the electrodes changes. Electronic device 900 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 994, electronic device 900 detects the intensity of the touch operation using pressure sensor 980A. Electronic device 900 can also calculate the location of the touch based on the detection signal from pressure sensor 980A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, an instruction to create a new short message is executed.

[0107] In the embodiment of the present application, the pressure sensor 980A is mainly used to collect user interaction operations, such as sliding operations, clicking operations, etc.

[0108] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0110] An embodiment of the present application also provides an electronic device, which includes: one or more processors, and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions so that the electronic device can execute the steps in any of the above methods.

[0111] An embodiment of the present application further provides a chip system, which is applied to an electronic device and includes one or more processors configured to invoke computer instructions to enable the electronic device to perform the steps of any of the above methods. Optionally, the chip system also includes a memory electrically connected to the processor. Optionally, the chip system may also include a communication interface.

[0112] The embodiment of the present application also provides a computer-readable storage medium, which stores instructions, and when the instructions are executed by an electronic device, any of the above methods can be implemented. The computer-readable medium may include at least: any entity or device capable of carrying computer program code (instructions) to a photographing device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard drive, a magnetic disk, or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0113] The present application also provides a computer program product, which includes a computer program that, when executed by an electronic device, can implement any of the above methods. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form.

[0114] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0115] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0116] In the embodiments provided in this application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0117] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0118] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0119] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0120] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0121] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0122] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for returning an application, characterized in that: include: Starting and running a first application on the electronic device, and displaying a first interface of the first application on the physical screen; In response to a first operation performed by a user in the first interface, displaying a running interface of a second application on the physical screen, wherein the first operation is used to switch the first application to the background; In response to the first operation, determining whether a first task is a preset task, the first task being a task being executed by the first application corresponding to the first interface, and an execution duration of the preset task being greater than or equal to a preset duration threshold; When the first task is the preset task, projecting the execution process of the first task onto a virtual screen and continuing to execute the first task; detecting the execution progress of the first task, and when detecting that the first task is completed, displaying a prompt message on the physical screen, the prompt message being used to indicate that the first task is completed; In response to a second operation by the user, displaying a second interface of the first application on the physical screen, where the second interface corresponds to a running interface after the first task is completed; The preset task includes a waiting task, and detecting the execution progress of the first task includes: Starting from determining that the first task is a waiting task, continuously acquiring image data of each frame of the display interface during the execution of the first task; When it is detected that the image difference between the current frame display interface and the previous frame display interface is greater than or equal to a preset difference threshold, it is determined that the first task is completed and the acquisition of the image data of the display interface of the first task is stopped.

2. The method according to claim 1, characterized in that The determining whether the first task is a preset task includes: Obtaining and judging, based on the task identifier of the first task, whether the first task belongs to any of the preset tasks; or, When the task identifier of the first task cannot be used to indicate the task type of the first task, it is determined whether the first task belongs to the preset task by detecting the data packet of the first task.

3. The method according to claim 2, characterized in that The preset task includes a hot update task, and the detecting of a data packet of the first task to determine whether the first task belongs to the preset task includes: detecting data packet reception information of the first application, where the data packet reception information is used to indicate a situation in which the first application receives a data packet through a network service; When the data packet reception information indicates that the first application is downloading update data, determining that the first task is a hot update task; or, When the data packet reception information indicates that the first application is not downloading update data, it is determined that the first task is not a hot update task.

4. The method according to claim 2, characterized in that The preset task includes a hot update task, and detecting the execution progress of the first task includes: Starting from determining that the first task is a hot update task, continuously detecting data packet reception information of the first application; The execution progress of the hot update task is determined according to the reception progress indicated by the data packet reception information.

5. The method according to claim 4, characterized in that The method further comprises: When it is determined according to the data packet reception information that the hot update task is completed, the continuous detection operation of the data packet reception information is stopped.

6. The method according to claim 2, characterized in that The preset task includes a waiting task, and the detecting of a data packet of the first task to determine whether the first task belongs to the preset task includes: Acquiring image data of the first interface; By performing image feature analysis on the image data of the first interface, identifying whether the first interface includes a progress bar; When it is detected that the first interface includes a progress bar, determining that the first task is a waiting task with a progress bar; or When it is detected that the first interface does not include a progress bar, image feature analysis is performed on image data of the first interface to identify whether the first task is a waiting task.

7. The method according to claim 6, characterized in that The detecting the execution progress of the first task includes: When the first task is a waiting task with a progress bar, the execution progress of the first task is determined by identifying the progress indicated by the progress bar of each frame display interface, and the acquisition of image data of the display interface of the first task is stopped after detecting that the first task is completed.

8. The method according to claim 2, characterized in that The preset task includes a waiting task, and the method further includes: When the first task is determined to be a waiting task based on the task identifier of the first task, and the first task also includes preset execution duration information, the time when the first task is completed is determined based on the preset execution duration information, and when the remaining duration of the waiting task is less than or equal to the preset remaining duration threshold, the remaining duration information is displayed on the physical screen.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: When it is determined that the first task does not belong to the preset task, the first application is switched to the background and suspended.

10. The method according to any one of claims 1 to 8, characterized in that The second operation is a click operation on the prompt information, or the second operation is a click operation on the first control, the first control is a control displayed synchronously with the prompt information, and the first control is used to switch the display interface in the physical screen back to the running interface of the first application; the prompt information is displayed through a pop-up window or a floating capsule.

11. An electronic device, characterized in that: The electronic device includes: one or more processors, and a memory; The memory is coupled to the one or more processors, and is configured to store computer program codes, where the computer program codes include computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 10.

12. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium comprises instructions, which, when executed on an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Display method and device, electronic equipment and storage medium

    CN112691369A