Application window display method and electronic device
By adopting an application window display method in electronic devices, window information is directly obtained and displayed from memory, the time delay problem when displaying application windows across systems is solved, and the user experience is improved.
Patent Information
- Application Number
- PCT/CN2024/074461
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-11
- Filing Date
- 2024-01-29
- Publication Date
- 2025-02-20
AI Technical Summary
The prior art has a time delay when displaying application windows across systems, resulting in poor user experience.
By adopting an application window display method in an electronic device, the first operating system directly obtains the window information from the memory and displays it without transmitting the actual window screen cache content.
The bandwidth and time of window information transmission is reduced, the information transmission speed is improved, the performance load on the first operating system side is reduced, and the user experience is improved.
Smart Images

Figure CN2024074461_20022025_PF_FP_ABST
Abstract
Description
Application window display method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 11, 2023, with application number 202311020769.5 and application name “Application Window Display Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to an application window display method and an electronic device. Background Art
[0003] As the form factor of terminal devices and user usage scenarios continue to merge, 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. The virtual machine includes an independent infrastructure for supporting the operation of the operating system and also includes applications running in the operating system. On the terminal device, applications can be used across systems or displayed across ecological windows. That is, users can view or operate applications provided by another operating system in the application window provided by the host operating system of the terminal device.
[0004] In some technical solutions, the method for realizing the cross-ecological window display of the above-mentioned application includes: retaining a complete display software stack for displaying the target application in the virtual machine, the virtual machine executing the display software stack, completing the window drawing, window management, window synthesis and other processes of the target application, and then the virtual machine sends the window information of the window to the host operating system in its entirety. 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. Among them, the complete display software stack is retained in the virtual machine, and inside the virtual machine, the target application needs to execute the display software stack through the display protocol (such as Wayland), and then send the window information corresponding to the display software stack to the host operating system through the remote desktop protocol (RDP) protocol.
[0005] However, in the above technical solutions, there will be a large time delay in displaying the application window on the host operating system side. From the user's perspective, the window display will be stuck, which will bring a poor user experience.
[0006] Summary of the Invention
[0007] Embodiments of the present application provide an application window display method and an electronic device, which can reduce the time delay in displaying application windows across systems on an electronic device and improve the user experience.
[0008] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0009] In a first aspect, a method for displaying an application window is provided, which can be applied to a first operating system of an electronic device, wherein the electronic device also includes a container, the container includes a second operating system and a first application suitable for the second operating system, and the container is used to provide the first application with a running environment of the second operating system. The electronic device displays a first interface, the first interface is the interface of the first operating system, and the first interface includes an application icon of the first application. In the above method, the first operating system controls the first application to run in the container in response to a first operation of the 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. Based on the first description information of the first application, the first operating system obtains the first window information of the first application from the memory of the electronic device, 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.
[0010] The first description information of the first application is used to indicate the location where the first window information of the first application is stored in the memory of the electronic device, and the first window information of the first application is the window information of the home page when the first application starts or the interface displayed before the last exit.
[0011] During the cross-system transmission of window information, the first application sends only the description information of the window information to the first operating system, without sending the window information, or in other words, the window's screen cache content does not need to be copied and transmitted. This can reduce the transmission bandwidth, increase the information transmission speed, 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, during the cross-system transmission of window information, the first application does not need to complete the memory read operation (i.e., there is no 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 complete the memory write operation (i.e., there is no need to write the window information sent by the first application to the memory). The first operating system can read the window information from the memory according to the description information. This reduces the memory read process on the first application side when the window information is sent, and reduces the memory write process on the first operating system side when the window information is sent, and also reduces the length of information transmission. Correspondingly, it will also reduce the time delay of the application window display across systems.
[0012] In addition, in the above method, 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 performing unified management of the windows of the first application. This centralized management method of application windows also greatly reduces the difficulty of synchronously managing application windows on the container and the first operating system side, ensuring the normal display of windows on the first operating system side.
[0013] In one implementation of the first aspect, the second interface of the first application includes a first control. The first operating system may also send operation information of the second operation to the first application in response to the user's second operation on the first control in the second interface; the operation information of the second operation includes type information and location information of the second operation, and the operation information of the second operation is used by the first application to determine the second window information and second description information corresponding to the third interface displayed in response 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 from the first application. The first operating system obtains 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 displays the third interface of the first application in the first window based on the second window information of the first application.
[0014] In this implementation, the first operating system side can present an 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.
[0015] In one implementation of the first aspect, the first operating system closes the first window in response to the user's third operation on the second control, and controls the first application in the container to terminate execution; alternatively, the first operating system closes the first window in response to the user's third operation on the second control, and controls the first application in the container to keep executing.
[0016] In one possible implementation of the first aspect, in response to a user's fourth operation on a first window, a first operating system sends operation information of the fourth operation to a first application; wherein the fourth operation represents a user's operation of zooming in or out on the first window; the operation information of the fourth operation is 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; the fourth description information of the first application is used to indicate a 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 obtains 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.
[0017] In the above implementation, the first operating system side can present an interface corresponding to the first application. The user can operate the content on the interface or the first window of the presented interface 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.
[0018] In one implementation of the first aspect, the container also includes at least one other application suitable for the second operating system, and the container is used to provide an operating environment of the second operating system for the at least one other application. The first interface also includes an application icon corresponding to at least one other application, and each other application corresponds to a window created by the first operating system, and each window displays the interface of the other application.
[0019] In this implementation, the user can choose to open multiple container applications on the first operating system side, and the first operating system can display the windows and interfaces in the windows corresponding to the multiple container applications selected by the user. It can be seen that the user can experience multiple applications suitable for 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.
[0020] In one 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; and the first operating system sends operation information of the second operation to the first application.
[0021] In one 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 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.
[0022] 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 corresponding to the display protocol, so that the first operating system will reduce the display time delay when displaying the application window. From the user's perspective, it will alleviate the problem of window display jamming and improve the user experience.
[0023] In an implementation of the first aspect, the first operating system receives a connection request sent from 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.
[0024] 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 the communication connection, ensuring that the first application and the first operating system can communicate normally and transmit window information.
[0025] In an implementation manner of the first aspect, 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.
[0026] In one implementation of the first aspect, the first operation includes a click and / or a touch operation, the second operation includes a click and / or a touch operation, the third operation includes a click operation, and the fourth operation includes one or more of click, touch, and drag operations. Furthermore, the first operating system and the second operating system may be the same operating system, or may be different operating systems.
[0027] In a second aspect, an embodiment of the present application provides an electronic device, which includes a first operating system and a container, the container including a second operating system and a first application suitable for the second operating system, and the container is used to provide an operating 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, and the first interface includes an application icon of the first application.
[0028] Among them, the first operating system is used to control the first application to run in the container in response to the 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 where the first window information of the first application is stored in the memory of the electronic device; 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 the first window created by the first operating system based on the first window information of the first application.
[0029] In one implementation of the second aspect, the second interface includes a first control; the first operating system is further used to send operation information of the second operation to the first application in response to the user's second operation on the first control in the second interface; the operation information of the second operation includes type information and location information of the second operation; the first application is further used to determine, based on the operation information of the second operation, the second window information and second description information corresponding to the third interface displayed in response 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 is further used to send the second description information of the first application to the first operating system; the first operating system is further used to obtain 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.
[0030] In one implementation of the second aspect, 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 used to close the first window and control the first application in the container to terminate execution in response to a third operation of the user on the second control; or, the first operating system is further used to close the first window and control the first application in the container to keep running in response to the third operation of the user on the second control.
[0031] In one implementation of the second aspect, the first operating system is further used 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 on the first window; the first application is further used to determine, based on the operation information of the fourth operation, the fourth window information and fourth description information corresponding to the fourth interface displayed in response 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 used to send the fourth description information of the first application to the first operating system; the first operating system is further used 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.
[0032] In one implementation of the second aspect, the container also includes at least one other application suitable for the second operating system, and the container is used to provide an operating environment of the second operating system for the at least one other application. The first interface also includes an application icon corresponding to at least one other application, and each other application corresponds to a window created by the first operating system, and each window displays the interface of the other application.
[0033] In one implementation method of the second aspect, a mapping relationship is established between the first window and the first application; the first operating system is also used to determine the first application corresponding to the second interface based on the first window and the mapping relationship; the first operating system is also used to send operation information of the second operation to the first application.
[0034] In one 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 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.
[0035] In an implementation manner of the second aspect, the first operating system is further configured to receive a connection request sent from the first application based on a preset display protocol, and to establish a communication connection with the first application based on the preset display protocol in response to the connection request.
[0036] In an implementation manner of the second aspect, 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.
[0037] In a third aspect, an electronic device is provided, comprising a memory and one or more processors; the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code comprises computer instructions, which, when executed by the processor, enable the electronic device to execute the application window display method as in the first aspect and any implementation thereof.
[0038] In a fourth aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the application window display method as in the first aspect and any implementation thereof.
[0039] In a fifth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is caused to execute the application window display method as in the first aspect and any implementation thereof.
[0040] It can be understood that the beneficial effects that can be achieved by the electronic device described in the second and third aspects, 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 possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] FIG1 is a structural diagram of an electronic device according to an embodiment of the present application;
[0042] FIG2 is a flowchart of a method for displaying an application window according to an embodiment of the present application;
[0043] FIG3 is a second structural diagram of an electronic device according to an embodiment of the present application;
[0044] FIG4 is a second flow chart of the application window display method according to an embodiment of the present application;
[0045] FIG5 is a first schematic diagram of a first window on an electronic device according to an embodiment of the present application;
[0046] FIG6 is a second schematic diagram of a first window on an electronic device according to an embodiment of the present application;
[0047] FIG7 is a third schematic diagram of a first window on an electronic device according to an embodiment of the present application;
[0048] FIG8 is a schematic diagram of an application window on an electronic device according to an embodiment of the present application;
[0049] FIG9 is a third structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship. For example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers 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, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.
[0051] In addition, the business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0052] Currently, there are many operating systems (or application ecosystems) in the industry, such as (Hongmeng) and so on. With the continuous integration of terminal device forms and user usage scenarios, the operating system or application ecosystem is also developing in the direction of 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, wherein the virtual machine includes an independent infrastructure for supporting the operation of the operating system and also includes applications running in the operating system. On the terminal device, applications can be used across systems or displayed across ecological windows, that is, users can view or operate applications provided by another operating system in the application window provided by the host operating system of the terminal device.
[0053] For example, in System side compatibility System application window (i.e. System side display applies to The target application window of the system) is used to run The system's virtual machine retains a complete display software stack for displaying the target application, which is used to run The system's virtual machine executes the display software stack to complete the target application's window drawing, window management, window synthesis and other processes, and then runs The system's virtual machine then sends the target application window's window information to the system. The system receives the window information and uses the window information to complete the rendering and display of the application window of the target application. The system's virtual machine is based on The system kernel controls the process of executing the display software stack. In the system, it is The system's kernel The operation of the system is controlled, and the window information is used to run The system's virtual machine is transferred to system, which is equivalent to cross-system or cross-ecological transmission, to realize cross-system or cross-ecological application window display.
[0054] The above is used to run The system's virtual machine retains the complete display software stack, which is used to run Inside the system's virtual machine, the target application needs to execute the target application's display software stack through a display protocol (such as the Wayland protocol), and when transmitting window information across systems, it needs to send window information based on another display protocol (such as the RDP protocol).
[0055] However, in the case of When the system's virtual machine executes the display protocol, it must follow the display protocol's own processing cycle. When the time node of the processing cycle arrives, it is used to run The system's virtual machine will send the window information to the system.
[0056] The above solution can also be called the window subsystem for Linux GUI (WSLg) solution for running Linux GUI programs. In this solution, the virtual machine side needs to go through two display protocols (such as the Wayland protocol and the 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, the window display will be jerked, which will bring a poor user experience.
[0057] Furthermore, the virtual machine needs to send the complete window information (i.e., the window's screen cache content) to the host operating system. This information transmission method increases the transmission bandwidth and slows down the transmission speed, thus affecting the performance of the host operating system. Furthermore, in this transmission method, when the virtual machine sends the window information, it needs to complete a memory read operation (i.e., read the window information from the virtual machine's corresponding memory). 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 corresponding memory). The read and fetch processes on both sides also increase the information transmission time and increase the time delay for the application window to be displayed.
[0058] Furthermore, application windows must be managed separately in the virtual machine and on the host operating system, and both sides must synchronize the management of the same application window. However, this synchronization is difficult and can easily lead to issues with the host operating system displaying application windows abnormally.
[0059] Based on the above content, an embodiment of the present application provides an application window display method, in which the first operating system of the electronic device controls the first application to run in a container in response to the user's first operation on the application icon of the first application in the first interface; 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 based on the first description information of the first application, obtains first window information of the first application from the memory of the electronic device, 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.
[0060] The electronic device includes a first operating system and a container, the container includes a second operating system and a first application suitable for the second operating system, and provides the first application with a running environment of the second operating system. In addition, the electronic device displays a first interface, the first interface is the interface of the first operating system, the first interface includes an application icon of the first application, the first description information of the first application is used to indicate the location of the first window information of the first application stored in the memory of the electronic device, and the first window information of the first application is the window information of the homepage of the first application or the interface displayed before the last exit. In addition, it can be understood that the window information can represent the screen cache content of the window.
[0061] The first application for 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 obtains the window information based on the description information and displays the corresponding interface. This can also realize the cross-system display of the window of the first application. 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 screen cache content. This can reduce the transmission bandwidth, improve the information transmission speed, and ensure the performance of the first operating system. In addition, since the description information is transmitted between the first application and the first operating system, during the cross-system transmission of window information, the first application does not need to complete the memory read operation (i.e., it is not necessary 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 complete the memory write operation (i.e., it is not necessary to write the window information sent by the first application to the memory). The first operating system can read the window information from the memory based on the description information. This reduces the memory read process on the first application side when sending the window information, and reduces the memory write process on the first operating system side when sending the window information, and also reduces the information transmission time. Correspondingly, it will also reduce the time delay of the application window display across systems.
[0062] In addition, in some possible 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. Therefore, the first operating system will reduce the display time delay when displaying the application window. From the user's perspective, it will alleviate the problem of window display jamming and improve the user experience.
[0063] In addition, in the method of the embodiment of the present application, 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 performing unified management of the windows of the first application. This centralized management method of application windows also greatly reduces the difficulty of synchronously managing application windows on the container and the first operating system side, thereby ensuring the normal display of windows on the first operating system side.
[0064] In some possible application scenarios, the application window display method in the embodiment of the present application can be applied to: (Hongmeng) system side compatibility System application window, in (Hongmeng) system side compatibility System application windows, etc. Of course, the method of the embodiment of the present application can also be applied to scenarios of application windows compatible between other operating systems, and the embodiment of the present application does not limit this.
[0065] The application window display method provided in the embodiment of the present application can be applied to an electronic device. As shown in FIG1 , the electronic device may include a first operating system and at least one container. The first operating system may represent the native operating system (or native application ecosystem) of the electronic device, for example, the system configured when the electronic device leaves the factory, such as system, system, System, etc. The container may include at least one application (hereinafter referred to as container application) suitable for the second operating system (or called the second application ecosystem). The container runs the second operating system and provides the container application with an operating environment for the second operating system. The first operating system and the operating system included in the container may be the same or different. In addition, in some possible application scenarios, if the first operating system is compatible with other operating system application windows, the container and the first operating system may share the same kernel or not. For example, in (Hongmeng) system side compatibility system application window, the container in the electronic device and the first operating system can share the same kernel.
[0066] It is understood that an application suitable for a second operating system refers to an application developed by a developer for the second operating system and adapted to the second operating system. Furthermore, the same application suitable for different operating systems may provide the same functions, but the configuration during the application development process may be different.
[0067] Furthermore, the second operating system running in the container is an operating system that does not include or display a graphical interface. When running the second operating system, the container does not need to run a graphical display service and only retains an application for generating a graphical interface.
[0068] The first operating system runs in the electronic device, and the functions that the user can experience on the electronic device are directly provided by the first operating system, and the interaction between the user and the electronic device is also a direct interaction with the first operating system. In addition, the first operating system can also provide the functions of the container application to the user through communication with the container application, information transmission, etc. For example, the first operating system can display the window corresponding to the container application, thereby realizing cross-system or cross-ecological display of the application window. The container applications that users can experience on the first operating system may include media applications (such as music applications, video applications, etc.), office applications (such as text editors, etc.), browser applications, etc.
[0069] In some possible application scenarios, when configuring various containers on an electronic device, the first operating system may obtain information about each application within each container, including the application name, application identifier, and application icon. Based on the information about each application within the container, the first operating system may display the application icon and / or application name corresponding to the container application on the electronic device screen. A user may select an application icon on the electronic device screen to display the interface of the container application within the container on the electronic device.
[0070] In addition to displaying the application icons and / or application names of container applications on the electronic device screen, the application icons and / or application names of applications provided by the first operating system may also be displayed. 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 on the application icon based on the type of operation event, the location where it occurred, and the location 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 operation of the corresponding application within the container. After the application is running in the container, the first operating system can display a window corresponding to the application on the screen, and the window can display interface content that matches the application's running status. The user's selection operation on the application includes clicking, touching, and double-clicking.
[0071] For example, as shown in Figure 2, an electronic device includes a first operating system and 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 a user clicks icon a2 on the screen, the first operating system determines that the selected application is A2 and that application A2 is from container A. The first operating system then starts the corresponding process for application A2 in container A, thereby controlling application A2 to start running.
[0072] In some possible application scenarios, when the container application is running, it performs application window drawing, application window management, application window synthesis and other processes through a preset display protocol, thereby obtaining window information corresponding to the application window, and saving the window information corresponding to the application window to the electronic device memory, and at the same time obtaining description information for indicating the location where the window information is saved, and sending the description information to the first operating system based on the preset display protocol. The preset display protocol corresponds to the second operating system applicable to the container application, for example, the container application is applicable to system, the preset display protocol can be Wayland protocol, X11 protocol, etc.
[0073] In other possible application scenarios, after the container application starts running, it will send a connection request to the first operating system based on the preset display protocol, requesting to establish a communication connection with the first operating system based on the preset display protocol. After receiving the connection request, the first operating system sends a response message to the container application, thereby informing the container application that the communication connection based on the preset display protocol has been established. When the communication connection has been established, the container application first sends first description information to the first operating system based on the preset display protocol, wherein the first description information is used to indicate the storage location of the first window information of the container application in the memory of the electronic device, and the first window information represents the window information of the home page of the container application or the interface displayed before the last exit. After receiving the first description information, the first operating system obtains the first window information from the memory of the electronic device according to the first description information, and displays the corresponding interface of the container application in the created native window according to the first window information.
[0074] For example, still using Figure 2 as an example, when application A2 begins running, it sends a connection request based on the X11 protocol to the first operating system. The first operating system receives the connection request, agrees to establish a communication connection with application A2, and then sends a response message to application A2. Application A2 then sends a description of the home window information of application A2 to the first operating system based on the X11 protocol. The first operating system can create a native window corresponding to application A2 and retrieve the home window information of application A2 from memory based on the description information. It then uses the home window information to display the home window interface of application A2 within the native window.
[0075] In some possible application scenarios, after the first operating system displays the interface corresponding to the container application, the user may continue to select controls on the interface. The first operating system may receive the user's selection operation and, in response to the selection operation, send operation information corresponding to the selection operation to the container application. The operation information includes operation information of the selection operation, such as type information and location information. The type information indicates whether the selection operation is a click, double-click, touch, drag, etc., and the location information indicates the location of the selection operation, such as the location of the click, double-click, touch, or drag trajectory. After receiving the operation information of the selection operation, the container application determines the user's specific operation content and intention based on the operation information of the selection operation, and further determines the next execution progress or operation status of the container application, as well as the second window information corresponding to the operation status. The container application stores the second window information in the electronic device's memory, obtains second description information indicating the location of the second window information, and sends the second description information to the first operating system. The first operating system continues to obtain the second window information from the electronic device's memory based on the second description information and displays the new interface corresponding to the container application in the native window.
[0076] For example, still taking Figure 2 as an example, after the first operating system displays the home window content corresponding to application A2 in the native window, the user can click the "next page" control on the home window content to select the home window content. Afterwards, the first operating system receives the user's selection operation and sends the operation information of the selection operation to application A2, wherein the operation information may include type information (such as click), location information of the selection operation (such as coordinate information of the click operation on the native window), etc. Application A2 determines that the content clicked by the user is the "next page" control on the home window content based on the type information of the selection operation (such as click), location information of the selection operation (such as coordinate information of the click operation on the native window), etc., and obtains the window information and corresponding description information of the next page of the home page of application A1, and sends the description information to the first operating system. Then, the first operating system obtains the next page window information based on the description information, and continues to display the home page of application A2 in the native window according to the next page window information to jump to the window interface of the next page.
[0077] In some possible application scenarios, subsequent transmission of operation information and other descriptive information between the container application and the first operating system may also be based on a preset display protocol. Furthermore, it is understood that in this embodiment of the present application, the preset display protocol used by the container application to obtain window information is the same as the preset display protocol used to transmit information between the container application and the first operating system.
[0078] In addition, in some other possible application scenarios, as shown in FIG3 , the 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.
[0079] The container application layer includes at least one container application. Application containers from the same container can be applied to the same operating system. The container application can include at least application, application, Applications, etc. In addition, container applications from different containers can be applicable to the same operating system or different operating systems.
[0080] The first operating system's application layer includes shell applications and native applications provided by the first operating system. The shell application can centrally manage applications within the container, such as managing the application icons of container applications within the container. The shell application can be 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 operation of the container application. After the container application begins running, it sends first description information corresponding to the first window information to the first operating system.
[0081] The system architecture layer includes the window fusion engine (window fusion engine), window management module (window manager service, WMS), input management module (input manager service, IMS) and display module (or called rendering service module) in the first operating system.
[0082] The window fusion engine can receive requests, data, description information, etc. sent by the container application, for example, receiving the first description information sent by the above-mentioned container application. The window fusion engine can also send the operation events and event information of the container application managed by the shell application on the first operating system side to the corresponding application in the container, thereby realizing the synchronization of information between the container and the first operating system. For example, when the first operating system displays the interface of the container application on the screen, the user selects a control on the interface, then the window fusion engine will send the user's selection event and event information to the corresponding container application.
[0083] For example, the window fusion engine may include a protocol management module and a window information management module. Among them, the protocol management module can connect to the display protocol of each container application in the container, and the display protocol of the container application matches the applicable operating system. For example, the container application is suitable for an operating system that is If the container application is a system, the display protocol of the container application may include the Wayland protocol, the X11 protocol, etc. Furthermore, the protocol management module may also obtain the timing of creating, maximizing, minimizing, and destroying windows of the container application on the first operating system side and 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.
[0084] The window information management module can maintain the description information of each container application. When connected to the above-mentioned shell application, 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 obtains the corresponding window information from the memory based on the description information.
[0085] The window management module can manage the windows corresponding to at least one container application and the windows of the native application displayed on the screen, provide capabilities such as window creation, destruction, property setting, and Z-order (such as the position of the window when each window is stacked) control, and provide window information of the window displayed on the screen to the input management module. The input management module receives input events or operation events from the bottom layer (such as the hardware layer), distributes the input events or operation events, and provides the input events or operation events and corresponding information to the shell application. The window fusion engine obtains the input events or operation events and corresponding information from the shell application, and sends the events and corresponding information to the container application. The display module can manage the display device (such as a screen), and display the window corresponding to the container application and the window corresponding to the native application provided by the first operating system on the display device, and display the interface of the container application in the corresponding window according to the window information of the container application.
[0086] The hardware layer includes the hardware device interface (HDI) and the display device of the electronic device (such as the screen). Among them, HDI connects to the southbound interface of different hardware devices, for example, the southbound interface of the screen.
[0087] When the application window display method provided by the embodiment of the present application is implemented based on the above-mentioned electronic device, the shell application can pull up the corresponding container application process on the first operating system side when the container application is used across systems or across ecosystems. Thereby, the first operating system obtains the description information sent by the container application, and obtains the corresponding window information from the electronic device memory according to the description information, and displays the corresponding interface of the container application according to the window information in the native window created on the screen. In this way, users can experience applications of other operating systems across systems or across 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.
[0088] During the cross-system transmission of window information, the container 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 can reduce the transmission bandwidth, increase the information transmission speed, and ensure the performance of the first operating system. In addition, since the description information is transmitted between the container application and the first operating system, during the cross-system transmission of window information, the container application does not need to complete the memory read operation (i.e., it 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 complete the memory write operation (i.e., it does not need to write the window information sent by the first application to the memory). The first operating system can read the window information from the memory based on the description information. This reduces the memory read process on the first application side when sending the window information, and reduces the memory write process on the first operating system side when sending the window information, and also reduces the length of information transmission. Correspondingly, it will also reduce the time delay of the application window display across systems.
[0089] In addition, the container application can 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. Therefore, the display time delay will be reduced when the first operating system displays the application window. From the user's perspective, it will alleviate the problem of window display jamming and improve the user experience.
[0090] 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 regarded as the first operating system performing unified management of the windows of the first application. This centralized management method of application windows also greatly reduces the difficulty of synchronously managing application windows on the container and the first operating system side, ensuring the normal display of windows on the first operating system side.
[0091] The electronic device in the embodiment of the present application may be a desktop computer, a laptop computer, a tablet computer, a mobile phone, or other terminal device that can be equipped with the first operating system (such as a host operating system) and supports different containers.
[0092] As shown in Figure 4, the application window display method provided in an embodiment of the present application, 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 an operating environment of the second operating system for the first application.
[0093] S401: A first operating system receives a first operation from a user on an application icon of a first application in a first interface.
[0094] In some embodiments, the electronic device may display a first interface corresponding to a first operating system, and the first operating system may display, on the first interface, an application icon of at least one container application on the electronic device, wherein the at least one container application includes the first application, so that the first operating system can show the user which applications are available on the electronic device, as shown, for example, in FIG5 . From the user's perspective, when the user wants to select one of the applications to run, the user may perform a first operation on the application. In some possible application scenarios, the first operation may include one or more of a click, a double-click, and a touch. For example, the user performs a double-click operation on the first application 501 in FIG5 to select and open the first application 501.
[0095] S402: The first operating system controls the first application to run in the container in response to the first operation.
[0096] The first operating system obtains the first operation of the user and determines the first application selected by the user, or determines the first application corresponding to the first operation, thereby controlling the execution of the first application in the container.
[0097] In some embodiments, when the first application runs in the container, it runs based on a preset display protocol, for example, completing processes such as window drawing, window management, and window synthesis, and obtains window information that matches the running state during the running process. Afterwards, the first application saves the window information in the memory of the electronic device and obtains description information of the window information, wherein the description information is used to indicate the location or address where the window information is saved in the memory of the electronic device. The preset display protocol matches the second operating system applicable to the first application, for example, the second operating system applicable to the first application is system, then the preset display protocol corresponding to the first application can be a common protocol such as the Wayland protocol and the X11 protocol.
[0098] S403: The first operating system receives first description information of the first application sent by the first application.
[0099] In some embodiments, after the first application runs in the container, it will first send first description information of the first window information that matches the current running state to the first operating system based on the 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 considered that the user chooses 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, and saves the home window information in the memory of the electronic device. At the same time, it obtains the description information of the home window information, and then sends the description information corresponding to the home window of the first application to the first operating system based on the above-mentioned wayland protocol. Alternatively, the first operation represents the user's operation on the application icon of the first application, and it can also be considered that the user chooses to open the first application that has been minimized or paused again. In this case, the first application can obtain the window information of the interface displayed before the last exit, and determine the description information corresponding to the window information. After that, it sends the description information to the first operating system based on the above-mentioned wayland protocol.
[0100] In some embodiments, different container applications may correspond to different preset display protocols. When communicating using different preset display protocols, corresponding communication connections need 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 establishes a communication connection with the first application if it agrees to establish a communication connection with the first application, and sends a response message to the first application. After receiving the response message, the first application again sends the above-mentioned first window information to the first operating system based on the preset display protocol.
[0101] S404: The first operating system obtains 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 a first window created by the first operating system based on the first window information of the first application.
[0102] 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; may also create the first window corresponding to the first application after establishing a communication connection with the first application; or may create the first window corresponding to the first application after receiving first description information sent by the first application. In the embodiments of the present application, the timing of creating the first window is not specifically limited.
[0103] In some embodiments, (Hongmeng) system side compatibility For example, the container application in the electronic device is suitable for the second operating system. System, the first operating system is (Hongmeng) system. In this case, the container and the first operating system can share a kernel of the electronic device, that is, the execution process of the first operating system and the container is controlled by the same kernel. When the container and the first operating system share the kernel, the container and the first operating system can also share the memory of the electronic device, that is, the first operating system and the container application can obtain data or information from the same memory.
[0104] Based on this, the first application can save the corresponding window information, such as the first window information, in the 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. Moreover, after obtaining the first description information, the first operating system can obtain the first window information from the corresponding location in the shared memory according to the first description information. In this way, the information transmission between the first application and the first operating system does not need to transmit the specific information content, but only the description information, thereby achieving the purpose of zero-copy transmission of window information, reducing the waste of transmission bandwidth, improving the transmission speed of information, and ensuring the performance of the first operating system side.
[0105] 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 in the first window; or, the first operating system displays the second interface in the first window according to the first window information. For example, as shown in Figure 6, if the first window information represents the home 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 home window of the first application. In this way, the first operating system can realize cross-system or cross-ecological window display or window fusion of applications, allowing users to use applications provided by other operating systems on the first operating system side, thereby improving the user experience.
[0106] As can be seen from the above, in the application window display method provided by the embodiment of the present application, during the cross-system transmission of window information, the first application sends only 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 can reduce the transmission bandwidth, improve the information transmission speed, 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, during the cross-system transmission of window information, the first application does not need to complete the memory read operation (i.e., it is not necessary 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 complete the memory write operation (i.e., it is not necessary to write the window information sent by the first application to the memory). The first operating system can read the window information from the memory based on the description information. This reduces the memory read process on the first application side when sending the window information, and reduces the memory write process on the first operating system side when sending the window information, and also reduces the information transmission time. Correspondingly, it will also reduce the time delay of the application window display across systems.
[0107] In some cases, the first application can 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. Therefore, the first operating system will reduce the display time delay when displaying the application window. From the user's perspective, it will alleviate the problem of window display jamming and improve the user experience.
[0108] In addition, in the method of the embodiment of the present application, 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 performing unified management of the windows of the first application. This centralized management method of application windows also greatly reduces the difficulty of synchronously managing application windows on the container and the first operating system side, ensuring the normal display of windows on the first operating system side.
[0109] 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 may perform further operations based on the second interface, such as clicking on the first control of the at least one control on the second interface. This operation may 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 and intention based on the operation information, and then determines the next running progress or running status of the first application, obtains the second window information of the third interface corresponding to the next running progress or running status, and saves the second window information in the memory of the electronic device, while obtaining second description information of the second window information. Thereafter, 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, i.e., the interface content corresponding to the current running status of the first application.
[0110] The second operation may include click, double-click, touch, drag, and other operations. The type information of the second operation is used to indicate whether the selection operation is a click, double-click, touch, drag, and other operations, or the type information of the second operation includes click, double-click, touch, drag, and other types. The position information of the second operation is used to indicate the position of the selection operation, such as the click position, double-click position, touch position, drag trajectory, and the like.
[0111] Exemplarily, the user clicks the "Next Page" control on the second interface 602 of the first window 601 as shown in Figure 6, thereby inputting a second operation to the electronic device. The first operating system receives the second operation and sends operation information such as type information and location information of the operation to the first application, wherein the type information includes click, and the location information includes the coordinate information of the location where the user performs the click operation 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, thereby continuing to obtain the second window information of the next page of the first application after the homepage, and sending 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 based on the second window information, as shown in Figure 7.
[0112] In some possible application scenarios, after creating a first window corresponding to a first application, the first operating system sends window attribute information of the first window to the first application. The window attribute information may include window size, etc., so that the first application can establish a coordinate system for the first window based on the window size. Thus, after receiving the location information of a selection operation, the first application determines the target of the selection operation, or determines what content or control the user selected in the first window, based on the coordinate information of the selection operation on the first window, the coordinate system of the first window, and the interface content currently displayed in the first window, and further determines which window information should be obtained.
[0113] In some possible application scenarios, the second operation may be any selection operation other than the first operation. The selection operation may be an operation on any interface content displayed in the first window corresponding to the first application. This embodiment of the present application does not impose any specific restrictions on this. Correspondingly, the second description information sent by the first application to the first operating system based on the second operation may also be description information of any window or interface corresponding to the first application; or, the second description information may also be 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 second operation of the user on the first operating system side.
[0114] In the above embodiment, 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.
[0115] In some embodiments, the user can also perform other selection operations on the first window displayed on the first operating system, such as closing the first window. In this case, the first window can 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 third operation from the user. When the first window is closed, the first operating system can also display a prompt message to ask the user whether 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, but will maintain the first application's running state and close the first window on the first interface. In this case, a reduced application icon or application icon thumbnail of the first application can be displayed on the toolbar or status bar on 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. 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.
[0116] In some embodiments, the user can also perform a fourth operation such as enlarging, reducing, maximizing, etc. on the first window. In this case, the first operating system will send the operation information corresponding to the fourth operation to the first application, and the first application will determine the user's specific operation based on the operation information, such as to what size to enlarge the first window, to what size to reduce it, etc. Then, based on the user's specific operation, the first application will determine the fourth interface or the interface content that may correspond to the first window after it is enlarged or reduced, and obtain the corresponding fourth window information. Afterwards, the first application saves the fourth window information in the memory of the electronic device, obtains the fourth description information for 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 obtains 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 enlarged or reduced first window based on the fourth window information.
[0117] In some embodiments, the user can select multiple container applications on the first operating system. For example, in addition to the first application, the container may also include other applications such as the second application and the third application. That is, the container may also provide an operating environment for other applications. Furthermore, application icons corresponding to the other applications may also be displayed on the first interface of the electronic device. The first operating system may create application windows corresponding to the other applications and display the interfaces of the corresponding applications within the application windows.
[0118] For example, the first operating system can also receive a first operation of the user on the application icon of the second application in the first interface, and in response to the first operation, control 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 the running state. Afterwards, the second application saves the first window information in the memory of the electronic device, and at the same time 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 saved in the memory of the electronic device. Among them, 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 system, then the preset display protocol corresponding to the second application may be a general protocol such as the Wayland protocol and the X11 protocol. Afterwards, the first operating system receives the first description information of the second application sent by the second application, wherein the first description information of the second application is used to indicate the location where the first window information of the second application is stored in the memory of the electronic device. The first operating system obtains the first window information of the second application from the memory of the electronic device based on the first description information of the second application, and displays the interface of the second application in the second window created by the first operating system based on the first window information of the second application.
[0119] For example, after the user chooses to open container application 1, he can continue to choose to open container application 2. After selecting container application 2, he can continue to choose to open container application 3. If the user chooses to open multiple container applications, there can also be multiple application windows created on the first operating system side, that is, each application corresponds to an application window, and each application window is established in sequence according to the order in which the corresponding container application is selected. Referring to (a) in Figure 8, after the first operating system creates multiple application windows, it can display each application window in a stacked manner according to the order in which each application window is created, and the application window created first is displayed at the bottom position, and the application window created later is stacked on the application window created first; or, as shown in (b) in Figure 8, the first operating system can also tile the multiple application windows created and distribute them on the screen.
[0120] In other embodiments, to prevent the first operating system from being unable to accurately identify 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 the 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 corresponding to the first application 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.
[0121] Alternatively, when a user performs a selection operation on a target window among multiple application windows or the interface content displayed in the target window, the first operating system can, in response to the user's selection operation, first identify the target window selected by the user, and then determine the container application corresponding to the selection operation, or determine the container application corresponding to the target window, based on the mapping relationship between the target window. The first operating system sends the operation information corresponding to the above-mentioned selection operation to the determined container application, and 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 information and location information of the above-mentioned operation.
[0122] In the above embodiment, the user can choose 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 the user can experience applications of multiple 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.
[0123] It can be understood that, as shown in Table 1 below, after adopting the application window display method in the embodiment of the present application, the delay time of the application window displayed on the electronic device is greatly reduced compared with the aforementioned prior art. For example, in the prior art, the display of the application window may have a delay of at least two frames, with a delay time of approximately 33.33ms, while in the embodiment of the present application, the display of the application window may have a delay of at least one frame, with a delay time of approximately 16.67ms. In addition, based on the display delay time in the prior art, the refresh rate of a single application window corresponding to the container application in the prior art is approximately 1s / 33.33ms≈30Hz, while in the embodiment of the present application, the refresh rate of a single application window corresponding to the container application can reach approximately 1s / 16.67ms≈60Hz. It can be seen that compared with the prior art, the performance of the electronic device when displaying application windows in the embodiment of the present application has been greatly improved.
[0124] Table 1
[0125] It is understandable that the display protocol that can be executed by the first operating system in the embodiment of the present application 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.
[0126] In some schemes, multiple embodiments of the present application can be combined, and the combined scheme can be implemented. Optionally, some operations in the process of each method embodiment are optionally combined, and / or the order of some operations is optionally changed. In addition, the execution order between the steps of each process is only exemplary and does not constitute a restriction on the execution order between the steps. There can also be other execution orders between the steps. It is not intended to indicate that the execution order is the only order in which these operations can be performed. Those of ordinary skill in the art will think of many ways to reorder the operations described in the embodiments of the present application. In addition, it should be noted that the process details involved in a certain embodiment of the present application are also applicable to other embodiments in a similar manner, or different embodiments can be used in combination.
[0127] Furthermore, some steps in the method embodiments may be equivalently replaced with other possible steps. Alternatively, some steps in the method embodiments may be optional and may be deleted in certain usage scenarios. Alternatively, other possible steps may be added to the method embodiments.
[0128] Furthermore, the various method embodiments may be implemented separately or in combination.
[0129] It is understandable that in order to implement the above functions, the aforementioned electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or 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 combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.
[0130] In this embodiment, the electronic device can be divided into functional modules according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into a single processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the module division in this embodiment is illustrative and is only a logical functional division. In actual implementation, other division methods may be used.
[0131] An embodiment of the present application further provides an electronic device, as shown in FIG9 , which may include one or more processors 901, a memory 902, and a communication interface 903. The memory 902 and the communication interface 903 are coupled to the processor 901. For example, the memory 902, the communication interface 903, and the processor 901 may be coupled together via a bus 904.
[0132] The communication interface 903 is used to transmit data with other devices. The memory 902 stores computer program code. The computer program code includes computer instructions. When the computer instructions are executed by the processor 901, the electronic device executes the application window display method in the embodiment of the present application. The processor 901 can be a processor or a controller, for example, 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 device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute the various exemplary logic blocks, modules and circuits described in conjunction with the embodiments of the present 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, and the like. The bus 904 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The above-mentioned bus 904 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, FIG9 shows only one thick line, but this does not mean that there is only one bus or one type of bus.
[0133] An embodiment of the present application further provides a computer-readable storage medium, in which computer program code is stored. When the processor executes the computer program code, the electronic device executes the relevant method steps in the method embodiment.
[0134] An embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the relevant method steps in the above method embodiment.
[0135] Among them, the electronic device, computer storage medium or computer program product provided in this application is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0136] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned 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.
[0137] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0138] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0140] If the integrated unit is implemented in the form of 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 embodiment of the present application is essentially or the contributing part or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0141] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for displaying an application window, characterized in that: 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 applicable to the second operating system, and the container being used 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, and the first interface comprises 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 by a user on an 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 used to indicate a location 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 last exit; The first operating system obtains 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 a first window created by the first operating system based on the first window information of the first application.
2. The method according to claim 1, characterized in that The second interface includes a first control; The method further comprises: The first operating system sends, in response to a second operation of the user on the first control in the second interface, 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 the operation information of the second operation is used by the first application to determine second window information and second description information corresponding to a third interface displayed in response to the second operation; the second description information of the first application is used to indicate a location in the memory of the electronic device where the second window information of the first application is stored; The first operating system receives second description information of the first application sent by the first application; The first operating system obtains 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 the 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 includes a second control, and the second control is used to trigger closing of the first window; the method further includes: The first operating system closes the first window and controls the first application in the container to terminate operation in response to a third operation of the user on the second control; or In response to a third operation of the user on the second control, the first operating system closes the first window and controls the first application in the container to keep running.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The first operating system sends, in response to a fourth operation of the user on the first window, operation information of the fourth operation to the first application; the fourth operation indicates an operation of the user to zoom in or out on the first window; the operation information of the fourth operation is 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; the fourth description information of the first application is used to indicate a location in the memory of the electronic device where the fourth window information of the first application is stored; The first operating system receives fourth description information of the first application sent by the first application; The first operating system obtains 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 according to any one of claims 1 to 4, characterized in that: The container also includes at least one other application suitable for the second operating system, and the container is used to provide a running environment 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, and each window displays an interface of the other application.
6. The method according to claim 2, characterized in that A mapping relationship is established between the first window and the first application; the first operating system sends operation information of the second operation to the first application in response to a second operation of the user on the first control in the second interface, including: The first operating system determines the first application corresponding to the second interface according to the mapping relationship between the first window and the first operating system; The first operating system sends operation information of the second operation to the first application.
7. The method according to any one of claims 1 to 6, characterized in that: 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 according to claim 2, characterized in that: 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; In response to the connection request, the first operating system establishes a communication connection with the first application based on the preset display protocol.
10. The method according to any one of claims 1 to 9, characterized in that: 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, characterized in that: The electronic device comprises a first operating system and a container, wherein the container comprises a second operating system and a first application applicable to the second operating system, and the container is used 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, and the first interface comprises 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 by a user on an application icon of the first application in the first interface; The first application is used 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 the location where the first window information of the first application is stored in the memory of the electronic device; 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 further used to receive first description information of the first application; The first operating system is further used to obtain 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 the first window created by the first operating system based on the first window information of the first application.
12. The electronic device according to claim 11, characterized in that: The second interface includes a first control; The first operating system is further configured to, in response to a second operation of the user 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; The first application is further used to determine, according to the operation information of the second operation, second window information and second description information corresponding to a third interface displayed in response to the second operation; the second description information of the first application is used to indicate a location in the memory of the electronic device where the second window information of the first application is stored; The first application is further used to send second description information of the first application to the first operating system; The first operating system is further used to obtain 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 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 according to claim 11 or 12, characterized in that: 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, in response to a third operation of the user on the second control, close the first window and control the first application in the container to terminate operation; or The first operating system is further configured to, in response to a third operation of the user on the second control, close the first window and control the first application in the container to keep running.
14. The electronic device according to any one of claims 11 to 13, characterized in that: The first operating system is further configured to, in response to a fourth operation performed by a user on the first window, send operation information of the fourth operation to the first application; the fourth operation indicates an operation of the user to zoom in or out on the first window; The first application is further used to determine, based on the operation information of the fourth operation, fourth window information and fourth description information corresponding to a fourth interface displayed in response to the fourth operation; the fourth description information of the first application is used to indicate a location in the memory of the electronic device where the fourth window information of the first application is stored; The first application is further used to send fourth description information of the first application to the first operating system; The first operating system is further used to obtain fourth window information of the first application from the memory of the electronic device according to 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 according to any one of claims 11 to 14, characterized in that: The container also includes at least one other application suitable for the second operating system, and the container is used to provide a running 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, and each window displays an interface of the other application.
16. The electronic device according to claim 12, characterized in that: A mapping relationship is established between the first window and the first application; The first operating system is further used to determine the first application corresponding to the second interface according to the mapping relationship between the first window and the first operating system; The first operating system is further used to send operation information of the second operation to the first application.
17. The electronic device according to any one of claims 11 to 16, characterized in that: 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 according to claim 12, characterized in that: 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 according to claim 17 or 18, characterized in that: The first operating system is further configured to receive a connection request sent from the first application based on the preset display protocol, and to establish a communication connection with the first application based on the preset display protocol in response to the connection request.
20. The electronic device according to any one of claims 11 to 19, characterized in that: 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, characterized in that: It includes a memory and one or more processors; the memory is coupled to the processor; the memory stores computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the application window display method as described in any one of claims 1-10.
22. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the application window display method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Virtual screen sharing method and device and electronic equipment
CN109725867A
Application window display method of virtual machine, computing equipment and storage medium
CN114880072A
Application program window processing method and device and computer readable storage medium
CN115658216A
Desktop application control method and device, electronic equipment and storage medium
CN116261713A
Method and Apparatus for Displaying Active Operating System Environment Data with a Plurality of Concurrent Operating System Environments
US20130293573A1