A multi-window display method, electronic device and readable storage medium

CN122924628APending Publication Date: 2026-10-16HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510413366.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

然而,多窗口显示技术在带来交互便利的同时,也产生了新问题,特别是在硬件空间极为有限的高精密设备如手机上

Benefits of technology

[0057]本申请提供的第二方面至第六方面的技术效果可以参见上述第一方面的各个可能的实现方式的技术效果,此处不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122924628A_ABST
    Figure CN122924628A_ABST
Patent Text Reader

Abstract

The application provides a multi-window display method, an electronic device and a readable storage medium, relates to the technical field of terminals, and can meet the multi-window display requirement while effectively reducing system power consumption. The multi-window display method is applied to an electronic device, and comprises the following steps: displaying a plurality of windows, wherein the plurality of windows comprise a first window and a second window, a first graphical user interface is displayed in the first window, and a first image is displayed in the second window; and in response to a user operation, the first image displayed in the second window is modified into a second graphical user interface, and / or the first graphical user interface displayed in the first window is modified into a second image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a multi-window display method, electronic device, and readable storage medium. Background Technology

[0002] With the development of electronic devices and the gradual improvement of human-computer interaction, foreground multi-window display technology has emerged. Foreground multi-window display technology is a technology that can display multiple windows on a display screen, such as free-form window tasks on computers, and split-screen tasks and floating window tasks on mobile phones and tablets. Users can use this to quickly switch between applications and coordinate operations, greatly improving operational efficiency and convenience. However, while bringing convenience to interaction, multi-window display technology has also created new problems, especially on high-precision devices with extremely limited hardware space, such as mobile phones. The system needs to operate under high load for extended periods to maintain the display of multiple windows on the screen, which leads to increased central processing unit (CPU) temperature and excessive power consumption, seriously affecting the user experience. Therefore, how to meet the needs of multi-window display while minimizing system power consumption has become an urgent problem to be solved. Summary of the Invention

[0003] This application provides a multi-window display method, an electronic device, and a readable storage medium, which can effectively reduce system power consumption while meeting the multi-window display requirements.

[0004] To achieve the above objectives, this application adopts the following technical solution:

[0005] In a first aspect, this application provides a multi-window display method applied to an electronic device. The method includes: displaying multiple windows, the multiple windows including a first window and a second window, the first window displaying a first graphical user interface and the second window displaying a first image; in response to a user operation, modifying the first image displayed in the second window to a second graphical user interface and / or modifying the first graphical user interface displayed in the first window to a second image.

[0006] Based on the multi-window display method provided in this application, when multiple windows are displayed in an electronic device, the first window displays a first graphical user interface that can maintain interactivity, while the second window uses a first image to replace the second graphical user interface that originally needed to be rendered in real time. This transforms the window-level dynamic refresh operation, which originally required continuous computational power, into a single, static graphics processing operation (such as a screenshot operation), which can greatly reduce the increased computational resources and power consumption due to interface rendering, thereby effectively reducing the overall power consumption during multi-window display.

[0007] Furthermore, the electronic device can respond to user actions by changing the first image displayed in the second window to a second graphical user interface. This allows users to interact with the electronic device through the first graphical user interface in the first window, or, when needed, interact with the second graphical user interface displayed in the second window based on user actions. This flexible, dynamic switching mechanism satisfies users' interaction needs in multi-window mode while reducing the number of windows rendered in real-time, avoiding unnecessary performance consumption and improving the user experience.

[0008] It should be understood that the first window, also known as the interest window or the main window, refers to the application window that is in focus (or in a focused state) on the display area of ​​the electronic device. Users can interact with the corresponding application through the interface content displayed in the first window, and this interface content needs to be continuously rendered and updated.

[0009] The second window, also known as a non-interest window or secondary window, refers to an application window that is not in focus on the display area of ​​an electronic device. The interface content displayed in this second window may be for display purposes only; that is, the interface content may be static and may not be used for user interaction.

[0010] Of course, in some embodiments, the second window can also refer to an application window that is not displayed at all in the display area of ​​the electronic device. For example, a window corresponding to an application that is continuously rendered in the background but whose rendered interface is not displayed on the electronic device.

[0011] In some embodiments, the first window and the second window can be distinguished based on the display size of the application window in the display area of ​​the electronic device.

[0012] The number of first windows in a multi-window application can be one or more; the number of second windows can also be one or more.

[0013] The first graphical user interface can be called the first interactive graphical user interface or window layer. The first graphical user interface can be understood as the user interface or view formed after being rendered by the rendering thread corresponding to the application window layer.

[0014] It is not difficult to understand that a first graphical user interface can display at least one interface element, such as images, text, and controls.

[0015] Similarly, the second graphical user interface can also be called the second interactive graphical user interface. It can refer to the user interface formed after being rendered by the rendering thread in the first application thread corresponding to the second window. The second graphical user interface can also display at least one interface element such as images, text, and controls.

[0016] It is easy to understand that user operations can include at least one of the following: user swiping on the first window, user swiping on the second window, user clicking or double-clicking on the second window.

[0017] In one possible implementation of the first aspect, the first image includes any one of a first preset image, a first sample image, and a screenshot corresponding to the second graphical user interface, wherein the first sample image is generated based on the application icon of the first application corresponding to the second window;

[0018] And / or, the second image includes any one of a second preset image, a second sample image, or a screenshot corresponding to the first graphical user interface, wherein the second sample image is generated based on the application icon of the second application corresponding to the first window.

[0019] It's easy to understand that the first sample image can consist of the application icon of the first application corresponding to the second window and a solid color background. Similarly, the second sample image can also consist of the application icon of the second application corresponding to the first window and a solid color background.

[0020] Optionally, if the second graphical user interface involves user privacy, the first image may be a first sample image.

[0021] Optionally, the first image and the second image can be any sample image. This application does not specifically limit the display content of the first image and the second image in its embodiments.

[0022] It should be understood that when user privacy is involved and it is impossible to obtain a screenshot corresponding to the graphical user interface, using a preset image or sample image as the first image (or second image) can effectively avoid the problem of abnormal display of the second window (or first window).

[0023] In one possible implementation of the first aspect, the method for determining that the first graphical user interface is displayed in the first window and the first image is displayed in the second window includes: a window manager service (WMS) module controlling the visibility of the first graphical user interface in the application window layer and the visibility of the second graphical user interface; the WMS module controlling the visibility of the first image in the mask window layer and the visibility of the second image corresponding to the first graphical user interface; the application window layer and the mask window layer are superimposed to form the first graphical user interface displayed in the first window and the first image displayed in the second window.

[0024] In one possible implementation of the first aspect, the method further includes: the WMS module sending a first notification to the activity manager service (AMS) module, the first notification indicating the visibility of the graphical user interface corresponding to each of the plurality of windows; the AMS module switching the lifecycle of a first application corresponding to the second window from a pause state to a resume state, and / or switching the lifecycle of a second application corresponding to the first window from a resume state to a pause state, according to the first notification.

[0025] The visibility of the graphical user interface corresponding to each window can also be understood as the visibility of the graphical user interface corresponding to each window at the application window layer.

[0026] In one possible implementation of the first aspect, the method further includes: the AMS module sending a second notification to the power-saving module, the second notification indicating the visibility of the graphical user interface corresponding to each of the plurality of windows; the power-saving module sending a defrost command to a first application process corresponding to the second window according to the second notification, the defrost command switching the state of the first application process from a frozen state to a defrost state; and / or sending a freeze command to a second application process corresponding to the first window, the freeze command switching the state of the first application process from a defrost state to a frozen state.

[0027] In one possible implementation of the first aspect, the method further includes: after the rendering thread corresponding to the second window performs a rendering operation, the WMS module controls the first image in the mask window layer to be invisible.

[0028] In one possible implementation of the first aspect, the WMS module sends a refresh request to the user interface (UI) thread in the second application process corresponding to the first window; the UI thread performs measurement and layout operations sequentially according to the refresh request and the vertical synchronization pulse (Vsync) signal; the UI thread obtains the visibility of the first graphical user interface; the UI thread stops performing drawing operations after the layout operation according to the visibility of the first graphical user interface.

[0029] In one possible implementation of the first aspect, before the UI thread stops performing drawing operations after the layout operation based on the visibility of the first graphical user interface, the method further includes: the WMS module controlling the visibility of the second image in the mask window layer.

[0030] Secondly, this application provides a multi-window display device, the device comprising:

