Display method, terminal equipment and computer readable storage medium
Patent Information
- Application Number
- CN202380089104.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-01-19
- Filing Date
- 2023-11-14
- Publication Date
- 2025-08-01
AI Technical Summary
Existing terminal equipment takes a long time from receiving the unfolding operation to lighting up the internal screen to display the interface, resulting in poor user experience.
By identifying the scene from the folded state to the expanded state, the identification information of the relevant process is obtained and its priority is adjusted, thereby reducing the waiting time caused by low priority and improving the display speed.
This shortens the time it takes for the internal screen to light up and display, improves user experience, and ensures that the terminal device can display the interface more quickly when it is in the expanded state.
Smart Images

Figure CN120418772A_ABST
Abstract
Description
Display method, terminal device, and computer-readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on January 19, 2023, with application number 202310125185.8 and application name “Display method, terminal device and computer-readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to a display method, a terminal device, and a computer-readable storage medium. Background Art
[0003] With the development of current flexible screen technology, flexible foldable screens (also called folding screens) have been applied to terminal devices such as mobile phones, allowing users to fold or unfold terminal devices such as mobile phones to meet users' needs for different screen sizes.
[0004] When the terminal device receives an expansion operation and switches from the folded state with the screen off to the expanded state, it will trigger the inner screen to light up and display the interface on the inner screen.
[0005] However, in the existing solution, it takes a long time for the terminal device to receive the user's expansion operation and light up the display interface on the inner screen, resulting in a poor user experience.
[0006] Summary of the Invention
[0007] The present invention provides a display method, terminal device, and computer-readable storage medium for use in the field of terminal technology. By identifying the transition from a folded state to an unfolded state, allocating resources for that transition, and adjusting the priorities of related processes, the system reduces the waiting time for processes that are unscheduled due to low priority, thereby improving display speed and user experience.
[0008] In a first aspect, an embodiment of the present application provides a display method, which is applied to a terminal device, wherein the terminal device includes an outer display screen and an inner display screen, and the terminal device has a state including a folded state and an unfolded state. The method includes:
[0009] When the terminal device is in a folded state and the external display screen is off, the terminal device recognizes an expansion event, which is used to instruct the terminal device to switch from a folded state to an expanded state; when the terminal device recognizes the expansion event, it obtains the identification information of the first process, and the first process is a process in the terminal device related to the display of the internal display screen; based on the identification information of the first process, the terminal device adjusts the first process from a first priority to a second priority, and the second priority is higher than the first priority; the terminal device schedules the first process to run based on the second priority; after the first process is completed, the terminal device lights up the internal display screen and displays the interface on the internal display screen.
[0010] It is understandable that the first process includes one or more of the following: image drawing and rendering, synthesis and display-related threads, and other display-related processes. Exemplarily, the first process may be a system UI process. The system UI process is used to draw the lock screen interface. The identification information is used to identify the corresponding process for distinction. The identification information may be a name, number, etc. The identification information of the first process may be a unique identification code (TID) of the first process.
[0011] In this way, the scenario of the screen being turned from off and folded to unfolded and bright is identified, and resources are configured for the scenario, and the priority of related processes is adjusted to reduce the waiting time of processes that cannot be scheduled due to low priority, increase the display speed, and enhance the user experience.
[0012] Optionally, when the terminal device identifies the expansion event, the terminal device obtains the identification information of the first process, including: when the terminal device calls the first process, the terminal device obtains the identification information of the first process.
[0013] The terminal device can obtain identification information through inter-process communication, and then adjust the priority of the first process based on the identification information, thereby shortening the waiting time of the first process and improving the user experience.
[0014] Optionally, when the terminal device recognizes the expansion event, the terminal device obtains the identification information of the first process, including: when the terminal device recognizes the expansion event, the terminal device reads the identification information of the first process from a local cache.
[0015] The terminal device can obtain identification information from the local cache. This eliminates the need for inter-process communication to obtain identification information, reduces communication load, and increases timeliness.
[0016] Optionally, when the terminal device is in the screen-off folded state, before identifying an expansion event, the method also includes: when the first process is started, the terminal device writes the identification information of the first process into the database; when the terminal device monitors that the identification information of the first process is written into the database, the terminal device stores the identification information of the first process in the local cache.
[0017] In this way, repeated reading of data can be reduced, signaling consumption can be reduced, and user experience can be improved.
[0018] Optionally, the first process includes: a system interface process, and the system interface process is used to draw an interface.
[0019] The terminal device can adjust the priority of the process used to draw the interface, speed up the drawing of the interface displayed on the inner screen, shorten the preparation time of the interface displayed on the inner screen, and shorten the screen display time.
[0020] Optionally, after the first process is completed, the method further includes: the terminal device adjusting the first process from the second priority to the first priority.
[0021] In this way, when the terminal device starts the internal display screen to display the screen, the first process is scheduled first to shorten the screen display time and reduce the interference with subsequent display or other functions.
[0022] Optionally, the first process is a system interface process; the terminal device adjusts the first process from the second priority to the first priority, including: when the first process completes drawing the interface, the terminal device adjusts the first process from the second priority to the first priority.
[0023] The terminal device can reduce interference with subsequent display or other functions.
[0024] Optionally, the method further includes: adjusting the first process from the second priority to the first priority after a preset time interval has passed after the first process is adjusted from the first priority to the second priority.
[0025] The preset time interval may correspond to the time threshold below.
[0026] In this way, when the terminal device starts the internal display screen to display the screen, the first process is scheduled first to shorten the screen display time and reduce the interference with subsequent display or other functions.
[0027] Optionally, the method further includes: when the internal display screen of the terminal device is lit, adjusting the first process from the second priority to the first priority.
[0028] In this way, when the terminal device starts the internal display screen to display the screen, the first process is scheduled first to shorten the screen display time and reduce the interference with subsequent display or other functions.
[0029] Optionally, the processor CPU of the electronic device includes multiple cores, and the method also includes: the terminal device adjusts the first process from the first CPU core to the second CPU core, and the computing power of the second CPU core is greater than the computing power of the first CPU core.
[0030] In this way, the affinity of the first process is adjusted so that the first process runs on a core with higher computing power, shortening the running time of the first process and thus shortening the screen display time.
[0031] Optionally, the method further includes: after adjusting the first process from the first priority to the second priority, the first process calls the second process; the terminal device adjusts the second process from the third priority to the second priority, the second process being a process in response to the call of the first process.
[0032] In this way, by adjusting the priority of the second process and reducing the waiting time of the second process, the time for the first process to call the second process can be shortened, the waiting time of the first process can be shortened, and the screen display time can be shortened, thereby improving the user experience.
[0033] In this way, the method further includes: the terminal device adjusts the third process from the fourth priority to the second priority, and the third process has a dependency relationship with the first process.
[0034] This can speed up the execution of the lock-holding process, reduce the extra waiting overhead of the system UI process due to competing locks, and shorten the time taken to display the internal screen.
[0035] Optionally, the method further includes: the terminal device deleting the lock in the fourth process; the fourth process is the first process, and / or a process that uses the same lock as the first process.
[0036] In this way, the terminal device speeds up the execution speed of the exclusion process by deleting some locks, thereby reducing the sleep time of the process in the terminal device and shortening the time consumption of the internal screen display process.
[0037] In a second aspect, an embodiment of the present application provides an electronic device, including a terminal device, which may also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver functions, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc.
[0038] The electronic device comprises: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method of the first aspect.
[0039] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method of the first aspect.
[0040] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run, it enables the computer to execute the method of the first aspect.
[0041] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method of the first aspect.
[0042] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] FIG1 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
[0044] FIG2 is a schematic diagram of a software structure of a terminal device provided in an embodiment of the present application;
[0045] FIG3 is a schematic diagram of an internal interaction process when an inner screen of a terminal device is lit up according to an embodiment of the present application;
[0046] FIG4 is a schematic diagram of a process of changes in a folding screen during the unfolding process provided by an embodiment of the present application;
[0047] FIG5 is a schematic diagram of a flow chart of a display method provided in an embodiment of the present application;
[0048] FIG6 is a flow chart of a display method provided in an embodiment of the present application;
[0049] FIG7 is a schematic diagram of a flow chart of the interaction between modules within a terminal device according to an embodiment of the present application;
[0050] FIG8 is a schematic diagram of a flow chart of a display method provided in an embodiment of the present application;
[0051] FIG9 is a schematic diagram of a flow chart of the interaction between modules within a terminal device according to an embodiment of the present application;
[0052] FIG10 is a schematic structural diagram of a display device provided in an embodiment of the present application;
[0053] FIG11 is a schematic structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] To facilitate a clear description of the technical solutions of the embodiments of the present application, some of the terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0055] 1. Other terms
[0056] In the embodiments of this application, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the terms "first chip" and "second chip" are used solely to distinguish between different chips and do not define their order. Those skilled in the art will understand that terms such as "first" and "second" do not define the quantity or execution order, and do not necessarily define differences.
[0057] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0058] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.
[0059] 2. Terminal equipment
[0060] The terminal device of the embodiment of the present application may also be any form of electronic device. For example, the electronic device may include a handheld device with image processing function, a vehicle-mounted device, etc. For example, some electronic devices include: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving cars, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks. The terminal equipment in the network (PLMN), etc., is not limited to this in the embodiments of the present application.
[0061] As an example and not a limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0062] In addition, in the embodiments of the present application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.
[0063] The electronic devices in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
[0064] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also known as main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as the Linux operating system, the Unix operating system, the Android operating system, the iOS operating system, or the Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0065] For example, FIG1 is a schematic diagram of a front view and a rear view of a terminal device with a folding screen provided in an embodiment of the present application.
[0066] As shown in Figure 1, the terminal device can include a folded state and an unfolded state. The folded state can be understood as the angle between the two side screens of the folding screen is less than or equal to a first value, and the unfolded state can be understood as the angle between the two side screens of the folding screen is greater than or equal to a second value.
[0067] In one possible implementation, the first value is equal to the second value. This implementation may be understood as the terminal device being either in a folded state or in an unfolded state.
[0068] In another possible implementation, the second value is greater than the first value. In this implementation, the terminal device may further include a transition state, which can be understood as a state in which the angle between the two side screens of the folding screen is greater than the first value and less than the second value.
[0069] As shown in Figure 1, when the terminal device is in the folded state, the display screen facing the user in the front view can be called the outer screen, and the display screen facing the user in the rear view can be called the back panel. When the terminal device is in the unfolded state, the display screen facing the user in the front view can be called the inner screen (or folding screen), and the outer screen and back panel in the rear view can be unfolded into a single plane.
[0070] That is, when the terminal device is in the folded state, the inner screen can be folded and hidden, and the outer screen can be used to display the interface. When the terminal device is in the unfolded state, the inner screen can be unfolded and used to display the interface.
[0071] Furthermore, as shown in FIG1 , cameras may be provided in the inner screen, outer screen and back panel of the terminal device.
[0072] It is understandable that the terminal device may include one or more external screen cameras, and / or one or more internal screen cameras. The external screen camera can be set at any position on the external screen; the internal screen camera can be set at any position on the internal screen. For example, the internal screen camera can be on the display screens on both sides when the internal screen is unfolded, or on the display screen on either side when the internal screen is unfolded. The embodiments of the present application do not limit the number of internal screen cameras, the positions of the internal screen cameras, the number of external screen cameras, and the positions of the external screen cameras.
[0073] For example, in the terminal device shown in FIG1 , when the terminal device is in a folded state, the external screen 101 and the external screen camera 102 on the external screen can be seen in the front view; and the rear camera 103 can be seen in the corresponding rear view.
[0074] When the terminal device is in the unfolded state, the inner screen is opened, and the inner screen 104 and the inner screen camera 105 on the inner screen can be seen in the front view; the corresponding rear view shows the rear camera 103 and the outer screen camera 102 on the outer screen. Among them, the inner screen 104 can be divided into two parts, left and right.
[0075] It is understandable that when the terminal device receives an expansion operation, the terminal device switches from a folded state to an expanded state, triggering the inner screen to light up and display the interface on the inner screen.
[0076] When the terminal device switches from the folded state with the screen off to the unfolded state, the inner screen will be triggered to light up and the interface will be displayed on the inner screen.
[0077] However, it takes a long time for the terminal device to receive and expand the operation and then light up the display interface on the inner screen, resulting in a poor user experience.
[0078] In a possible design, the terminal device uses a Hall sensor to trigger the inner screen to light up. For example, when the Hall sensor detects that the angle between the two side screens of the folding screen is greater than 10 degrees, the terminal device triggers the start of the inner screen lighting.
[0079] In this way, the terminal device can start lighting up the inner screen when the angle between the two side screens of the folding screen is small, shortening the time from when the terminal device receives the unfolding operation to when the inner screen lights up. It can also be understood as shortening the time it takes for the terminal device to trigger the inner screen to light up.
[0080] However, this method does not improve the subsequent internal screen lighting process, and the improvement effect is limited, and as a result, it takes a long time for the internal screen to light up the display interface.
[0081] In possible design two, the terminal device increases the frequency of the processor.
[0082] For example, when the terminal device detects the scenario of switching from the screen-off and folded state to the unfolded state, the frequency of the terminal device's processor is increased to improve the computing power of the terminal device, speed up the computing speed of the terminal device's processor, and thereby shorten the time it takes to turn the screen on from the screen-off and folded state to the unfolded state.
[0083] However, during the transition from the folded state to the unfolded state, the terminal device must process a large number of tasks, placing a heavy system load and limiting the improvement. Furthermore, in a second possible design, where all processes on the terminal device are frequency-increased, the terminal device may encounter situations where processes that affect the internal screen lighting are not scheduled or receive insufficient resources due to low priority, or are not executed or executed slowly, resulting in a slow screen lighting.
[0084] In view of this, an embodiment of the present application provides a display method that identifies the scenario of the screen changing from an off-screen folded state to an unfolded-screen bright state, configures resources for the scenario, adjusts the priority of related processes, reduces the waiting time of processes that cannot be scheduled due to low priority and other reasons, improves display speed, and enhances user experience.
[0085] For ease of understanding, the software system of the terminal device is described below. The software system of the terminal device can adopt a layered architecture, event-driven architecture, micro-core architecture, microservice architecture, or cloud architecture, etc., which will not be described in detail here. The embodiment of this application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal device.
[0086] Figure 2 is a block diagram of the software structure of a terminal device according to an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into five layers: application layer, application framework layer, hardware abstraction layer (HAL), kernel layer, and hardware layer.
[0087] The application layer includes a series of application packages. The application layer runs applications by calling the application programming interface (API) provided by the application framework layer. As shown in Figure 2, application packages may include applications such as camera, calendar, phone, map, phone, music, settings, email, video, social networking, and the system UI.
[0088] The system interface is used to manage terminal device lock or unlock, etc.
[0089] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0090] As shown in Figure 2, the application framework layer may include a power manager (power manager service), a window manager (window manager service), a display manager (display manager service), a folding screen manager (device state manager service), a sensor manager (sensor service), an Android interface process (Android UI process), etc.
[0091] The power manager can control the power on and off of various components in the terminal device. For example, it can control the terminal device's internal screen to display when powered on, turn off when powered off, and the external screen to display when powered on, turn off when powered off.
[0092] The window manager manages windowed programs. It can obtain the display size, determine whether a status bar is present, lock the screen, touch the screen, drag the screen, and take screenshots. The window manager also sends configuration change events to the system UI, allowing the system UI to redraw the lock screen based on the configuration changes and then relight the screen.
[0093] The display manager can manage the screen display of the terminal device, perform logical screen mapping switching, screen resolution switching, etc. For example, the display manager registers with the folding screen manager to monitor the status of the folding screen. When the folding screen is in the folded state, the display manager controls the terminal device to display the interface on the external screen; when the folding screen is in the expanded state, the display manager controls the terminal device to display the interface on the internal screen.
[0094] The foldable screen manager can manage the foldable screen status. For example, the foldable screen manager can calculate the foldable screen status and notify other modules (such as the power manager and display manager, etc.) of the foldable screen status to facilitate other modules to process according to the foldable screen status (for example, switching between the inner and outer screens and the display screen, etc.). It is understandable that the foldable screen manager can also respond to commands sent by other modules to obtain the foldable screen status and feedback the foldable screen status.
[0095] Alternatively, it can be understood that the folding screen manager can monitor the changes in the folding state or posture of the terminal device, integrate and calculate the device status of the terminal device, and notify the monitoring service to perform corresponding response actions to facilitate other modules to process according to the folding screen status, for example, triggering the display manager to switch the logical screen mapping, triggering the power manager to switch the power on and off of the internal and external screens, triggering the window manager to redraw according to the screen switch, etc.
[0096] The folding screen manager also registers the requests of the attitude sensor and Hall sensor with the sensor service, and manages the registration and event fusion calculation of the attitude sensor and Hall sensor to determine the folding screen status of the terminal device.
[0097] The sensor manager manages sensor status and other functions. It registers gesture sensors and Hall effect sensors with the sensor hardware abstraction and listens for event change notifications from the sensor hardware abstraction. Upon detecting gesture or Hall effect sensor changes, the sensor manager notifies the Folding Screen Manager to trigger event fusion calculations and distributes the results to relevant listening services (e.g., the display manager, power manager, window manager, etc.).
[0098] The Android UI process and the system UI (system UI) have a lock contention relationship during the configuration process. The system UI (system UI) relies on the protection of the lock in the Android UI process during the reconfiguration and drawing process.
[0099] The purpose of the HAL layer is to abstract the hardware. It can provide a unified interface for querying hardware devices for upper-layer applications, or it can also provide data storage services for upper-layer applications. As shown in Figure 2, the HAL layer can include display hardware abstraction and sensor hardware abstraction (sensor HIDL).
[0100] Display hardware abstraction can control both external and internal screens.
[0101] The sensor hardware abstraction can control sensors and monitor event change notifications driven by sensors. For example, the sensor manager registers gesture and hall sensors with the HIDL service in the sensor hardware abstraction to monitor event change notifications from the sensor HIDL service.
[0102] Multiple modules in the HAL layer may comply with the Hardware Abstraction Layer Interface Description Language (HIDL) or AIDL.
[0103] The kernel layer is the layer between hardware and software. As shown in Figure 2, the kernel layer may include one or more of the following: display driver, sensor driver, camera driver, etc.
[0104] The sensor driver supports the registration of events for the sensor hardware abstraction and reports parameter change events to the Hidl process registered with the sensor hardware abstraction. For example, the Hall effect driver in the sensor driver can send distance events or approach events to the sensor hardware abstraction.
[0105] In some embodiments, the sensor driver includes a sensor subsystem framework and a sensor subsystem driver, which are located in a coprocessor (SCP).
[0106] It is understood that the terminal device may include an application processor (AP) and a coprocessor (SCP). The application processor includes the above-mentioned application framework layer, hardware abstraction layer, kernel layer, etc.; the coprocessor includes the sensor subsystem framework and sensor subsystem driver.
[0107] The sensor subsystem framework includes an event distribution management module. This module is responsible for transmitting sensor change events to the sensor hardware abstraction via inter-core communication. The sensor subsystem driver supports the sensor hardware abstraction's registered events and reports parameter change events to the Hidl process registered with the sensor hardware abstraction. For example, the event distribution management module sends distance and approach events to the sensor hardware abstraction.
[0108] It should be understood that in some embodiments, layers that implement the same function may be referred to by other names, or a layer that can implement the functions of multiple layers may be considered as one layer, or a layer that can implement the functions of multiple layers may be divided into multiple layers. This embodiment of the present application does not limit this.
[0109] The following describes the display process of the terminal device during the unfolding of the folding screen in conjunction with Figure 2.
[0110] When the terminal device receives the expansion operation, the sensor of the terminal device detects a distance event, etc. The sensor outputs a corresponding signal and reports it to the sensor driver. The sensor driver processes the corresponding signal output by the sensor to obtain the folding screen status information (for example, the posture of the terminal device, the distance event, etc.). The sensor driver reports the folding screen status information to the folding screen manager through the sensor hardware abstraction. The folding screen manager confirms the change information of the folding screen state (for example, from a folded state to an expanded state) based on the folding screen status information. The posture of the terminal device can include a folded state or an expanded state. The expanded state can include a semi-expanded state and a fully expanded state.
[0111] Taking the change in the folding screen state from folded to unfolded as an example, the folding screen manager sends the folding screen state change information to the display manager to manage the logical screen. The display manager sends the folding screen state change information to the display hardware abstraction. After receiving the folding screen state change information, the display hardware abstraction confirms that the folding screen has switched from the external screen to the internal screen. The display hardware abstraction sends an instruction to the display driver to instruct it to turn on the internal screen. The display driver drives the hardware layer to turn on the internal screen. The terminal device begins to display the image on the internal screen.
[0112] It is understandable that when a terminal device switches from a folded state with the screen off to an unfolded state, it triggers multiple managers in the framework layer of the application processing side (AP side), the system manager on the application side (APP side), and the lock screen drawing process it carries. The following, combined with Figure 3, illustrates the internal interaction process of the terminal device during the inner screen lighting process.
[0113] S301. During the process of switching the terminal device from the screen-off folded state to the unfolded state, the Hall sensor in the terminal device detects that the angle of the folding screen is greater than a first threshold.
[0114] S302: The Hall driver in the sensor driver reports a distance event to the sensor hardware abstraction.
[0115] S303: After receiving the distance event, the sensor hardware abstraction sends the distance event to the sensor manager. S304: The sensor manager sends the distance event to the folding screen manager.
[0116] S305: The folding screen manager determines that the terminal device switches from the folded state to the unfolded state based on the distance event and the current folding screen state, and sends an unfold event to the display manager to call the display manager to switch the logical screen.
[0117] The expand event is used to instruct the terminal device to switch from the folded state to the expanded state.
[0118] S306: The display manager determines to swap the logical screens based on the expanded state, and points logical screen 0 to the inner screen. Switching logical screen 0 from pointing to the outer screen to pointing to the inner screen can be understood as switching from outer screen display to inner screen display.
[0119] It is understandable that when the terminal device is in the folded state, the logical screen 0 points to the outer screen, and the terminal device displays the interface on the outer screen. When the terminal device is in the unfolded state, the logical screen 0 points to the inner screen, and the terminal device displays the interface on the inner screen.
[0120] S307, the display manager calls the power manager to power on the inner screen so that the interface can be displayed on the inner screen later. In addition, the display manager also calls the window manager to manage window programs.
[0121] S308: The window manager reloads configuration information based on the inner screen. The configuration information includes: inner screen size, resolution, etc. After reloading the configuration information, the window manager sends a configuration modification event to the system interface.
[0122] S309: The system interface is re-layouted and re-drawn based on the configuration information in the configuration modification event to display the interface on the internal screen.
[0123] S310: After the drawing and rendering is completed, the window management service and the display management service call the power management service to light up the inner screen and display the interface on the inner screen.
[0124] It should be noted that the aforementioned S307, powering on the inner screen, and S309, triggering the windows to be re-layouted and redrawn according to the new configuration information, are concurrent processes. However, switching from the folded screen off state to the expanded state requires displaying the lock screen interface on the inner screen. Therefore, it is necessary to wait until all windows visible to the user are re-layouted and redrawn before triggering the inner screen to light up.
[0125] As can be seen from the interaction process shown in Figure 3, it takes a long time for the system UI to be re-layouted and re-drawn based on the configuration information in the configuration modification event. Therefore, the system UI re-layout and re-drawing based on the new configuration information are the critical path in this scenario. If the system UI drawing speed is increased when the phone is unfolded from the folded screen state, the speed of triggering the inner screen to light up will also be increased.
[0126] The following describes the changing process of the folding screen and scene recognition during the unfolding of the folding screen in conjunction with Figure 4.
[0127] In some embodiments, the terminal device divides the angle of the folding screen into multiple situations and determines the state of the folding screen.
[0128] For example, the terminal device determines the state of the folding screen during the unfolding process by using two thresholds. Correspondingly, the terminal device also determines the state of the folding screen during the folding process by using two thresholds.
[0129] Specifically, in response to a user's unfolding operation, if the angle of the folding screen changes from less than or equal to a first threshold (for example, from 0 degrees or close to 0 degrees), the terminal device is in an approaching state when the angle of the folding screen is less than or equal to the first threshold; and in a moving-away state when the angle of the folding screen is greater than the first threshold. The approaching state can be mapped to the folded state, and the moving-away state can be mapped to the unfolded state (which can be a semi-expanded state or a fully unfolded state).
[0130] The terminal device responds to the user's expansion operation. If the angle of the folding screen changes from greater than the first threshold, the terminal device is in a folded state when the angle of the folding screen is less than or equal to the second threshold; when the angle of the folding screen is greater than the second threshold, the terminal device is in an unfolded state (which can be a semi-expanded state or a fully unfolded state).
[0131] The terminal device responds to the user's folding operation. If the angle of the folding screen changes from greater than a third threshold (for example, from 180 degrees or close to 180 degrees), the terminal device is in a folded state when the angle of the folding screen is less than or equal to the third threshold; when the angle of the folding screen is greater than the third threshold, the terminal device is in an unfolded state (which can be a semi-expanded state or a fully unfolded state).
[0132] In response to the user's folding operation, the angle of the folding screen of the terminal device changes from less than the third threshold value. When the angle of the folding screen is less than or equal to the fourth threshold value, the terminal device is in an approaching state; when the angle of the folding screen is greater than the fourth threshold value, the terminal device is in a distant state (which can be a semi-expanded state or a fully expanded state).
[0133] It is understood that the fourth threshold is less than the first threshold, the first threshold is less than the third threshold, and the third threshold is less than the second threshold. For example, the first threshold is 10, the second threshold is 65, the third threshold is 60, and the fourth threshold is 5.
[0134] In a possible implementation, the terminal device can determine the status of the folding screen using a Hall sensor and a posture sensor. The Hall sensor is used to determine the status of the folding screen when the angle of the folding screen is small. The posture sensor is used to determine the status of the folding screen when the angle of the folding screen is large.
[0135] For example, Figure 4 is a schematic diagram of a folding screen state during an unfolding process provided by an embodiment of the present application, taking the first threshold value as 10 and the second threshold value as 65 as an example.
[0136] As shown in Figure 4, a, if the angle of the terminal device's foldable screen changes from 0 degrees or close to 0 degrees, while the foldable screen is unfolding, the terminal device's Hall sensor detects that the foldable screen angle is greater than 10 degrees. The sensor driver and sensor hardware abstraction then report a distance event to the sensor manager. This distance event indicates that the device has switched to the distance state. The sensor manager sends this distance event to the foldable screen manager. Upon receiving the distance event, the foldable screen manager maps the device to a semi-expanded state, triggering the device's internal screen to light up.
[0137] As shown in b in Figure 4, if the angle of the folding screen of the terminal device changes from greater than 10 degrees, during the unfolding of the folding screen, the posture sensor of the terminal device detects that the angle of the folding screen is greater than 65 degrees. The sensor driver and sensor hardware abstraction report the unfolding event to the sensor manager. The unfolding event is used to indicate that the device form is switched to the unfolded state (semi-expanded state or fully expanded state). The sensor manager sends the away event to the folding screen manager. After receiving the unfolding event, the folding screen manager triggers the internal screen of the terminal device to light up. It can be understood that the above-mentioned judgment of the status of the folding screen in the terminal device is only an example. The terminal device can also judge the status of the folding screen in other ways, which is not limited here.
[0138] The following describes how to identify the screen status of a terminal device. The screen status includes off and on.
[0139] The screen-off state can be determined by the interactive state of the terminal device. For example, the terminal device can determine the interactive state of the terminal device through the boolean isInteractive() function in the power manager. When the return value of this function is true (true), it indicates that the terminal device is in the interactive state, that is, the screen is on; when the return value of this function is false (false), it indicates that the terminal device is in the non-interactive state, that is, the screen is off.
[0140] The display method provided in the embodiment of the present application is described below with reference to FIG. 5 to FIG. 9 .
[0141] S501: When the terminal device is in the screen-off folded state, an unfolding event is recognized.
[0142] The terminal device can identify the screen status through the interactive status of the terminal device. For details, please refer to the relevant instructions above and will not be described in detail here.
[0143] In the embodiment of the present application, the terminal device is in a screen-off folded state, which can be understood as the external screen of the terminal device is off (not displayed) and in a folded state.
[0144] An expansion event refers to the terminal device switching from a folded state to an expanded state.
[0145] In some embodiments, when the terminal device detects that the angle of the folding screen changes from less than a first threshold to greater than the first threshold, the terminal device recognizes an expansion event. Alternatively, when the terminal device detects that the angle of the folding screen changes from greater than a first threshold to greater than a second threshold, the terminal device recognizes an expansion event. The first threshold and the second threshold can refer to the relevant descriptions above and will not be repeated here. The embodiments of the present application do not specifically limit the method for identifying the expansion event.
[0146] It is understandable that when the terminal device switches from the off-screen folded state to the unfolded state, when the terminal device detects that the angle of the folding screen is greater than or equal to the first threshold, the Hall sensor reports the distance event to the folding screen manager through the sensor driver and sensor hardware abstraction. The folding screen manager recognizes the unfolding event based on the distance event and triggers the terminal device to turn on the screen. The specific process can be referred to the corresponding description of Figure 4 above, and will not be repeated here.
[0147] S502: When the terminal device recognizes an expansion event, it obtains identification information of a first process, where the first process is a process related to inner screen display.
[0148] The first process includes: a system UI process. The system UI process is used to draw the lock screen interface.
[0149] The identification information is used to identify the corresponding process for distinction. The identification information may be a name, a number, etc. The identification information of the first process may be a unique identification code (TID) of the first process.
[0150] It is understood that the terminal device can read the identification information of the first process by calling the first process. The terminal device can also pre-store the identification information of the first process in a local cache and obtain the identification information of the first process through the local cache. The embodiments of the present application do not limit the specific process by which the terminal device obtains the identification information of the first process.
[0151] S503: The terminal device adjusts the first process from a first priority to a second priority, where the second priority is higher than the first priority.
[0152] In the embodiment of the present application, the terminal device prioritizes the second-priority process over the first-priority process. This reduces the waiting time for the first process, which is not scheduled due to reasons such as low priority, and improves its running speed. This reduces the proportion of time the first process is in the runnable state, increases the proportion of time the first process is in the running state, and shortens the time the screen is displayed.
[0153] It is understood that the terminal device divides priorities into real-time priority, very important process (VIP) priority, high priority, medium priority, and low priority. High priority, medium priority, and low priority can be collectively referred to as normal priority. The number of tasks with real-time priority and VIP priority is relatively small, while the number of tasks with medium priority and low priority of normal priority is relatively large, and the number of tasks with high priority of normal priority is also relatively small.
[0154] It is understandable that the normal priority can be divided into three levels: high priority, medium priority and low priority, and can also be divided into more levels, which is not limited here.
[0155] For example, if the first priority is medium priority or low priority, the second priority can be any one of real-time priority, VIP priority or high priority. If the first priority is high priority, the second priority can be any one of VIP priority or real-time priority.
[0156] In some embodiments, the terminal device is configured with priority information. Priority information can be a number or other identifying information, which is not limited herein. Specifically, the terminal device identifies the priority corresponding to a process using a number. For example, using a scale of 0-130, the lower the number corresponding to a process, the higher the priority. For example, using a first priority of 100, the second priority can be a number less than 100.
[0157] In some embodiments, the first priority is any one of the common priorities, and the second priority is any one of the VIP priority or the high priority. In this way, the time of other processes called by the first process can be shortened, and the waiting time of the first process can be shortened.
[0158] It should be noted that when the first process has real-time priority or VIP priority, the second process can also be temporarily adjusted to the same priority. The second process is the process that responds to the call of the first process. For example, if the first process is a system UI process with VIP priority and the second process has medium priority, the second process will have VIP priority when responding to the scheduling of the first process; at the end of the scheduling, the second process will have medium priority.
[0159] Based on the above embodiment, the terminal device may adjust the priority of the first process from the second priority to the first priority after a period of time. It can also be understood that the priority adjustment of the first process is canceled after a period of time.
[0160] Exemplarily, when the terminal device reaches a certain stage of operation, for example, when the system UI process drawing ends, the system UI may notify the system server to cancel the configuration based on inter-process communication.
[0161] In this way, the first process is scheduled first during the critical time period to shorten the screen display time and reduce interference with subsequent displays or other functions.
[0162] In a possible implementation manner 1, the priority adjustment of the first process is canceled by setting a time threshold. After the terminal device adjusts the first process to the second priority, after the time threshold passes, the terminal device adjusts the first process from the second priority to the first priority.
[0163] For example, at a first moment, the terminal device adjusts the priority of the first process from the first priority to the second priority; at a second moment, the terminal device adjusts the priority of the first process from the second priority to the first priority. The difference between the second moment and the first moment is the time threshold.
[0164] For example, the time threshold can be obtained by statistically analyzing the time consumed by the first process to execute the task. The time threshold can be set according to actual conditions or experience, and the specific value of the time threshold is not limited in the embodiment of the present application.
[0165] In a second possible implementation, when the first process finishes executing a task, the terminal device adjusts the priority of the first process from the second priority to the first priority.
[0166] Exemplarily, taking the first process as a system UI process, the terminal device may set the first process to be adjusted from the second priority to the first priority when the system UI process is reconfigured based on the configuration information and drawing is completed.
[0167] In a third possible implementation method, when the terminal device recognizes that the inner screen lighting process ends, it sets the first process to be adjusted from the second priority to the first priority.
[0168] The terminal device can recognize that the inner screen lighting process ends when the backlight is turned on; or it can recognize that the inner screen lighting process ends when it recognizes that the terminal device is in the screen-on state. The embodiment of the present application does not limit the recognition conditions for the end of the inner screen lighting process.
[0169] It is understandable that the terminal device can control the time when the first process is the second priority through any of the above three implementation methods, and can also control the time when the first process is the second priority through other implementation methods, which are not specifically limited here.
[0170] Based on the above embodiment, the terminal device may further set the first process on the large core or the medium core while adjusting the priority of the first process.
[0171] Specifically, the terminal device may further adjust the first process from the first CPU core to the second CPU core. When the first CPU core is a small core, the second CPU core is a large core or a medium core; when the first CPU core is a medium core, the second CPU core is a large core.
[0172] Exemplarily, taking the first process as the system UI process as an example, the terminal device further adjusts the system UI process to the large core or the medium core.
[0173] In this way, the first process runs on the large or medium core with better computing power, reducing the number of times it runs on the small core with poor computing power, so that it can complete the rearrangement and redrawing according to the new configuration with less running time.
[0174] In some embodiments, the terminal device may set the first process to run on the large core or the medium core for a period of time. It can also be understood that after adjusting the first process to run on the large core or the medium core, the terminal device cancels the adjustment after a period of time.
[0175] For example, the terminal device may set the system UI process to be adjusted on the large core or the medium core for a period of time, and cancel the adjustment after a period of time.
[0176] In this way, the first process can be set to have affinity with the medium and large cores during the critical time period, so that the first process runs on the medium and large cores during the time period when the inner screen is lit up after unfolding from the folded screen-off state.
[0177] In a possible implementation method 1, the affinity adjustment of the first process is canceled by setting a time threshold. After the terminal device adjusts the first process to run on the large core or the medium core, the first process is adjusted from the second priority to the first priority after a period of time.
[0178] For example, at a first moment, the terminal device sets the first process to run on the large core or the medium core; at a second moment, the terminal device cancels the setting for the first process to run on the large core or the medium core. The difference between the second moment and the first moment is the time threshold.
[0179] For example, the time threshold can be obtained by statistically analyzing the time consumed by the first process to execute the task. The time threshold can be set according to actual conditions or experience, and the specific value of the time threshold is not limited in the embodiment of the present application.
[0180] In a second possible implementation, when the first process finishes executing a task, the terminal device cancels the setting for the first process to run on the large core or the medium core.
[0181] Exemplarily, taking the first process as a system UI process, the terminal device may cancel the setting for the first process to run on the large core or the medium core when the system UI process is reconfigured based on the configuration information and the drawing is completed.
[0182] In a third possible implementation method, when the terminal device recognizes that the inner screen lighting process has ended, it cancels the setting for the first process to run on the large core or the medium core.
[0183] The terminal device can recognize that the inner screen lighting process ends when the backlight is turned on; or it can recognize that the inner screen lighting process ends when it recognizes that the terminal device is in the screen-on state. The embodiment of the present application does not limit the recognition conditions for the end of the inner screen lighting process.
[0184] It can be understood that the terminal device can control the time for the first process to run on the big core or the middle core through any of the three implementation methods mentioned above, and can also control the terminal device to set the time for the first process to run on the big core or the middle core through other implementation methods, which are not specifically limited here.
[0185] Based on the above embodiment, the terminal device may further adjust the priority of the second process.
[0186] In some embodiments, after adjusting the first process from the first priority to the second priority, the first process calls the second process; the terminal device adjusts the second process from the third priority to the second priority, and the second process is a process that responds to the call of the first process.
[0187] In this way, by adjusting the priority of the second process and reducing the waiting time of the second process, the time for the first process to call the second process can be shortened, the waiting time of the first process can be shortened, and the screen display time can be shortened, thereby improving the user experience.
[0188] Based on the above embodiment, the terminal device may further adjust the priority of the third process. The third process is dependent on the first process.
[0189] It is understandable that, due to the dependency between the third process and the first process, the lock in the third process cannot be eliminated, nor can the granularity of lock contention be further reduced.
[0190] In some embodiments, the terminal device adjusts the third process to the second priority.
[0191] Exemplarily, taking the first process as the system UI process as an example, the third process may be the Android UI process in the system server process.
[0192] This can speed up the execution of the lock-holding process, reduce the extra waiting overhead of the system UI process due to competing locks, and shorten the time taken to display the internal screen.
[0193] Based on the above embodiment, the terminal device may further delete the lock in the fourth process, or reduce the granularity of the lock related to the fourth process.
[0194] The fourth process may be the first process, or another process that uses the same lock as the first process, which is not limited here.
[0195] It is understandable that processes in the terminal device may enter a sleeping state due to waiting for locks, semaphores, etc. Therefore, the terminal device removes some locks to speed up the execution of the lock-rejecting process, thereby reducing the sleep time of the processes in the terminal device and shortening the time taken for the internal screen display process.
[0196] The display method provided in the embodiment of the present application is described below with reference to specific examples.
[0197] For example, FIG6 is a flow chart of a display method provided in an embodiment of the present application. Taking the first process as the system UI process as an example, the display method includes:
[0198] During the process of switching the terminal device from the screen-off folded state to the unfolded state, the terminal device detects that the angle of the folding screen is greater than or equal to the first threshold, triggering the screen-on process.
[0199] Specifically, the Hall sensor in the terminal device detects that the angle of the folding screen is greater than or equal to a first threshold. Adaptively, the terminal device reports the distance event to the sensor manager via the sensor driver and sensor hardware abstraction, triggering the screen light display process.
[0200] S601. The folding screen manager in the system server process of the terminal device recognizes a screen-off folding state expansion event based on a distance event.
[0201] In the embodiment of the present application, the expansion event in the screen-off folded state refers to: an expansion event identified when the terminal device is in the screen-off folded state.
[0202] S602: The folding screen manager in the system server process distributes a screen-off folding state expansion event to the system UI process.
[0203] After receiving the away event, the folding screen manager confirms that the terminal device is in the off state and identifies the off-screen folding state expand event. The system server process dispatches the off-screen folding state expand event.
[0204] S603: The system UI process receives a screen-off folding state expansion event.
[0205] S604: After receiving the screen-off folding state expansion event, the system UI process obtains its own identification information.
[0206] S605: The system UI process sends identification information of the system UI process to the system server process. Adaptively, the system server process receives the identification information of the system UI process.
[0207] S606: The system server process adjusts the system UI process from the first priority to the second priority based on the identification information.
[0208] The first priority and the second priority can refer to the description of the relevant content in the above S503, which will not be repeated here.
[0209] In this way, adjusting the priority of the system UI process so that the system UI process is scheduled to run first can reduce the proportion of time it is in the executable (runnable) state and increase the proportion of time it is in the running (running) state.
[0210] In summary, this can reduce the waiting time for the system UI process, which is often delayed due to factors such as low priority, and improve its execution speed. This can also reduce the time the system UI process spends in the runnable state, increase the time the system UI process spends in the running state, and shorten the screen-on time. Adjusting the priority of the system UI process shortens the time it takes to access CPU resources, thereby reducing the time it spends in the runnable state.
[0211] Based on the embodiment shown in FIG. 6 , the terminal device may further set the system UI process on the large core or the medium core while adjusting the priority of the system UI process.
[0212] In a possible implementation, the terminal device further executes S607.
[0213] S607: The system server process adjusts the system UI process to the large core or the medium core based on the identification information.
[0214] Specifically, the terminal device may also adjust the system UI process from the first CPU core to the second CPU core. When the first CPU core is a small core, the second CPU core is a large core or a medium core; when the first CPU core is a medium core, the second CPU core is a large core.
[0215] It can be understood that the system server process sets the system UI process to run on the big core or the medium core based on the identification information.
[0216] In this way, the system UI process runs on large or medium cores with better computing power, reducing the number of times it runs on small cores with poor computing power, allowing it to complete the rearrangement and redrawing according to the new configuration in less time.
[0217] Based on the embodiment shown in FIG. 6 , the terminal device further executes S608 .
[0218] S608: After a period of time, the terminal device cancels the priority adjustment of the first process and / or the affinity adjustment of the first process.
[0219] It is understandable that if the terminal device adjusts the priority of the first process, the terminal device cancels the priority adjustment of the first process after a period of time. If the terminal device adjusts the affinity of the first process, the terminal device cancels the affinity adjustment of the first process after a period of time.
[0220] Priority adjustment refers to adjusting the first process from the first priority to the second priority. Affinity adjustment refers to setting the first process to run on a large core or a medium core.
[0221] The following describes how to cancel the priority adjustment of the first process.
[0222] The terminal device adjusts the system UI process from the first priority to the second priority. After a period of time, the system UI process is adjusted from the second priority to the first priority.
[0223] In this way, the first process is scheduled first during the critical time period to shorten the screen display time and reduce interference with subsequent displays or other functions.
[0224] In a possible implementation manner 1, a time threshold is set, and after the time threshold, the first process is adjusted from the second priority to the first priority.
[0225] For example, at a first moment, the system server process adjusts the system UI process from the first priority to the second priority; at a second moment, the system server process adjusts the system UI process from the second priority to the first priority. The difference between the second moment and the first moment is the time threshold.
[0226] For example, the time threshold can be obtained by statistically analyzing the time consumed by the first process to execute the task. The time threshold can be set according to actual conditions or experience, and the specific value of the time threshold is not limited in the embodiment of the present application.
[0227] In a second possible implementation, when the system UI process finishes executing a task, the terminal device adjusts the priority of the first process from the second priority to the first priority.
[0228] The terminal device may set the first process to be adjusted from the second priority to the first priority when the system UI process is reconfigured based on the configuration information and the drawing is completed.
[0229] In the third possible implementation method, when the terminal device recognizes that the inner screen lighting process has ended, it sets the system UI process from the second priority to the first priority.
[0230] The terminal device can recognize that the inner screen lighting process ends when the backlight is turned on; or it can recognize that the inner screen lighting process ends when it recognizes that the terminal device is in the screen-on state. The embodiment of the present application does not limit the recognition conditions for the end of the inner screen lighting process.
[0231] It is understandable that the terminal device can control the time when the first process is the second priority through any of the above three implementation methods, and can also control the time when the first process is the second priority through other implementation methods, which are not specifically limited here.
[0232] It is understandable that, to cancel the adjustment of the affinity of the first process, reference may be made to the description of the corresponding content in FIG. 5 , or to the related content of canceling the adjustment of the priority of the first process, which will not be repeated here.
[0233] In this way, the first process can be set to have affinity with the medium and large cores during the critical time period, so that the first process runs on the medium and large cores during the time period when the inner screen is lit up after unfolding from the folded screen-off state.
[0234] Based on the above embodiment, the terminal device further executes S609.
[0235] S609: The system server process adjusts the Android UI process to the second priority.
[0236] It is understandable that there is a lock competition relationship between the Android UI process and the system UI process.
[0237] This can reduce the extra waiting overhead of the system UI process due to contention locks and shorten the time it takes to display the internal screen.
[0238] Based on the above embodiment, the terminal device may further delete the lock in the fourth process, or reduce the granularity of the lock related to the fourth process.
[0239] The fourth process may be the first process, or another process that uses the same lock as the first process, which is not limited here.
[0240] It is understandable that the process in the terminal device may enter a sleeping state due to waiting for locks, semaphores, etc. Therefore, the terminal device removes some locks to reduce the sleeping time of the process in the terminal device, thereby shortening the time consumption of the internal screen display process.
[0241] The following describes the interaction process of the internal modules of the terminal device with reference to Figure 7. As shown in Figure 7, the terminal device includes: sensor driver, sensor hardware abstraction, sensor manager, folding screen manager, system interface process, power manager and window manager. Taking the change of the angle of the terminal device from 0 degrees as an example, the interaction process includes:
[0242] S701: After the included angle of the folding screen is greater than a first threshold, the sensor driver generates a distance event based on a signal transmitted by the Hall sensor.
[0243] S702: The sensor driver reports the distance event to the sensor manager via the sensor hardware abstraction.
[0244] S703: After receiving the distance event, the sensor manager distributes the distance event to the folding screen manager.
[0245] S704: The folding screen manager determines that the terminal device switches from the folded state to the unfolded state based on the distance event and the current folding screen state, and generates an unfolding event.
[0246] S705: The folding screen manager distributes an expansion event to the power manager and the window manager.
[0247] S706: The folding screen manager sends an expansion event to the system UI process.
[0248] It is understandable that the terminal device may execute S705 and S706 simultaneously, or may execute S705 first and then S706. The embodiment of the present application does not limit the order in which the terminal device executes S705 and S706.
[0249] S707 . After receiving the expansion event, the system UI process sends identification information of the system UI process to the folding screen manager.
[0250] S708. The folding screen manager adjusts the system UI process from the first priority to the second priority based on the identification information of the system UI process.
[0251] S709. The folding screen manager adjusts the system UI process from the first CPU core to the second CPU core based on the identification information of the system UI process.
[0252] It is understandable that the terminal device may execute S708 and S709 simultaneously, or may execute S708 first and then S709. The embodiment of the present application does not limit the order in which the terminal device executes S708 and S709.
[0253] S710. After receiving the first message, the folding screen manager cancels the adjustment of the priority of the system UI process and the adjustment of the affinity.
[0254] The first message is used to indicate the end of the internal screen display process. The first message may include one or more of the following: a message from the power manager to indicate that the internal screen is turned on; a message from the window manager to indicate that the interface has been displayed. This is not limited here.
[0255] Specifically, after receiving the first message, the folding screen manager adjusts the system UI process from the second priority to the first priority; and adjusts the system UI process from the second CPU core to the first CPU core.
[0256] It is understandable that the folding screen manager can also cancel the priority adjustment and affinity adjustment of the system UI process after a preset time interval after adjusting the system UI process from the first priority to the second priority. The preset time interval can be the time threshold mentioned above, which is not detailed here.
[0257] Alternatively, after receiving the message indicating that the system UI process has ended, the folding screen manager cancels the adjustment of the priority and affinity of the system UI process.
[0258] In some embodiments, the folding screen manager can also adjust the priority and affinity of the Android UI process. The specific adjustment method can refer to the adjustment of the system UI process in S707-S710 above. No further details will be given here.
[0259] Adaptively, the Android UI process sends identification information of the Android UI process to the folding screen manager after receiving the expansion event.
[0260] This can reduce the waiting time of the system UI process, which is often delayed due to factors such as low priority, and improve its execution speed. This reduces the proportion of time the system UI process is in the runnable state, increases the proportion of time the system UI process is in the running state, and shortens the time the screen is displayed. Adjusting the priority of the system UI process shortens the time it takes to access CPU resources, thereby reducing the proportion of time it is in the runnable state.
[0261] In the embodiments shown in Figures 6 and 7 above, the system UI process must obtain and notify the system server process of its own identification information across processes, potentially increasing system load and scheduling overhead. Furthermore, the method shown in Figure 6 relies on the system server process to accurately detect and notify processes across processes, such as Android's Binder calls. Adding inter-process communication in this scenario increases system load and is time-consuming, depending on the timeliness of scheduling.
[0262] The embodiment of the present application provides another display method, which pre-stores the identification information of the system UI process locally. In this way, the system server process does not need to obtain the identification information through inter-process communication, reducing the communication load and increasing the timeliness guarantee.
[0263] For example, FIG8 is a flowchart of another display method provided by an embodiment of the present application. Taking the first process as the system UI process as an example, the display method includes:
[0264] During the process of switching the terminal device from the screen-off folded state to the unfolded state, the terminal device detects that the angle of the folding screen is greater than or equal to the first threshold, triggering the screen-on process.
[0265] Specifically, the Hall sensor in the terminal device detects that the angle of the folding screen is greater than or equal to a first threshold. Adaptively, the terminal device reports the distance event to the sensor manager via the sensor driver and sensor hardware abstraction, triggering the screen light display process.
[0266] S801. The folding screen manager in the system server process of the terminal device recognizes a screen-off folding state expansion event based on a distance event.
[0267] S802: The system server process adjusts the system UI process from a first priority to a second priority based on pre-stored identification information of the system UI process.
[0268] In this way, the priority of the system UI process is adjusted, the time it takes for the screen-lighting process to obtain CPU resources is shortened, and the proportion of time it is in the waiting (runnable) state is reduced.
[0269] Compared with the method shown in Figure 6, in the method shown in Figure 8, the folding screen manager in the system server process detects the scenario and can obtain the corresponding information from the local cache without obtaining identification information through inter-process communication, thereby reducing communication load and increasing timeliness.
[0270] Based on the above embodiment, the terminal device further executes S803-S805 to store the identification information of the system UI in the local cache.
[0271] S803. When the system server process starts, register a listener for database write events.
[0272] S804: When the system UI process is started, the identification information of the system UI is written into the database.
[0273] S805: The system server monitors and writes the identification information of the system UI into the database, and reads and saves the identification information of the system UI into the local cache.
[0274] This can reduce repeated reading of the database.
[0275] In some embodiments, if the system UI process restarts for some reason, the database is rewritten upon restart, triggering the system server's monitoring and updating of the local cache to ensure data consistency. If the system server restarts for some reason, the Android framework triggers a full Android restart and re-goes through the steps of registering for monitoring, writing data, and caching it locally to ensure data consistency.
[0276] It is understandable that the terminal device can also save the identification information of the system UI to the local cache in other ways, which are not limited here.
[0277] Based on the embodiment shown in FIG. 8 , the terminal device may further set the system UI process on the large core or the medium core while adjusting the priority of the system UI process.
[0278] Specifically, the terminal device may also adjust the system UI process from the first CPU core to the second CPU core. When the first CPU core is a small core, the second CPU core is a large core or a medium core; when the first CPU core is a medium core, the second CPU core is a large core.
[0279] In a possible implementation, the terminal device further executes S806.
[0280] S806: The system server process adjusts the system UI process to the large core or the medium core based on the identification information.
[0281] It can be understood that the system server process sets the system UI process to run on the big core or the medium core based on the identification information.
[0282] In this way, the system UI process runs on large or medium cores with better computing power, reducing the number of times it runs on small cores with poor computing power, allowing it to complete the rearrangement and redrawing according to the new configuration in less time.
[0283] Based on the embodiment shown in FIG. 8 , the terminal device further executes S807 .
[0284] S807: After a period of time, the terminal device cancels the priority adjustment of the first process and / or the affinity adjustment of the first process.
[0285] The specific method of S807 can refer to the corresponding description of S608 above, which will not be repeated here.
[0286] Based on the above embodiment, the terminal device further executes S808.
[0287] S808. The system server process adjusts the Android UI process to the second priority.
[0288] It is understandable that there is a lock competition relationship between the Android UI process and the system UI process.
[0289] This can reduce the extra waiting overhead of the system UI process due to contention locks and shorten the time it takes to display the internal screen.
[0290] Based on the above embodiment, the terminal device may further delete the lock in the fourth process, or reduce the granularity of the lock related to the fourth process.
[0291] The fourth process may be the first process, or another process that uses the same lock as the first process, which is not limited here.
[0292] It is understandable that the process in the terminal device may enter a sleeping state due to waiting for locks, semaphores, etc. Therefore, the terminal device removes some locks to reduce the sleeping time of the process in the terminal device, thereby shortening the time consumption of the internal screen display process.
[0293] The following describes the interaction process of the internal modules of the terminal device with reference to Figure 9. As shown in Figure 9, the terminal device includes: sensor driver, sensor hardware abstraction, sensor manager, folding screen manager, system interface process, power manager and window manager. Taking the change of the angle of the terminal device from 0 degrees as an example, the interaction process includes:
[0294] S901. When the folding screen manager starts, it registers a listener for database write events.
[0295] S902: When the system UI process is started, the identification information of the system UI is written into the database.
[0296] S903: The system server process monitors the database write event, obtains the identification information of the system UI from the database, and saves it to the local cache.
[0297] S904: After the included angle of the folding screen is greater than the first threshold, the sensor driver generates a distance event based on the signal transmitted by the Hall sensor.
[0298] S905: The sensor driver reports the distance event to the sensor manager via the sensor hardware abstraction.
[0299] S906: After receiving the distance event, the sensor manager distributes the distance event to the folding screen manager.
[0300] S907. The folding screen manager determines that the terminal device switches from the folded state to the unfolded state based on the distance event and the current folding screen state, and generates an unfolding event.
[0301] S908: The folding screen manager distributes an expansion event to the power manager and the window manager.
[0302] S909. The folding screen manager adjusts the system UI process from the first priority to the second priority based on the identification information of the system UI process.
[0303] S910. The folding screen manager adjusts the system UI process from the first CPU core to the second CPU core based on the identification information of the system UI process.
[0304] It is understandable that the terminal device may execute S909 and S910 simultaneously, or may execute S909 first and then S910. The embodiment of the present application does not limit the order in which the terminal device executes S909 and S910.
[0305] S911. After receiving the first message, the folding screen manager cancels the adjustment of the priority of the system UI process and the adjustment of the affinity.
[0306] The first message is used to indicate the end of the internal screen display process. The first message may include one or more of the following: a message from the power manager to indicate that the internal screen is turned on; a message from the window manager to indicate that the interface has been displayed. This is not limited here.
[0307] Specifically, after receiving the first message, the folding screen manager adjusts the system UI process from the second priority to the first priority; and adjusts the system UI process from the second CPU core to the first CPU core.
[0308] It is understandable that the folding screen manager can also cancel the priority adjustment and affinity adjustment of the system UI process after a preset time interval after adjusting the system UI process from the first priority to the second priority. The preset time interval can be the time threshold mentioned above, which is not detailed here.
[0309] Alternatively, after receiving the message indicating that the system UI process has ended, the folding screen manager cancels the adjustment of the priority and affinity of the system UI process.
[0310] In some embodiments, the folding screen manager can also adjust the priority and affinity of the Android UI process. For details, please refer to the relevant processing and adjustment of the system UI process in S902, S903, S909-S911 above. No further details will be given here.
[0311] This can reduce the waiting time of the system UI process, which is often delayed due to factors such as low priority, and improve its execution speed. This reduces the proportion of time the system UI process is in the runnable state, increases the proportion of time the system UI process is in the running state, and shortens the time the screen is displayed. Adjusting the priority of the system UI process shortens the time it takes to access CPU resources, thereby reducing the proportion of time it is in the runnable state.
[0312] It is understandable that the above embodiment shortens the time it takes for the screen of the terminal device to light up and display by identifying the scenario of the terminal device switching from the folded state with the screen off to the unfolded state, and by adjusting the priority and affinity of the relevant processes in the scenario. The terminal device can also identify other scenarios and adjust the priority and affinity of the relevant processes in the corresponding scenarios to reduce the waiting time of processes that cannot be scheduled due to low priority, thereby improving the running speed and user experience. Other scenarios may be switching from the unfolded state to the folded state, from the folded state with the screen on to the unfolded state, etc., which are not limited here.
[0313] It should be noted that the above embodiments are all based on the example of a terminal device with a foldable screen that can be folded twice on the left and right sides, and the terminal device having two states: a folded state and an unfolded state. In possible implementations, the foldable screen can also be a foldable screen that can be folded three times or four times (not shown in the figure). The terminal device can also have three states: a folded state, a transitional state, and an unfolded state.
[0314] Exemplarily, the folding screen may be a folding screen that can achieve N folds, where N is an integer greater than or equal to 2.
[0315] It should be noted that the "at..." in the embodiments of the present application can be the instant when a certain situation occurs, or it can be a period of time after the situation occurs, and the embodiments of the present application do not specifically limit this. In addition, the display interface provided in the embodiments of the present application is only an example, and the display interface can also include more or less content.
[0316] The display method of the embodiment of the present application has been described above. The following describes the device for performing the above display method provided in the embodiment of the present application. Those skilled in the art will understand that the method and device can be combined and referenced with each other, and the terminal device provided in the embodiment of the present application can perform the steps in the above display method.
[0317] As shown in FIG10 , FIG10 is a schematic structural diagram of a display device provided in an embodiment of the present application. The display device may be a terminal device in an embodiment of the present application, or a chip or chip system in a terminal device.
[0318] As shown in FIG10 , a display device 2100 can be used in a communication device, circuit, hardware component, or chip, and includes a display unit 2101 and a processing unit 2102. The display unit 2101 is used to support the display step performed by the display device 2100; the processing unit 2102 is used to support the information processing step performed by the display device 2100.
[0319] In a possible implementation, the display device 2100 may also include a communication unit 2103. Specifically, the communication unit is used to support the display device 2100 in executing the steps of sending and receiving data. The communication unit 2103 may be an input or output interface, pin, or circuit.
[0320] In a possible embodiment, the display device may further include a storage unit 2104. The processing unit 2102 and the storage unit 2104 are connected via a circuit. The storage unit 2104 may include one or more memories, which may be devices in one or more devices or circuits for storing programs or data. The storage unit 2104 may exist independently and be connected to the processing unit 2102 of the display device via a communication circuit. The storage unit 2104 may also be integrated with the processing unit 2102.
[0321] The storage unit 2104 can store computer-executable instructions for the method in the terminal device, so that the processing unit 2102 executes the method in the above embodiment. The storage unit 2104 can be a register, a cache, or a RAM, etc. The storage unit 2104 can be integrated with the processing unit 2102. The storage unit 2104 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions. The storage unit 2104 can be independent of the processing unit 2102.
[0322] The display method provided in the embodiments of the present application can be applied to electronic devices with foldable screens. The electronic devices include terminal devices. The specific device form of the terminal device can refer to the above-mentioned relevant descriptions and will not be repeated here.
[0323] For example, Figure 11 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 180, and a display screen 194. The sensor module 180 may include at least: an angle sensor 180A, a gyroscope sensor 180B, a touch sensor 180C, and a posture sensor 180D.
[0324] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0325] The processor 110 may include one or more processing units. The different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.
[0326] USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. USB interface 130 can be used to connect a charger to charge the terminal device, or to transfer data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices.
[0327] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110.
[0328] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0329] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. The antennas in a terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0330] Mobile communication module 150 can provide wireless communication solutions for terminal devices, including 2G / 3G / 4G / 5G. It can include at least one filter, switch, power amplifier, and low-noise amplifier (LNA). Mobile communication module 150 receives electromagnetic waves from antenna 1, filters and amplifies the received electromagnetic waves, and transmits them to the modem processor for demodulation.
[0331] The wireless communication module 160 can provide wireless communication solutions applied to terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.
[0332] The terminal device implements display functions through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.
[0333] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. In some embodiments, the terminal device may include one or N display screens 194, where N is a positive integer greater than 1. In the embodiment of the present application, the display screen 194 may be a foldable screen or a large screen.
[0334] In some embodiments, the folding screen can be a folding screen that can be folded in two, three or four directions, or a folding screen that can be folded in three or four directions (not shown in the figure). For example, the folding screen can be a folding screen that can be folded in two directions.
[0335] The folding screen state may include two states: folded state and unfolded state; the folding screen state may also include three states: folded state, transition state and unfolded state.
[0336] In some embodiments, the display screen 194 may also be an external screen of the terminal device. The understanding of the external screen can refer to the introduction of the external screen in the above embodiment, and will not be repeated here. In some embodiments, the display screen 194 may also be an internal screen of the terminal device. The understanding of the internal screen can refer to the introduction of the internal screen in the above embodiment, and will not be repeated here.
[0337] 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 terminal device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0338] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 can include a program storage area and a data storage area.
[0339] Angle sensor 180A is used to measure angles. In the embodiment of the present application, when the terminal device is a foldable screen mobile phone, angle sensor 180A is used to determine the folding angle of the foldable screen mobile phone. Angle sensor 180A can be a Hall sensor.
[0340] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device. In the embodiment of the present application, the gyroscope sensor 180B can be used to determine the horizontal screen state or the vertical screen state of the terminal device. When the terminal device is a foldable screen mobile phone, the gyroscope sensor 180B can also be used to determine the upper half or lower half of the foldable screen mobile phone.
[0341] The touch sensor 180C can be disposed on the display screen 194, and the touch sensor 180C and the display screen 194 form a touch screen, or "touch screen." In the embodiment of the present application, the touch sensor 180C is used to receive user touch operations on the touch screen, such as receiving user operations to launch a video application, launch a short video application, or trigger a function control in an application.
[0342] The posture sensor 180D is used to monitor the posture of the terminal device. An embodiment of the present application provides an electronic device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the above method.
[0343] The present embodiment provides a chip. The chip includes a processor configured to invoke a computer program stored in a memory to execute the technical solution of the above embodiment. The implementation principles and technical effects are similar to those of the above-mentioned related embodiments and will not be further described here.
[0344] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the above-mentioned method is implemented. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.
[0345] In one possible implementation, computer-readable media may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium designed to carry or store the desired program code in the form of instructions or data structures and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include optical disc, laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0346] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.
[0347] The present application embodiment is described with reference to the flow chart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processing unit of general-purpose computer, special-purpose computer, embedded processing machine or other programmable device to produce a machine, so that the instruction executed by the processing unit of computer or other programmable data processing device produces the device for realizing the function specified in one flow chart flow or multiple flows and / or one block or multiple blocks of block diagram.
[0348] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0349] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.
Claims
1. A display method, characterized in that Applied to a terminal device, the terminal device includes an external display screen and an internal display screen, and the states of the terminal device include a folded state and an unfolded state. The method includes: When the terminal device is in the folded state and the external display screen is turned off, and an unfolding event is recognized, the unfolding event is used to indicate that the terminal device switches from the folded state to the unfolded state; When the terminal device recognizes the unfolding event, it obtains the identification information of a first process, and the first process is a process related to the display of the internal display screen in the terminal device; The terminal device adjusts the first process from a first priority level to a second priority level based on the identification information of the first process, and the second priority level is higher than the first priority level; The terminal device schedules the first process to run based on the second priority level; After the first process finishes running, the terminal device lights up the internal display screen and displays an interface on the internal display screen.
2. The method according to claim 1, wherein When the terminal device recognizes the unfolding event, obtaining the identification information of the first process includes: When the terminal device calls the first process, it obtains the identification information of the first process.
3. The method according to claim 1, characterized in that, When the terminal device recognizes the unfolding event, obtaining the identification information of the first process includes: When the terminal device recognizes the unfolding event, it reads the identification information of the first process from the local cache.
4. The method according to claim 3, characterized in that, Before the terminal device recognizes the unfolding event when it is in the screen-off folded state, the method further includes: When the first process is started, the terminal device writes the identification information of the first process into a database; When the terminal device monitors that the identification information of the first process is written into the database, it stores the identification information of the first process into the local cache.
5. The method according to any one of claims 1 to 4, characterized in that, The first process includes: a system interface process, and the system interface process is used to draw the interface.
6. The method according to any one of claims 1-5, characterized in that, After the first process finishes running, the method further includes: The terminal device adjusts the first process from the second priority level to the first priority level.
7. The method according to claim 6, characterized in that, The first process is a system interface process; The terminal device adjusts the first process from the second priority level to the first priority level, including: When the first process finishes drawing the interface, the terminal device adjusts the first process from the second priority level to the first priority level.
8. The method according to any one of claims 1-5, characterized in that, The method further includes: After a preset time interval after adjusting the first process from the first priority level to the second priority level, the first process is adjusted from the second priority level to the first priority level.
9. The method according to any one of claims 1-5, characterized in that, The method further includes: When the internal display screen of the terminal device is lit up, the terminal device adjusts the first process from the second priority level to the first priority level.
10. The method according to any one of claims 1-9, characterized in that, The processor CPU of the terminal device includes multiple cores, and the method further includes: The terminal device adjusts the first process from a first CPU core to a second CPU core, and the computing power of the second CPU core is greater than that of the first CPU core.
11. The method according to any one of claims 1-10, characterized in that, The method further includes: After adjusting the first process from the first priority level to the second priority level, the first process calls a second process; The terminal device adjusts the second process from the third priority to the second priority, where the second process is a process called in response to the first process.
12. The method according to any one of claims 1 to 11, characterized in that, The method further includes: The terminal device adjusts a third process from the fourth priority to the second priority, where the third process has a dependency relationship with the first process.
13. The method according to any one of claims 1-12, characterized in that, The method further includes: The terminal device deletes the lock in a fourth process; the fourth process is the first process and / or a process that uses the same lock as the first process.
14. A terminal device, characterized in that, Including: A processor and a memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the terminal device executes the method according to any one of claims 1-13.
15. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the method according to any one of claims 1-13.