Process scheduling method, readable storage medium and electronic device
By freezing high-load processes, it solves the problem of animation freezes when electronic devices use high resources, achieves smooth rendering of animations and efficient utilization of processor resources, and improves user experience.
Patent Information
- Application Number
- CN202310724371.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-06-16
AI Technical Summary
When an electronic device runs in the foreground and consumes a lot of resources, the animation will freeze and affect the user experience. Especially when the vertical synchronization signal arrives, the image cannot be drawn in time, causing the frame rate to drop.
Provides a process scheduling method that frees up processor resources by freezing high-load processes, ensuring animations are rendered and displayed within an appropriate time, including pausing and resuming application processes during user operations, and managing process priorities based on processor idle rate and application list class.
It effectively avoids animation freezes, improves user experience, and ensures the smoothness of animation and efficient use of processor resources.
Smart Images

Figure CN117707717B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a process scheduling method, a readable storage medium and an electronic device. Background Art
[0002] An electronic device can display an animation corresponding to the user's operation on the electronic device in the user interface (UI) in response to the user's operation on the electronic device. However, in some scenarios, if the hardware resources occupied by the first application running in the foreground of the electronic device are relatively high, the electronic device may not be able to complete the drawing of a frame of image when the vertical synchronization (vertical synchronization) signal corresponding to the frame of image arrives, causing the animation displayed in the UI to freeze, affecting the user experience. For example, assuming that the frame rate of the display screen of the electronic device is 60Hz, the interval between the vertical synchronization signals of two adjacent frames of the animation is 16.67 milliseconds. If the time it takes for the electronic device to draw a frame of image exceeds 16.67 milliseconds, the animation will freeze. Summary of the invention
[0003] In view of this, the present application provides a process scheduling method, a readable storage medium and an electronic device.
[0004] In a first aspect, the present application provides a process scheduling method, in which an electronic device runs a first application, a second application, and a third application, the method comprising: displaying a first interface of the first application, with the first application running in the foreground and the second application running in the background; in response to a user's swiping up operation on the first interface at a first time point, pausing the process of the second application within a first time period; in response to the user's lifting up operation at a second time point, displaying a second interface, wherein the first time period is between the first time point and the second time point; and after the second time point, not pausing the process of the second application.
[0005] In this process scheduling method, the electronic device can freeze the process of the second application within the first time period to provide more computing resources for the electronic device to draw, render and display the interface, thereby avoiding freezes in the display interface of the electronic device and improving the user experience.
[0006] Optionally, in some implementations, the electronic device suspends the process of running the first application within the first time period, so that more computing resources can be provided for the electronic device to draw, render and display the interface.
[0007] In a possible implementation of the first aspect above, the above-mentioned response to the user's swipe-up operation on the first interface at a first time point to suspend the process of the second application within a first time period includes: in response to the user's swipe-up operation, based on the first application in the first list, suspending the process of the second application within the first time period.
[0008] Optionally, in some embodiments, the electronic device may also suspend the process of the second application within the first time period in response to a swipe-up operation by the user based on the idle rate of the processor of the electronic device being less than the first idle rate (or the usage rate of the processor of the electronic device being greater than the first usage rate).
[0009] Optionally, in some embodiments, the electronic device may also suspend the process of the second application within a first time period in response to a user's swipe-up operation, based on the idle rate of the electronic device's processor being less than a first idle rate (or the usage rate of the electronic device's processor being greater than the first usage rate) and the first application being in the first list.
[0010] In this implementation, the electronic device suspends the process of the second application within the first time period in response to the user's swipe-up operation when the first application is in the first list (e.g., the whitelist application list hereinafter) and / or the idle rate of the processor of the electronic device is less than the first idle rate (or the utilization rate of the processor of the electronic device is greater than the first utilization rate), that is, the first application may occupy more computing resources. In this way, when the first application is not in the first list, the electronic device may not suspend the process of the second application, which can avoid affecting the operation of the second application.
[0011] When the first application may occupy a large amount of computing resources, in response to a user sliding up on the first interface at a first time point, pausing the process of the second application within a first time period includes:
[0012] In response to the user's swipe up operation, based on the second application being in the second list and the third application not being in the second list, the process of the second application is suspended within the first time period, and the process of the third application is not suspended, and the third application runs in the background.
[0013] Optionally, in some implementations, the electronic device may suspend the process of the second application within the first time period based on the usage rate of the electronic device processor by the process of the second application being greater than a preset value.
[0014] In this implementation, the electronic device suspends the process of the second application in the second list (indicating that the second application may occupy more computing resources) or the process whose usage rate of the electronic device processor is greater than a preset value, but does not suspend the process of the third application that is not in the second list (indicating that the third application may occupy fewer computing resources), thereby avoiding affecting the operation of the third application.
[0015] In a possible implementation of the first aspect, the method further includes: in response to a lift operation by the user at a second time point, resuming the process of running the second application after the second time point.
[0016] In this implementation, the electronic device can respond to the user's lifting operation at the second time point (indicating that the user is no longer operating the electronic device, or the animation display of the electronic device is completed, or the electronic device does not require more computing resources to draw, render, and display the interface after the second time point), and resume the process of the second application after the second time point. In this way, the operation of the process of the second application can be resumed in time, avoiding the long-term freezing of the process of the second application affecting the operation of the second application.
[0017] In a possible implementation of the first aspect above, the above-mentioned sliding up operation includes an operation in which the user presses the bottom of the first interface and slides upward to a first position, wherein the distance between the first position and the bottom of the first interface is greater than the first distance.
[0018] In a possible implementation of the first aspect above, the lifting operation includes at least one of the following operations: a lifting operation after the user slides downward from a first position to a second position, wherein the second position is within a preset area; a lifting operation after the user slides upward from a first position to a third position, wherein the acceleration of sliding upward from the first position to the third position is greater than the first acceleration or the distance between the third position and the bottom of the first interface is greater than the second distance.
[0019] Optionally, the preset area may be an area whose distance from the bottom of the first interface is less than a preset distance, or an area whose distance from the first position is greater than a preset distance and is below the first position.
[0020] In a possible implementation of the first aspect above, the method also includes: drawing multiple interfaces in response to a swipe up operation between the first time point and the second time point; and resuming the process of running the second application at the third time point based on completing the drawing of the multiple interfaces at the third time point.
[0021] In this implementation, the electronic device can resume the running of the process of the second application in a timely manner after the drawing of the above-mentioned multiple interfaces is completed, so as to avoid freezing the process of the second application for a long time and affecting the running of the second application.
[0022] Optionally, the multiple interfaces may be continuous interfaces, displaying a motion effect, such as the multiple continuous interfaces corresponding to the first animation described below.
[0023] In a possible implementation of the first aspect, the multiple interfaces are animations of switching from a first interface to a second interface.
[0024] In a possible implementation of the first aspect, the method further includes: based on the duration of suspending the process of the second application at the fourth time point reaching the first duration, resuming the process of the second application at the fourth time point.
[0025] In this implementation, the electronic device can promptly resume the running of the process of the second application after the second application is frozen for a first period of time, so as to avoid the long-term freezing of the process of the second application affecting the running of the second application.
[0026] In a possible implementation of the first aspect, the method further includes: based on the first application being in the second list, pausing the process of the first application within a first time period.
[0027] In this implementation, if the first application is in the second list, it means that the second application also occupies a large amount of computing resources, and the electronic device suspends the process of the first application during the first time period. In this way, more computing resources can be provided for the electronic device to draw, render and display the interface, avoiding the jamming of the electronic device display interface, which is conducive to improving the user experience.
[0028] In a possible implementation of the first aspect above, the method also includes: displaying a third interface of a third application; in response to a swipe up operation of the user on the third interface at a fifth time point, not pausing the process of the second application within a second time period; in response to a lift up operation of the user at a sixth time point, displaying a fourth interface, wherein the second time period is between the fifth time point and the sixth time point.
[0029] Optionally, the third application is not in the first list (eg, the whitelist application list described below).
[0030] In this implementation, when the application (third application) running in the foreground of the electronic device is not in the first list (indicating that the electronic device currently has sufficient computing resources to draw, render and display the interface), the process of the second application will not be frozen even if the user performs the aforementioned swipe up operation on the electronic device.
[0031] In a second aspect, the present application provides a readable storage medium, which includes instructions. When the instructions are executed by an electronic device, the electronic device implements the above-mentioned first aspect and any possible implementation method provided by the above-mentioned first aspect.
[0032] In a third aspect, the present application provides an electronic device, comprising: a memory for storing instructions; and at least one processor for executing instructions so that the electronic device implements the above-mentioned first aspect and any possible implementation method provided by the above-mentioned first aspect.
[0033] In a fourth aspect, the present application provides a program product, which, when running on an electronic device, enables the electronic device to implement the method provided in the first aspect and any possible implementation of the first aspect.
[0034] It should be understood that the beneficial effects of the second to fourth aspects mentioned above can be referred to the description of the first aspect mentioned above and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 According to some embodiments of the present application, a schematic diagram of a scenario in which a mobile phone 10 displays an animation in response to a user operation is shown;
[0036] Figure 2 According to some embodiments of the present application, a schematic diagram of a mobile phone 10 freezing a high-load process during a display switching animation is shown;
[0037] Figure 3 According to some embodiments of the present application, a schematic diagram is shown in which a mobile phone 10 freezes a high-load process and then unfreezes the high-load process in response to a second operation;
[0038] Figure 4 According to some embodiments of the present application, a schematic diagram of unfreezing a high-load process after the mobile phone 10 has frozen the high-load process for a first period of time is shown;
[0039] Figure 5 According to some embodiments of the present application, a schematic diagram of a mobile phone 10 not freezing a high-load process during a display switching animation is shown;
[0040] Figure 6 According to some embodiments of the present application, a schematic diagram of a software architecture of a mobile phone 10 is shown;
[0041] Figure 7 According to some embodiments of the present application, a schematic diagram of an interactive process of a process scheduling method is shown;
[0042] Figure 8 According to some embodiments of the present application, a schematic diagram of an interactive process of a process scheduling method is shown;
[0043] Fig.9A According to some embodiments of the present application, a schematic diagram of a user operation is shown;
[0044] Fig. 9B According to some embodiments of the present application, another schematic diagram of user operation is shown;
[0045] Fig.10 According to some embodiments of the present application, a schematic diagram of an interaction flow of another process scheduling method is shown;
[0046] Fig.11 According to some embodiments of the present application, a schematic diagram of an interaction flow of another process scheduling method is shown;
[0047] Fig.12According to some embodiments of the present application, a schematic diagram of an interaction flow of another process scheduling method is shown;
[0048] Fig.13 According to some embodiments of the present application, a schematic flow chart of a process scheduling method is shown;
[0049] Fig.14 According to some embodiments of the present application, a schematic structural diagram of a mobile phone 10 is shown. DETAILED DESCRIPTION
[0050] The illustrative embodiments of the present application include, but are not limited to, a process scheduling method, a readable storage medium, and an electronic device.
[0051] The technical solution of the present application is described below in conjunction with the accompanying drawings.
[0052] It should be understood that the process scheduling method provided in the embodiment of the present application can be applied to any electronic device that can display a user interface, including but not limited to mobile phones, tablet computers, wearable devices, head-mounted displays, mobile email devices, portable game consoles, portable music players, reader devices, laptop computers, etc., and the embodiment of the present application does not limit it. For ease of description, the following is introduced by taking the mobile phone 10 as an example.
[0053] Figure 1 According to some embodiments of the present application, a schematic diagram of a scenario in which a mobile phone 10 displays an animation in response to a user operation is shown.
[0054] refer to Figure 1 , the mobile phone 10 runs the camera application in the foreground and the game application, the gallery application and the file management application in the background. At time 0, the mobile phone 10 responds to the user's upward sliding operation from the bottom of the camera interface 01 of the camera application, and starts to display the switching animation from the camera interface 01 to the multitasking interface 02.
[0055] Continue to refer Figure 1, assuming that the display frame rate of the display screen of the mobile phone 10 is 60Hz, if the mobile phone 10 starts drawing the switching animation at time 0, the mobile phone 10 should display the first frame image of the switching animation at 16.6ms. However, the process of the camera application (hereinafter referred to as the camera process), the process of the game application (hereinafter referred to as the game process), etc., occupy 99% of the central processing unit (CPU) resources and the graphics processing unit (GPU) resources (it can also be other data, not limited here). The mobile phone 10 only draws the first frame image of the switching animation at 40ms, and cannot display the first frame image at 16.6ms, causing the switching animation displayed by the mobile phone 10 to freeze, affecting the user experience.
[0056] In order to avoid the electronic device displaying animation freeze in some scenarios, an embodiment of the present application provides a process scheduling method. In this method, the electronic device can record applications that occupy a high processor resource when running in the foreground (for example, applications that use a processor at a rate greater than a certain rate) in a whitelist application list (as a first list). The electronic device can respond to the user triggering a first operation of the first animation, and freeze the high-load process in the process currently running in the electronic device when the running state of the electronic device meets the freezing condition (for example, the first application running in the foreground of the electronic device is an application in the whitelist application list, the idle rate of the processor of the electronic device is lower than the first idle rate, etc.). Then, the electronic device renders, synthesizes and displays the first animation, and after the first animation is displayed, the high-load process is unfrozen.
[0057] Through the method provided in the embodiment of the present application, the electronic device can provide sufficient processor resources for the drawing of the first animation by freezing the high-load process, thereby avoiding freezes when displaying the first animation, which is beneficial to improving the user experience.
[0058] For example, refer to Figure 2 , corresponding to Figure 1 In the situation shown, the mobile phone 10 responds to the operation (first operation) of the user pressing the bottom of the shooting interface 01 and then sliding up a distance greater than the first distance at time 0, and can freeze the high-load processes (such as the camera process and the game process) in the mobile phone 10 to release the processor resources occupied by the high-load processes. Then, the mobile phone 10 can render, synthesize and display the first animation (the animation of switching from the camera interface 01 to the multitasking interface 02), and after the first animation is displayed (for example, after time T1), resume the operation of the camera process and the game process.
[0059] That is, during the period from time 0 to time T1, the camera process and the game process are frozen (in a stopped state) and do not occupy processor resources. In this way, the mobile phone 10 can provide sufficient processor resources for the animation process to achieve the rendering, synthesis and display of the first animation, so that the time taken by the mobile phone 10 to render, synthesize and display each frame of the first animation is less than 16.6ms, thereby avoiding the first animation from freezing.
[0060] It should be understood that in some embodiments, the user may lift up the phone at time T2 before time T1, and the phone 10 will continue to display the first animation until it switches to the multitasking interface 02.
[0061] It should be understood that in some embodiments, while the mobile phone 10 is rendering, synthesizing and displaying the first animation, processes other than high-load processes may remain running, such as the process of the gallery application (hereinafter referred to as the gallery process) and the process of the file management application (hereinafter referred to as the file management process).
[0062] In some embodiments, while freezing a high-load process, the electronic device can unfreeze the high-load process in response to the user canceling the second operation of the first animation to avoid freezes in other interfaces displayed by the electronic device.
[0063] For example, refer to Figure 3 , corresponding to Figure 2 In the scenario shown, after the mobile phone 10 freezes the high-load processes (camera process and game process) at time 0, in response to the user's operation of sliding down at time T3 and lifting up at time T4 (the second operation), the mobile phone 10 can unfreeze the high-load processes at time T4 and resume the operation of the camera process and the game process.
[0064] In some embodiments, if the duration of freezing the high-load process before the first animation is played is longer than the first duration, the electronic device may also unfreeze the high-load process to avoid affecting the normal use of the high-load process. For example, the first duration may be 600ms, 1s, etc. (it should be understood that the first duration may also be any other value, such as any value greater than 0.3s to 2 seconds, which is not limited here).
[0065] For example, refer to Figure 4 , corresponding to Figure 2 In the situation shown, after the mobile phone 10 freezes the high-load processes (camera process and game process) at time 0, if an abnormality occurs in the animation process, the first animation cannot be played within the duration of the first animation. At time T5, the mobile phone 10 can unfreeze the high-load processes and resume the operation of the camera process and the game process based on the duration (T5-0) of freezing the high-load processes being greater than the first duration (e.g., 600ms).
[0066] It should be understood that the first animation can be any animation defined by the operating system of the electronic device or the application running in the electronic device, including but not limited to the animation of switching from the current display interface to the multitasking interface, the animation of switching from the current display interface to the desktop, the animation of displaying a drop-down menu in the current display interface, etc. The embodiment of the present application does not limit the specific form of the first animation.
[0067] It should be understood that the first operation may be an operation defined by the operating system of the electronic device or an application running in the electronic device and corresponding to the first animation. For example, when the first animation is an animation of switching from the current display interface to the multitasking interface, the first operation may be an operation in which the user presses at the bottom of the current display interface and then slides up by a distance greater than the first distance. For another example, when the first animation is an animation of switching from the current display interface to the desktop, the first operation may be an operation in which the user presses on the left side of the current display interface and then slides right, or the user presses on the right side of the current display interface and then slides left. For another example, when the first animation is an animation of displaying a drop-down menu on the current display interface, the first operation may be an operation in which the user presses at the top of the current display interface and then slides down.
[0068] It should be understood that the second operation may be an operation defined by the operating system of the electronic device or an application running in the electronic device and corresponding to the first operation. For example, when the first operation is an operation in which the user slides up after pressing at the bottom of the current display interface and the distance is greater than the first distance, the second operation may be an operation in which the user slides down to a preset area after the first operation, or an operation in which the user slides down after the first operation, or an operation in which the user continues to slide up at a first acceleration after the first operation, or an operation in which the user continues to slide up to a distance greater than the second distance from the bottom of the current display interface after the first operation. For another example, when the first operation is an operation in which the user slides right after pressing on the left side of the current display interface, the second operation may be a left slide operation when sliding right to a certain position. For another example, when the first operation is an operation in which the user slides left after pressing on the right side of the current display interface, the second operation may be a right slide operation when sliding left to a certain position. For another example, when the first operation is a sliding operation in which the user presses down at the top of the current display interface and then slides down, the second operation may be an upward sliding operation when sliding down to a certain position.
[0069] It should be understood that in some implementations, the second operation and the first operation may be consecutive operations.
[0070] It should be understood that the correspondence between the first operation, the second operation, and the first animation in the embodiment of the present application is only an example. In other embodiments, the first operation that triggers the first animation and the second operation that cancels the first animation may also be other operations, which are not limited here.
[0071] It should be understood that a high-load process refers to a process that may cause the first animation to be displayed jerkily when running (in the foreground or background), for example, a process that uses a processor at a rate greater than a preset rate when running in the foreground or background.
[0072] In some embodiments, the electronic device may set a high-load application list (as a second list), which records application program identifiers corresponding to high-load processes, such as installation package names. The electronic device may compare the application identifier corresponding to the currently running process with the high-load application list to determine the high-load process and freeze the high-load process.
[0073] It should be understood that in some embodiments, for processes that will affect the user experience after being frozen, the electronic device may not add the corresponding programs corresponding to these processes to the high-load application list, for example, in the process of playing audio or video.
[0074] It should be understood that, in some embodiments, the freezing condition may include at least one of the following conditions:
[0075] Freezing condition A: The foreground application of the electronic device (e.g., the application corresponding to the current display interface of the electronic device, hereinafter referred to as the foreground application) is an application in the whitelist application list. The whitelist application list stores at least one application identifier, such as an installation package name (package name), and any one of the at least one application may cause the first animation to be displayed in a stuck state when running in the foreground.
[0076] It should be understood that in some embodiments, the whitelist application list can be pre-set in the electronic device by the developer of the electronic device, or obtained by the electronic device from a server, or generated by the electronic device based on the use of processor resources when the application is running in the foreground.
[0077] Freezing condition B: the idle rate of the processor of the electronic device is lower than the first idle rate, or the usage rate of the processor of the electronic device is higher than the first usage rate.
[0078] It should be understood that in other embodiments, the freezing condition may further include more conditions, which are not limited here.
[0079] Optionally, in some embodiments, the electronic device may determine that the operating state of the electronic device satisfies the freezing condition when the operating state of the electronic device satisfies the freezing condition A, or satisfies the freezing condition B.
[0080] Optionally, in some embodiments, the electronic device may also determine that the operating state of the electronic device satisfies the freezing condition when the operating state of the electronic device at least satisfies the freezing condition A.
[0081] For example, refer to Figure 5 , if the current foreground application of the mobile phone 10 is a file management application, and the interface 03 of the file management application is displayed. At time 0, the mobile phone 10 responds to the operation (first operation) of the user pressing the bottom of the interface 03 and sliding up a distance greater than the first distance, and the mobile phone 10 can render, synthesize and display the first animation (animation of switching from the interface 03 to the multitasking interface 04) during the period from time 0 to time N×16.6=16.6N. During the period from time 0 to time 16.6N, the mobile phone 10 does not freeze the file management process, camera process, game process and gallery process, and resumes the operation of the camera process and the game process.
[0082] It should be understood that after the process is frozen, it is in a processing stop state and cannot schedule processor resources for calculation; after the process is unfrozen (in a running state), the processor resources can be called for calculation. In some embodiments, the electronic device can freeze or unfreeze the high-load process through the instructions preset in the operating system of the electronic device. For example, the electronic device can freeze the process with a process identification (PID) of "XX" through the "kill-18XX" instruction or the "kill-SIGSTOP XX" instruction, and unfreeze the process with a PID of "XX" through the "kill-19XX" instruction or the "kill-SIGCONT XX" instruction.
[0083] The technical solution of the present application is introduced below in conjunction with the software architecture of mobile phone 10.
[0084] First, the software architecture for implementing the process scheduling method of the present application is introduced.
[0085] Figure 6 According to some embodiments of the present application, a schematic diagram of a software architecture of a mobile phone 10 is shown.
[0086] like Figure 6 As shown, the software architecture includes an application layer 21, an application framework layer 22 and a kernel layer 23.
[0087] The application layer 21 may include applications in the mobile phone 10, such as a desktop application 211 (hereinafter referred to as the desktop 211).
[0088] The desktop 211 can track the user's operation according to the input event sent by the input manager service (IMS) 221, and freeze the high-load process in response to the user's aforementioned first operation. The desktop 211 is also used to render, synthesize and display the first animation, and unfreeze the high-load process after the first animation is displayed.
[0089] It should be understood that in some embodiments, the desktop 211 may also unfreeze the high-load process in response to the user's second operation of canceling the first animation during the freezing of the high-load process.
[0090] It should be understood that in other embodiments, the application layer 21 may also include other applications, such as camera, gallery, calendar, call, map, navigation, Bluetooth, music, video, short message, file management and other applications, which are not limited here.
[0091] The application framework layer 22 can provide an application programming interface (API) and a programming framework for the application in the application layer 21. The application framework layer 22 includes some predefined functions, such as IMS 221, activity manager service (AMS) 222, and the like.
[0092] IMS 221 can convert the user's operation on mobile phone 10, such as the user's operation on the display screen of mobile phone 10, into an input event and send it to the application in application layer 21. For example, IMS 221 can send the input event to application layer 21 through input() function.
[0093] In some embodiments, input events may include a DOWN event, a MOVE event, and an UP event. A DOWN event refers to an event corresponding to an operation in which a user presses a certain position on the display screen of the mobile phone 10. The DOWN event sent by the IMS 221 may include the coordinates of the position where the user presses and an event identifier corresponding to the DOWN event. A MOVE event refers to an event corresponding to an operation in which a user presses and moves the display screen of the mobile phone 10. The MOVE event sent by the IMS 221 may include the coordinates of the position during the movement (e.g., the starting point coordinates and the end point coordinates) and an event identifier corresponding to the MOVE event. A UP event refers to an event corresponding to an operation in which a user lifts a certain position on the display screen of the mobile phone 10. The UP event sent by the IMS 221 may include the coordinates of the position when the user lifts and an event identifier corresponding to the UP event.
[0094] AMS 222 can be used to start, switch and schedule applications, as well as manage and schedule application processes. In some embodiments, AMS 222 can freeze, unfreeze, and perform other operations on processes running on mobile phone 10 by sending instructions to kernel 231.
[0095] Exemplarily, AMS 222 may provide desktop 211 with a calling interface or function for freezing or unfreezing a process. For example, AMS 222 may provide desktop 211 with a freeze() interface to freeze a process, and provide desktop 211 with an unfreeze() interface to unfreeze a process. Furthermore, if desktop 221 registers a callback when calling freeze() interface (desktop 221 calls freeze() interface, for example, through freeze(callback)), AMS 222 may send a freezing completion notification to desktop 211 after freezing a high-load process.
[0096] It should be understood that the AMS 222 freezes the high-load process based on the desktop 211 calling the freeze() interface, and unfreezes the high-load process based on the desktop 211 calling the unfreeze() interface.
[0097] It should be understood that in some embodiments, the application framework layer 22 may also include other modules, such as a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a package management service, etc., which are not limited here.
[0098] The kernel layer 23 includes a kernel 231 , which is used to run processes in the mobile phone 10 .
[0099] It should be understood that in other embodiments, the kernel layer 23 may further include more modules, such as a display driver, a camera driver, an audio driver, a sensor driver, etc.
[0100] It should be understood that Figure 6 The software architecture shown is only an example. In other embodiments, the software architecture of the mobile phone 10 may include more or fewer modules, and some modules may be merged or split, which is not limited here.
[0101] refer to Figure 7 , combined with Figure 6 In the architecture shown, taking the foreground application running on the mobile phone 10 as the first application as an example, the mobile phone 10 may implement the process scheduling method provided by the present application by the following steps:
[0102] S7.1: AMS 222 loads a list of high-load applications.
[0103] When the AMS 222 is started, it can load a list of high-load applications.
[0104] Exemplarily, the high-load application list may include applications that occupy high processor resources when running in the foreground or background, such as camera applications, game applications, live broadcast applications, search applications, shopping applications, etc.
[0105] S7.2: The desktop 211 loads the whitelist application list.
[0106] When the desktop 211 is started, the whitelist application list may be loaded.
[0107] Exemplarily, the whitelist application list may include applications that may cause the first animation to freeze during runtime, such as camera applications, game applications, etc.
[0108] It is understood that step S7.1 and step S7.2 can be executed successively or simultaneously, which is not limited here.
[0109] S7.3: The IMS 221 sends an input event to the desktop 211.
[0110] The IMS 221 may send input events, such as DOWN events, MOVE events, UP events, etc., to the desktop 211 based on the user's operations on the display screen of the mobile phone 10 .
[0111] S7.4: In response to the first operation of the user, the desktop 211 freezes the high-load process if the first application is in the whitelist application list.
[0112] The first application is running in the foreground, and the first application may be a camera application.
[0113] When receiving the input event sent by the IMS 221 , the desktop 211 can freeze the high-load process in the mobile phone 10 in response to the first operation corresponding to the input event when the first application is in the whitelist application list.
[0114] Exemplarily, the desktop 211 can freeze the high-load process in response to the first operation when the first application is in the whitelist application list through the following steps.
[0115] S7.4.1, the desktop 211 tracks the user operation in response to the move start event.
[0116] When the desktop 211 receives an input event sent by the IMS 221, such as a press event, a move event, or a lift event, it can start tracking the user operation according to the event triggering position in the input event.
[0117] It should be understood that when the user presses and starts sliding, the IMS 221 first sends a move start event to the desktop 211, and then sends a move event, wherein the move start event can be used to indicate the moving direction of the move event. For example, if the user's sliding operation is an upward sliding operation, the IMS 221 can first send an upward sliding start (onSwipeUpStart) event to the desktop 211, and then send a move event.
[0118] S7.4.2, in response to the moving distance of the moving event being greater than the first distance (first operation), the desktop 211 determines that the first application is in the whitelist application list.
[0119] When the desktop 211 is tracking the user's mobile operation, when the moving distance of the mobile operation is greater than the first distance (for example, when the moving distance of the mobile operation in the upward direction in the display interface of the mobile phone 10 is greater than the first distance), the first application running on the mobile phone 10 is compared with the whitelist application list to determine that the first application is in the whitelist application list.
[0120] S7.4.3, the desktop 211 calls the freeze(callback) function to freeze the high-load process.
[0121] When the first application is in the whitelist application list, the desktop 211 calls the freeze (callback) interface to notify the AMS
[0122] 222 Send a freeze command to freeze a high-load process.
[0123] It should be understood that the freeze (callback) interface is only an example, and in other embodiments, the desktop 211 may also send a freeze instruction to the AMS 222 through other functions or interfaces, which is not limited here.
[0124] After the desktop 211 calls the freeze(callback) function, the AMS 222 can freeze the high-load process based on the following step S7.5:
[0125] S7.5: AMS 222 traverses the high-load application list and freezes the high-load processes.
[0126] In response to the freeze instruction, the AMS 222 traverses the high-load application list and freezes the high-load processes.
[0127] For example, in some embodiments, the AMS 222 may traverse the high-load application list and freeze the high-load process by following the steps below:
[0128] S7.5.1, AMS 222 maintains a list of high-load processes based on process status.
[0129] AMS 222 can compare the application identifier of the process currently running on the mobile phone 10, such as the installation package name, with the application identifier of the application in the high-load application list. If the application identifier of a process is in the high-load application list, the PID of the process is added to the high-load process list.
[0130] It should be understood that the high-load process list stores the PIDs of the high-load processes.
[0131] It should be understood that in other embodiments, if the usage rate of a process for processor resources is greater than a preset value, the PID of the process may also be added to the high-load process list.
[0132] It should be understood that in some embodiments, the AMS 222 may also maintain a list of high-load processes in real time after startup, so as to respond to the freeze instruction more quickly.
[0133] S7.5.2, AMS 222 Freeze high-load processes.
[0134] The AMS 222 may freeze the high-load process based on a freeze instruction defined by the operating system of the mobile phone 10 .
[0135] Exemplarily, the AMS 222 may freeze the high-load process by sending a kill-18 or kill-SIGSTOP instruction to the kernel 231. For example, assuming that the PIDs in the high-load process list include PID1 and PID2, the AMS 222 may freeze the high-load process by sending "kill-18PID1, PID2" or "kill-SIGSTOP PID1, PID2" to the kernel 231.
[0136] It should be understood that in other embodiments, the AMS 222 may also freeze high-load processes through other instructions or interfaces, which are not limited herein.
[0137] S7.5.3, AMS 222 sends a freeze callback to desktop 211 via callback_finished().
[0138] After freezing the high-load process, for example, after issuing the aforementioned freeze instruction, the AMS 222 sends a freeze callback to the desktop 211 through the callback_finished() interface to notify the desktop that the high-load process has been frozen.
[0139] It should be understood that in other embodiments, the desktop 211 may also notify the desktop 211 that the high-load process has been frozen through other functions or interfaces, which is not limited here.
[0140] S7.5.4, AMS 222 records the PID of the frozen process.
[0141] The AMS 222 may record the PID of the frozen high-load process to facilitate subsequent unfreezing of the process.
[0142] S7.5.5, when the AMS 222 is not unfrozen after being frozen for a first period of time, unfreeze the high-load process.
[0143] After freezing the high-load process, the AMS 222 may record the duration for which the high-load process is frozen, and unfreeze the high-load process if the high-load process is not unfrozen after being frozen for a first duration.
[0144] S7.6: The desktop 211 renders, synthesizes, and displays the first animation, and unfreezes the high-load process after the display is completed.
[0145] After receiving the freeze callback, the desktop 211 can render, synthesize and display the first animation, and unfreeze the high-load process after the display is completed.
[0146] Exemplarily, in some embodiments, the desktop 211 may render, synthesize, and display the first animation through the following steps, and unfreeze the high-load process after the display is completed:
[0147] S7.6.1, the desktop 211 displays a first animation.
[0148] After receiving the freeze callback, the desktop 211 may call processor resources to render, synthesize, and display the first animation frame by frame.
[0149] S7.6.2, based on the completion of the first animation display, the desktop 211 calls the unfreeze() interface to unfreeze the high-load process.
[0150] After the first animation display is completed, the desktop 211 calls the unfreeze() interface to send a thawing instruction to the AMS 222 to thaw the high-load process.
[0151] It should be understood that in other embodiments, the desktop 211 may also send a thawing instruction to the AMS 222 through other functions or interfaces to thaw the high-load process, which is not limited here.
[0152] S7.7: AMS 222 unfreezes high-load processes.
[0153] After receiving the unfreeze instruction sent by the desktop 211 through the unfreeze() interface, the AMS 222 can unfreeze the high-load process according to the PID of the frozen process recorded in step S7.5.4. For example, if the PIDs in the frozen process include PID1 and PID2, the AMS 222 can unfreeze the high-load process by sending "kill-19PID1,PID2" or "kill-SIGCONTPID1,PID2" to the kernel 231.
[0154] It should be understood that in other embodiments, the AMS 222 may also unfreeze the high-load process through other instructions or interfaces, which is not limited here.
[0155] Through the method provided in the embodiment of the present application, the mobile phone 10 can provide sufficient processor resources for the rendering, synthesis and display of the first animation by freezing the high-load process, thereby avoiding the first animation from being stuck, which is beneficial to improving the user experience.
[0156] Next, combine Figure 6 The software architecture shown, Figures 2 to 5 The scenario shown takes the first animation as an example of the switching animation from the current display interface to the multi-tasking interface to introduce the technical solution of the present application.
[0157] First, a technical solution is introduced in which the mobile phone 10 freezes a high-load process in response to a first operation, and unfreezes the high-load process in response to a second operation of the user.
[0158] Figure 8 According to some embodiments of the present application, a schematic diagram of an interactive process of a process scheduling method is shown. Figure 8 As shown, the interaction process includes the following steps:
[0159] S801 : The IMS 221 sends a press event to the desktop 211 .
[0160] In response to the user pressing the bottom of the display interface of the mobile phone 10, the IMS 221 sends a pressing event to the AMS 222. The pressing event may include the position information when the user presses, such as the coordinate information of the user pressing position in the display screen of the mobile phone 10.
[0161] For example, refer to Fig.9A , assuming that the horizontal direction of the current display interface of the mobile phone 10 is the X direction in the figure, and the vertical direction is the Y direction in the figure. In response to the user's pressing operation at the bottom of the current interface, the IMS 221 sends the position information in the pressing event to the AMS 222, which may include the coordinates of the user's pressing position in the X direction and the coordinates in the Y direction.
[0162] S802: In response to the press event, the desktop 211 starts tracking the user operation.
[0163] In response to the press event sent by the IMS 221 , the desktop 211 starts tracking the user operation so as to execute related functions according to the user operation.
[0164] Exemplarily, in some embodiments, the desktop 211 may obtain the position information in the press event based on a function defined by the operating system of the mobile phone 10, such as the getActionMaskedmDownPos.set function, and start tracking the user's operation.
[0165] S803: The IMS 221 sends a movement event to the desktop 211.
[0166] In response to the user's sliding operation on the display interface of the mobile phone 10, the IMS 211 sends a movement event to the desktop 211. The position information of the movement event may include the coordinates of the position to which the user slides.
[0167] For example, refer to Fig.9A When the user slides from the bottom of the display interface of the mobile phone 10 to point A, the location information in the movement event sent by the IMS 211 to the desktop may include the coordinates of point A in the X direction and the coordinates of point A in the X direction.
[0168] It should be understood that before the user performs the lift operation, the IMS 211 may continue to send movement events to the AMS 222 , and each movement event may include the coordinates of the position to which the user slides.
[0169] S804: In response to the moving event, the desktop 211 sends a freeze instruction to the AMS 222 if the moving distance of the moving event is greater than the first distance and the first application is an application in the whitelist application list.
[0170] In response to the received moving event, the desktop 211 sends a freeze instruction to the AMS 222 when the moving distance of the moving event is greater than the first distance and the first application is an application in the whitelist application list. The "moving distance of the moving event is greater than the first distance" is used to trigger the aforementioned first animation, such as a switching animation from the current display interface to the multi-tasking interface.
[0171] Exemplarily, the desktop 211 may send a freeze instruction to the AMS 222 by calling the aforementioned freeze (callback) interface.
[0172] For example, reference Fig.9A , when the user slides to point A, the moving distance corresponding to the moving event received by the desktop 211 is greater than the first distance. Figure 2In the scenario shown, the first application is a camera application, and in the whitelist application list, the desktop 211 can send a freeze instruction to the AMS 222 .
[0173] In some embodiments, the moving distance of the moving event is greater than the first distance when the user slides in the vertical direction of the display interface (eg Fig.9A The sliding distance in the Y direction (shown in the figure) is greater than the first distance, and there is no need to pay attention to the sliding distance of the user's sliding operation in the horizontal direction. That is, when the user slides upward in the vertical direction, the distance the user slides upward can be the distance from the user's initial pressing position to the current position; when the user slides upward obliquely or irregularly, the distance the user slides upward can be the component of the distance from the user's initial pressing position to the current position in the vertical direction.
[0174] For example, refer to Fig. 9B Regardless of whether the upward sliding path of the user is a vertical upward path R1, an oblique upward path R2, or an irregular upward sliding path R3, when the distance between the Y coordinate of the position slid to by the user and the bottom of the display interface of the mobile phone 10 is greater than the first distance, the moving distance of the moving event received by the desktop 211 is greater than the first distance.
[0175] Exemplarily, in some embodiments, the desktop 211 can obtain the coordinates of the position where the user moves in the mobile event based on a function defined by the operating system of the mobile phone 10, such as the getActionMaskedmLastPos.set function, and determine the moving distance of the mobile event based on the coordinates and the coordinates of the position in the mobile event received historically.
[0176] It should be understood that in other embodiments, if the first application is not in the whitelist application list, but the usage status of the mobile phone 10 satisfies the aforementioned freezing condition B, the switching animation may also be stuck, and the desktop 211 may also send a freezing instruction to the AMS 222 in response to the moving distance of the received moving event being greater than the first distance.
[0177] It should be understood that in other embodiments, the desktop 211 may also send a freeze instruction to the AMS 222 in other situations, such as when the moving distance corresponding to the moving event in the Y direction is greater than a certain distance, when the distance between the coordinate position corresponding to the moving event and the previous press event is greater than a certain distance, and when the first application is an application in the whitelist application list, which is not limited here.
[0178] It should be understood that if the moving distance of the moving event is greater than the first distance, it indicates that the aforementioned sliding upward from the bottom of the display interface (first operation) is triggered. In other embodiments, it may also be that other input events corresponding to the first operation trigger the desktop 211 to send a freeze instruction to the AMS 222 when the first application is an application in the whitelist application list, which is not limited here.
[0179] S805: The AMS 222 traverses the high-load application list, sends an instruction to freeze the high-load process to the kernel 231, and records the PID of the high-load process.
[0180] After receiving the freeze instruction, the AMS 222 responds to the freeze instruction by comparing the application identifier, such as the installation package name, corresponding to the process currently running on the mobile phone 10 with the installation package name of the application in the high-load application list. If the installation package name corresponding to a process is in the high-load application list, the process is determined as a high-load process, and after all high-load processes are determined, an instruction to freeze the high-load process is sent to the kernel 231 and the PID of the high-load process is recorded.
[0181] For example, for Figures 2 to 4 In the situation shown, AMS 222 can compare the installation package names of the camera application, gallery application, game application, and file management application with the installation package names of the applications in the high-load application list, and determine that the camera process (assuming the process identifier is PID1) and the game process (assuming the process identifier is PID2) are high-load processes. Then, AMS 222 can send a "kill-18PID1, PID2" or "kill-SIGSTOP PID1, PID2" instruction to the kernel 231.
[0182] It should be understood that in other embodiments, the instruction to freeze the high-load process may also be an instruction in other forms, which is not limited here.
[0183] It should be understood that after sending the instruction to freeze the high-load process to the kernel 231, the AMS 222 may send a freeze completion notification to the desktop 211. In response to the completion notification, the desktop 211 may perform rendering, synthesis, and display of the animation.
[0184] In some embodiments, the AMS 222 may send a freeze completion notification to the desktop 211 through the aforementioned callback_finished() interface.
[0185] In some embodiments, the AMS 222 may first confirm whether the high-load process has been successfully frozen, and then send a freezing completion notification to the desktop 211 after confirming that the high-load process has been successfully frozen.
[0186] S806: The kernel 231 freezes the high-load process.
[0187] The kernel 231 freezes the high-load process in response to the instruction to freeze the high-load process.
[0188] For example, for Figure 3 In the situation shown, the camera process and the game process are frozen after time 0.
[0189] It should be understood that after the high-load process is frozen, it no longer calls on processor resources.
[0190] In this way, since high-load processes are frozen during rendering, compositing, and displaying switching animations, more hardware resources can be provided for rendering, compositing, and displaying switching animations, thus avoiding switching animation freezes.
[0191] S807 : The IMS 221 sends a lift event to the desktop 211 .
[0192] In response to the user's lifting operation on the display interface of the mobile phone 10, the IMS 221 sends a lifting event to the AMS 222. The lifting event may include the lifting position when the user lifts the finger, such as the coordinate information of the user's lifting position in the display screen of the mobile phone 10.
[0193] For example, refer to Fig.9A In response to the user's lifting operation at point D, the IMS 221 may send a lifting event to the AMS 222. The lifting position in the lifting event may include the coordinates of point D in the X direction and the Y direction.
[0194] S808: In response to the lifting event, the desktop 211 sends a thawing instruction to the AMS 222 when the lifting position of the lifting event is in a preset area.
[0195] In response to the lift event, the desktop 211 sends a thawing instruction to the AMS 222 when the lift position of the lift event is in a preset area. The "lift position of the lift event is in a preset area" is used to indicate the cancellation of the switching animation from the current display interface to the multitasking interface.
[0196] For example, for Figure 3 In the illustrated scenario, the desktop 211 may send a thawing instruction to the AMS 222 in response to a lift event at time T4.
[0197] Exemplarily, the desktop 211 may send a thawing instruction to the AMS 222 by calling the aforementioned unfreeze() interface.
[0198] Exemplarily, the preset area may be an area whose distance from the bottom of the display interface of the mobile phone 10 is less than the preset distance. For example, referring to FIG9 , after the user slides up to point A, then slides down from point A to point D and lifts up, the lift position corresponding to the lift event includes the coordinates of point D. If the distance between the coordinates of point D and the bottom of the display interface of the mobile phone 10 is less than the preset distance, the desktop 211 may send a thawing instruction to the AMS 222.
[0199] It should be understood that in other embodiments, the preset area may also be other areas, the distance from the maximum upward position of the user's sliding operation in the Y direction is greater than the preset distance, and the area below the maximum position is not limited here. For example, referring to FIG. 9, after the user slides up to point A, then slides down from point A to point D and lifts up, the lift position corresponding to the lift event is the coordinate of point D. If the distance between the coordinates of point D and the coordinates of point A is greater than the preset distance, the desktop 211 can send a thawing instruction to the AMS 222.
[0200] Exemplarily, in some embodiments, the desktop 211 may obtain the coordinates in the lift event based on a function defined by the operating system of the mobile phone 10, such as the getActionMaskedmUpPos.set function, and determine that the lift position of the lift event is in a preset area based on the coordinates.
[0201] It should be understood that the lift event of "the lift position of the lift event is in the preset area" is used to indicate the second operation corresponding to the first operation. In other embodiments, corresponding to different first operations, the desktop 211 can also respond to the input event of the corresponding second operation and send a thawing instruction to the AMS 222, which is not limited here.
[0202] S809: The AMS 222 sends an instruction to unfreeze the high-load process to the kernel 231 according to the recorded PID of the high-load process.
[0203] After receiving the thawing instruction sent by the desktop 211 , the AMS 222 responds to the thawing instruction and sends an instruction to thaw the high-load process to the kernel 231 according to the PID of the high-load process recorded in step S805 .
[0204] For example, for Figure 3 In the illustrated scenario, the high-load processes include a camera process (with a process identifier of PID1) and a game process (with a process identifier of PID2). The AMS 222 may send a “kill-19PID1, PID2” or “kill-SIGCONT PID1, PID2” instruction to the kernel 231.
[0205] It should be understood that in other embodiments, the instruction to unfreeze the high-load process may also be an instruction in other forms, which is not limited here.
[0206] S810: The kernel 231 unfreezes the high-load process.
[0207] After receiving the instruction to unfreeze the high-load process, the kernel 231 responds to the instruction and unfreezes the high-load process.
[0208] For example, for Figure 3 In the situation shown, after time T4, the frozen camera process and game process resume running.
[0209] In this way, the mobile phone 10 can respond to the user's operation of canceling the display switching animation (the lifting position corresponding to the lifting event is in the preset area) and promptly unfreeze the high-load process to avoid affecting the normal operation of the application corresponding to the high-load process.
[0210] It should be understood that after the high-load process is thawed, processor resources can be scheduled.
[0211] Through the method provided in the embodiment of the present application, the mobile phone 10 can provide sufficient processor resources for rendering, synthesis and displaying the switching animation by freezing the high-load process, which can avoid the switching animation from freezing, and is conducive to improving the user experience. In addition, the mobile phone 10 can respond to the user's second operation of canceling the switching animation, unfreeze the high-load process, and avoid affecting the operation of the high-load process.
[0212] Furthermore, the present application embodiment also provides a process scheduling method. Figure 8 In the illustrated embodiment, after freezing the high-load process, if the acceleration of the user's sliding operation is greater than the first acceleration (indicating that the user's sliding operation is used to trigger a return to the desktop), the mobile phone 10 may also unfreeze the high-load process.
[0213] Specifically, Fig.10 According to some embodiments of the present application, another interactive flow diagram of a process scheduling method is shown. Fig.10 As shown, the interactive process includes steps S1001 to S1010, wherein steps S1001 to S1006 can refer to the aforementioned steps S801 to 806, and steps S1009 and S1010 can refer to the aforementioned steps S809 and 810, which will not be described in detail here. Figure 8 The different steps S1007 and S1008 of the illustrated embodiment are introduced as follows:
[0214] S1007 : The IMS 221 sends a movement event to the desktop 211 .
[0215] In response to the user's sliding operation on the display interface of the mobile phone 10, the IMS 211 sends a movement event to the desktop 211, and the movement event may include the coordinates of the position to which the user slides.
[0216] For example, refer to Fig.9A When the user slides from the bottom of the display interface of the mobile phone 10 to point A and continues to slide toward point C or point D, the IMS 211 can continue to send movement events to the desktop.
[0217] S1008: In response to the motion event, when the acceleration of the motion event is greater than the first acceleration, the desktop 211 sends a thawing instruction to the AMS 222 .
[0218] In response to the received motion event, when the acceleration of the motion event is greater than the first acceleration, the desktop 211 sends a thawing instruction to the AMS 222. The "acceleration of the motion event is greater than the first acceleration" is used to indicate that the user's sliding operation is used to trigger the animation of switching to the desktop.
[0219] For example, the desktop 211 can determine the acceleration corresponding to the mobile event based on the location information in the received mobile event, the historical location information corresponding to the historical mobile event, and the time when the mobile event is received, and then compare the determined acceleration with the first acceleration, and send a thawing instruction to the AMS 222 when the acceleration of the mobile event is greater than the first acceleration.
[0220] In some embodiments, the desktop 211 may send a freeze instruction to the AMS 222 by calling the aforementioned freeze (callback) interface.
[0221] Exemplarily, in some embodiments, the desktop 211 can obtain the coordinates of the position where the user moves in the mobile event based on a function defined by the operating system of the mobile phone 10, such as the getActionMaskedmLastPos.set function, and determine the acceleration of the mobile event based on the coordinates and the coordinates in the historically received mobile events and the time when the historical mobile events were received.
[0222] According to the method provided in the embodiment of the present application, if the acceleration of the user's sliding operation is greater than the first acceleration (indicating that the user's sliding operation is used to trigger the return to the desktop), the mobile phone 10 can also unfreeze the high-load process. In this way, it can be avoided that the high-load process is always frozen when the user's sliding operation is used to trigger the animation of returning to the desktop, thereby avoiding affecting the operation of the high-load process.
[0223] The present application embodiment also provides a process scheduling method. Figure 8 In the illustrated embodiment, after freezing the high-load process, if the switching animation display is completed, the mobile phone 10 may also unfreeze the high-load process.
[0224] Specifically, Fig.11According to some embodiments of the present application, a schematic diagram of an interaction flow of another process scheduling method is shown. Fig.11 As shown, the interactive process includes steps S1101 to S1109, wherein steps S1101 to S1106 can refer to the aforementioned steps S801 to 806, and steps S1108 and S1109 can refer to the aforementioned steps S809 and 810, which will not be described in detail here. Figure 8 The different steps S1107 of the illustrated embodiment are introduced as follows:
[0225] S1107: The desktop 211 sends a thawing instruction to the AMS 222 based on the completion of the switching animation display.
[0226] Based on the completion of the switching animation display, the desktop 211 sends a thawing instruction to the AMS 222 to instruct the AMS 222 to thaw the frozen high-load process.
[0227] For example, for Figure 2 In the illustrated situation, the desktop 211 may send a defrost instruction to the AMS 222 at time T1 based on completion of the switching animation display.
[0228] It should be understood that in other embodiments, when the user's operation triggers other animations, the desktop 211 may also send a defrost instruction to the AMS 222 when the animation display is completed.
[0229] Through the method provided in the embodiment of the present application, if the animation triggered by the user operation has been displayed, the mobile phone 10 can also unfreeze the high-load process. In this way, it is possible to avoid freezing the high-load process for a long time and affecting the operation of the high-load process.
[0230] Furthermore, the present application embodiment also provides a process scheduling method. Figure 8 In the illustrated embodiment, after freezing the high-load process, the AMS 222 may also unfreeze the high-load process when the duration of freezing the high-load process is greater than the first duration. In this way, the running of the high-load process may be prevented from being affected by the desktop 211 not sending the unfreezing instruction in time.
[0231] Specifically, Fig.12 According to some embodiments of the present application, a schematic diagram of an interaction flow of another process scheduling method is shown. Fig.12 As shown, the interaction process includes steps S1201 to S1209, wherein steps S1201 to S1206 can refer to the aforementioned steps S801 to S806, which will not be described in detail here. Figure 8 The different steps S1207 and S1208 of the illustrated embodiment are introduced as follows:
[0232] S1207: When the duration of freezing the high-load process is greater than the first duration, the AMS 222 sends an instruction to unfreeze the high-load process to the kernel 231 according to the recorded PID of the high-load process.
[0233] Exemplarily, after freezing the high-load process, the AMS may record the duration of freezing the high-load process. If the duration is greater than the first duration, the AMS may send an instruction to unfreeze the high-load process to the kernel 231 according to the recorded PID of the high-load process.
[0234] For example, for Figure 4 In the illustrated scenario, the high-load processes include the camera process (process identifier PID1) and the game process (process identifier PID2). At time T5, the AMS 222 sends a "kill-19PID1, PID2" or "kill-SIGCONT PID1, PID2" instruction to the kernel 231 based on the fact that the duration (T5) of freezing the high-load processes is greater than the first duration.
[0235] S1208: The kernel 231 unfreezes the high-load process.
[0236] After receiving the instruction to unfreeze the high-load process, the kernel 231 responds to the instruction and unfreezes the high-load process.
[0237] For example, for Figure 4 In the situation shown, after time T5, the camera process and the game process resume running.
[0238] Through the method provided in the embodiment of the present application, if the animation triggered by the user operation has been displayed, the mobile phone 10 can also unfreeze the high-load process. In this way, it is possible to avoid freezing the high-load process for a long time and affecting the operation of the high-load process.
[0239] That is to say, based on Figures 8 to 12 In the illustrated embodiment, the desktop 211 can send a thawing instruction to the AMS 222 to instruct the AMS 222 to thaw the frozen high-load process when the lifting position of the lifting event is in a preset area, or the acceleration of the moving event is greater than the first acceleration, or the switching animation display is completed. The AMS 222 can also thaw the frozen high-load process when the duration of freezing the high-load process is greater than the first duration.
[0240] Furthermore, an embodiment of the present application also provides a process scheduling method.
[0241] Fig.13 According to some embodiments of the present application, a schematic flow chart of a process scheduling method is shown. Fig.13 As shown, the process includes the following steps:
[0242] S1301: The mobile phone 10 displays a first interface of a first application and runs a second application in the background, wherein the second application is in a high-load application list.
[0243] For example, for Figure 2 In the scenario shown, the first application may be a camera application, the second application may be a game application, and the first interface may be Figure 1 It should be understood that in some other embodiments, the mobile phone 10 can also run a third application that is not in the high-load application list, such as Figure 2 The Gallery app and the File Manager app in the scenario shown.
[0244] For example, for Figure 5 In the scenario shown, the first application may be a file management application, the second application may be a game application and a camera application, and the first interface may be Figure 5 It should be understood that in some other embodiments, the mobile phone 10 can also run a third application that is not in the high-load application list, such as Figure 2 The Gallery app in the scenario shown.
[0245] S1302: In response to a first operation of the user on the first interface, the mobile phone 10 freezes the process of the second application when the first application is in the whitelist application list.
[0246] The mobile phone 10 responds to the first operation of the user on the first interface and freezes the process of the second application when the first application is in the whitelist application list.
[0247] It should be understood that the first operation may be an operation defined by an operating system of the electronic device or an application running in the electronic device and corresponding to the first animation.
[0248] For example, when the first animation is an animation of switching from the first interface to the multitasking interface, the first operation may be an operation in which the user presses the bottom of the current display interface and then slides up by a distance greater than the first distance. The mobile phone 10 may respond to the first operation based on the execution process of the aforementioned steps S801 to 804, and send a freeze instruction to the AMS 222 when the first application is an application in the high whitelist application list. The AMS 222 may determine that the process of the second application is a high-load process based on the execution process of the aforementioned step S805, and freeze the process corresponding to the second application.
[0249] For example, for Figures 2 to 4 In the situation shown, the mobile phone 10 can freeze the camera process and the game process (the process of the second application) at time 0 based on the execution process of the aforementioned steps S801 to step 805, in response to the user's operation of sliding up from the bottom of the interface 03 for a distance greater than the first distance (the first operation).
[0250] It should be understood that if a third application that is not in the high-load application list is also running in the background of the mobile phone 10, the mobile phone 10 does not freeze the process of the third application. Figures 2 to 4 , the gallery application is not in the list of high-load applications. During the process of freezing the process of the second application (camera process, game process), the gallery process remains running.
[0251] It should be understood that in some other embodiments, if the first application is also in the high-load application list, the mobile phone 10 may also freeze the process of the first application.
[0252] In some embodiments, the mobile phone 10 may freeze the process of the second application using instructions defined by the operating system of the mobile phone 10. Figure 2 In the illustrated scenario, the processes of the second application may include a camera process (process identifier PID1) and a game process (process identifier PID2). The mobile phone 10 may use the AMS 222 to send a "kill-18PID1, PID2" or "kill-SIGSTOP PID1, PID2" instruction to the kernel 231 to freeze the camera process and the game process.
[0253] It should be understood that, in some embodiments, if the first application is not an application in the whitelist application list, the mobile phone 10 may not freeze the process of the second application.
[0254] For example, refer to Figure 5 , in the foreground application by Figures 2 to 4 After the camera application in the interface is switched to the file management application. Even if the user performs an operation of sliding up from the bottom of the interface 03 at time 0 for a distance greater than the first distance, the camera process and the game process are high-load processes, and the mobile phone 10 will not freeze the camera process and the game process.
[0255] It should be understood that in some embodiments, if the first application is not in the whitelist application list, but the idle rate of the processor of the mobile phone 10 is less than the first idle rate, the mobile phone 10 can also freeze the process of the second application in response to the user's first operation on the first interface.
[0256] It should be understood that in some embodiments, the mobile phone 10 may freeze the process of the second application in response to the user's first operation on the first interface only when the first application is in the whitelist application list and the idle rate of the processor of the mobile phone 10 is less than the first idle rate.
[0257] S1303: The mobile phone 10 renders, synthesizes and displays a first animation corresponding to the first operation.
[0258] After freezing the second application process, the mobile phone 10 renders, synthesizes and displays the first animation corresponding to the first operation.
[0259] In this way, since the process of the second application is frozen during the rendering, synthesis and display of the first animation, more hardware resources can be provided for the rendering, synthesis and display of the first animation, thereby avoiding the first animation from freezing.
[0260] S1304: The mobile phone 10 unfreezes the process of the second application in response to a second operation of the user during the display of the first animation, or the first animation display is completed, or the process of the second application is frozen for more than the first time period.
[0261] For example, after the mobile phone 10 starts rendering, synthesizing and displaying the first animation corresponding to the first operation, in response to the second operation of the user during the display of the first animation, the process of the second application can be unfrozen. In this way, in response to the user canceling the second operation of displaying the first animation, the process of the second application can be unfrozen in time to avoid affecting the normal operation of the second application.
[0262] For example, for Figure 3 In the situation shown, while the animation process is drawing, synthesizing and displaying the switch from the current display interface to the multi-tasking interface, the mobile phone 10 can respond to the user's operation of sliding down at time T3 and lifting up at time T4 (the second operation) to unfreeze the camera process and the game process.
[0263] It should be understood that the second operation can cancel any operation of the first animation, which is not limited here. In some embodiments, the second operation of canceling the switching animation can be one or more. Exemplary, for switching the aforementioned switching animation:
[0264] For example, refer to Fig.9A After the user slides up to point A (i.e., the first operation, the distance between point A and the bottom of the display interface of the mobile phone 10 is greater than the first distance), the operation of continuing to slide up from point A to point B (the distance between point B and the bottom of the display interface of the mobile phone 10 is greater than the second distance, and the second distance is greater than the first distance) can be the second operation. In some embodiments, the desktop 211 can display the desktop based on the operation of the user sliding from point A to point B.
[0265] For example, refer to Fig.9A After the user slides up to point A, the operation of continuing to slide up from point A to point C at the first acceleration (the first acceleration is greater than the preset acceleration) can also be the second operation. In some embodiments, the desktop 211 can display the desktop based on the operation of the user sliding from point A to point C.
[0266] For example, refer to Fig.9AAfter the user slides up to point A, the operation of sliding down from point A to point D (the distance between point D and the bottom of the display interface of the mobile phone 10 is less than the aforementioned preset distance) can also be the second operation. In some embodiments, the desktop 211 can switch back to the display interface before the switching animation is triggered based on the user's operation of sliding from point A to point D.
[0267] In some embodiments, corresponding to the first animation being the aforementioned switching animation, the mobile phone 10 responds to the second operation of the user during the display of the first animation, and the specific process of unfreezing the process of the second application can refer to the description of the aforementioned steps S807 to S810, or steps S1007 to 1010, and will not be repeated here.
[0268] Exemplarily, after the first animation is displayed, the mobile phone 10 can unfreeze the process of the second application. Figure 2 In the situation shown, the mobile phone 10 can unfreeze the camera process and the game process at time T1 (the moment when the first animation is displayed). In this way, the process of the second application can be unfrozen in time after the first animation is displayed to avoid affecting the normal operation of the second application.
[0269] In some embodiments, corresponding to the first animation being the aforementioned switching animation, the mobile phone 10 may unfreeze the process of the second application after the first animation is displayed. The specific process may refer to the description of the aforementioned steps S1107 to S1109 and will not be repeated here.
[0270] Exemplarily, when the process of the second application is frozen for more than the first time period, the mobile phone 10 unfreezes the process of the second application. Figure 4 In the case shown, the animation process starts drawing, synthesizing and displaying the process of switching from the current display interface to the multi-tasking interface. At time T5, the mobile phone 10 determines that the duration of freezing the camera process and the game process is greater than the first duration, and unfreezes the camera process and the game process. In this way, it is possible to avoid freezing the process of the second application for a long time and affecting the normal operation of the second application.
[0271] In some embodiments, corresponding to the first animation being the aforementioned switching animation, when the mobile phone 10 freezes the process of the second application for more than the first duration, the specific process of unfreezing the process of the second application can refer to the description of the aforementioned steps S1207 and S1208, which will not be repeated here.
[0272] It should be understood that in some embodiments, the mobile phone 10 can use instructions defined by the operating system of the mobile phone 10 to unfreeze the process of the second application. Figure 2In the scenario shown, the processes of the second application include a camera process (with a process identifier of PID1) and a game process (with a process identifier of PID2). The mobile phone 10 can use the AMS 222 to send a "kill-19PID1, PID2" or "kill-SIGCONT PID1, PID2" instruction to the kernel 231 to unfreeze the camera process and the game process.
[0273] Through the method provided in the embodiment of the present application, the mobile phone 10 can provide sufficient processor resources for rendering, synthesis and displaying the switching animation by freezing the high-load process, which can avoid the switching animation from freezing, and is conducive to improving the user experience. In addition, the mobile phone 10 can unfreeze the high-load process based on the user's second operation of canceling the switching animation or the duration of freezing the high-load process exceeds the first duration, so as to avoid affecting the operation of the high-load process.
[0274] further, Fig.14 According to some embodiments of the present application, a schematic structural diagram of a mobile phone 10 is shown.
[0275] Fig.14 As shown, the mobile phone 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
[0276] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0277] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0278] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0279] In some embodiments, the processor 110 may call and execute the corresponding instructions of the process scheduling method provided in each embodiment of the present application stored in the memory to implement the process scheduling method provided in the embodiment of the present application. For example, the processor 110 may be used to execute an instruction to determine whether the foreground application is in the whitelist application list in response to the first operation, execute an instruction to freeze a high-load process and unfreeze a high-load process, and respond to an instruction of the second operation.
[0280] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the mobile phone 10, and can also be used to transfer data between the mobile phone 10 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices.
[0281] The charging management module 140 is used to receive charging input from a charger. While the charging management module 140 is charging the battery 142 , it can also power the electronic device through the power management module 141 .
[0282] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
[0283] The wireless communication function of the mobile phone 10 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0284] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
[0285] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 10. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0286] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 10. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0287] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-LED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 10 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0288] The mobile phone 10 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0289] For example, in some embodiments, display screen 194 may be used to display an interface of an application and a first animation.
[0290] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the mobile phone 10 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0291] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 10. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0292] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, at least one application required for a function, etc. The data storage area may store data created during the use of the mobile phone 10, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications of the mobile phone 10 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor 110.
[0293] The mobile phone 10 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
[0294] The audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals.
[0295] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.
[0296] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.
[0297] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0298] The earphone jack 170D is used to connect a wired earphone.
[0299] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.
[0300] The acceleration sensor 180E can detect the magnitude of the acceleration of the mobile phone 10 in various directions (generally three axes). When the mobile phone 10 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device, to determine whether the mobile phone 10 is in a horizontal screen state, and for applications such as a pedometer.
[0301] The ambient light sensor 180L is used to sense the ambient light brightness. The mobile phone 10 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the mobile phone 10 is in a pocket to prevent accidental touches.
[0302] The fingerprint sensor 180H is used to collect fingerprints. The mobile phone 10 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0303] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the mobile phone 10, which is different from the position of the display screen 194.
[0304] For example, the touch sensor 180K may transmit a user's touch operation on the touch sensor 180K (or the display screen 194 ) to the IMS 221 running in the processor 110 , so that the IMS 221 sends an input event corresponding to the operation to the desktop 211 .
[0305] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals of vibrating bones of the human body. The bone conduction sensor 180M can also contact the human body's pulse to receive blood pressure beating signals.
[0306] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The mobile phone 10 may receive key input and generate key signal input related to user settings and function control of the mobile phone 10.
[0307] Motor 191 can generate vibration prompts.
[0308] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0309] The SIM card interface 195 is used to connect a SIM card.
[0310] It is understood that the structure of the mobile phone 10 shown in the embodiment of the present application does not constitute a specific limitation on the mobile phone 10. In other embodiments of the present application, the mobile phone 10 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.
[0311] It should be understood that Fig.14 The structure of the mobile phone 10 shown is only an example. In other embodiments, the mobile phone 10 may include more or fewer modules, and some modules may be combined or split, which is not limited here.
[0312] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code or program product executed on a programmable system, and the programmable system includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0313] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.
[0314] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0315] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable storage media. Therefore, a machine-readable storage medium may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, a floppy disk, an optical disk, an optical disk, a magneto-optical disk, a random access memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a magnetic card or an optical card, a flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, a machine-readable storage medium includes any type of machine-readable storage medium suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0316] In the accompanying drawings, some structural, module or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0317] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" means that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0318] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims
1. A process scheduling method, characterized in that: The electronic device runs a first application, a second application, and a third application, wherein the first application uses a processor at a rate greater than a preset rate when running in the foreground, and the second application is a high-load application, and the method includes: Displaying a first interface of a first application, wherein the first application is running in the foreground and the second application is running in the background; In response to a swipe-up operation of the user on the first interface at a first time point, pausing the process of the second application within a first time period; In response to a lifting operation by the user at a second time point, displaying a second interface, wherein the first time period is between the first time point and the second time point; After the second time point, the process of the second application is not suspended.
2. The method according to claim 1, characterized in that The step of pausing the process of the second application within a first time period in response to a user sliding up on the first interface at a first time point includes: In response to the upward sliding operation of the user, based on the first application being in the first list, the process of the second application is suspended within a first time period.
3. The method according to claim 1, characterized in that The step of pausing the process of the second application within a first time period in response to a user sliding up on the first interface at a first time point includes: In response to the user's swipe up operation, based on the fact that the second application is in the second list and the third application is not in the second list, the process of the second application is suspended within a first time period, the process of the third application is not suspended, and the third application runs in the background.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: In response to a lift-up operation by the user at a second time point, after the second time point, the process of running the second application is resumed.
5. The method according to claim 4, characterized in that The sliding-up operation includes an operation in which a user presses the bottom of the first interface and slides upward to a first position, wherein a distance between the first position and the bottom of the first interface is greater than a first distance.
6. The method according to claim 5, characterized in that The lifting operation includes at least one of the following operations: A lifting operation after the user slides down from the first position to the second position, wherein the second position is within a preset area; The user performs a lifting operation after sliding upward from the first position to the third position, wherein the acceleration of sliding upward from the first position to the third position is greater than the first acceleration or the distance between the third position and the bottom of the first interface is greater than the second distance.
7. The method according to any one of claims 1 to 3, characterized in that The method further comprises: During the first time point and the second time point, in response to the sliding up operation, drawing a plurality of interfaces; Based on the completion of drawing the multiple interfaces at a third time point, the process of running the second application is resumed at the third time point. The method according to claim 7 , wherein the multiple interfaces are animations of switching from the first interface to the second interface.
9. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Based on the duration of suspending the process of the second application at the fourth time point reaching the first duration, resuming the process of the second application at the fourth time point.
10. The method according to claim 3, characterized in that The method further comprises: Based on the first application being in the second list, pausing the process of the first application within the first time period.
11. The method according to claim 1, characterized in that: The method further comprises: displaying a third interface of the third application; the usage rate of the processor by the third application when running in the foreground is less than or equal to the preset usage rate; In response to the upward sliding operation of the user on the third interface at a fifth time point, not pausing the process of the second application within a second time period; In response to a lifting operation by the user at a sixth time point, a fourth interface is displayed, wherein the second time period is between the fifth time point and the sixth time point.
12. A readable storage medium, characterized in that: The readable storage medium includes instructions, and when the instructions are executed by an electronic device, the electronic device implements the method according to any one of claims 1 to 11.
13. An electronic device, characterized in that: include: A memory for storing instructions; At least one processor is used to execute the instructions so that the electronic device implements the method according to any one of claims 1 to 11.