[0031] A display unit is used to display multiple windows, including a first window and a second window, wherein a first graphical user interface is displayed in the first window and a first image is displayed in the second window;

[0032] The modification unit is configured to, in response to a user operation, modify the first image displayed in the second window to a second graphical user interface and / or modify the first graphical user interface displayed in the first window to a second image.

[0033] In one possible implementation of the second aspect, the first image includes any one of a first preset image, a first sample image, and a screenshot corresponding to the second graphical user interface, wherein the first sample image is generated based on the application icon of the first application corresponding to the second window.

[0034] And / or, the second image includes any one of a second preset image, a second sample image, or a screenshot corresponding to the first graphical user interface, wherein the second sample image is generated based on the application icon of the second application corresponding to the first window.

[0035] In one possible implementation of the second aspect, the method for determining whether to display a first graphical user interface in the first window and a first image in the second window includes:

[0036] The Window Management Service (WMS) module controls the visibility of the first graphical user interface (GUI) and the visibility of the second GUI in the application window layer; the WMS module also controls the visibility of the first image and the visibility of the second image corresponding to the first GUI in the masked window layer.

[0037] The application window layer and the mask window layer are superimposed to form the first graphical user interface displayed in the first window and the first image displayed in the second window.

[0038] In one possible implementation of the second aspect, the device further includes:

[0039] The WMS module sends a first notification to the Activity Management Service (AMS) module, the first notification being used to indicate the visibility of the graphical user interface corresponding to each of the multiple windows;

[0040] According to the first notification, the AMS module switches the lifecycle of the first application corresponding to the second window from the pause state to the resume state, and / or switches the lifecycle of the second application corresponding to the first window from the resume state to the pause state.

[0041] In one possible implementation of the second aspect, the device further includes:

[0042] The AMS module sends a second notification to the power-saving module, the second notification being used to indicate the visibility of the graphical user interface corresponding to each of the multiple windows;

[0043] According to the second notification, the power-saving module sends a defrost command to the first application process corresponding to the second window, the defrost command being used to switch the state of the first application process from frozen state to defrost state; and / or sends a freeze command to the second application process corresponding to the first window, the freeze command being used to switch the state of the first application process from defrost state to frozen state.

[0044] In one possible implementation of the second aspect, the apparatus further includes: after the rendering thread corresponding to the second window performs a rendering operation, the WMS module controls the first image in the mask window layer to be invisible.

[0045] In one possible implementation of the second aspect, the device further includes:

[0046] The WMS module sends a refresh request to the user interface (UI) thread in the second application process corresponding to the first window;

[0047] The UI thread executes measurement and layout operations sequentially based on the refresh request and the vertical synchronization pulse Vsync signal;

[0048] The UI thread obtains the visibility of the first graphical user interface;

[0049] The UI thread stops executing the drawing operations after the layout operation based on the visibility of the first graphical user interface.

[0050] It should be understood that once the UI thread stops drawing, the subsequent rendering thread will also stop rendering. This allows for a significant reduction in the resources and power consumed by drawing and rendering by controlling whether the content displayed in the first window is drawn and rendered, thus greatly optimizing system power consumption.

[0051] In one possible implementation of the second aspect, before the UI thread stops executing the drawing operation following the layout operation based on the visibility of the first graphical user interface, the apparatus further includes:

[0052] The WMS module controls the visibility of the second image in the mask window layer.

[0053] Thirdly, this application provides an electronic device including a processor and a memory, the memory for storing a computer program, and the processor for calling and running the computer program from the memory, causing the electronic device to perform the methods described in the first aspect and various possible implementations of the first aspect.

[0054] Fourthly, this application provides a chip system including a processor that executes a computer program stored in a memory to implement the method in any possible implementation of the first aspect.

[0055] Fifthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method in any possible implementation of the first aspect.

[0056] In a sixth aspect, this application provides a computer program product including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method in any possible implementation of the first aspect.

[0057] The technical effects of the second to sixth aspects provided in this application can be found in the technical effects of the various possible implementations of the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0058] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0059] Figure 2 This is a flowchart corresponding to a multi-window display method provided in an embodiment of this application.

[0060] Figure 3 This is a schematic diagram of a scenario in which three windows are displayed in the display area of ​​an electronic device, as provided in an embodiment of this application.

[0061] Figure 4 This is a schematic diagram of another scenario where three windows are displayed in the display area of ​​an electronic device, as provided in an embodiment of this application.

[0062] Figure 5 This is a schematic diagram of another scenario where three windows are displayed in the display area of ​​an electronic device, as provided in this application embodiment.

[0063] Figure 6 This is a schematic diagram of another scenario where three windows are displayed in the display area of ​​an electronic device, as provided in an embodiment of this application.

[0064] Figure 7 This is a schematic diagram of a structure corresponding to the multi-window display principle provided in an embodiment of this application.

[0065] Figure 8 This is a schematic diagram of the principle structure of displaying multiple windows provided in an embodiment of this application.

[0066] Figure 9 This is a schematic diagram related to transformation processing provided in an embodiment of this application.

[0067] Figure 10 This is a schematic diagram of a user operation scenario provided in an embodiment of this application.

[0068] Figure 11 This is a schematic diagram of a scenario where a user operation involves multiple operations, as provided in an embodiment of this application.

[0069] Figure 12 This is a flowchart illustrating the process of controlling the lifecycle during multi-window display, as provided in an embodiment of this application.

[0070] Figure 13 This is a schematic diagram illustrating another process for controlling the lifecycle during multi-window display provided in this application embodiment.

[0071] Figure 14 This is a schematic diagram of the lifecycle of an application from startup to shutdown in the prior art provided in the embodiments of this application.

[0072] Figure 15 This is a flowchart illustrating the freezing or thawing of an application process in a multi-window display method provided in this application embodiment.

[0073] Figure 16 This is a schematic diagram of a WMS module, a power-saving module, and an interaction scenario between multiple windows provided in an embodiment of this application.

[0074] Figure 17 This is a flowchart illustrating the optimized rendering mechanism in a multi-window display method provided in this application embodiment.

[0075] Figure 18 This is a schematic diagram of an interactive process for reducing power consumption through an optimized rendering mechanism provided in an embodiment of this application.

[0076] Figure 19 This is a schematic diagram of the structure of a multi-window display device provided in an embodiment of this application. Detailed Implementation

[0077] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings and related embodiments. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0078] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0079] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0080] With the development of electronic devices and the gradual improvement of human-computer interaction, multi-window display technology has emerged. This technology allows the system to run multiple application windows simultaneously in the foreground of the display screen, such as free window tasks on a computer, and split-screen tasks and floating window tasks on mobile phones and tablets. Users can use this to quickly switch between applications and coordinate operations, greatly improving operational efficiency and convenience. However, while this new form of multi-window display technology brings interactive convenience, it also creates new problems, especially on high-precision devices with extremely limited hardware space, such as mobile phones. The system needs to operate under high load for a long time to maintain the display of multiple windows on the screen, which leads to increased CPU temperature and excessive power consumption, seriously affecting the user experience. Therefore, how to meet the requirements of smooth multi-window display while minimizing system power consumption has become an urgent problem to be solved.

[0081] In existing technologies, temporarily inactive background application processes can be set to a low-power state based on their priority, pausing their execution while retaining their memory data. This allows background application processes to be quickly resumed when the user uses the application, avoiding frequent process restarts that would consume excessive system resources and power, such as CPU and sensors. Operating systems typically categorize application processes based on priority into several main types: background applications, previous applications, home screen applications, services, observable applications, foreground applications, persistent services, system processes, and native processes, with priority increasing sequentially.

[0082] Background applications can refer to inactive, historically running applications.

[0083] The previous application mainly refers to the most recently used or most recently used background application.

[0084] The home screen application mainly refers to the system launcher. The launcher is mainly responsible for managing the main interface for user interaction with electronic devices. Terminating the launcher will cause the wallpaper interface of the electronic device to disappear.

[0085] Services can refer to the background services that correspond to the application, such as cloud services or cloud synchronization operations.

[0086] Aware applications refer to application processes that are not fully displayed in the foreground but can be perceived, such as the application process of an application displayed in a floating window, or the application process corresponding to an application that is playing audio and / or video.

[0087] Foreground applications mainly refer to applications that are currently being used.

[0088] Persistent services can refer to some core service functions in electronic devices, such as calling functions, wireless fidelity (Wi-Fi), etc.

[0089] System processes refer to those processes within the operating system that manage hardware, resources, and core services. Termination of a system process will lead to system errors. Native processes, on the other hand, are irreplaceable core processes provided by the operating system. Native processes are essential components for maintaining the normal operation of the operating system.

