Application returning method and electronic equipment
By judging and projecting screens on electronic devices to preset tasks to the virtual screen, detecting task progress and prompting users to return, the problem of users being unable to return to the application in time during task execution is solved, and the user experience and timeliness of task completion are improved.
Patent Information
- Application Number
- CN202410245244.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-02-29
AI Technical Summary
When performing hot updates or waiting for tasks, users cannot return to the application in time after the task is executed, resulting in poor user experience. Especially when the task is executed for a long time, users are prone to miss important interactions or task start time.
By determining whether the task is a preset task (such as hot updates or waiting tasks) when the user switches the application to the background, and casting it to the virtual screen to continue execution, detecting the task progress, and prompting the user to return when the task is completed Apply to ensure that users return in time at the right time.
Improves the user experience, allowing users to use other applications with confidence during task execution, without having to wait all the time, return to the application in time, and avoid missing important tasks or interactive operations.
Smart Images

Figure CN119236387A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a method for returning an application and an electronic equipment. Background Art
[0002] The version of the application is updated more and more frequently. There are two ways to update the application. One is offline update (also called cold update), which requires re-downloading the installation package and then reinstalling the application after exiting the application. The other is online update (also called hot update), which is to download the data package for update during the use of the application after starting it, that is, the application needs to be updated in the running state after starting. During hot update, once the user exits the update interface and switches the application to the background, the update will be interrupted, which means that the user can only stay on the update interface and wait for the update to complete. During this period, other operations cannot be performed, resulting in a poor user experience.
[0003] In addition, for highly interactive applications such as game applications, multiple people often participate in the interaction. When others are performing various interactive operations such as character selection and waiting to form a team, users can only stay on a corresponding interface and wait for others to complete the operation. Due to the long waiting time, many users will choose to temporarily switch the game application to the background and then use other applications, such as chat applications, video applications or shopping applications. This causes users to forget the tasks that are still being performed in the game application, resulting in missing the start time of the game, etc., and the user experience is poor.
[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 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 a 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 detecting that the first task has been completed, displaying a prompt message on the physical screen, the prompt message being used to indicate that the first task has been 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 has been 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 the execution progress will be detected during the execution of the first task. 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 increases the judgment of the task type of the currently executed task and continues to execute the preset task using a special execution process 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 period instead of just waiting, thereby improving the user experience.
[0008] In combination with the first aspect, in some implementations of the first aspect, in response to the first operation, when determining whether the first task belongs to a preset task, it may include: obtaining and judging whether the first task belongs to any one of the preset tasks according to 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, judging 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, it is determined whether it belongs to the preset task 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, the task type of the first task is identified and whether the first task belongs to the preset task is determined by detecting and analyzing the situation of 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 the present application, so that the scope of application is no longer limited to only knowing the task type through the task identifier.
[0009] In combination with the first aspect, in certain implementations of the first aspect, the preset task includes a hot update task, and 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 the situation that the first application receives the data packet through the 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 will be determined by detecting the situation that the application receives the data packet through the network service, because the hot update will inevitably download the update data packet and update, so detecting whether the 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, and when detecting the execution progress of the first task and after detecting that the first task has been completed, displaying a prompt message on the physical screen may include: starting from determining that the first task is a hot update task, continuously detecting data packet reception information; and determining the execution progress of the hot update task according to the reception progress indicated by the data packet reception information. In this implementation, once it is confirmed that the current task is 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 node of completion of execution.
[0011] In conjunction with the first aspect, in certain implementations of the first aspect, the method further includes: when it is determined according to the data packet reception information that the hot update task has been completed, stopping the continuous detection operation of the data packet reception information. In this implementation, the continuous detection operation of the data packet reception information starts from the determination that it is a hot update task and ends when the hot update task is completed, ensuring that no detection is missed and also releasing the occupation of the running resources in a timely manner.
[0012] In combination with the first aspect, in certain implementations of the first aspect, the preset task includes a waiting task, and 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, whether it is a waiting task will be determined by image analysis. 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, whether it is a waiting task can be determined by identifying other features in the image.
[0013] In combination with the first aspect, in certain implementations of the first aspect, the preset task includes a waiting task, and when the execution progress of the first task is detected and the prompt information is displayed on the physical screen after the first task is detected to be completed, it may include: starting from determining that the first task is a waiting task, continuously acquiring the 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 the preset difference threshold, determining that the first task is completed, and stopping acquiring the image data of the display interface of the first task. In this implementation, the time node when the task is completed is locked by continuously acquiring the image data of the display interface and performing image analysis, and the instantaneous changes when the execution is completed are captured by detecting the difference between two consecutive frames of the display interface image, thereby locking the time node when the task is completed. It should be understood that 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, 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 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 of each frame of the display interface, and stopping obtaining the image data of the display interface of the first task after detecting that the first task has been completed. In this implementation, for a waiting task with a progress bar, the progress can be determined by identifying the progress bar, and only identifying 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 according to 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 according to 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 the preset task, switching the first application to the background and suspending it. In this implementation, for situations that do not belong to the preset task, a fallback will be performed according to the execution process of the traditional solution, realizing the combination of the solution of the present application and the traditional solution, so that 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 certain 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 the memory is used to store computer program code, wherein the computer program code includes computer instructions, and 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. The chip system is applied to an electronic device, and the chip system includes one or more processors. 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, and the memory is electrically connected to the processor.
[0023] Optionally, the chip system may also include a communication interface.
[0024] According to 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 It is a schematic diagram of an 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 It is a schematic diagram of an interactive process of returning to an application in a waiting task according to an embodiment of the present application.
[0030] Figure 5 It is a schematic flowchart of a method for returning to an application according to an embodiment of the present application.
[0031] Figure 6 It is a schematic diagram of the execution process of returning to the application under a hot update task in an embodiment of the present application.
[0032] Figure 7 It 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 It is a schematic diagram of a device for returning an application according to an embodiment of the present application.
[0034] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] The scheme of the embodiment of the present application is introduced below 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, the electronic device A may be a mobile phone, a 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 was exited is interrupted, resulting in a poor user experience. Figure 1Take the application that the user is using and subsequently returns to as a game application as an example for explanation. As shown in interface 101, assuming that the user starts the application by clicking on the desktop icon of game B (an example of the first application) or hot-starts the application by clicking on its snapshot, the application starts to be hot-updated under the triggering of the user's selected operation (the operation of confirming the updated version), and the update interface shown in interface 101 appears. During the hot update process, the screen of the update interface will basically not change as a whole, only the progress bar will change. For example, when the corresponding update progress shown in interface 101 is 15%, assuming that interface 102 appears after a period of update, as shown in interface 102, the update progress has reached 50%, and only the progress bars of the two interfaces have changed. Assuming that the user exits game B by sliding up in interface 102, in response to the user's sliding up operation, interface 103 is displayed on electronic device A. As shown in interface 103, a snapshot of the application suspended in the background is displayed, and interface 102 is also generated and saved as a snapshot. Assuming that the user clicks on the snapshot of other applications in interface 103, here we take the snapshot of application C (an example of the second application) as an example. In response to the click operation, interface 104 is displayed on the electronic device, and interface 104 is the running interface #1 of application C. The user starts to use application C, and after a period of time (for example, it may be a few minutes, more than ten minutes, etc.), the running interface #2 of application C appears, as shown in interface 105. Assuming that the user exits application C by sliding up in interface 105, in response to the sliding up operation, interface 106 is displayed on the electronic device. Assuming that the user clicks on the snapshot of game B in interface 106, he will enter game B again, that is, return to game B. In response to the click operation, interface 107 is displayed on electronic device A. It can be seen from interface 107 that the hot update task of game B is interrupted due to the sliding up operation of returning it to the background in interface 102. So when the user re-enters interface 107, the update progress stays at 50%.
[0037] exist Figure 1 In the example shown, when the user is using game B, when 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's 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, the present 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 is created to ensure that the hot update task can continue to be executed when the application retreats to the background, and the user is prompted to return to the application after the execution is completed, so that the user no longer needs to stay on the task execution interface and cannot perform other operations, thereby improving the user experience.
[0040] Figure 2 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 game B in 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 of identifying the task currently executed by Game B is performed, and 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, the screen needs to be displayed, and the 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, instead of only interrupting the hot update task.
[0041] Assume that the user clicks on the snapshot of application C in interface 103 to enter application C and use 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 tell the user that the update has been completed. As shown in interface 110, during the display of the running interface #3 of application C, the hot update task of game B is completed, and a pop-up window pops up, which displays "Game B has been updated, do you want to switch back to game B", and the pop-up window also includes two controls, among 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 be returned 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 an update interface, but a new display interface. It is also possible to return to game B by clicking on the pop-up window. The prompt information can also be displayed using a suspended capsule, and can return to game B in response to the user's click operation on the suspended capsule or the confirmation control therein.
[0042] It should be noted that Figure 1-Figure 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 by 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, users will miss other subsequent interactions that require user participation because they 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, the electronic device A may be a mobile phone, a 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 prematurely, causing the user to miss other tasks with time limits, or the task is still being executed, causing the user to wait, and the user experience is poor. Assume 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). Due to the need for multi-person interaction, this stage waits for all the people participating in the interaction to complete their selection before data loading and opening can be performed. Assume that the user exits game B by sliding up in interface 202, and 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. Assuming that the user clicks on the snapshot of other applications in interface 203, here we take the snapshot of clicking application C (an example of the second application) as an example. In response to the click operation, interface 204 is displayed on the electronic device, and interface 204 is the running interface #1 of application C. The user starts to use application C, and after a period of time, the running interface #2 of application C appears, as shown in interface 205. Since the user cannot know when the task of selecting a role (that is, the task of selecting a team) in interface 201 will end, it is easy to return in time. Assuming that the user exits application C by sliding up in interface 205, in response to the sliding up operation, interface 206 is displayed on the electronic device. Assuming that the user clicks on the snapshot of game B in interface 206, he will enter game B again, that is, return to game B. In response to the click operation, interface 207 is displayed on electronic device A. It can be seen from interface 207 that the waiting task of game B has already ended, and it is displayed as interface #5 at this time. It is assumed here that interface #5 is the corresponding interface after a period of time after the game is started. This leads to a late return (the game has been started for a period of time), and the user experience is poor. 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] In response to the above problems, this application provides a new method for returning to the application. For such waiting tasks that require users to wait for a long time, a virtual screen will be created to ensure that the waiting task can continue to be executed when the application retreats to the background, and the user will be prompted to return to the application in time after the execution is completed, so that the user can return to the application at a more appropriate time, thereby improving the user experience. It should be understood that although in traditional solutions, such waiting tasks will also be executed in the background, the user will not be notified at the appropriate time point that the task has been completed, causing the user to miss subsequent interactive operations.
[0046] Figure 4 is a schematic diagram of an interactive process of returning to an 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 of identifying the task currently executed by Game B is performed, and 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 to be executed in the background. During the execution of the current waiting task, the virtual screen carries the content to be displayed, rather than the physical screen. This ensures that the user can continue to use other applications on the physical screen, and the current task can continue to be executed in the background, and the 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 the user clicks on the snapshot of application C in interface 203 to enter application C and use 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 tell the user that the casting is completed. As shown in interface 210, during the display of the running interface #3 of application C, the waiting task of game B (here, the casting and team formation 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, among which the "Confirm" control is used to trigger the return to game B. Assuming that the user clicks the confirmation control in interface 110, you 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 start interface, which prevents the user from missing the time node of the game starting after the team formation 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 all people have completed the operation. This process can be regarded as a waiting task. During the execution of the waiting task, the screen changes slightly. 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 executing other tasks, there will be a sudden change in the screen for an instant, so you can determine whether the waiting task has been completed by locking the change of the screen.
[0048] It should also be understood that Figure 1-Figure 4 For example, while using game B, temporarily quit game B, use application C instead, and then return to game B. However, in reality, it is also possible to use multiple other arbitrary applications after quitting game B. 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. 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 task. The second type of task can include loading progress tasks (waiting tasks that 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 It can be seen from the waiting task shown that 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 screen changes are relatively small until the team is formed, as shown in interface 211. The degree of change in the interface screen is large, and the end time (the time when the execution is completed) can be detected.
[0050] It should also be noted that the solution used in 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 is a schematic flow chart of a method for returning an application in an embodiment of the present application. Figure 5 The steps shown are introduced below.
[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 the present application involves creating a virtual screen, in order to distinguish the virtual screen from the actual screen, the actual screen of the electronic device A is referred to as a physical screen, and the screen that is not presented to the user is referred to as a virtual screen. The above-mentioned game B can be regarded as an example of the first application, and the interface 102 and the interface 202 can be regarded as examples of the first interface.
[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, a swipe up operation or a continuous swipe left operation, as long as it can trigger the application to be switched to the background. It should also be understood that in the traditional solution, when the first operation occurs, the first application will be directly switched to the background and suspended, but 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, first determining whether the first task currently being executed belongs to the preset task, and then deciding 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 belongs to 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 are tasks that require users to wait for a long time. For example, it may take several minutes or more than ten minutes to wait. The waiting time for preset tasks may also be uncertain. For example, the waiting time for update tasks and loading progress tasks is uncertain. For example, for casting and team formation tasks, the waiting time for other users is also uncertain.
[0061] In one implementation, in response to a first operation, when determining whether a first task belongs to a preset task, 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, by detecting the data packet of the first task, determining whether the first task belongs to the preset 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, the task identifier of the first task is obtained to determine whether it belongs to the preset 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, the task type of the first task is identified and 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 present application solution, so that the scope of application is no longer limited to only knowing 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, only requires the user to wait, and has a small degree of screen change during execution. The waiting task may include a progress bar or may not include a progress bar. For a waiting task 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 a waiting task without a progress bar, the currently executed 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 an example, the initial neural network model can be trained using training samples to obtain a trained neural network model. The training samples may 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 time information, that is, they have a fixed execution time (known execution time), but there are also many tasks that do not have a fixed execution time. For example, the above-mentioned role selection task has an unfixed execution time. 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 the situation that the first application receives the data packet through the 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 will be determined by detecting the situation that the application receives the data packet through the network service, because the hot update will inevitably download the update data packet and update, so detecting whether the update data packet is being downloaded can determine whether the hot update task is being executed.
[0064] It should be understood that the update is also divided into online update and hot update, but the hot update is 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 is 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 may be identified to determine whether it is a waiting task.
[0066] In another implementation, the preset task includes a waiting task, and the method further includes: when the first task is determined to be a waiting task according to the task identifier of the first task, and the first task also includes preset execution time information, the moment when the first task is completed is determined according to the preset execution time information, and when the remaining time of the waiting task is less than or equal to the preset remaining time threshold, the remaining time information is displayed on the physical screen. In this implementation, for a special waiting task such as a waiting task with a known execution time, when locking the time node when the task is completed, this known execution time can be directly used, and a reminder can be given in advance, 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 a waiting task with a known execution time. For a waiting task with an unknown execution time, it is also necessary to lock the time node when the task is completed by 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 completion of the first task is locked in time.
[0071] In one implementation, the preset task includes a hot update task, and when detecting the execution progress of the first task and after detecting that the first task has been completed, displaying a prompt message on the physical screen may include: starting from determining that the first task is a hot update task, continuously detecting the data packet reception information; and determining the execution progress of the hot update task according to the reception progress indicated by the data packet reception information. In this implementation, once it is confirmed that the current task is 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 node of the completion of the execution.
[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 receiving progress can be determined by parsing the information.
[0073] In another example, when the packet reception information does not include an indication of the reception progress, it can be judged based on whether the packet is received at two consecutive moments, that is, if the packet is not received at the current moment, but the packet is received at the previous moment, it is considered that the reception is complete and the hot update task is completed. In this example, although it will take a moment to know that the reception is complete, since subsequent data updates will be performed after the packet is received during the hot update process, the impact of this short delay can be basically ignored.
[0074] In one implementation, the method further includes: when it is determined that the hot update task is completed according to the data packet reception information, stopping the continuous detection operation of the data packet reception information. In this implementation, the continuous detection operation of the data packet reception information starts from the determination that it is a hot update task and ends when the hot update task is completed, ensuring that no detection is missed and releasing the occupation of the running 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 may include: starting from determining that the first task is a waiting task, continuously acquiring the image data of each frame of the display interface during the execution of the first task; when detecting that the image difference between the current frame display interface and the previous frame display interface is greater than or equal to the preset difference threshold, determining that the first task has been completed, and stopping acquiring the image data of the display interface of the first task. In this implementation, the time node when the task is completed is locked by continuously acquiring the image data of the display interface and performing image analysis, and the instantaneous changes when the execution is completed are captured by detecting the difference between two consecutive frames of the display interface image, thereby locking the time node when the task is completed. 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 images may be compared using a grayscale histogram.
[0077] In another implementation, 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 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 of each frame of the display interface, and stopping obtaining the image data of the display interface of the first task after detecting that the first task has been completed. In this implementation, for a waiting task with a progress bar, the progress can be determined by identifying the progress bar, and only identifying 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, it is possible to first judge whether it is a hot update task and then judge whether it is a waiting task; it is also possible to first judge whether it is a waiting task and then judge whether it is a hot update task; it is also possible to 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 executed.
[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 figure can be regarded as an example of the way 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 the case that it does not belong to the preset task, it will be covered according to the execution process of the traditional solution, realizing the combination of the solution of the present application and the traditional solution, so that for all tasks, when the first operation occurs during the execution, there can be a corresponding processing strategy to handle it.
[0084] Figure 5 In the scheme 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, and the execution progress will be detected during the execution of the first task. 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 scheme increases the judgment of the task type of the currently executed task and continues to execute the preset task using a special execution process 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 period instead of just waiting, thereby improving the user experience.
[0085] Figure 6 It is a schematic diagram of the execution process of returning to the 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), and the framework layer ( Figure 6The FWK layer in the , includes 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, the network service can be used 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 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. GameKit reports the switch operation to the network service. Under the trigger of this operation, the network service module detects the packet reception status, that is, detects whether the update packet is being received and the progress of the received packet, and feeds back the packet reception status to GameKit. When the network service detects that the update packet is being received, it reports to GameKit. After receiving the notification, GameKit confirms that the hot update task is currently being executed, and then sends a request to create a virtual screen to the GUE service. GUEservice calls SurfaceFlinger to create a virtual screen. SurfaceFlinger is responsible for continuing the update task on the virtual screen during the hot update. When the network service detects that the data packet has been received, the data packet reception status sent to GameKit indicates that the update progress is complete. GameKit sends a notification of the update completion to the game manager. The game manager or the native SystemUI notifies the user of the update completion through a pop-up window.
[0087] Figure 7 It 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), and the framework layer ( Figure 7The FWK layer in the , includes 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 performs 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 notification of the completion of the loading task 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 that the current task has been completed through a pop-up window.
[0089] Should understand Figure 6 and Figure 7 This is only 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 displayed in sequence, these steps are not necessarily performed in sequence in the order shown in the figure. Unless clearly stated in this article, 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 part 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 part 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 in 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 The apparatus 2000 can also be used to perform Figure 2 and Figure 4 The interactive process is shown.
[0093] In one implementation, the apparatus 2000 may further include a storage unit for storing relevant data. The storage unit may be integrated in any one of the above units, or may be a unit independent of all the above units.
[0094] Fig. 9 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. Fig. 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 is to be understood that the structure illustrated in the embodiment of the present application does 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 in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0097] For example, Fig. 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 processor (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), etc. Among them, different processing units may be independent devices or integrated in 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 for detecting the task type, processing the image feature analysis, and responding to the interactive operations input by the user.
[0100] The processor 910 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 910 is a cache memory. The memory may store instructions or data that the processor 910 has just used or cyclically used. If the processor 910 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 910, and thus improves the efficiency of the system.
[0101] The electronic device 900 implements the display function through a GPU, a display screen 994, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 994 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 910 may include one or more GPUs, which execute program instructions to generate or change 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 1 or N display screens 994, where N is a positive integer greater than 1.
[0103] In the embodiment of the present application, each interface is presented to the user mainly through the display screen 994, for example Figure 1-Figure 4 Each interface in .
[0104] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 900 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0105] In an embodiment of the present application, the trained neural network model can be used to identify waiting tasks with the help of NPU.
[0106] The pressure sensor 980A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 980A can be set on the display screen 994. There are many types of pressure sensors 980A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 980A, the capacitance between the electrodes changes. The electronic device 900 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 994, the electronic device 900 detects the touch operation intensity according to the pressure sensor 980A. The electronic device 900 can also calculate the touch position according to the detection signal of the pressure sensor 980A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the 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 the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0109] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be 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 in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in 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, which 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] The embodiment of the present application also provides a chip system, 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 perform the steps in any of the above methods. Optionally, the chip system also includes a memory, and the memory is 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 at least include: any entity or device capable of carrying computer program code (instructions) to a camera / 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 disk, 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, and when the computer program is executed by an electronic device, any of the above methods can be implemented. 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 emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0115] Those of ordinary skill 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 to be beyond the scope of this application.
[0116] In the embodiments provided in the present 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 only a logical function division, and there may be other division methods in actual implementation, 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 separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[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, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0119] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[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" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0122] The embodiments described above 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, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope 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 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; 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, 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 has been completed, displaying a prompt message on the physical screen, wherein the prompt message is used to indicate that the first task has been completed; In response to a second operation of the user, a second interface of the first application is displayed on the physical screen, where the second interface corresponds to a running interface after the first task is executed.
2. The method according to claim 1, characterized in that In response to the first operation, determining whether the first task belongs to a preset task includes: Obtaining and judging, based on the task identifier of the first task, whether the first task belongs to any one 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 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 a data packet of the first 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 the detecting the execution progress of the first task and displaying a prompt message on the physical screen after detecting that the first task is completed includes: Starting from determining that the first task is a hot update task, continuously detecting the data packet reception information; 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 has been completed, the continuous detection operation on 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 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 a data packet of the first task includes: Acquire 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 2, characterized in that The preset task includes a waiting task, and the detecting the execution progress of the first task and displaying a prompt message on the physical screen after detecting that the first task is completed 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.
8. The method according to claim 6, characterized in that The 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 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.
9. 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.
10. The method according to any one of claims 1 to 9, 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.
11. The method according to any one of claims 1 to 9, characterized in that The second operation is a click operation on the prompt information, or the second operation is a click operation on a 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.
12. 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 the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to perform the method as claimed in any one of claims 1 to 11.
13. 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 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, and when the instructions are executed on an electronic device, the electronic device executes the method as claimed in any one of claims 1 to 11.
Citation Information
Patent Citations
Application switching method and terminal
CN105607827A
Screen projection method, screen projection device, electronic equipment and computer readable storage medium
CN111314768A
Information processing method and electronic equipment
CN112558825A
Display method and device, electronic equipment and storage medium
CN112691369A
System update display method and display equipment
CN113094140A