Application window display method and electronic device
By receiving description information of the application window instead of complete information in the first operating system, the time delay and synchronization management difficulties of cross-system display are resolved, enabling fast and seamless application window display and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, there is a significant time delay when displaying application windows across systems, resulting in a choppy user experience. Furthermore, the transmission process increases bandwidth requirements and makes synchronization management more difficult.
By receiving window information descriptions of the first application in the first operating system, rather than complete window information, transmission bandwidth and memory operations are reduced, and information transmission is carried out using a preset display protocol, enabling cross-system display of application windows.
It reduces the time delay of application window display across systems, improves information transmission speed, reduces the difficulty of synchronization management, and improves user experience.
Smart Images

Figure CN119473057B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of terminal, and in particular, to an application window display method and an electronic device. BACKGROUND
[0002] With the continuous integration of terminal device forms and user use scenarios, the operating systems that can be used by terminal devices are also developing in the direction of integration and complementarity. For example, a terminal device can include a host operating system and a virtual machine for running other operating system environments, wherein the virtual machine includes an independent infrastructure for supporting the running of an operating system, and also includes an application running in the operating system. On the terminal device, the application can be used across systems or displayed in a cross-ecological window, that is, a user can view or operate an application provided by another operating system on an application window provided by the host operating system.
[0003] In some technical solutions, the manner of realizing the above-mentioned cross-ecological window display of an application includes reserving a complete display software stack for displaying a target application in the virtual machine, executing the display software stack by the virtual machine to complete window drawing, window management, window composition and the like of the target application, and then sending the window information of the window to the host operating system in its entirety by the virtual machine. The host operating system receives the window information and uses the window information to complete the rendering and display of the application window of the target application, thereby realizing the cross-ecological window display of the application. In the virtual machine, the complete display software stack is reserved, and in the virtual machine, the target application needs to execute the display software stack through a display protocol (such as wayland), and then send the window information corresponding to the display software stack to the host operating system through a remote desktop protocol (RDP) protocol.
[0004] However, in the above technical solutions, there is a large time delay in displaying the application window on the host operating system side, and from the perspective of the user, the user will feel that the window display is lagging and the like, thereby bringing a poor experience to the user. SUMMARY
[0005] The embodiments of the present application provide an application window display method and an electronic device, which can reduce the time delay of displaying an application window across systems on an electronic device and improve the experience of a user.
[0006] To achieve the above-mentioned purpose, the embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, a method for displaying an application window is provided. The method can be applied to a first operating system of an electronic device. The electronic device further includes a container. The container includes a second operating system and a first application adapted to the second operating system. The container is configured to provide a running environment of the second operating system for the first application. The electronic device displays a first interface. The first interface is an interface of the first operating system. The first interface includes an application icon of the first application. In the method, the first operating system controls the first application to run in the container in response to a first operation of a user on the application icon of the first application in the first interface. The first operating system receives first description information of the first application sent from the first application. The first operating system obtains first window information of the first application from a memory of the electronic device based on the first description information of the first application, and displays a second interface of the first application in a first window created by the first operating system based on the first window information of the first application.
[0008] The first description information of the first application is used to indicate a location in the memory of the electronic device where the first window information of the first application is stored. The first window information of the first application is window information of a home page of the first application or a last displayed interface before the first application is exited.
[0009] In the process of cross-system transmission of the window information, the first application only sends the description information of the window information to the first operating system, without sending the window information or the picture buffer content of the window. This can reduce the transmission bandwidth, improve the transmission speed of the information, and ensure the performance of the first operating system. Moreover, since the description information is transmitted between the first application and the first operating system, in the process of implementing the cross-system transmission of the window information, the first application does not need to perform the memory reading operation (i.e., does not need to read the window information from the memory and send it to the first operating system), and the first operating system does not need to perform the memory writing operation (i.e., does not need to write the window information sent by the first application into the memory). The first operating system can read the window information from the memory according to the description information. This reduces the memory reading process of the first application when the window information is sent, reduces the memory writing process of the first operating system when the window information is sent, and reduces the time length of the information transmission. Accordingly, the time delay of the cross-system display of the application window is also reduced.
[0010] In addition, in the method, the first application writes the window information into the memory of the electronic device, and the first operating system reads the window information from the memory of the electronic device. The first application (or the container) and the first operating system can share the memory of the electronic device. In this way, the first operating system can also be regarded as uniformly managing the window of the first application. This centralized management of the application window can greatly reduce the difficulty of synchronously managing the application window by the container and the first operating system, and ensure the normal display of the window on the first operating system.
[0011] In one possible implementation of the first aspect, the second interface of the first application includes a first control. The first operating system may also, in response to a user's second operation on the first control in the second interface, send operation information of the second operation to the first application; the operation information of the second operation includes type information and location information of the second operation, and is used by the first application to determine the second window information and second description information corresponding to the third interface displayed after responding to the second operation; the second description information of the first application is used to indicate the location in the memory of the electronic device where the second window information of the first application is stored. The first operating system receives the second description information of the first application sent by the first application. Based on the second description information of the first application, the first operating system retrieves the second window information of the first application from the memory of the electronic device, and displays the third interface of the first application in a first window based on the second window information of the first application.
[0012] In this implementation, the first operating system side can present an interface corresponding to the first application. Users can experience applications from other operating systems across systems or ecosystems on the first operating system side, and can also experience the "seamless" switching of the container application window from the container side to the first operating system side on the first operating system side.
[0013] In one possible implementation of the first aspect, the first operating system, in response to a third operation by the user on the second control, closes the first window and controls the first application within the container to terminate its operation; or, the first operating system, in response to a third operation by the user on the second control, closes the first window and controls the first application within the container to continue running.
[0014] In one possible implementation of the first aspect, a first operating system, in response to a user's fourth operation on a first window, sends operation information of the fourth operation to a first application; wherein the fourth operation represents a user's operation to zoom in or out of the first window; the operation information of the fourth operation is used by the first application to determine the fourth window information and fourth description information corresponding to the fourth interface displayed after responding to the fourth operation; the fourth description information of the first application is used to indicate the location in the memory of the electronic device where the fourth window information of the first application is stored. The first operating system receives the fourth description information of the first application sent by the first application; the first operating system retrieves the fourth window information of the first application from the memory of the electronic device based on the fourth description information of the first application, and displays the fourth interface of the first application in the first window based on the fourth window information of the first application.
[0015] In the above implementation, the first operating system side can present an interface corresponding to the first application. Users can operate on the content on the interface or the first window of the presented interface across systems or ecosystems on the first operating system side. Users can also experience the "seamless" switching of the container application window from the container side to the first operating system side on the first operating system side.
[0016] In one possible implementation of the first aspect, the container further includes at least one other application suitable for a second operating system, and the container is used to provide a runtime environment of the second operating system for the at least one other application. The first interface also includes application icons corresponding to the at least one other application, and each other application corresponds to a window created by the first operating system, with each window displaying the interface of the other application.
[0017] In this implementation, users can select to open multiple container applications on the first operating system side, and the first operating system can display the windows and interfaces corresponding to the multiple container applications selected by the user. It can be seen that users can experience multiple applications applicable to other operating systems across systems or ecosystems on the first operating system side, and can also experience the "seamless" switching of container application windows from the container side to the first operating system side.
[0018] In one possible implementation of the first aspect, a mapping relationship is established between the first window and the first application; the first operating system determines the first application corresponding to the second interface based on the first window and the mapping relationship; the first operating system sends operation information of the second operation to the first application.
[0019] In one possible implementation of the first aspect, the first window information is determined by the first application based on a preset display protocol, and the first description information is sent by the first application to the first operating system based on the preset display protocol. In another possible implementation of the first aspect, the operation information of the second operation is sent by the first operating system to the first application based on the preset display protocol.
[0020] In this way, the first application only needs to use a preset display protocol to complete the sending of description information, which is equivalent to reducing the processing cycle of the display protocol. As a result, the first operating system will reduce the display time delay when displaying the application window. From the user's perspective, this will alleviate the problem of window display lag and improve the user experience.
[0021] In one possible implementation of the first aspect, the first operating system receives a connection request sent by the first application based on a preset display protocol; in response to the connection request, the first operating system establishes a communication connection with the first application based on the preset display protocol.
[0022] In this implementation, a communication connection based on a preset display protocol is established between the first operating system and the first application, and information is transmitted based on this communication connection to ensure that the first application and the first operating system can communicate normally and transmit window information.
[0023] In one possible implementation of the first aspect, the first operating system and the container share the kernel of the electronic device, and the first operating system and the container share the memory of the electronic device.
[0024] In one possible implementation of the first aspect, the first operation includes a click and / or touch operation, the second operation includes a click and / or touch operation, the third operation includes a click operation, and the fourth operation includes one or more of the following: click, touch, and drag. Furthermore, the first operating system and the second operating system can be the same operating system, or they can be different operating systems.
[0025] Secondly, embodiments of this application provide an electronic device, which includes a first operating system and a container. The container includes a second operating system and a first application applicable to the second operating system. The container is used to provide the first application with a runtime environment of the second operating system. The electronic device displays a first interface, which is the interface of the first operating system and includes an application icon of the first application.
[0026] The first operating system is used to control the first application to run in a container in response to a user's first operation on the application icon of the first application in the first interface; the first application is used to send the first description information of the first application to the first operating system; the first description information of the first application is used to indicate the location in the memory of the electronic device where the first window information of the first application is stored; the first window information of the first application is the window information of the home page of the first application or the interface displayed before the last exit; the first operating system is also used to receive the first description information of the first application; the first operating system is also used to obtain the first window information of the first application from the memory of the electronic device based on the first description information of the first application, and display the second interface of the first application in a first window created by the first operating system based on the first window information of the first application.
[0027] In one possible implementation of the second aspect, the second interface includes a first control; a first operating system, further configured to, in response to a user's second operation on the first control in the second interface, send operation information of the second operation to a first application; the operation information of the second operation includes type information and location information of the second operation; the first application, further configured to, based on the operation information of the second operation, determine second window information and second description information corresponding to the third interface displayed after responding to the second operation; the second description information of the first application is used to indicate the location in the memory of the electronic device where the second window information of the first application is stored; the first application, further configured to, send the second description information of the first application to the first operating system; the first operating system, further configured to, based on the second description information of the first application, retrieve the second window information of the first application from the memory of the electronic device, and display the third interface of the first application in a first window based on the second window information of the first application.
[0028] In one possible implementation of the second aspect, the first window includes a second control for triggering the closing of the first window; the first operating system is further configured to close the first window in response to a third operation by the user on the second control and control the first application within the container to terminate operation; or, the first operating system is further configured to close the first window in response to a third operation by the user on the second control and control the first application within the container to continue running.
[0029] In one possible implementation of the second aspect, the first operating system is further configured to send operation information of the fourth operation to the first application in response to the user's fourth operation on the first window; the fourth operation represents the user's operation of zooming in or out of the first window; the first application is further configured to determine, based on the operation information of the fourth operation, the fourth window information and the fourth description information corresponding to the fourth interface displayed after responding to the fourth operation; the fourth description information of the first application is used to indicate the location in the memory of the electronic device where the fourth window information of the first application is stored; the first application is further configured to send the fourth description information of the first application to the first operating system; the first operating system is further configured to obtain the fourth window information of the first application from the memory of the electronic device according to the fourth description information of the first application, and display the fourth interface of the first application in the first window based on the fourth window information of the first application.
[0030] In one possible implementation of the second aspect, the container further includes at least one other application suitable for the second operating system, and the container is used to provide the runtime environment of the second operating system for the at least one other application. The first interface also includes application icons corresponding to the at least one other application, and each other application corresponds to a window created by the first operating system, with each window displaying the interface of the other application.
[0031] In one possible implementation of the second aspect, a mapping relationship is established between the first window and the first application; the first operating system is further configured to determine the first application corresponding to the second interface based on the first window and the mapping relationship; the first operating system is further configured to send operation information of the second operation to the first application.
[0032] In one possible implementation of the second aspect, the first window information is determined by the first application based on a preset display protocol, and the first description information is sent by the first application to the first operating system based on the preset display protocol. In another possible implementation of the second aspect, the operation information of the second operation is sent by the first operating system to the first application based on the preset display protocol.
[0033] In one possible implementation of the second aspect, the first operating system is further configured to receive a connection request sent by the first application based on a preset display protocol, and in response to the connection request, establish a communication connection with the first application based on the preset display protocol.
[0034] In one possible implementation of the second aspect, the first operating system and the container share the kernel of the electronic device, and the first operating system and the container share the memory of the electronic device.
[0035] Thirdly, an electronic device is provided, including a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform an application window display method as described in the first aspect and any implementation thereof.
[0036] Fourthly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform an application window display method as described in the first aspect and any implementation thereof.
[0037] Fifthly, a computer program product is provided that, when the computer program product is run on a computer, causes the computer to execute the application window display method as described in the first aspect and any implementation thereof.
[0038] It is understood that the beneficial effects achieved by the electronic devices described in the second and third aspects above, the computer-readable storage medium described in the fourth aspect, and the computer program product described in the fifth aspect can be referred to the beneficial effects in the first aspect and any of its possible design embodiments, and will not be repeated here. Attached Figure Description
[0039] Figure 1 A schematic diagram of the structure of an electronic device shown in an embodiment of this application. Figure 1 ;
[0040] Figure 2 A flowchart illustrating the application window display method shown in the embodiments of this application. Figure 1 ;
[0041] Figure 3 A schematic diagram of the structure of an electronic device shown in an embodiment of this application. Figure 2 ;
[0042] Figure 4 A flowchart illustrating the application window display method shown in the embodiments of this application. Figure 2 ;
[0043] Figure 5 A schematic diagram of a first window on an electronic device as shown in an embodiment of this application. Figure 1 ;
[0044] Figure 6 A schematic diagram of a first window on an electronic device as shown in an embodiment of this application. Figure 2 ;
[0045] Figure 7 A schematic diagram of a first window on an electronic device as shown in an embodiment of this application. Figure 3 ;
[0046] Figure 8 This is a schematic diagram of an application window on an electronic device as shown in an embodiment of this application;
[0047] Figure 9 A schematic diagram of the structure of an electronic device shown in an embodiment of this application. Figure 3 . Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application is merely a description of 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, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0049] Furthermore, the business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0050] Currently, there are multiple operating systems (or application ecosystems) in the industry, such as (HarmonyOS, etc.) As terminal device forms and user scenarios continue to converge, operating systems and application ecosystems are also developing towards integration and complementarity. For example, a terminal device may include a host operating system (or native operating system) and a virtual machine for running other operating system environments. The virtual machine includes an independent infrastructure to support the operation of the operating system, as well as applications running within the operating system. On a terminal device, applications can be used across systems or displayed in cross-ecosystem windows; that is, users can view or operate applications provided by another operating system within an application window provided by the host operating system of the terminal device.
[0051] For example, in System compatibility System application window (i.e., in) System-side display applicable When the system's target application window is used to run... The system's virtual machine retains the complete display software stack for displaying the target application, which is used for running... The system's virtual machine executes the display software stack, completing processes such as window drawing, window management, and window compositing for the target application. Afterwards, it is used for runtime. The system's virtual machine then sends the complete window information of the target application window to... system. The system receives window information and uses it to render and display the application window of the target application. Also, it can be understood that, in the context of running... Within the system's virtual machine, it is based on The system kernel controls the execution of the display software stack. Within the system, it is... The system kernel Controlling the system's operation, window information is used for running The system's virtual machine is transferred to The system is equivalent to cross-system or cross-ecosystem transmission, enabling the display of application windows across systems or ecosystems.
[0052] The above is used for operation The system's virtual machine retains the complete display software stack for running... Inside the system's virtual machine, the target application needs to execute its display software stack through a display protocol (such as the Wayland protocol). Also, when transmitting window information across systems, it needs to send window information based on another display protocol (such as the RDP protocol).
[0053] However, in the process of running When the system's virtual machine executes the display protocol, it must follow the display protocol's own processing cycle. When the processing cycle's time node arrives, it is used for execution. Only the system's virtual machine will send window information via the RDP protocol. system.
[0054] The above solution can also be called the Windows Subsystem for Linux GUI (WSLg) solution. In this solution, the virtual machine needs to go through two display protocols (such as Wayland protocol and RDP protocol) before sending the window information to the host operating system. Since each display protocol has a corresponding processing cycle, there will be a large time delay (such as at least two frames) when the host operating system displays the application window. From the user's perspective, this will result in problems such as window display stuttering, which will bring a poor user experience.
[0055] Furthermore, the virtual machine needs to send complete window information (i.e., the window's cached content) to the host operating system. This information transmission method increases bandwidth and slows down transmission speed, thus affecting the performance of the host operating system. In addition, in this transmission method, when the virtual machine sends window information, it needs to complete a memory read operation (i.e., read the window information from the virtual machine's memory), and after the host operating system receives the window information, it needs to complete a memory write operation (i.e., write the window information to the host operating system's memory). These read and write processes on both sides also increase the information transmission time and increase the time delay of application window display.
[0056] Furthermore, application windows need to be managed separately in the virtual machine and the host operating system, and the management of the same application window on both sides needs to be synchronized. However, synchronizing window management on both sides is quite difficult, and it is easy to encounter problems where the host operating system displays application windows abnormally.
[0057] Based on the above, this application provides an application window display method. In this method, the first operating system of the electronic device responds to the user's first operation on the application icon of the first application in the first interface and controls the first application to run in a container; the first application sends first description information of the first application to the first operating system; the first operating system receives the first description information of the first application, and obtains the first window information of the first application from the memory of the electronic device based on the first description information of the first application, and displays the second interface of the first application in the first window created by the first operating system based on the first window information of the first application.
[0058] The aforementioned electronic device includes a first operating system and a container. The container includes a second operating system and a first application applicable to the second operating system, and provides the second operating system's runtime environment for the first application. The electronic device displays a first interface, which is the interface of the first operating system. The first interface includes an application icon for the first application. The first description information of the first application indicates the location in the electronic device's memory where the first window information of the first application is stored. The first window information of the first application is the window information of the first application's home page or the interface displayed before the last exit. Furthermore, it is understood that the window information can represent the cached content of the window's screen.
[0059] The first application, applicable to the second operating system, runs in a container and sends the description information corresponding to the window information to the first operating system. The first operating system then retrieves the window information based on the description information and displays the corresponding interface, thus enabling cross-system display of the first application's window. During the cross-system transmission of window information, the first application only sends the description information of the window information to the first operating system, without needing to send the window information itself or copy and transmit the window's cached content. This reduces transmission bandwidth, increases information transmission speed, and ensures performance on the first operating system side. Furthermore, since only description information is transmitted between the first application and the first operating system, the first application does not need to perform memory read operations (i.e., it does not need to read the window information from memory and send it to the first operating system), and the first operating system does not need to perform memory write operations (i.e., it does not need to write the window information sent by the first application into memory). The first operating system can simply read the window information from memory based on the description information. This reduces the memory read process on the first application side and the memory write process on the first operating system side when sending window information, thus reducing the information transmission time and consequently reducing the time delay of cross-system display of the application window.
[0060] Furthermore, in some potential application scenarios, the first application only needs to use a preset display protocol to complete the acquisition of window information and the sending of description information, which is equivalent to reducing the processing cycle corresponding to the display protocol. As a result, the first operating system will reduce the display time delay when displaying the application window. From the user's perspective, this will alleviate the problem of window display lag and improve the user experience.
[0061] In addition, in the method of this application embodiment, the first application writes window information to the memory of the electronic device, and the first operating system reads the window information from the memory of the electronic device. The first application (or container) and the first operating system can share the memory of the electronic device. This method can also be regarded as the first operating system uniformly managing the window of the first application. This centralized management of application windows also greatly reduces the difficulty of synchronous management of application windows by the container and the first operating system, and ensures the normal display of the window on the first operating system side.
[0062] In some possible application scenarios, the application window display method in this application embodiment can be applied to, in HarmonyOS system compatibility System application window, in HarmonyOS system compatibility System application windows, etc. Of course, the method of this application embodiment can also be applied to scenarios of application windows that are compatible between other operating systems, and this application embodiment does not impose any limitations on this.
[0063] The application window display method provided in this application embodiment can be applied to electronic devices. See [link to relevant documentation]. Figure 1 As shown, the electronic device may include a first operating system and at least one container. The first operating system may represent the electronic device's native operating system (or native application ecosystem), such as the system configured when the electronic device leaves the factory. system, system, Systems, etc. A container can include at least one application (hereinafter referred to as a container application) suitable for a second operating system (or a second application ecosystem). The container runs the second operating system and provides the runtime environment of the second operating system for the container application. The first operating system and the operating system included in the container can be the same or different. Furthermore, in some possible application scenarios, if the first operating system is to be compatible with other operating system application windows, the container and the first operating system can share the same kernel or not. For example, implemented in... HarmonyOS system compatibility In the system application window, containers in an electronic device can share the same kernel as the primary operating system.
[0064] It's understandable that an application for a second operating system refers to an application developed by developers specifically for and adapted to that second operating system. Furthermore, the same application for different operating systems provides the same functionality, but the configuration during application development may differ.
[0065] Furthermore, the second operating system running within the container is an operating system that does not include or display a graphical interface. When the container is running the second operating system, it does not need to run graphics display services, but only retains the applications used to generate the graphical interface.
[0066] The primary operating system runs on the electronic device. The functions that users experience on the electronic device are directly provided by the primary operating system, and user interaction with the electronic device is also directly with the primary operating system. Furthermore, the primary operating system can provide the functionality of container applications to users through communication and information transmission with container applications. For example, the primary operating system can display the window corresponding to the container application, thereby enabling application windows to be displayed across systems or ecosystems. Container applications that users can experience on the primary operating system can include media applications (such as music applications, video applications, etc.), office applications (such as text editors, etc.), and browser applications.
[0067] In some potential application scenarios, when configuring various containers on an electronic device, the primary operating system can obtain information about each application within each container, including application name, application identifier, and application icon. Based on this information, the primary operating system can display the corresponding application icon and / or application name on the electronic device screen. The user can then select an application icon on the electronic device screen to display the interface of the container application within that container.
[0068] In addition to displaying the application icon and / or application name of the container application, the electronic device screen can also display the application icon and / or application name of applications provided by the first operating system. The first operating system receives user operation events on the screen, such as clicks, touches, drags, and double-clicks, and determines whether the operation event is a selection operation of an application icon based on the type of operation event, its location, and the position of the application icon displayed on the screen. If so, it further determines whether the application corresponding to the selection operation is an application of the first operating system or a container application. If it is a container application, the first operating system is responsible for launching the corresponding application process within the container or controlling the running of the corresponding application within the container. After the application runs within the container, the first operating system can display the corresponding application window on the screen, and the window displays interface content matching the application's running state. The user's selection operations for the application include clicks, touches, and double-clicks.
[0069] For example, see Figure 2As shown, the electronic device includes a first operating system and a container A, where container A contains applications A1 and A2. An icon a1 for application A1 and an icon a2 for application A2 are displayed on the electronic screen. If the user clicks icon a2 on the screen, the first operating system determines that the selection operation corresponds to application A2, and that application A2 originates from container A. Subsequently, the first operating system launches the corresponding application A2 process within container A, thereby controlling application A2 to begin running.
[0070] In some potential application scenarios, during runtime, container applications perform processes such as application window rendering, application window management, and application window composition through a preset display protocol. This process yields the corresponding window information for the application window, which is then saved to the electronic device's memory. Simultaneously, descriptive information indicating the location where the window information is saved is obtained and sent to a first operating system based on the preset display protocol. This preset display protocol corresponds to a second operating system applicable to the container application. For example, the container application may use a different operating system. The system can default to display protocols such as Wayland protocol and X11 protocol.
[0071] In other possible application scenarios, after the container application starts running, it sends a connection request to the first operating system based on a preset display protocol, requesting to establish a communication connection with the first operating system based on the preset display protocol. Upon receiving the connection request, the first operating system sends a response message to the container application, informing it that the communication connection based on the preset display protocol has been established. With the communication connection established, the container application first sends first description information to the first operating system based on the preset display protocol. This first description information indicates the storage location of the container application's first window information in the electronic device's memory, and the first window information represents the window information of the container application's home page or the interface displayed before the last exit. After receiving the first description information, the first operating system retrieves the first window information from the electronic device's memory based on the first description information and displays the corresponding interface of the container application within a created native window based on the first window information.
[0072] For example, still using Figure 2 For example, when application A2 starts running, it sends a connection request based on the X11 protocol to the first operating system. The first operating system receives this request, agrees to establish a communication connection with application A2, and then sends a response message to application A2. Afterwards, application A2 sends description information corresponding to its homepage window information to the first operating system based on the X11 protocol. The first operating system can then create a native window corresponding to application A2, retrieve the homepage window information of application A2 from memory based on the description information, and finally display the homepage window interface of application A2 within the native window using this information.
[0073] In some potential application scenarios, after the first operating system displays the interface corresponding to the container application, the user can continue to select controls on that interface. The first operating system can receive the user's selection and, in response, send operation information corresponding to that selection to the container application. This operation information includes details about the selection, such as type information and location information. The type information indicates whether the selection is a click, double-click, touch, or drag operation, while the location information indicates the position of the selection, such as the location of a click, double-click, touch, or drag. Upon receiving the operation information, the container application determines the user's specific operation content and intent based on the operation information, thereby determining the next step of the container application's operation or running status, as well as the corresponding second window information. The container application saves the second window information in the electronic device's memory, obtains second descriptive information indicating the location where the second window information is saved, and sends this second descriptive information to the first operating system. The first operating system then retrieves the second window information from the electronic device's memory based on the second descriptive information and displays the new container application interface within the original window.
[0074] For example, still using Figure 2 For example, after the first operating system displays the homepage window content corresponding to application A2 within the native window, the user can click the "Next Page" control on the homepage window content to make a selection. The first operating system then receives the user's selection and sends the selection operation information to application A2. This operation information may include type information (e.g., click) and location information (e.g., the coordinates of the click on the native window). Based on the type and location information of the selection operation, application A2 determines that the user clicked the "Next Page" control on the homepage window content. It then obtains the next page window information and corresponding description information of application A1's homepage and sends the description information to the first operating system. The first operating system then uses this description information to obtain the next page window information and continues to display the window interface of application A2's homepage that has transitioned to the next page within the native window.
[0075] In some potential application scenarios, during the subsequent transmission of operation information and other descriptive information, the container application and the first operating system can also communicate based on a preset display protocol. Furthermore, it is understood that in this embodiment, the preset display protocol used by the container application to obtain window information is the same as the preset display protocol used for transmitting information between the container application and the first operating system.
[0076] In addition, see other possible application scenarios. Figure 3 As shown, the aforementioned electronic device may include an application layer, a system architecture layer, and a hardware layer, wherein the application layer includes a container application layer and a first operating system application layer.
[0077] The container application layer includes at least one container application. Application containers from the same container can be compatible with the same operating system. A container application can include at least one... application, application, Applications, etc. Furthermore, container applications from different containers can be used on the same operating system or on different operating systems.
[0078] The first operating system application layer includes shell applications and native applications provided by the first operating system. The shell application can manage applications within the container in a unified manner, such as managing application icons. The shell application is responsible for identifying the container application corresponding to the application icon selected by the user, launching the corresponding application process within the container, and controlling the container application's execution. After starting, the container application sends the first description information corresponding to the first window information to the first operating system.
[0079] The system architecture layer includes the window fusion engine, window manager service (WMS), input manager service (IMS), and display module (or render service) in the first operating system.
[0080] The window fusion engine can receive requests, data, and description information sent by container applications, such as the first description information sent by the container application mentioned above. The window fusion engine can also send operation events and event information of the container application managed by the shell application on the first operating system side to the corresponding application within the container, achieving information synchronization between the container and the first operating system. For example, when the first operating system displays the container application's interface on the screen, and the user selects a control on the interface, the window fusion engine will send the user's selection event and event information to the corresponding container application.
[0081] For example, a window blending engine may include a protocol management module and a window information management module. The protocol management module can interface with the display protocols of various container applications within the container. The display protocols of these container applications are matched to the applicable operating system; for example, if the container application is compatible with an operating system... For a system, the display protocol of a container application can include the Wayland protocol, the X11 protocol, etc. Furthermore, the protocol management module can also obtain the timing of window creation, maximization, minimization, and destruction of the container application on the first operating system side, along with the corresponding operation events or selection events, and synchronize the received operation events and event information to the corresponding container application using the display protocols of different container applications.
[0082] The window information management module can maintain the description information of each container application. When connecting with the shell application mentioned above, the window fusion engine can save the received description information of the container application in the window information management module. The shell application then obtains the description information of the container application from the window information management module and retrieves the corresponding window information from memory based on the description information.
[0083] The window management module manages at least one window corresponding to a container application and the window of the native application displayed on the screen. It provides capabilities such as window creation, destruction, attribute setting, and Z-order control (e.g., the position of windows when stacked). It also provides window information of the displayed windows to the input management module. The input management module receives input or operation events from the underlying layer (e.g., the hardware layer), distributes these events, and provides them along with corresponding information to the shell application. The window fusion engine then retrieves the input or operation events and corresponding information from the shell application and sends them to the container application. The display module manages the display device (e.g., the screen) and displays the windows corresponding to the container application and the native application provided by the first operating system on the display device. It also displays the container application's interface within the corresponding window based on the container application's window information.
[0084] The hardware layer includes hardware device interfaces (HDI) and display devices (such as screens) for electronic devices. Specifically, the HDI interfaces with the southbound interfaces of different hardware devices, for example, with the southbound interface of a screen.
[0085] When implementing the application window display method provided in this application embodiment using the aforementioned electronic device, the shell application can launch the corresponding container application process on the first operating system side when the container application is used across systems or ecosystems. This allows the first operating system to obtain the description information sent by the container application, and to retrieve the corresponding window information from the electronic device's memory based on the description information, and then display the container application's interface within a native window created on the screen according to the window information. In this way, users can experience applications from other operating systems across systems or ecosystems on the first operating system side, and can also experience a "seamless" switching of the container application window from the container side to the first operating system side.
[0086] During cross-system transmission of window information, the container application only sends descriptive information about the window to the first operating system. It does not need to send the actual window information or copy and transmit the window's cached content. This reduces transmission bandwidth, increases transmission speed, and ensures performance on the first operating system side. Furthermore, since only descriptive information is transmitted between the container application and the first operating system, the container application does not need to perform memory read operations (i.e., it does not need to read the window information from memory and send it to the first operating system), and the first operating system does not need to perform memory write operations (i.e., it does not need to write the window information sent by the first application into memory). The first operating system can simply read the window information from memory based on the descriptive information. This reduces the memory read and write processes on the first application and operating system sides during window information transmission, thus reducing transmission time and consequently reducing the time latency for cross-system window display.
[0087] Furthermore, container applications can acquire window information and send description information using a preset display protocol, which reduces the processing cycle of the display protocol. As a result, the first operating system will reduce the display time delay when displaying the application window. From the user's perspective, this will alleviate the problem of window display lag and improve the user experience.
[0088] In addition, the window application writes window information to the memory of the electronic device, and the first operating system reads the window information from the memory of the electronic device. The window application (or container) and the first operating system can share the memory of the electronic device. This method can also be seen as the first operating system managing the windows of the first application in a unified manner. This centralized management of application windows also greatly reduces the difficulty of synchronous management of application windows on the container and the first operating system side, ensuring the normal display of windows on the first operating system side.
[0089] The electronic devices described in this application embodiment can be desktop computers, laptops, tablets, mobile phones, or other terminal devices that can run the first operating system (such as a host operating system) and support different containers.
[0090] See Figure 4 As shown, the application window display method provided in this application embodiment, when applied to the aforementioned electronic device, may include the following steps S401-S404, wherein the electronic device includes a first operating system and a container, the container includes a first application suitable for a second operating system, and the container is used to provide the first application with the operating environment of the second operating system.
[0091] S401, The first operating system receives the user's first operation on the application icon of the first application in the first interface.
[0092] In some embodiments, the electronic device may display a first interface corresponding to a first operating system, and the first operating system may display application icons of at least one container application on the first interface, wherein the at least one container application includes the aforementioned first application, thereby allowing the first operating system to demonstrate to the user which applications are available on the electronic device, for example... Figure 5 As shown. From the user's perspective, when a user wants to select an application to run, the user can perform a first action on that application. In some possible application scenarios, the first action may include one or more of the following: clicking, double-clicking, and touching. For example, when a user selects an application to run... Figure 5 Double-clicking the first application 501 in the middle selects to open the first application 501.
[0093] S402, The first operating system responds to the first operation and controls the first application to run in the container.
[0094] The first operating system obtains the user's first operation and determines the first application selected by the user, or the first application corresponding to the first operation, thereby controlling the operation of the first application within the container.
[0095] In some embodiments, when the first application runs within the container, it operates based on a preset display protocol, such as performing window drawing, window management, and window compositing, and acquiring window information matching its running state during operation. The first application then saves the window information in the electronic device's memory and obtains descriptive information about the window information, where the descriptive information indicates the location or address where the window information is stored in the electronic device's memory. The preset display protocol is matched to the second operating system applicable to the first application; for example, the second operating system applicable to the first application is... If the system's default display protocol for the first application is a common protocol such as Wayland protocol or X11 protocol, then the default display protocol for the first application is a common protocol such as Wayland protocol or X11 protocol.
[0096] S403, The first operating system receives the first description information of the first application sent by the first application.
[0097] In some embodiments, after the first application runs in the container, it first sends a first description of the first window information matching the current running state to the first operating system based on a preset display protocol. For example, since the first operation represents the user's operation on the application icon of the first application, it can be assumed that the user has chosen to open the first application for the first time. In this case, after the first application starts running, it first obtains the home window and home window information of the first application, saves the home window information in the memory of the electronic device, and obtains the description information of the home window information. Then, it sends the description information corresponding to the home window of the first application to the first operating system based on the Wayland protocol mentioned above. Alternatively, the first operation represents the user's operation on the application icon of the first application, which can also be assumed that the user has chosen to open the first application that has been minimized or paused. In this case, the first application can obtain the window information of the interface displayed before the last exit, determine the description information corresponding to the window information, and then send the description information to the first operating system based on the Wayland protocol mentioned above.
[0098] In some embodiments, different container applications may correspond to different preset display protocols. When communicating using different preset display protocols, a corresponding communication connection needs to be established to ensure that the first application and the first operating system can communicate normally and transmit description information. For example, after the first application starts running, it sends a connection request to the first operating system based on the preset display protocol. After receiving the connection request, the first operating system, if it agrees to establish a communication connection with the first application, establishes a communication connection with the first application and sends response information to the first application. After receiving the response information, the first application again sends the aforementioned first window information to the first operating system based on the preset display protocol.
[0099] S404. The first operating system obtains the first window information of the first application from the memory of the electronic device based on the first description information of the first application, and displays the second interface of the first application in the first window created by the first operating system based on the first window information of the first application.
[0100] In some embodiments, the first operating system may create a first window (or native window) corresponding to the first application after receiving the first operation described above; it may also create a first window corresponding to the first application after establishing a communication connection with the first application; or it may create a first window corresponding to the first application after receiving the first description information sent by the first application. The timing of creating the first window is not specifically limited in this embodiment.
[0101] In some embodiments, with HarmonyOS system compatibility Taking the system application window as an example, container applications in electronic devices are suitable for a second operating system. The system, the first operating system is (HarmonyOS) system. In this scenario, the container and the primary operating system can share a single kernel on the electronic device; that is, the same kernel controls the execution process of both the primary operating system and the container. When the container and the primary operating system share a kernel, they can also share the electronic device's memory; that is, both the primary operating system and the container application can access data or information from the same memory.
[0102] Based on this, the first application can store the corresponding window information, such as the first window information, in memory shared with the first operating system, and obtain the first description information (or pointer information) indicating the storage location (or address) of the first window information. Furthermore, after obtaining the first description information, the first operating system can retrieve the first window information from the corresponding location in the shared memory based on the first description information. In this way, information transmission between the first application and the first operating system does not require transmitting the actual information content, only the description information, thereby achieving zero-copy transmission of window information, reducing bandwidth waste, improving information transmission speed, and ensuring the performance of the first operating system.
[0103] In some embodiments, after obtaining the first window information of the first application, the first operating system can render the first window according to the first window information, thereby displaying the second interface corresponding to the first application within the first window; or, the first operating system can display the second interface within the first window according to the first window information. For example, see... Figure 6 As shown, if the first window information represents the homepage window of the first application, the second interface 602 displayed in the first window 601 created by the first operating system is the content of the homepage window of the first application. In this way, the first operating system can realize cross-system or cross-ecosystem window display or window fusion of applications, allowing users to use applications provided by other operating systems on the first operating system side, thus improving the user experience.
[0104] As can be seen from the above, in the application window display method provided in this application embodiment, during the cross-system transmission of window information, the first application only sends the description information of the window information to the first operating system, without sending the window information or copying and transmitting the window's screen cache content. This reduces transmission bandwidth, improves information transmission speed, and ensures the performance of the first operating system. Furthermore, since the first application and the first operating system transmit description information, during the cross-system transmission of window information, the first application does not need to perform memory read operations (i.e., it does not need to read the window information from memory and send it to the first operating system), and the first operating system does not need to perform memory write operations (i.e., it does not need to write the window information sent by the first application into memory). The first operating system can simply read the window information from memory based on the description information. This reduces the memory read process on the first application side and the memory write process on the first operating system side when sending window information, thus reducing the information transmission time and correspondingly reducing the time delay of cross-system application window display.
[0105] Furthermore, in some cases, the first application can complete the acquisition of window information and the sending of description information using a preset display protocol, which is equivalent to reducing the processing cycle corresponding to the display protocol. As a result, the first operating system will reduce the display time delay when displaying the application window. From the user's perspective, this will alleviate the problem of window display lag and improve the user experience.
[0106] In addition, in the method of this application embodiment, the first application writes window information to the memory of the electronic device, and the first operating system reads the window information from the memory of the electronic device. The first application (or container) and the first operating system can share the memory of the electronic device. This method can also be regarded as the first operating system uniformly managing the window of the first application. This centralized management of application windows also greatly reduces the difficulty of synchronous management of application windows by the container and the first operating system, and ensures the normal display of the window on the first operating system side.
[0107] In some embodiments, the second interface of the first application may include at least one control. After the first operating system displays the second interface of the first application, the user can perform further operations based on the second interface, such as clicking the first control among at least one control on the second interface. This operation can also be considered as the user's second operation. In this case, the first operating system obtains the second operation and, in response to the second operation, sends operation information corresponding to the second operation to the first application based on a preset display protocol, such as type information, location information, etc. After receiving the operation information of the selected operation, the first application determines the user's specific operation content, intent, etc., based on the operation information, and then determines the next running progress or running state of the first application, and obtains the second window information of the third interface corresponding to the next running progress or running state, and saves the second window information in the memory of the electronic device, while obtaining the second description information of the second window information. Then, the first application sends the second description information to the first operating system. The first operating system obtains the second window information from the memory of the electronic device based on the second description information, and continues to display the corresponding third interface in the first window based on the second window information, that is, the interface content corresponding to the current running state of the first application.
[0108] The second operation mentioned above can include click, double-click, touch, drag, etc. The type information of the second operation is used to indicate whether the selected operation is a click, double-click, touch, drag, etc., or the type information of the second operation includes click, double-click, touch, drag, etc. The position information of the second operation is used to indicate the position of the selected operation, such as the position of the click, the position of the double-click, the position of the touch, the trajectory of the drag, etc.
[0109] For example, users in such Figure 6 Clicking the "Next Page" control on the second interface 602 of the first window 601, as shown, inputs a second operation to the electronic device. The first operating system receives the second operation and sends operation information such as the type information and location information of the operation to the first application. The type information includes "click," and the location information includes the coordinates of the user's click position on the first window. Based on the received operation information, the first application determines that the user clicked the "Next Page" control on the second interface of the first window, and then continues to obtain the second window information of the next page after the first application's homepage, and sends the second description information corresponding to the second window information to the first operating system. Thus, the first operating system obtains the second window information based on the second description information, and continues to display the third interface 701 representing the content of the next page window of the first application on the first window 601, such as... Figure 7 As shown in the image.
[0110] In some potential application scenarios, after creating the first window corresponding to the first application, the first operating system sends the window attribute information of the first window to the first application. This window attribute information may include window size, allowing the first application to establish and determine the coordinate system of the first window based on its size. Thus, upon receiving the location information of the selection operation, the first application, based on the coordinates of the selection operation on the first window, the first window's coordinate system, and the currently displayed interface content, determines the target of the selection operation, or specifically identifies the content or control within the first window that the user selected. This information then determines which further window information should be acquired.
[0111] In some possible application scenarios, the aforementioned second operation can be any selection operation other than the first operation. This selection operation can be an operation on any interface content displayed in the first window corresponding to the first application, and this application embodiment does not impose specific limitations on this. Correspondingly, the second description information sent by the first application to the first operating system based on the second operation can also be the description information of any window or interface corresponding to the first application; or, the second description information can also be the description information of the window or interface corresponding to the first application in any running state. In this case, the running state of the first application is related to the user's second operation on the first operating system side.
[0112] In the above embodiments, the first operating system side can present a second interface corresponding to the first application. Users can experience applications of other operating systems across systems or ecosystems on the first operating system side, and can also experience the "seamless" switching of the container application window from the container side to the first operating system side on the first operating system side.
[0113] In some embodiments, the user can also perform other selection operations on the first window displayed on the first operating system side, such as closing the first window. In this case, the first window may include a second control, and the user can perform a third operation on the second control. The first operating system can also close the first window in response to receiving the user's third operation. When the first window is closed, the first operating system can also display a prompt message to ask the user whether they want to close the first application or minimize the first window. If the user chooses to minimize the window, the first operating system will not control the first application to terminate its operation, but will maintain the running state of the first application and close the first window on the first interface. In this case, a minimized application icon or application icon thumbnail of the first application can be displayed on the toolbar or status bar of the interface. When the user operates on the application icon of the first application again, or chooses to restore the first window of the first application (i.e., operates on the application icon on the toolbar or status bar), the first operating system will continue to display the second interface within the first window. If the user chooses to close the first application, the first operating system will control the first application to terminate its operation. When the user operates on the application icon of the first application again, the first operating system will recreate the first window of the first application and display the second interface.
[0114] In some embodiments, the user can also perform a fourth operation on the first window, such as zooming in, zooming out, or maximizing. In this case, the first operating system sends the operation information corresponding to the fourth operation to the first application. The first application determines the user's specific operation based on the operation information, such as the size to which the first window should be zoomed in or out. Then, based on the user's specific operation, it determines the possible fourth interface or its content after the first window is zoomed in or out, and obtains the corresponding fourth window information. Afterward, the first application saves the fourth window information in the memory of the electronic device, obtains fourth description information indicating the location where the fourth window information is saved, and sends the fourth description information to the first operating system. The first operating system retrieves the fourth window information from the memory of the electronic device based on the fourth description information, and displays the corresponding fourth interface in the zoomed-out or zoomed-out first window based on the fourth window information.
[0115] In some embodiments, a user can select multiple container applications on the first operating system side. For example, in addition to the first application, the container may also include other applications such as a second application and a third application; that is, the container can also provide a runtime environment for other applications. Furthermore, application icons corresponding to the other applications can be displayed on the first interface of the electronic device. The first operating system can create application windows corresponding to the other applications and display the interfaces of the corresponding applications within the application windows.
[0116] For example, the first operating system can also receive a first operation from the user on the application icon of the second application in the first interface, and respond to the first operation by controlling the second application to run in the container. In some possible application scenarios, after the second application starts running in the container, it obtains first window information that matches its running state. Then, the second application saves the first window information in the memory of the electronic device, and simultaneously obtains first description information of the first window information, wherein the first description information is used to indicate the location or address where the first window information is stored in the memory of the electronic device. The preset display protocol matches the second operating system applicable to the second application; for example, the second operating system applicable to the second application is... If the system is configured such that the preset display protocol for the second application is a common protocol such as Wayland protocol or X11 protocol, then the first operating system receives the first description information of the second application sent by the second application. This first description information indicates the location in the electronic device's memory where the first window information of the second application is stored. Based on the first description information, the first operating system retrieves the first window information of the second application from the electronic device's memory and displays the interface of the second application in a second window created by the first operating system.
[0117] For example, after a user selects to enable container application 1, they can then select to enable container application 2, and after selecting container application 2, they can select to enable container application 3. If the user selects to enable multiple container applications, the first operating system can also create multiple application windows; that is, each application corresponds to one application window, and each application window is created sequentially according to the order in which the corresponding container applications are selected. See [link to relevant documentation] Figure 8 As shown in (a), after creating multiple application windows, the first operating system can display the application windows in a stacked manner according to the order in which they were created. The application windows created first are displayed at the bottom layer, and the application windows created later are stacked on top of the earlier ones; or, as shown in (a), the first application window created first is displayed at the bottom layer, and the application windows created later are stacked on top of the earlier ones. Figure 8 As shown in (b), the first operating system can also tile multiple application windows created and distribute them on the screen.
[0118] In other embodiments, to prevent the first operating system from being unable to accurately distinguish which container application each application window corresponds to after creating multiple application windows, the first operating system can establish a mapping relationship between each application window and its corresponding container application. When the first operating system sends operation information for the second operation to the first application, the first operating system can determine the first application corresponding to the second interface based on the pre-established mapping relationship between the second interface and the first application. After determining the first application, the first operating system then sends the operation information for the second operation to the first application.
[0119] Alternatively, when a user selects a target window or the content displayed in a target window among multiple application windows, the first operating system can respond to the user's selection by first identifying the selected target window, and then determining the container application corresponding to the selection operation, or the container application corresponding to the target window, based on the target window and mapping relationship. The first operating system sends the operation information corresponding to the selection operation to the determined container application. The container application then determines the corresponding second window information based on the operation information and sends the second description information corresponding to the second window information to the first operating system. The first operating system obtains the second window information based on the second description information and displays the interface corresponding to the container application in the corresponding target window based on the second window information. The operation information includes the type and location information of the operation.
[0120] In the above embodiments, users can select to open multiple container applications on the screen, and the screen can display the interfaces corresponding to the multiple container applications selected by the user. It can be seen that users can experience multiple applications from other operating systems across systems or ecosystems on the first operating system side, and can also experience the "seamless" switching of container application windows from the container side to the first operating system side on the first operating system side.
[0121] It is understandable that, as shown in Table 1 below, after adopting the application window display method in this application embodiment, the latency of the application window displayed on the electronic device is significantly reduced compared to the aforementioned prior art. For example, in the prior art, the display of the application window may have a latency of at least two frames, with a latency of approximately 33.33ms, while in this application embodiment, the display of the application window may have a latency of at least one frame, with a latency of approximately 16.67ms. Furthermore, based on the display latency in the prior art, the refresh rate of a single application window corresponding to a container application in the prior art is approximately 1s / 33.33ms≈30Hz, while in this application embodiment, the refresh rate of a single application window corresponding to a container application can reach approximately 1s / 16.67ms≈60Hz. Therefore, compared with the prior art, the performance of the electronic device displaying the application window in this application embodiment is greatly improved.
[0122] Table 1
[0123] Scheme Display latency Window information zero-copy transmission Single window refresh rate Prior art 33.33 ms Not supported 30 Hz Embodiments of the present application 16.67 ms Supported 60 Hz
[0124] It is understood that the display protocol that the first operating system in this application embodiment can execute is the same as or matches the preset display protocol of the operating system applicable to the container application, and is pre-configured according to the preset display protocol of the operating system applicable to the container application.
[0125] In some solutions, multiple embodiments of this application can be combined, and the combined solution can be implemented. Optionally, some operations in the processes of each method embodiment may be combined, and / or the order of some operations may be changed. Furthermore, the execution order between the steps of each process is merely exemplary and does not constitute a limitation on the execution order between steps; other execution orders are also possible. It is not intended to indicate that the execution order is the only possible order in which these operations can be performed. Those skilled in the art will conceive of various ways to reorder the operations described in the embodiments of this application. In addition, it should be noted that the process details involved in one embodiment of this application are also applicable to other embodiments in a similar manner, or different embodiments may be combined.
[0126] Furthermore, some steps in the method embodiments can be equivalently replaced with other possible steps. Alternatively, some steps in the method embodiments may be optional and can be deleted in certain use cases. Or, other possible steps may be added to the method embodiments.
[0127] Furthermore, the various method embodiments can be implemented individually or in combination.
[0128] It is understood that, in order to achieve the above functions, the aforementioned electronic device includes hardware and / or software modules corresponding to perform each function. Based on the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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 in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0129] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0130] This application also provides an electronic device, such as... Figure 9 As shown, the electronic device may include one or more processors 901, memory 902, and communication interface 903. The memory 902 and communication interface 903 are coupled to the processor 901. For example, the memory 902, communication interface 903, and processor 901 may be coupled together via a bus 904.
[0131] The communication interface 903 is used for data transmission with other devices. The memory 902 stores computer program code. The computer program code includes computer instructions, which, when executed by the processor 901, cause the electronic device to perform the application window display method of this embodiment. The processor 901 can be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The bus 904 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 904 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0132] This application also provides a computer-readable storage medium storing computer program code. When the processor executes the computer program code, the electronic device performs the relevant method steps in the above method embodiments.
[0133] This application also provides a computer program product that, when run on a computer, causes the computer to execute the relevant method steps described in the above method embodiments.
[0134] The electronic devices, computer storage media, or computer program products provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0135] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0136] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus 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 device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0137] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0138] 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.
[0139] 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 readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to it, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0140] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An application window display method, characterized by, A first operating system applied to an electronic device, the electronic device further comprising a container, the container comprising a second operating system and a first application suitable for the second operating system, and the container being configured to provide a running environment of the second operating system for the first application; the electronic device displays a first interface, the first interface being an interface of the first operating system, and the first interface comprising an application icon of the first application; The method comprises: The first operating system controls the first application to run in the container in response to a first operation of a user on the application icon of the first application in the first interface; The first operating system receives first description information of the first application sent by the first application; the first description information of the first application is configured to indicate a position of first window information of the first application saved in a memory of the electronic device; the first window information of the first application is window information of a home page of the first application or an interface displayed before the first application was last exited; the first description information is pointer information, and the position is an address of the first window information saved in the memory of the electronic device; The first operating system obtains the first window information of the first application from the memory of the electronic device based on the first description information of the first application, and displays a second interface of the first application in a first window created by the first operating system based on the first window information of the first application.
2. The method of claim 1, wherein, The second interface comprises a first control; The method further comprises: The first operating system sends operation information of a second operation to the first application in response to the second operation of a user on the first control in the second interface; the operation information of the second operation comprises type information and position information of the second operation, and the operation information of the second operation is configured to enable the first application to determine second window information and second description information corresponding to a third interface displayed after the first application responds to the second operation; the second description information of the first application is configured to indicate a position of the second window information of the first application saved in the memory of the electronic device; The first operating system receives second description information of the first application sent by the first application; The first operating system obtains the second window information of the first application from the memory of the electronic device according to the second description information of the first application, and displays a third interface of the first application in the first window based on the second window information of the first application.
3. The method according to claim 1 or 2, characterized in that, The first window comprises a second control configured to trigger closing of the first window; the method further comprises: The first operating system closes the first window and controls the first application in the container to terminate running in response to a third operation of a user on the second control; or The first operating system closes the first window and controls the first application in the container to maintain running in response to a third operation of a user on the second control.
4. The method of claim 1, wherein, The method further comprises: The first operating system sends operation information of the fourth operation to the first application in response to a fourth operation of the first window by the user, the fourth operation representing an operation of zooming in or zooming out of the first window, and the operation information of the fourth operation being used by the first application to determine fourth window information and fourth description information corresponding to a fourth interface displayed in response to the fourth operation; and the fourth description information of the first application being used to indicate a location in a memory of the electronic device where the fourth window information of the first application is stored. The first operating system receives the fourth description information of the first application sent by the first application. The first operating system acquires the fourth window information of the first application from the memory of the electronic device according to the fourth description information of the first application, and displays the fourth interface of the first application in the first window based on the fourth window information of the first application.
5. The method of claim 1, wherein, The container further includes at least one other application adapted to the second operating system, and the container is configured to provide a running environment for the at least one other application; the first interface further includes application icons corresponding to the at least one other application respectively, and each other application corresponds to a window created by the first operating system, and an interface of the other application is displayed in each window respectively.
6. The method of claim 2, wherein, The first window and the first application have a mapping relationship; the first operating system sends operation information of a second operation of the first control in the second interface to the first application in response to the second operation of the first control in the second interface by the user, including: The first operating system determines the first application corresponding to the second interface according to the first window and the mapping relationship; The first operating system sends the operation information of the second operation to the first application.
7. The method of claim 1, wherein, The first window information is determined by the first application based on a preset display protocol, and the first description information is sent by the first application to the first operating system based on the preset display protocol.
8. The method of claim 2, wherein, The operation information of the second operation is sent by the first operating system to the first application based on a preset display protocol.
9. The method according to claim 7 or 8, characterized in that, Before the first operating system receives the first description information of the first application sent by the first application, the method further includes: The first operating system receives a connection request sent by the first application based on the preset display protocol; The first operating system establishes a communication connection based on the preset display protocol between the first operating system and the first application in response to the connection request.
10. The method of claim 1, wherein, The first operating system and the container share a kernel of the electronic device, and the first operating system and the container share a memory of the electronic device.
11. An electronic device, comprising: The electronic device includes a first operating system and a container, the container including a second operating system and a first application adapted to the second operating system, and the container being configured to provide a running environment of the second operating system for the first application; the electronic device displays a first interface, the first interface being an interface of the first operating system, and the first interface including an application icon of the first application; The first operating system is configured to control the first application to run in the container in response to a first operation of a user on an application icon of the first application in the first interface; The first application is configured to send first description information of the first application to the first operating system; The first description information of the first application is used to indicate a position of the first application in the memory of the electronic device, where first window information of the first application is stored; the first window information of the first application is window information of a home page of the first application or an interface displayed before the first application is lastly exited; the first description information is pointer information, and the position is an address of the first window information stored in the memory of the electronic device; The first operating system is further configured to receive the first description information of the first application; The first operating system is further configured to acquire the first window information of the first application from the memory of the electronic device based on the first description information of the first application, and display a second interface of the first application in a first window created by the first operating system based on the first window information of the first application.
12. The electronic device of claim 11, wherein, The second interface includes a first control; The first operating system is further configured to send operation information of a second operation of a user on the first control in the second interface to the first application in response to the second operation; the operation information of the second operation includes type information and position information of the second operation; The first application is further configured to determine second window information and second description information corresponding to a third interface displayed after the first application responds to the second operation according to the operation information of the second operation; the second description information of the first application is used to indicate a position of the second window information of the first application in the memory of the electronic device; The first application is further configured to send the second description information of the first application to the first operating system; The first operating system is further configured to acquire the second window information of the first application from the memory of the electronic device based on the second description information of the first application, and display the third interface of the first application in the first window based on the second window information of the first application.
13. The electronic device of claim 11 or 12, wherein The first window includes a second control, and the second control is used to trigger closing of the first window; The first operating system is further configured to close the first window and control the first application in the container to terminate running in response to a third operation of a user on the second control; or The first operating system is further configured to close the first window and control the first application in the container to maintain running in response to a third operation of a user on the second control.
14. The electronic device of claim 11, wherein The first operating system is further configured to send operation information of a fourth operation of a user on the first window to the first application in response to the fourth operation; the fourth operation represents an operation of the user on the first window, such as zooming in or zooming out. The first application is further configured to determine fourth window information and fourth description information corresponding to the fourth interface displayed in response to the fourth operation based on operation information of the fourth operation; and the fourth description information of the first application is used to indicate a location in a memory of the electronic device where the fourth window information of the first application is stored. The first application is further configured to send the fourth description information of the first application to the first operating system. The first operating system is further configured to obtain the fourth window information of the first application from the memory of the electronic device according to the fourth description information of the first application, and display the fourth interface of the first application in the first window based on the fourth window information of the first application.
15. The electronic device of claim 11, wherein, The container further comprises at least one other application adapted to the second operating system, and the container is configured to provide a running environment of the second operating system for the at least one other application; the first interface further comprises application icons corresponding to the at least one other application respectively; and each other application corresponds to a window created by the first operating system, and an interface of the other application is displayed in each window respectively.
16. The electronic device of claim 12, wherein, The first window and the first application have a mapping relationship therebetween. The first operating system is further configured to determine the first application corresponding to the second interface according to the first window and the mapping relationship. The first operating system is further configured to send operation information of the second operation to the first application.
17. The electronic device of claim 11, wherein, The first window information is determined by the first application based on a preset display protocol, and the first description information is sent by the first application to the first operating system based on the preset display protocol.
18. The electronic device of claim 12, wherein, The operation information of the second operation is sent by the first operating system to the first application based on a preset display protocol.
19. The electronic device of claim 17 or 18, wherein The first operating system is further configured to receive a connection request sent by the first application based on the preset display protocol, and establish a communication connection based on the preset display protocol between the first operating system and the first application in response to the connection request.
20. The electronic device of claim 11, wherein, The first operating system and the container share a kernel of the electronic device, and the first operating system and the container share a memory of the electronic device.
21. An electronic device, comprising: An electronic device includes a memory and one or more processors; the memory is coupled to the processors; the memory stores computer program codes including computer instructions, which, when executed by the processors, cause the electronic device to perform the application window display method of any one of claims 1-10.
22. A computer-readable storage medium, characterized in that, Computer instructions, when executed on an electronic device, cause the electronic device to perform the application window display method of any one of claims 1-10.
Citation Information
Patent Citations
Application window display method of virtual machine, computing equipment and storage medium
CN114880072A
Data processing method and device, storage medium and program product
CN116136784A