[0090] In specific application scenarios where multiple application windows (hereinafter referred to as foreground multiple windows) are displayed on the screen of an electronic device, all multiple application windows belong to the foreground applications mentioned above during the display process. From the perspective of application process priority, the multiple application windows have the same priority, that is, the application processes corresponding to the multiple application windows have no priority. Therefore, the existing technology mentioned above cannot be used. In other words, it is impossible to set the foreground application processes corresponding to multiple windows to a low-power state to avoid the consumption of system resources and power based on the application process priority.

[0091] Furthermore, existing technologies can utilize dynamic frame rate adjustment to reduce system resource consumption and optimize system resource utilization by dynamically adjusting the frame rate. Specifically, specific refresh rates can be set for different windows or views based on the application interface type. For example, during program development, developers can use the WMS to call the application programming interface (API) corresponding to the setFrameRate() function to set the refresh rate of static interfaces (such as static e-book reading) to 30 Hz, the refresh rate of low-dynamic interfaces (such as standby mode) to 1 Hz, and the refresh rate of high-dynamic game interfaces (such as game interfaces) to 120 Hz. While the above method can avoid excessive consumption of system resources and power, it is only applicable to electronic devices that support dynamic frame rate adjustment. Electronic devices that do not support dynamic frame rate adjustment cannot use this method, creating new compatibility issues and greatly limiting the specific types of electronic devices that can be used.

[0092] In applications with multiple windows displayed in the foreground, users can quickly switch between different applications. However, when users frequently interact with multiple windows using the method described above, the frequent refreshes of different frame rates can cause visible interruptions or blackouts during the switching process. The greater the refresh rate difference between the windows, the more pronounced the interruptions and blackouts become. This compromises the visual smoothness of rapid switching between multiple windows in the foreground, significantly reducing the user experience.

[0093] To address the aforementioned issues, this application provides a multi-window display method. This method involves displaying a first graphical user interface (GUI) for dynamic interaction in a first window and a first image for static display in a second window, thereby reducing the computational and energy consumption overhead of real-time rendering. Furthermore, the electronic device can respond to user actions by modifying the first image displayed in the second window to the corresponding second GUI and / or modifying the first GUI in the first window to the second image. This design significantly reduces system power consumption by reducing the number of simultaneously rendered dynamic windows without affecting the multi-window display.

[0094] The multi-window display method provided in this application can be applied to electronic devices. Exemplary examples include, but are not limited to, personal computers (PCs), smartphones, netbooks, tablets, smart cameras, wearable devices, handheld computers, smart TVs, personal digital assistants (PDAs), portable multimedia players (PMPs), projection devices, smart screen devices, augmented reality (AR) / virtual reality (VR) devices, mixed reality (MR) devices, in-vehicle devices, smart screens, cloud servers, televisions, or motion-sensing game consoles in human-computer interaction scenarios. This application does not impose any limitations on the specific type of electronic device.

[0095] See Figure 1This is a schematic diagram of the structure of an electronic device 100 provided in this application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 131, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0096] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0097] For example, when the electronic device 100 is a mobile phone or a tablet computer, it may include all the components shown in the figure, or it may include only some of the components shown in the figure.

[0098] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0099] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0100] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0101] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0102] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU performs mathematical and geometric calculations and is used for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information. The display screen 194 is used to display images, videos, etc.

[0103] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0104] Internal memory 131 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 131. Internal memory 131 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback, image playback, etc.). The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.).

[0105] In addition, the internal memory 131 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0106] The multi-window display method provided in this application embodiment will be described in detail below with reference to the corresponding flowchart and specific application scenarios.

[0107] The multi-window display method provided in this application can be applied to scenarios including, but not limited to, split-screen tasks and floating window tasks. This application does not limit the specific application scenarios.

[0108] Split-screen tasks refer to a user simultaneously opening and operating multiple applications on the display screen of an electronic device. The interfaces of multiple applications are displayed side by side in a split-screen format, supporting interactive operations such as window scaling, position swapping, and content dragging.

[0109] For example, to compare prices of the same product, a user can simultaneously open application A, application B, and application C. The user interfaces of the three applications can be displayed on the screen at the same time, and the user can switch between different application interfaces to view the price of the product in different applications. As another example, a user can simultaneously open game application A, social application B, and browser application C on an electronic device (such as a computer). The user can switch between different application windows, allowing them to chat with friends using social application B while playing a game in the background, and then browse game strategy information on browser application C.

[0110] A floating window task refers to displaying other applications in a movable and resizable floating window above the current application interface, enabling quick switching between multiple tasks.

[0111] For example, a user can launch video playback application A to open the video playback page. At the same time, a chat window corresponding to social application B can be displayed floating in the playback interface of application A, so that the user can chat with friends through the chat window between watching the video.

[0112] like Figure 2 The diagram shows a flowchart of a multi-window display method according to an embodiment of this application. This multi-window display method 200 can be executed by an electronic device, specifically by a module (e.g., a processor, chip, or chip system) within the electronic device; it can also be implemented by a logic module or software capable of performing all or part of the functions.

[0113] See Figure 2 The multi-window display method 200 mainly includes the following steps:

[0114] S210, the electronic device displays multiple windows, including a first window and a second window, the first window displays a first graphical user interface, and the second window displays a first image.

[0115] It should be understood that multiple windows can refer to multiple application windows running simultaneously in the foreground of an electronic device's display screen, allowing users to switch between different application windows to use different applications.

[0116] In practical applications, multiple windows can be displayed on the same screen.

[0117] It's easy to understand that the display position (i.e., window position), display size (i.e., window size), and display content of each window displayed on the same screen can be the same or different. The display position, display size, and display content of each window can change in response to subsequent user operations.

[0118] In some embodiments, in addition to displaying multiple windows, the same screen may also display content including interface elements such as images, text, or icons. This application does not limit this aspect.

[0119] The specific number of the aforementioned windows can be determined according to different actual application situations (such as different application scenarios), and this application embodiment does not limit this.

[0120] For example, in a user's shopping price comparison application scenario, the user can compare the price of the same product in application A, application B, and application C. In this case, the specific number of windows displayed on the electronic device can be three, namely the application window corresponding to application A, the application window corresponding to application B, and the application window corresponding to application C.

[0121] For example, in an application scenario where a user is playing a game and chatting at the same time, the user can use application D to play the game and use application E to chat with a friend. In this scenario, two windows can be displayed on the electronic device, that is, there can be two windows, namely the application window corresponding to application D and the application window corresponding to application E.

[0122] In this embodiment, the first window, also known as the interest window or the main window, refers to an application window that is in focus (or in a focused state) on the display area of ​​the electronic device. Users can interact with the corresponding application through the content displayed in the first window, which can be continuously rendered and updated.

[0123] Correspondingly, the second window, also known as a non-interest window or secondary window, refers to an application window that is not in focus on the display area of ​​an electronic device. The interface content displayed in this second window can be static, meaning it does not require user interaction.

[0124] In some embodiments, the first window and the second window can be application windows with different display states among multiple windows.

[0125] For example, the first window can be an application window displayed in a tiled state. Correspondingly, the second window can be an application window displayed in a side-view state. That is, the first window and the second window can be determined based on the display state of each window in the multiple windows on the display screen of the electronic device.

[0126] As an example, not a limitation, Figure 3 The diagram illustrates a scenario where three windows are displayed in the display area of ​​an electronic device, according to an embodiment of this application. See also... Figure 3 Assume A, B, and C represent three application windows. Window B is displayed in a tiled state within the display area of ​​the electronic device, while windows A and C are both displayed in a side-mounted state within the display area. Figure 3 Window B can correspond to the first window, and windows A and C can both be the second window.

[0127] For example, Figure 4 The diagram illustrates another scenario where three windows are displayed in the display area of ​​an electronic device, according to an embodiment of this application. See also... Figure 4 Assume A, B, and C represent three application windows, Figure 4 If both windows A and B are displayed in a fully tiled state within the display area of ​​an electronic device, then windows A and B can be the first window. Figure 4 Window C is displayed in a side-facing position within the display area of ​​the electronic device, so window C can be a second window.

[0128] In some embodiments, the first window and the second window can also be determined based on the proportion of the application window in the display area of ​​the electronic device. That is, the first window and the second window can be determined based on the display size of the application window. The specific value of the aforementioned proportion can be customized or pre-configured according to the actual application situation (such as the size of the application window in different types of applications). This application embodiment does not impose any limitations on this.

[0129] For example, in the display area of ​​an electronic device, if the display area of ​​an application window exceeds two-thirds of the total display area, then the application window can be designated as the first window. In other words, the first window is an application window whose display area is greater than or equal to two-thirds of the total display area. Conversely, if the display area of ​​an application window does not exceed two-thirds of the total display area, then the application window can be designated as the second window. In other words, the second window can be an application window whose display area is less than two-thirds of the total display area.

[0130] Still with Figure 3 For example, if window A occupies more than two-thirds of the display area of ​​the electronic device, then window A can be considered the first window; if windows B and C do not occupy more than two-thirds of the display area, then windows B and C can be considered the second window.

[0131] Of course, in other embodiments, the second window may also include application windows that are not fully displayed in the display area of ​​the electronic device and / or application windows that are not displayed in the display area of ​​the electronic device at all.

[0132] It should be understood that an application window that is not displayed in the display area at all can refer to an application window that is continuously rendered in the background, but whose rendered interface may not be displayed on the electronic device due to reasons such as the size of the electronic device's display screen.

[0133] Figure 5 The diagram illustrates another scenario where three windows are displayed in the display area of ​​an electronic device, according to an embodiment of this application. See also... Figure 5 Suppose A, B, and C represent three application windows. Window A is fully displayed in the display area of ​​the electronic device, that is, the first window can refer to window A. Window B and window C are not fully displayed in the display area of ​​the electronic device, then the second window can refer to window B and window C.

[0134] For example, Figure 6 The illustration shows another scenario of displaying three windows in the display area of ​​an electronic device, according to an embodiment of this application. See also... Figure 6Suppose A and B represent two application windows, with window A fully displayed in the display area of ​​the electronic device and window B not displayed in the display area of ​​the electronic device. In this example, window A can be the first window and window B can be the second window.

[0135] In this embodiment of the application, a first graphical user interface may be displayed in the first window, that is, the content displayed in the first window is the first graphical user interface.

[0136] The first graphical user interface can also be called the first interactive graphical user interface or the first window layer. The first graphical user interface can be understood as the actual window layer formed after being rendered by the rendering thread corresponding to the application window layer.

[0137] In practical applications, the first graphical user interface (GUI) can display interface elements such as images, text, and controls. The electronic device can display the corresponding interface in response to the user's triggering operation on the interface elements (such as controls) in the first GUI. In other words, the first GUI is mainly used for the user to interact with the second application corresponding to the first window.

[0138] It's easy to understand that the second window can display the first image; that is, the content displayed in the second window is the first image.

[0139] The first image can be any image.

[0140] In some embodiments, the first image may be a first preset image, for example, the first preset image may be an image generated based on the user's historical operations in a first application corresponding to the second window.

[0141] In some embodiments, the first image may be a first sample image, which may be generated based on the application icon of the first application corresponding to the second window.

[0142] For example, a first sample image can be constructed based on the application icon of the first application and a background of a preset color.

[0143] In other embodiments, the first image may also be a screenshot corresponding to a second graphical user interface corresponding to the second window.

[0144] The second graphical user interface can also be referred to as the second interactive graphical user interface or the second window layer. It can also be understood as the actual window layer formed after the rendering thread corresponding to the application window layer has finished rendering. For details, please refer to the relevant description of the first graphical user interface in the foregoing embodiments; it will not be repeated here.

[0145] It's easy to understand that in a multi-window environment, the first window can be a single window, for example, Figure 3 Window B shown or Figure 6 Window A is shown in the diagram. The number of first windows can also be multiple. For example, Figure 4 The window shown is window A and window B.

[0146] Similarly, within a multi-window environment, the number of second windows can also be one or more. For example, Figure 4 The three windows shown can include a second window, namely window C; for example, Figure 3 The three windows shown can also include two second windows, namely window A and window C.

[0147] In this embodiment of the application, the window manager service (WMS) module can be used to configure the display settings of multiple windows in an electronic device.

[0148] Specifically, the WMS module can control the visibility of the first graphical user interface in the application window layer and control the visibility of the second graphical user interface corresponding to the second window; the WMS module can control the visibility of the first image in the mask window layer and control the visibility of the second image corresponding to the first graphical user interface.

[0149] It should be understood that the application window layer is the basic layer for application interface rendering managed by the operating system. The application window layer may include the aforementioned first graphical user interface and second graphical user interface.

[0150] The mask window layer, overlaid on the application window layer, can refer to an auxiliary control layer used to achieve specific functions (such as a permission overlay) by setting transparency or area occlusion. The mask window layer may include the aforementioned first image and second image.

[0151] like Figure 7 The diagram shown is a structural schematic corresponding to the multi-window display principle provided in an embodiment of this application. (See also...) Figure 7 The dashed box represents the display area on the screen of an electronic device (i.e., the display range that the user can see on the screen), and the upper layer (corresponding to...) Figure 7The area within the dashed box can represent images A, B, and C corresponding to the mask window layer. The lower layer (below the dashed box) can represent graphical user interfaces a, b, and c corresponding to the application window layer. Image A can be a screenshot of graphical user interface a, image B can be a screenshot of graphical user interface b, and image C can be a screenshot of graphical user interface c. In this embodiment, the WMS module can control the visibility of each graphical user interface in the application window layer, and it can also control the visibility of each image in the mask window layer.

[0152] Assuming the WMS module sets the visibility of each graphical user interface in the control application window layer and the visibility of each image in the mask window layer, three application windows can be obtained. For example... Figure 8 The diagram shown is a schematic representation of the principle structure of a multi-window display according to an embodiment of this application. (See also...) Figure 8 The WMS module can control which image A is visible, which is invisible, and which is visible in the upper mask window layer. Correspondingly, the WMS module can also control which graphical user interface (GUI) a is invisible, which is visible, and which is invisible in the lower application window layer. Based on this, through the overlay and synthesis of the mask window layer and the application window layer, the visible images A, B, and C become the content displayed in the three application windows that the user can see within the display area of ​​the electronic device. In other words, the first window displays GUI b, and the second windows on the left and right sides of the first window display images A and C respectively.

[0153] It should be understood that the specific content displayed in the first and second windows that the user sees within the display area is a complete interface formed by combining the mask window layer and the application window layer.

[0154] Based on the above settings, since image B in the mask window layer is invisible, it will not obscure the display of the graphical user interface b in the application window layer. Furthermore, image B, being invisible, will not participate in subsequent interface composition, thus not affecting the interaction between the user and the graphical user interface b in the first window.

[0155] In some embodiments, the first image in the mask window layer can be transformed to obtain a transformed first image, which can be used to display in a side-view state in a second window.

[0156] It should be understood that transformation processing may include at least one of rotation operations, deformation operations, and scaling operations.

[0157] like Figure 9The diagram shown is a schematic representation of a transformation process provided in an embodiment of this application. (See also...) Figure 9 Image A (in the tiled display state) Figure 9 The image on the left (in the middle) can be a screenshot of the application window layer corresponding to the second graphical user interface. After performing transformation processing, it can be obtained as image A, which is displayed in a side-view state. Figure 9 (The image on the right side of the middle), so that when Figure A is displayed in the display area of ​​the electronic device, it can also be displayed in a side-standing state, highlighting the three-dimensional sense of space while further enriching the display form of the second window.

[0158] S220, the electronic device, in response to a user operation, modifies the first image displayed in the second window to a second graphical user interface and / or modifies the first graphical user interface displayed in the first window to a second image.

[0159] It should be understood that user operation can refer to any operation capable of switching the display state of at least one window. The display state of at least one window includes, but is not limited to, at least one of the following: the window's display position within the display area, the window's display size within the display area, and the content displayed within the window.

[0160] User operations may specifically include at least one of the following: clicking, touching, single-clicking, double-clicking, two-finger swiping, dragging (left / right or up / down), long-pressing the first window and / or the second window for a preset duration, etc. This application does not limit the specific user operations described in any way.

[0161] In one example, a user action can be a single operation.

[0162] For example, Figure 10 The user operation provided in this application is a schematic diagram of an operation scenario. See also: Figure 10 Assume the displayed windows include window A, window B, and window C, where window A and window B are the first windows, displayed in a tiled state, and window C is the second window, displayed in a side-mounted state. The electronic device can respond to the user swiping left (using...). Figure 10 The dashed line in the image represents a swipe operation that modifies the displayed content in window A and window C. In this example, the user action can consist of only a leftward swipe, i.e., a single action.

[0163] In another example, user actions can also be multiple actions.

[0164] Still with Figure 10 Taking the example of multiple windows shown, the electronic device can respond to a user's long press for a preset duration to keep the multiple windows in a changeable state (using...). Figure 11(The bolded window indicates this), after which the electronic device can respond to the user moving left (using...) Figure 11 The dashed lines in the diagram represent swiping actions to modify the displayed content in window A and window C. In this example, user actions can include a long press for a preset duration to trigger an action and a swipe to the left, for a total of two actions.

[0165] It should be understood that in the two examples above, modifying the displayed content in window A can mean changing the first graphical user interface displayed in window A to the second image in response to user operation. Similarly, modifying the displayed content in window C can mean changing the first image displayed in window C to the corresponding second graphical user interface in response to user operation.

[0166] It's not hard to understand that the second image can also be any image.

[0167] In some embodiments, the second image may be a second preset image. For example, the second preset image may be an image generated based on the user's historical operations in a first application corresponding to the first window.

[0168] In some embodiments, the second image may also be a second sample image, which may be generated based on the application icon of the second application corresponding to the first window. For example, the second sample image may be constructed based on the application icon of the second application and a background of a preset color.

[0169] In other embodiments, the second image may also be a screenshot corresponding to the first graphical user interface corresponding to the first window. This application does not limit the specific content of the second image or the aforementioned first image.

[0170] It should be understood that when user privacy is involved and a screenshot corresponding to the graphical user interface cannot be obtained, using a second preset image or a second sample image as the second image can effectively avoid the problem of abnormal display of the first window.

[0171] In this embodiment of the application, the electronic device can modify the first image displayed in the second window to a second graphical user interface and / or modify the first graphical user interface displayed in the first window to a second image in response to user operation. That is, the electronic device can modify the display content of at least one window in a plurality of windows in response to user operation.

[0172] Furthermore, the method for modifying the displayed content of a window may include: the WMS module can control the second graphical user interface in the application window layer to be visible, and control the first image in the mask window layer to be invisible. And / or, the WMS module can control the first graphical user interface in the application window layer to be invisible, and control the second image in the mask window layer to be visible. Then, by overlaying and compositing the application window layer and the mask window layer, the first image displayed in the second window can be modified to the second graphical user interface, and / or the first graphical user interface displayed in the first window can be modified to the second image. It is easy to understand that the above modification process can be referred to the aforementioned... Figure 7 and Figure 8 The embodiments described herein are for illustrative purposes only and will not be repeated here.

[0173] Of course, in addition to responding to user operations and modifying the displayed content in the first window and / or the second window, in some other embodiments, the electronic device can also respond to the aforementioned user operations and modify the display position and window size of one or more windows in the display area.

[0174] Still with Figure 10 Taking multiple windows as an example, in one instance, the electronic device can respond to user actions by changing the display state of window A from "tiled" to "sideways"; the display state of window B remains unchanged; and the display state of window C changes from "sideways" to "tiled". Alternatively, the display state of window A can be changed from "tiled" to "sideways"; the display state of window B can also be changed from "tiled" to "sideways"; and the display state of window C can also be changed from "sideways" to "tiled".

[0175] In another example, the electronic device can also respond to user actions by keeping the display states of windows A and B unchanged, while changing the display state of window C from "sideways" to "tiled".

[0176] In other examples, the electronic device may also respond to user actions by changing the display state of window A from "tiled" to "sideways" while the display states of windows B and C remain unchanged.

[0177] It is easy to understand that, based on the above possible examples, if the display area of ​​the electronic device remains unchanged, as the display state of at least one of the three windows changes, the display position and size of the corresponding window within the display area can also change.

[0178] In some embodiments, after modifying the first image displayed in the second window to a second graphical user interface and / or modifying the first graphical user interface displayed in the first window to a second image in response to user operation, see [link to documentation]. Figure 12The WMS module can also send a first notification to the AMS module. The first notification can be used to indicate the visibility of the graphical user interface corresponding to each window in multiple windows. The AMS module can switch the lifecycle of the first application corresponding to the second window from the pause state to the resume state, and / or switch the lifecycle of the second application corresponding to the first window from the resume state to the pause state, based on the received first notification.

[0179] It should be understood that if the content displayed in any one of the multiple windows changes, the WMS module can send the first notification to the AMS module.

[0180] In this embodiment, the first notification includes the visibility of the graphical user interfaces (GUIs) corresponding to all windows within the application window layer. In other words, the first notification can be used by the WMS module to report the visibility of the GUIs corresponding to all windows within the application window layer to the AMS module.

[0181] In one example, the first notification sent by the WMS module to the AMS module may include: the identification information of the application corresponding to each window and the visibility of the graphical user interface of each window in the application window layer.

[0182] Suppose multiple windows include a first window and a second window. The application corresponding to the first window is application A, and the AMS module can mark application A as task1. The application corresponding to the second window is application B, and the AMS module can mark application B as task2. If, in response to a user operation, the content displayed in the first window is changed to the second image, and the content displayed in the second window is changed to the second graphical user interface, then the specific content in the first notification can be: task1, invisible; task2, visible.

[0183] See Figure 12 Thus, after the AMS module receives the first notification, it can modify the lifecycle stage (hereinafter referred to as state) of the application corresponding to each window based on the visibility of the graphical user interface (GUI) of all windows in the application window layer. Since the GUI of the first window is invisible in the application window layer, the lifecycle of the second application corresponding to the first window can be switched from the resume state to the pause state. If the GUI of the second window is visible in the application window layer, the lifecycle of the first application corresponding to the second window can be switched from the pause state to the resume state.

[0184] Corresponding to the example above, the AMS module can switch the lifecycle of application A from the resume state to the pause state, and switch the lifecycle of application B from the pause state to the resume state.

[0185] In another example, the first notification sent by the WMS module to the AMS module may include: the identification information of the application corresponding to each window and the display content of the corresponding window. In this case, the AMS module can determine the lifecycle state of the application corresponding to the window based on the display content of the corresponding window.

[0186] Based on the example above, the specific content of the first notification could include: task1, an image; task2, a graphical user interface. See also... Figure 13 Based on the specific content of the first notification received, the AMS module can switch the lifecycle of application A, which displays an image, from the resume state to the pause state, and switch the lifecycle of application B, which displays a graphical user interface, from the pause state to the resume state.

[0187] Of course, in other examples, the specific content included in the first notification sent by the WMS module to the AMS module can be adjusted according to the actual application situation. For example, the first notification received by the AMS module may only carry information related to windows whose displayed content has changed. In this case, the WMS module may only send the first notification to the AMS module including windows whose graphical user interface visibility has changed in the application window layer. In this case, the WMS module may send the first notification to the AMS module including the visibility of the graphical user interface of each window in the application window layer only after the visibility of the graphical user interface of all windows in the application window layer has changed. The embodiments of this application do not limit the specific content of the first notification.

[0188] It should be noted that, as Figure 14 The diagram shown illustrates the lifecycle of an application from startup to shutdown in the prior art provided in this application embodiment. (See also...) Figure 14 An application goes through six main states from startup to shutdown: created, start, resume, pause, stop, and destroy. Each state corresponds to a specific system callback method and performs key operations.

[0189] In the `created` state, the `onCreate()` method is called upon the first creation of the application. This is primarily used to initialize the application's core components and user interface layout, such as loading the layout (`setContentView`) and binding view controls. During this stage, the user interface is invisible, in a background initialization state, and is not interactive. It should be understood that, depending on the operating system, the user interface components can be activities, abilities, or UIViewControllers. For ease of understanding, the following text primarily uses activities as examples.

[0190] The Activity launched state, which precedes the created state, mainly refers to the state in which an activity within the application is successfully launched and loaded into memory by the operating system.

[0191] In the start state, the onStart() method is called when the activity becomes visible. During this stage, operations such as preloading background data can be performed. The activity is visible at this stage, but it is not yet interactive.

[0192] In the resume state, the activity comes to the foreground and becomes the focus of user interaction. Calling the onResume() method restores user interface elements and animations. During this stage, users can perform real-time operations such as playing animations or videos. In other words, the activity is fully visible and on top of the display screen during this stage, allowing normal interaction, and all user interface events (such as clicks) are handled.

[0193] After resuming, the application can enter the Activity running state, which is a continuously running state, where users can interact smoothly with the user interface of the application.

[0194] In the pause state, the activity loses focus and enters a non-focused state. After the onPause() method is called, the corresponding application process will stop its activities (such as rendering), release occupied resources (such as turning off the camera), save temporary data, or pause other time-consuming operations (such as video playback). It is worth noting that the activity is still visible in this stage, but cannot be operated, i.e., it is not interactive.

[0195] The onStop() method is called when the activity is completely invisible in the Stop state. In other words, the activity is invisible and uninterrupted during this phase.

[0196] During this phase, the application process releases unnecessary resources (such as disconnecting network requests) and saves persistent data. If the user returns to the application (that is, the previously invisible activity becomes visible again), it will restart by calling the onRestart() method. If the system encounters a high-priority issue (such as insufficient memory) that needs to be handled, it may directly destroy the activity, i.e., it is in the App process killed state, and the application process corresponding to the application is killed by the system.

[0197] The destroy state is the final stage before an activity is destroyed. After the onDestroy() method is executed, all resources are released, such as terminating background threads and unbinding services. It also verifies that data has been persisted to ensure consistency of the state after the application restarts. During this stage, the activity is destroyed, there is no UI, and the user cannot interact with it.

[0198] The Activity shut-down state can refer to the state where the activity is completely destroyed or removed from memory after the onDestroy() method is called in the aforementioned lifecycle.

[0199] In this embodiment of the application, after receiving the first notification, the AMS module can switch the lifecycle of the second application corresponding to the first window from the resume state to the pause state according to the first notification. That is, the AMS module controls the second application to switch from the original user-visible and interactive state to the user-visible but non-interactive state.

[0200] And / or, after receiving the first notification, the AMS module can also switch the lifecycle of the first application corresponding to the second window from the pause state to the resume state according to the first notification. That is, the AMS module controls the first application to switch from a state that is visible to the user but not interactive to a state that is visible to the user and interactive. In other words, after receiving the first notification, the AMS module can modify the interactive state of the first window and / or the second window while keeping it visible to the user.

[0201] See Figure 14In existing technologies, the lifecycle of an application going from the background (i.e., invisible to the user) to the foreground (i.e., visible to the user) and regaining interactivity with the user involves a series of steps: from the stop state to the restart state, then to the start state, and finally to the resume state. However, based on the embodiments of this application, for an application to be displayed in the foreground and regain interactivity with the user, the AMS module only needs to switch the application's lifecycle from the pause state to the resume state. This effectively achieves a faster restoration of the application's visibility and interactivity without affecting the simultaneous display of multiple windows. Furthermore, this design is more suitable for multi-window display application scenarios that frequently require window switching.

[0202] In some embodiments, see Figure 15 After the AMS module switches the application's lifecycle, the WMS module can also send a second notification to the power saving module. This second notification can also indicate the visibility of the graphical user interface corresponding to each window in multiple windows. In this way, the power saving module can send a unfreeze command to the first application process corresponding to the second window based on the received second notification. The unfreeze command is used to switch the activity of the first application process from a frozen state to a unfrozen state; and / or, send a freeze command to the second application process corresponding to the first window. The freeze command is used to switch the activity of the first application process from a unfrozen state to a frozen (or frozen) state.

[0203] It should be understood that if the visibility of the graphical user interface corresponding to at least one of the multiple windows changes, the WMS module will send a first notification to the AMS module, and then a second notification to the power-saving module. Upon receiving the second notification, the power-saving module can send corresponding instructions (including freeze or unfreeze instructions) to the application processes corresponding to applications at different lifecycle stages to pause or resume the application process's activity (e.g., network requests, application interface refreshes, etc.).

[0204] In one example, when the lifecycle of the first application corresponding to the second window switches to the resume state, the power-saving module can send a defrost command to the first application process to restore the activity state of the first application process. In other words, when the first application is visible and interactive to the user, the defrost command sent by the power-saving module allows the first application process to resume its activity state.

[0205] In another example, when the lifecycle of the second application corresponding to the first window switches to the pause state, the power-saving module sends a freeze command to the second application process to stop its activity. In other words, while the second application is visible to the user but not interactive, the freeze command sent by the power-saving module pauses its activity.

[0206] Based on the above possible implementation methods, the second application in the pause state will pause all running activities and promptly converge the request calls between the second application process and the service process (system service). This effectively reduces the probability of the second application process not being able to be effectively frozen due to the second application process being in an uninterruptible state, processing higher priority tasks, or the request buffer being filled with too many requests. This creates conditions for the freezing operation of the second application process and can further effectively reduce system power consumption.

[0207] Furthermore, actual experiments have verified that, taking an electronic device displaying three windows within its display area—two first windows and one second window—with the two first windows displaying corresponding second images and the second window displaying a second graphical user interface as an example, if the power-saving module sends the freeze command described in the above embodiment to the second application processes corresponding to the two first windows respectively, thus freezing the activity of the two second application processes, then the overall system power consumption of the three windows is equivalent to the power consumption of the second window displayed in full-screen mode within the display area. Therefore, it is evident that the above possible implementation significantly optimizes system energy consumption.

[0208] In this embodiment, the second notification can be used by the WMS module to report to the power-saving module that the visibility of the graphical user interface corresponding to multiple windows has changed in the application window layer.

[0209] It is worth noting that since the AMS module and the power-saving module may receive, identify, and process information in different ways, the specific content of the first notification sent by the WMS module to the AMS module and the second notification sent by the WMS module to the AMS module may differ. However, in some embodiments, when the AMS module and the power-saving module receive, identify, and process information in the same way, the specific content of the second notification and the specific content of the first notification may also be the same.

[0210] In one example, the specific content of the second notification may include: the package name of the application corresponding to each window and the visibility of the graphical user interface of each window in the application window layer.

[0211] In another example, the specific content of the second notification may include: the package name of the application corresponding to each window and the display content of the corresponding window. It should be understood that the display content of the corresponding window may include an image or a graphical user interface.

[0212] In other examples, the specific content included in the second notification sent by the WMS module to the power-saving module can be adjusted according to the actual application situation. For example, if the power-saving module can only receive the second notification sent by the WMS module that includes only the window whose visibility of the graphical user interface has changed at the application window layer, the specific content included in the second notification sent by the WMS module to the power-saving module can be adjusted.

[0213] Furthermore, assuming the visibility of the graphical user interface corresponding to the first window changes within the application window layer, the second notification may only include the package name of the first application corresponding to the second window and a notification regarding the visibility of the graphical user interface of the second window within the application window layer. This application embodiment does not limit the specific content of the second notification.

[0214] In other embodiments, the WMS module may send the second notification to the power-saving module before the AMS module switches the application's lifecycle. Alternatively, the WMS module may send the second notification to the power-saving module simultaneously with the first notification to the AMS module.

[0215] To better understand the process of optimizing system energy consumption using lifecycle customization and application process freezing mechanisms in the aforementioned embodiments, the following will use... Figure 16 The diagram shows three windows displayed on an electronic device: window A, window B, and window C. Taking the modification of the display content of window A and window C in response to user operation as an example, the main steps S210 and S220 of the multi-window display method 200 are explained by way of example.

[0216] According to the aforementioned step S210, three windows can be displayed on the electronic device, namely window A, window B and window C. Window A and window B can display the corresponding graphical user interface, and window C can display the corresponding image.

[0217] In this scenario, the lifecycles of the applications corresponding to windows A and B can be in the resume state, while the lifecycle of the application corresponding to window C can be in the pause state. Furthermore, the application processes corresponding to windows A and B are in an active state, maintaining their request and call relationships with the system service processes, while the application process corresponding to window C can be in a paused active state.

[0218] Based on the above step S210, see Figure 16In step 1601, the electronic device can, according to step S220, respond to the user operation and modify the graphical user interface displayed in window A to the corresponding image, and modify the image displayed in window C to the corresponding graphical user interface.

[0219] In response to user actions, the WMS module can modify the graphical user interface corresponding to window A in the application window layer to be invisible and the graphical user interface corresponding to window C to be visible. It can also modify the image corresponding to window A in the mask window layer to be visible and the image corresponding to window C to be invisible. By overlaying the application window layer and the mask window layer, multiple windows with modified content can be combined to display the modified content.

[0220] See this example. Figure 16 In step 1602, the WMS module can also send a first notification to the AMS module to cause the AMS module to execute step 1603. Specifically, the AMS module can switch the lifecycle of the application corresponding to window A from the resume state to the pause state according to the first notification, so that window A changes from a visible and interactive state to a visible but not interactive state; the AMS module can also switch the lifecycle of the application corresponding to window C from the pause state to the resume state according to the first notification, so that window C changes from a visible but not interactive state to a visible and interactive state.

[0221] Further, see Figure 16 In step 1604, the WMS module can send a second notification to the power-saving module to cause the power-saving module to execute step 1605. Specifically, the power-saving module can send a freeze command to the application process corresponding to window A to freeze the activity of the application process corresponding to window A; the power-saving module can also send an unfreeze command to the application process corresponding to window C to restore the activity of the application process corresponding to window C.

[0222] Based on the above possible implementation methods, system energy consumption can be better optimized by customizing the lifecycles of windows A and C and by using a freezing mechanism for the application processes corresponding to windows A and C.

[0223] In some embodiments, the WMS module can also send a refresh request to the UI thread in the second application process corresponding to the first window; the UI thread in the second application process can perform measurement and layout operations sequentially according to the refresh request and the vertical synchronization (Vsync) signal; then, the UI thread in the second application process obtains the visibility of the first graphical user interface; the UI thread stops performing the drawing operations after the layout operation according to the visibility of the first graphical user interface.

[0224] It should be understood that a refresh request can be used by the WMS module to notify the UI thread of the second application process corresponding to the first window to re-execute the measurement, layout, and drawing process. After that, the rendering thread can update the interface of the second application corresponding to the first window (i.e., the first graphical user interface).

[0225] It's not hard to understand, see Figure 17 As shown in the flowchart, the Vsync signal can be generated by the display controller hardware, and the generated Vsync signal can be received by the central frame synchronization scheduler. When the central frame synchronization scheduler receives the Vsync signal, it can send the received Vsync signal to the UI thread in the second application process. Based on this, the UI thread in the second application process can sequentially execute the measurement and layout process according to the received Vsync signal and refresh request. Afterwards, the UI thread in the second application process sends a corresponding visibility query request for the first graphical user interface to the WMS module. If the first graphical user interface is not visible, the UI thread in the second application process stops executing the drawing process after the layout, and the rendering thread does not need to perform rendering operations after executing the drawing process.

[0226] like Figure 18 The image shown is an embodiment of this application. Figure 17 The corresponding interaction flow diagram. See also Figure 18 The interaction process mainly includes the following steps 1801 to 1806:

[0227] Step 1801: The WMS module sends a refresh request to the UI thread of the second application process.

[0228] Step 1802: The central frame synchronization scheduler sends a Vsync signal to the UI thread of the second application process.

[0229] Step 1803: The UI thread of the second application process executes measurement and layout operations sequentially based on the received refresh request and Vsync signal.

[0230] Step 1804: The UI thread of the second application process sends a visibility query request for the first graphical user interface to the WMS module.

[0231] Step 1805: The WMS module sends feedback information to the UI thread of the second application process.

[0232] It should be understood that feedback information can refer to the response information sent by the WMS module to the UI thread of the second application process corresponding to the query request. It is primarily used to indicate the visibility of the first graphical user interface.

[0233] Step 1806: If the first graphical user interface is not visible, the UI thread of the second application process will not perform a drawing operation based on the received feedback information.

[0234] It should be understood that the content of steps 1801 to 1806 above can be found in the foregoing. Figure 17 The embodiments described herein will not be repeated here.

[0235] In other embodiments, the UI thread of the second application process can continue to perform drawing operations and obtain drawing results while the first graphical user interface is visible. Then, the UI thread of the second application process passes the drawing results to the rendering thread. The rendering thread renders the interface content according to the drawing results and passes the rendered interface content to the graphics display subsystem for display.

[0236] For example, after step S220 in the embodiment of this application, if the electronic device can respond to the user operation again and modify the second image user interface displayed in the second window to the first image, the WMS module, the UI thread in the first application process corresponding to the second window, and the central frame synchronization scheduler can perform operations. Figure 17 or Figure 18 In the aforementioned process, if the second graphical user interface corresponding to the second window is also not visible after the UI thread in the first application process corresponding to the second window has completed the measurement and layout operations, then the drawing operation after the layout operation will not be executed, and the rendering thread will not need to perform the rendering operation.

[0237] Based on the above possible implementation methods, when the first graphical user interface is invisible in the application window layer corresponding to the first window, the drawing operation of the UI thread, the rendering operation of the rendering thread, and the display operation of the graphics display subsystem in the second application process corresponding to the first window can be stopped, thereby reducing the resource and power consumption required for drawing, rendering, and display operations and further optimizing system power consumption.

[0238] Furthermore, even if the lifecycle of the second application is not switched to the pause state and / or the second application process fails to be frozen, the above steps stop the drawing, rendering, and display activities of the first graphical user interface, which can greatly limit the main activities of the first window, reduce the system load, and reduce resource and power consumption.

[0239] It should be noted that in this embodiment, after the UI thread in the second application process completes the measurement and layout operations, it further determines whether to perform subsequent drawing operations based on the visibility of the first user interface. Since the measurement and layout operations have already been performed, the display position of the first window within the display area of ​​the electronic device can be effectively preserved, without affecting the application scenario of multi-window display. This avoids the problem of user experience degradation caused by the display position of the first window within the display area being occupied by other windows and other interface elements.

[0240] Furthermore, the above-described possible implementation methods are applicable not only to electronic devices that support dynamic frame rate adjustment, but also to electronic devices that do not support dynamic frame rate adjustment. The above-described implementation methods effectively solve the problem of insufficient compatibility caused by using graphics dynamic frame technology to reduce power consumption by dynamically adjusting the frame rate. While applicable to multi-window display application scenarios, they can also be applied to other application scenarios (such as multi-interface display), thus breaking through the limitations of application scenarios.

[0241] In this embodiment, if the UI thread in the second application process has stopped drawing and the rendering thread has also stopped rendering (i.e., the content displayed in the first window is no longer continuously refreshed), and the WMS module has not promptly controlled the visibility of the second image corresponding to the first graphical user interface in the mask window layer, then frame drops or interruptions may occur in the first window. Therefore, in some embodiments, before the UI thread in the second application process stops performing drawing operations based on the display state of the first window, the WMS module can also control the visibility of the second image corresponding to the first graphical user interface in the mask window layer.

[0242] In other words, before step 1806, the WMS module controls the visibility of the second image corresponding to the first graphical user interface in the mask window layer, and then executes step 1806. Based on the received feedback information, the UI thread of the second application process stops performing the drawing operation when the first graphical user interface is not visible.

[0243] In some embodiments, according to the aforementioned step S220, the electronic device responds to the user operation by changing the displayed content of the second window from the first image to the second graphical user interface. In this case, the UI thread of the first application process corresponding to the second window can also receive a refresh request sent by the WMS module and perform measurement and layout operations according to the received refresh request and Vsync signal. Afterwards, the UI thread corresponding to the first application process queries the WMS module to obtain the visibility of the second graphical user interface. Due to the aforementioned user operation, the second graphical user interface in the application window layer corresponding to the second window is visible. Then, the UI thread corresponding to the first application process can continue to perform the drawing operation after the layout operation according to the visible second graphical user interface to obtain the drawing result. Afterwards, the UI thread of the first application process transfers the drawing result to the rendering thread. The rendering thread renders the interface content according to the drawing result and transmits the rendered interface content to the graphics display subsystem for display.

[0244] In this embodiment, if the WMS module prematurely disables the first image in the mask window layer corresponding to the second window, before the second graphical user interface in the application window layer corresponding to the second window has completed the drawing and rendering process, an interruption or brief black screen phenomenon will occur in the second window. Therefore, to avoid the above-mentioned interruption and black screen phenomenon, in some embodiments, the WMS module controls the first image in the mask window layer corresponding to the second window to be invisible after the rendering thread corresponding to the second window performs the rendering operation.

[0245] In other words, when the content displayed in the second window is changed from the second graphical user interface to the first image, the UI thread of the first application process corresponding to the second window resumes the drawing operation. After the rendering thread resumes rendering, the WMS module controls the first image in the mask window layer to be invisible.

[0246] Based on the above possible implementation methods, by coordinating the visibility timing of images in the mask window layer by the WMS module, the smooth display of content during window switching is effectively ensured.

[0247] Based on the multi-window display method provided in this application, when multiple windows are displayed in an electronic device, the first window displays a first graphical user interface that can maintain interactivity, while the second window uses a first image to replace the second graphical user interface that originally needed to be rendered in real time. This transforms the window-level dynamic refresh operation, which originally required continuous computational power, into a single, static graphics processing operation (such as a screenshot operation), which can greatly reduce the increased computational resources and power consumption due to interface rendering, thereby effectively reducing the overall power consumption during multi-window display.

[0248] Furthermore, the electronic device can respond to user actions by changing the first image displayed in the second window to a second graphical user interface. This allows users to interact with the electronic device through the first graphical user interface in the first window, or, when needed, interact with the second graphical user interface displayed in the second window based on user actions. This flexible, dynamic switching mechanism satisfies users' interaction needs in multi-window mode while reducing the number of windows rendered in real-time, avoiding unnecessary performance consumption and improving the user experience.

[0249] It should be noted that the content of the WMS module, AMS module, UI thread and rendering thread mentioned in the above embodiments can be found in the description in the prior art, and will not be repeated in the embodiments of this application.

[0250] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0251] The multi-window display method provided by the above embodiments Figure 19 This is a schematic block diagram of a multi-window display device 1900 provided in an embodiment of this application. Figure 19 The multi-window display device 1900 shown may include a display unit 1910 and a modification unit 1920.

[0252] Display unit 1910 is used to display multiple windows, including a first window and a second window, wherein a first graphical user interface is displayed in the first window and a first image is displayed in the second window;

[0253] Modification unit 1920 is configured to, in response to a user operation, modify the first image displayed in the second window to a second graphical user interface and / or modify the first graphical user interface displayed in the first window to a second image.

[0254] In some embodiments, the first image includes any one of a first preset image, a first sample image, and a screenshot corresponding to the second graphical user interface, wherein the first sample image is generated based on the application icon of the first application corresponding to the second window;

[0255] And / or, the second image includes any one of a second preset image, a second sample image, or a screenshot corresponding to the first graphical user interface, wherein the second sample image is generated based on the application icon of the second application corresponding to the first window.

[0256] In some embodiments, the method for determining whether to display a first graphical user interface in the first window and a first image in the second window includes:

[0257] The Window Management Service (WMS) module controls the visibility of the first graphical user interface (GUI) and the visibility of the second GUI in the application window layer; the WMS module also controls the visibility of the first image and the visibility of the second image corresponding to the first GUI in the masked window layer.

[0258] The application window layer and the mask window layer are superimposed to form the first graphical user interface displayed in the first window and the first image displayed in the second window.

[0259] In some embodiments, the multi-window display device 1900 further includes:

[0260] The WMS module sends a first notification to the Activity Management Service (AMS) module, the first notification being used to indicate the visibility of the graphical user interface corresponding to each of the multiple windows;

[0261] According to the first notification, the AMS module switches the lifecycle of the first application corresponding to the second window from the pause state to the resume state, and / or switches the lifecycle of the second application corresponding to the first window from the resume state to the pause state.

[0262] In some embodiments, the multi-window display device 1900 further includes:

[0263] The AMS module sends a second notification to the power-saving module, the second notification being used to indicate the visibility of the graphical user interface corresponding to each of the multiple windows;

[0264] According to the second notification, the power-saving module sends a defrost command to the first application process corresponding to the second window, the defrost command being used to switch the state of the first application process from frozen state to defrost state; and / or sends a freeze command to the second application process corresponding to the first window, the freeze command being used to switch the state of the first application process from defrost state to frozen state.

[0265] In some embodiments, the apparatus further includes: after the rendering thread corresponding to the second window performs a rendering operation, the WMS module controls the first image in the mask window layer to be invisible.

[0266] In some embodiments, the multi-window display device 1900 further includes: the WMS module sending a refresh request to the user interface (UI) thread in the second application process corresponding to the first window; the UI thread performing measurement and layout operations sequentially according to the refresh request and the vertical synchronization pulse (Vsync) signal; the UI thread obtaining the visibility of the first graphical user interface; and the UI thread stopping the drawing operations after the layout operation based on the visibility of the first graphical user interface.

[0267] In some embodiments, before the UI thread stops executing the drawing operations following the layout operation based on the visibility of the first graphical user interface, the multi-window display device 1900 further includes:

[0268] The WMS module controls the visibility of the second image in the mask window layer.

[0269] It should be understood that the description of the device embodiments can refer to the relevant descriptions of the various method embodiments above. Their implementation principles and technical effects are similar to those of the method embodiments above, and will not be repeated here.

[0270] Figure 19 The "module" of the multi-window display device 1900 shown can be implemented in hardware, software, or by hardware executing corresponding software. For example, the "module" can refer to an application-specific integrated circuit (ASIC), electronic circuits, a processor (e.g., a shared processor, a proprietary processor, or a group processor, etc.) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions.

[0271] Based on the methods provided in the above embodiments, this application also provides the following:

[0272] This application provides a computer program product, which includes a program that, when run by an electronic device, causes the electronic device to perform the methods shown in the above embodiments.

[0273] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods shown in the above embodiments.

[0274] This application provides a chip including a memory and a processor. The processor executes a computer program stored in the memory to control the electronic device to perform the methods shown in the various embodiments above.

[0275] It should be understood that the processor mentioned in the embodiments of this application can be a CPU, or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0276] It should also be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0277] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. In the above embodiments, the descriptions of each embodiment have different focuses; parts not described in detail or recorded in a certain embodiment can be referred to in the relevant descriptions of other embodiments.

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

[0279] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.

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

[0281] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0282] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a large-screen device, a recording medium, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0283] Finally, it should be noted that the above description is only a specific implementation of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the protection scope of this application.

Claims

1. A multi-window display method, characterized in that, Applied to electronic devices, the method includes: Display multiple windows, including a first window and a second window, wherein the first window displays a first graphical user interface and the second window displays a first image; In response to user actions, the first image displayed in the second window is modified to a second graphical user interface and / or the first graphical user interface displayed in the first window is modified to a second image.

2. The multi-window display method according to claim 1, characterized in that, The first image includes any one of a first preset image, a first sample image, and a screenshot corresponding to the second graphical user interface. The first sample image is generated based on the application icon of the first application corresponding to the second window. And / or, the second image includes any one of a second preset image, a second sample image, or a screenshot corresponding to the first graphical user interface, wherein the second sample image is generated based on the application icon of the second application corresponding to the first window.

3. The multi-window display method according to claim 1 or 2, characterized in that, The method for determining whether a first graphical user interface is displayed in the first window and a first image is displayed in the second window includes: The Window Management Service (WMS) module controls the visibility of the first graphical user interface (GUI) and the visibility of the second GUI in the application window layer; the WMS module also controls the visibility of the first image and the visibility of the second image corresponding to the first GUI in the masked window layer. The application window layer and the mask window layer are superimposed to form the first graphical user interface displayed in the first window and the first image displayed in the second window.

4. The multi-window display method according to any one of claims 1 to 3, characterized in that, The method further includes: The WMS module sends a first notification to the Activity Management Service (AMS) module, the first notification being used to indicate the visibility of the graphical user interface corresponding to each of the multiple windows; According to the first notification, the AMS module switches the lifecycle of the first application corresponding to the second window from the pause state to the resume state, and / or switches the lifecycle of the second application corresponding to the first window from the resume state to the pause state.

5. The multi-window display method according to claim 4, characterized in that, The method further includes: The AMS module sends a second notification to the power-saving module, the second notification being used to indicate the visibility of the graphical user interface corresponding to each of the multiple windows; According to the second notification, the power-saving module sends a defrost command to the first application process corresponding to the second window, the defrost command being used to switch the state of the first application process from frozen state to defrost state; and / or sends a freeze command to the second application process corresponding to the first window, the freeze command being used to switch the state of the first application process from defrost state to frozen state.

6. The multi-window display method according to any one of claims 1 to 5, characterized in that, The method further includes: After the rendering thread corresponding to the second window performs the rendering operation, the WMS module controls the first image in the mask window layer to be invisible.

7. The multi-window display method according to claim 4 or 5, characterized in that, The method further includes: The WMS module sends a refresh request to the UI thread in the second application process corresponding to the first window. The UI thread executes measurement and layout operations sequentially based on the refresh request and the vertical synchronization pulse Vsync signal; The UI thread obtains the visibility of the first graphical user interface; The UI thread stops executing the drawing operations after the layout operation based on the visibility of the first graphical user interface.

8. The multi-window display method according to claim 7, characterized in that, Before the UI thread stops executing the drawing operations after the layout operation based on the visibility of the first graphical user interface, the method further includes: The WMS module controls the visibility of the second image in the mask window layer.

9. An electronic device, characterized in that, The electronic device is configured to perform the method as described in any one of claims 1 to 8.

10. A chip system, characterized in that, The chip system includes a processor that executes a computer program stored in a memory to implement the method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 8.