Application window display method and electronic equipment
By using container and window description information transmission method in electronic devices, the problem of delay in the display time of application window on the host operating system side is solved, and more efficient information transmission and user experience are achieved.
Patent Information
- Application Number
- CN202311020769.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-08-11
AI Technical Summary
The prior art has a large time delay when displaying application windows on the host operating system side, resulting in poor user experience.
By introducing a container in the electronic device, the container includes a second operating system and a first application suitable for the second operating system, the first operating system responds to user operations, controls the first application to run in the container, and receives a window of the first application. Describe information, obtain window information from memory to display the interface of the first application.
It reduces the time delay of application windows to display across systems, improves information transmission speed, reduces memory reading and writing processes, and improves user experience.
Smart Images

Figure CN119473057A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] With the continuous integration of terminal device forms and user usage scenarios, the operating systems that can be used by terminal devices are also developing in the direction of integration and complementarity. For example, a terminal device can include a host operating system and a virtual machine for running other operating system environments, where 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 on the application window provided by the host operating system of the terminal device.
[0003] In some technical solutions, the method of realizing the above-mentioned cross-ecological window display of the application includes: retaining a complete display software stack for displaying the target application in the virtual machine, the virtual machine executes the display software stack, completes 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. 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.
[0004] However, in the above-mentioned 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. Summary of the invention
[0005] The embodiments of the present application provide an application window display method and an electronic device, which can reduce the time delay of displaying application windows across systems on an electronic device and improve the user experience.
[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, a method for displaying an application window is provided, 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 applicable to the second operating system, and the container is used to provide the first application with an operating environment of the second operating system. 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. 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. 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.
[0008] 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 at the start of the first application or the interface displayed before the last exit.
[0009] In the process of transmitting window information across systems, the first application only sends the description information of the window information to the first operating system, without sending the window information, or the window screen cache content does not need to be copied and transmitted, which 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, in the process of implementing the cross-system transmission of window information, the first application does not need to complete the memory reading operation (that is, 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 writing operation (that is, there is no need to write the window information sent by the first application into the memory). The first operating system can read the window information from the memory according to the description information. In this way, the memory reading process on the first application side when the window information is sent, and the memory writing process on the first operating system side when the window information is sent, and the information transmission time is also reduced. Correspondingly, the time delay of the application window display across systems will also be reduced.
[0010] 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 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.
[0011] In an 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 where the second window information of the first application is stored in the memory of the electronic device. 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 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.
[0012] 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 "seamless" switching of container application windows from the container side to the first operating system side on the first operating system side.
[0013] In an implementation manner 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 running; or, 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 running.
[0014] In an implementation of the first aspect, in response to a fourth operation of a user on a first window, the first operating system sends operation information of the fourth operation to the first application; wherein 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 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 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.
[0015] 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.
[0016] In an implementation manner 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 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.
[0017] 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.
[0018] In an implementation manner 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.
[0019] 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.
[0020] In this way, the first application only needs to use a preset display protocol to complete the sending of description information, which is equivalent to reducing the processing cycle 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.
[0021] In an implementation manner of the first aspect, the first operating system receives a connection request sent from the first application based on a preset display protocol; the first operating system establishes a communication connection with the first application based on the preset display protocol in response to the connection request.
[0022] In this implementation, a communication connection based on a preset display protocol is established between the first operating system and the first application, and information is transmitted based on the communication connection, ensuring that the first application and the first operating system can communicate normally and transmit window information.
[0023] 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.
[0024] In an implementation manner 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 operations of click, touch, and drag. Furthermore, the first operating system and the second operating system may be the same operating system, or the first operating system and the second operating system may be different operating systems.
[0025] 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 includes 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.
[0026] 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 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.
[0027] In an implementation method of the second aspect, the second interface includes a first control; the first operating system is also 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 also used to determine, based on the operation information of the second operation, 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 where the second window information of the first application is stored in the memory of the electronic device; the first application is also used to send the second description information of the first application to the first operating system; the first operating system is also 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.
[0028] In an implementation manner 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 in response to a third operation of the user on the second control, and control the first application in the container to terminate running; or, the first operating system is further used to close the first window in response to the third operation of the user on the second control, and control the first application in the container to keep running.
[0029] In an implementation method of the second aspect, the first operating system is also used to send operation information of the fourth operation to the first application in response to a fourth operation of the user 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 also 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 the location in the memory of the electronic device where the fourth window information of the first application is stored; the first application is also used to send the fourth description information of the first application to the first operating system; the first operating system is also 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.
[0030] In an implementation manner 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 the 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.
[0031] In an 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.
[0032] In one possible implementation of the second aspect, the first window information is determined by the first application based on a preset display protocol, and the first description information is sent by the first application to the first operating system based on the preset display protocol. In another possible implementation of the second aspect, the operation information of the second operation is sent by the first operating system to the first application based on the preset display protocol.
[0033] In an implementation manner of the second aspect, the first operating system is further used 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.
[0034] 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.
[0035] 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 the memory stores computer program code, the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the application window display method as in the first aspect and any implementation thereof.
[0036] 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 in the first aspect and any implementation thereof.
[0037] In a fifth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer executes the application window display method in the first aspect and any implementation thereof.
[0038] 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
[0039] Figure 1 The structure of the electronic device shown in the embodiment of the present application is shown in FIG. Figure 1 ;
[0040] Figure 2 The following is a flow chart of the application window display method shown in the embodiment of the present application. Figure 1 ;
[0041] Figure 3 The structure of the electronic device shown in the embodiment of the present application is shown in FIG. Figure 2 ;
[0042] Figure 4 The following is a flow chart of the application window display method shown in the embodiment of the present application. Figure 2 ;
[0043] Figure 5 Schematic diagram of the first window on the electronic device shown in the embodiment of the present application Figure 1 ;
[0044] Figure 6 Schematic diagram of the first window on the electronic device shown in the embodiment of the present application Figure 2 ;
[0045] Figure 7 Schematic diagram of the first window on the electronic device shown in the embodiment of the present application Figure 3 ;
[0046] Figure 8 A schematic diagram of an application window on an electronic device according to an embodiment of the present application;
[0047] Fig. 9 The structure of the electronic device shown in the embodiment of the present application is shown in FIG. Figure 3 . DETAILED DESCRIPTION
[0048] 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, which 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. And, 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 items 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, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the differences. At the same time, in the embodiments of the present application, the words "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 solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0049] 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. A person of ordinary skill in the art can appreciate 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.
[0050] At present, there are many operating systems (or application ecosystems) in the industry, such as (Hongmeng), etc. 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 on the application window provided by the host operating system of the terminal device.
[0051] For example, in System side compatibility System application window (that is, in The system side display is applicable 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 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. And, it can be understood that in the process of running 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.
[0052] The above is used to run The system's virtual machine retains a complete display software stack, which is used to run Inside the virtual machine of the system, the target application needs to execute the display software stack of the target application through a display protocol (such as the Wayland protocol), and when transmitting window information across systems, the window information needs to be sent based on another display protocol (such as the RDP protocol).
[0053] 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.
[0054] 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 Wayland protocol and RDP protocol) before sending the window information to the host operating system. Since each display protocol has a corresponding processing cycle, there will be a large time delay (such as at least two frames) when the host operating system displays the application window. From the user's perspective, the window display will be stuck, which will bring a poor experience to the user.
[0055] In addition, 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 will increase the transmission bandwidth and slow down the transmission speed, thus affecting the performance of the host operating system. In addition, 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 memory corresponding to the virtual machine), and after the host operating system receives the window information, it needs to complete a memory write operation (i.e., write the window information to the memory corresponding to the host operating system). The reading and fetching process on both sides will also increase the time of information transmission and increase the time delay of the application window display.
[0056] In addition, the virtual machine and the host operating system need to manage application windows separately, and the management of the same application window on both sides needs to be synchronized. However, it is difficult to manage the windows on both sides synchronously, and it is easy to cause the host operating system to display the application window abnormally.
[0057] Based on the above content, an embodiment of the present application provides an application window display method, in which a first operating system of an electronic device controls the first application to run in a container in response to a first operation of a user on an application icon of a first application in a 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 a first window created by the first operating system based on the first window information of the first application.
[0058] 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 an operating environment of the second operating system. Also, the electronic device displays a first interface, the first interface is an interface of the first operating system, the first interface includes an application icon of the first application, 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 home page of the first application or the interface displayed before the last exit. And, it can be understood that the window information can represent the screen cache content of the window.
[0059] The first application applicable to the second operating system runs in the container, and sends the description information corresponding to the window information to the first operating system, and the first operating system obtains the window information according to the description information and displays the corresponding interface, so that the cross-system display of the window of the first application can also be realized. In the process of 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 the picture cache content of the window without copying and transmitting, which can reduce the transmission bandwidth, improve the transmission speed of information, and ensure the performance of the first operating system side. In addition, since the description information is transmitted between the first application and the first operating system, in the process of realizing the cross-system transmission of window information, the first application does not need to complete the memory reading operation (that is, 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 writing operation (that is, it is not necessary to write the window information sent by the first application into the memory). The window information can be read from the memory according to the description information on the first operating system side, which reduces the memory reading process on the first application side when the window information is sent, and reduces the memory writing process on the first operating system side when the window information is sent, and also reduces the duration of information transmission. Correspondingly, it will also reduce the time delay of the cross-system display of the application window.
[0060] Also, 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, when the first operating system displays the application window, the display time delay will be reduced. From the user's perspective, the problem of window display jamming will be alleviated, thereby improving the user experience.
[0061] 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.
[0062] 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 that are compatible between other operating systems, and the embodiment of the present application does not limit this.
[0063] The application window display method provided in the embodiment of the present application can be applied to electronic devices. Figure 1 As shown, the electronic device may include a first operating system and at least one container. The first operating system may represent the 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 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. Also, 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 may not share the kernel. 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.
[0064] It is understandable that the application applicable to the second operating system refers to an application developed by a developer for the second operating system and adapted to the second operating system. Also, the same application applicable to different operating systems may provide the same functions, but the configurations during the application development process may be different.
[0065] Furthermore, the second operating system running in the container is an operating system that does not include or display a graphical interface. When the container runs the second operating system, it does not need to run a graphical display service, and only retains an application for generating a graphical interface.
[0066] 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 directly interacting 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 the 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.
[0067] In some possible application scenarios, when the electronic device configures each container, the first operating system can obtain information about each application in each container, including application name, application identifier, application icon, etc. The first operating system can display application icons and / or application names corresponding to the container applications on the electronic device screen based on the information about each application in the container. The user can select an application icon on the electronic device screen to display the interface of the container application in the container on the electronic device.
[0068] In addition to displaying the application icon and / or application name of the container application on the screen of the electronic device, the application icon and / or application name of the application provided by the first operating system may also be displayed. The first operating system receives the user's operation events on the screen, such as click, touch, drag, double-click, etc., and determines whether the operation event is a selection operation of the application icon based on the type of the operation event, the location where it occurs, and the location of the application icon displayed on the screen. If so, it is further determined 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 pulling up the process of the corresponding application in the container, or controlling the operation of the corresponding application in the container. After the application runs in the container, the first operating system can display the window corresponding to the application on the screen, and the window displays the interface content matching the running status of the application. Among them, the user's selection operation for the application includes click, touch, double-click, etc.
[0069] For example, see Figure 2As shown, the electronic device includes a first operating system and a container A, wherein the container A includes an application A1 and an application A2. An icon a1 of application A1 and an icon a2 of application A2 are displayed on the electronic screen. If the user clicks icon a2 on the screen, the first operating system determines that the application corresponding to the selection operation is A2, and the application A2 comes from the container A. Afterwards, the first operating system will pull up the process of the corresponding application A2 in the container A, etc., so as to control the application A2 to start running.
[0070] 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 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.
[0071] In some 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 based on the preset display protocol with the first operating system. 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 the 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 interface corresponding to the container application in the created native window according to the first window information.
[0072] For example, Figure 2 For example, when the above-mentioned application A2 starts running, application A2 will send a connection request based on the X11 protocol to the first operating system. The first operating system receives the connection request, and after agreeing to establish a communication connection with application A2, it sends a response message to application A2. Afterwards, application A2 sends the description information corresponding to 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 obtain the home window information of application A2 from the memory according to the description information. Afterwards, the home window information is used to display the home window interface corresponding to application A2 in the native window.
[0073] In some possible application scenarios, after the first operating system displays the interface corresponding to the above container application, the user can continue to perform selection operations on the controls on the interface. The first operating system can receive the user's selection operation, and in response to the selection operation, send the operation information corresponding to the selection operation to the container application. The operation information includes the operation information of the selection operation, such as type information, position information, etc., wherein the type information is used to indicate whether the selection operation is a click, double-click, touch, drag, etc., and the position information is used to indicate the location of the selection operation, such as the click location, double-click location, touch location, drag trajectory, etc. After receiving the operation information of the above selection operation, the container application determines the specific operation content, intention, etc. of the user according to the operation information of the above selection operation, and then determines the next running progress or running state of the container application, and the second window information corresponding to the running state, and saves the second window information in the electronic device memory, and at the same time obtains the second description information for indicating the location of saving 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 memory according to the second description information, and displays the interface corresponding to the new container application in the native window.
[0074] For example, Figure 2 For 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, and 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.
[0075] In some possible application scenarios, in the process of transmitting subsequent operation information and other descriptive information, the container application and the first operating system may also communicate based on the preset display protocol. Also, it is understandable that in the embodiment of the present application, the preset display protocol for the container application to obtain window information is the same as the preset display protocol for transmitting information between the container application and the first operating system.
[0076] In addition, for some other possible application scenarios, see Figure 3 As shown, the above-mentioned electronic device may include an application layer, a system architecture layer and a hardware layer, wherein the application layer includes a container application layer and a first operating system application layer.
[0077] The container application layer includes at least one container application. Application containers from the same container can be applicable 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 to different operating systems.
[0078] The first operating system application layer includes a shell application and a native application provided by the first operating system. The shell application can manage the applications in the container in a unified manner, such as managing the application icons of the container applications in the container. The shell application can be responsible for identifying the container application corresponding to the application icon targeted by the user's selection operation, and launching the process of the corresponding application in the container to control the operation of the container application. After the container application starts running, it sends the first description information corresponding to the first window information to the first operating system.
[0079] The system architecture layer includes a window fusion engine, a window manager service (WMS), an input manager service (IMS), and a display module (or render service) in the first operating system.
[0080] The window fusion engine can receive requests, data, description information, etc. sent by the container application, for example, receive the first description information sent by the above 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, so as to synchronize the 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.
[0081] For example, the window fusion engine may include a protocol management module and a window information management module. The protocol management module may 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 applicable to the operating system system, the display protocol of the container application may include the wayland protocol, the X11 protocol, etc. In addition, 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.
[0082] The window information management module can maintain the description information of each container application. By connecting 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 according to the description information.
[0083] 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 the 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, provides the input events or operation events and the corresponding information to the shell application, and the window fusion engine obtains the input events or operation events and the corresponding information from the shell application, and sends the events and the corresponding information to the container application. The display module can manage the display device (such as the 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.
[0084] The hardware layer includes hardware device interface (HDI) and display devices (such as screens) of electronic devices, etc. Among them, HDI is connected to the southbound interface of different hardware devices, for example, the southbound interface of the screen.
[0085] 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, obtains the corresponding window information from the electronic device memory according to the description information, and displays the corresponding interface of the container application in the native window created on the screen according to the window information. In this way, 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 container application windows from the container side to the first operating system side on the first operating system side.
[0086] During the cross-system transmission of window information, the container 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 screen cache content, which 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 container application and the first operating system, in the process of implementing the cross-system transmission of window information, the container application does not need to complete the memory reading 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 writing operation (i.e., it is not necessary to write the window information sent by the first application into the memory). The first operating system can read the window information from the memory according to the description information, which reduces the memory reading process on the first application side when the window information is sent, and reduces the memory writing process on the first operating system side when the window information is sent, and also reduces the duration of information transmission. Correspondingly, it will also reduce the time delay of the cross-system display of the application window.
[0087] Furthermore, 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, thereby reducing the display time delay 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.
[0088] In addition, the window application writes window information to the memory of the electronic device, and the first operating system reads the window information from the memory of the electronic device. The window application (or container) and the first operating system can share the memory of the electronic device. This method can also be 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.
[0089] 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 the like, which may be equipped with the first operating system (such as a host operating system) and may support different containers.
[0090] See also Figure 4 As shown, the application window display method provided in the 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 a running environment of the second operating system for the first application.
[0091] S401: A first operating system receives a first operation by a user on an application icon of a first application in a first interface.
[0092] In some embodiments, the electronic device may display a first interface corresponding to the first operating system, and the first operating system may display an application icon of at least one container application on the electronic device on the first interface, 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, for example Figure 5 From the user's perspective, when the user wants to select one of the applications to run, the user can perform a first operation on the application. In some possible application scenarios, the first operation may include one or more operations of clicking, double-clicking, and touching. For example, the user Figure 5 A double-click operation is performed on the first application 501 in the display so as to select and open the first application 501.
[0093] S402: In response to a first operation, the first operating system controls the first application to run in a container.
[0094] 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 operation of the first application in the container.
[0095] 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 obtaining 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 may be a general protocol such as the Wayland protocol and the X11 protocol.
[0096] S403: The first operating system receives first description information of the first application sent by the first application.
[0097] In some embodiments, after the first application runs in the container, it will first send the 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, the home window and home window information of the first application are first obtained, and the home window information is saved in the memory of the electronic device. At the same time, the description information of the home window information is obtained, and then the description information corresponding to the home window of the first application is sent 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, and then send the description information to the first operating system based on the above-mentioned wayland protocol.
[0098] 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. Exemplarily, 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.
[0099] 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.
[0100] In some embodiments, the first operating system may create a first window (or native window) corresponding to the first application after receiving the first operation; may also create a first window corresponding to the first application after establishing a communication connection with the first application; and may also create a 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.
[0101] In some embodiments, (Hongmeng) system side compatibility For example, the container application in the electronic device is applicable to 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. In the case where 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 both obtain data or information from the same memory.
[0102] 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.
[0103] In some embodiments, after obtaining the first window information of the first application, the first operating system may 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, see Figure 6 As shown, 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 the window display or window fusion of applications across systems or ecosystems, allowing users to use applications provided by other operating systems on the first operating system side, thereby improving the user experience.
[0104] As can be seen from the above content, 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 screen cache content, which 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, in the process of implementing the cross-system transmission of window information, the first application does not need to complete the memory reading operation (that is, 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 writing operation (that is, it is not necessary to write the window information sent by the first application into the memory). The window information can be read from the memory on the first operating system side according to the description information, which reduces the memory reading process on the first application side when the window information is sent, and reduces the memory writing process on the first operating system side when the window information is sent, and also reduces the information transmission time. Correspondingly, it will also reduce the time delay of the application window display across systems.
[0105] Also, 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, thereby reducing the display time delay when the first operating system displays the application window. From the user's perspective, it will alleviate the problem of window display jams and improve the user experience.
[0106] 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.
[0107] In some embodiments, the second interface of the first application may include at least one control. After the first operating system displays the second interface of the first application, the user may further perform operations based on the second interface, such as clicking on the first control of at least one control on the second interface, etc. This operation may also be used 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 the preset display protocol, such as type information, location information, etc. After receiving the operation information of the above-mentioned selection operation, the first application determines the specific operation content, intention, etc. of the user according to the operation information, and then determines the next running progress or running state of the first application, and obtains the second window information of the third interface corresponding to the next running progress or running state, and saves the second window information in the memory of the electronic device, and obtains the second description information of the second window information. After that, 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 according to the second description information, and continues to display the corresponding third interface in the first window according to the second window information, that is, the interface content corresponding to the current running state of the first application.
[0108] The second operation may include click, double-click, touch, drag and other operations, and the type information of the second operation is used to indicate whether the selection operation is 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 track and the like.
[0109] For example, the user Figure 6 The user clicks the "Next Page" control on the second interface 602 of the first window 601 shown, 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 a click, and the location information includes the coordinate information of the location where the user clicks on the first window. The first application determines, based on the received operation information, that the user clicked the "Next Page" control on the second interface of the first window, and thus continues to obtain the second window information of the next page of the first application after the homepage, and sends the second description information corresponding to the second window information to the first operating system. Thus, the first operating system obtains the second window information based on the second description information, and continues to display the third interface 701 representing the content of the next page window of the first application on the first window 601 based on the second window information, as shown in FIG. Figure 7 as shown in .
[0110] In some possible application scenarios, after creating the first window corresponding to the first application, the first operating system will send the window attribute information of the first window to the first application, wherein the window attribute information may include the window size, etc., so that the first application can establish a coordinate system to determine the first window according to the window size. In this way, after receiving the position information of the selection operation, the first application determines which is the target of the selection operation, or determines what content or control the user has selected in the first window according to 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 continue to be obtained.
[0111] In some possible application scenarios, the second operation may be any selection operation other than the first operation, and the selection operation may be an operation on any interface content displayed in the first window corresponding to the first application, and the embodiments of the present application do not impose specific restrictions on this. And, correspondingly, the second description information sent by the first application to the first operating system based on the second operation may also be the description information of any window or interface corresponding to the first application; or, the second description information may also be the description information of the window or interface corresponding to the first application in any running state, in which case the running state of the first application is related to the second operation of the user on the first operating system side.
[0112] In the above embodiment, the first operating system side can present a second interface corresponding to the first application. The user can experience applications of other operating systems across systems or ecosystems on the first operating system side, and can also experience the "seamless" switching of the container application window from the container side to the first operating system side on the first operating system side.
[0113] In some embodiments, the user can also perform other selection operations on the first window displayed on the first operating system side, such as closing the first window. In this case, the first window may include a second control, and the user can perform a third operation on the second control. The first operating system can also close the first window in response to receiving the third operation of the user. When the first window is closed, the first operating system can also display a prompt message to ask the user whether he wants 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 the operation, and the running state of the first application will be maintained, and the first window on the first interface will be closed. In this case, the application icon or application icon thumbnail of the first application after reduction can be displayed on the toolbar or status bar on the interface. When the user operates the application icon of the first application again, or chooses to restore the first window of the first application (that is, operates the application icon on the toolbar or status bar), the first operating system will continue to display the second interface in the first window. If the user chooses to close the first application, the first operating system will control the first application to terminate the operation. When the user operates the application icon of the first application again, the first operating system will recreate the first window of the first application and display the second interface.
[0114] In some embodiments, the user can also perform a fourth operation 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 the first window is enlarged or reduced to, etc., and then, based on the user's specific operation, determine the fourth interface or 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.
[0115] In some embodiments, the user can select multiple container applications on the first operating system side. Exemplarily, 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 a running environment for other applications. Also, on the first interface of the electronic device, application icons corresponding to other applications may also be displayed. The first operating system may create application windows corresponding to the other applications, and display the interfaces of the corresponding applications in the application windows.
[0116] 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 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.
[0117] 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. Figure 8 As shown in (a) of FIG. 1 , after creating multiple application windows, the first operating system 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, and the application window created later is stacked on the application window created first; or Figure 8 As shown in (b), the first operating system can also tile the created multiple application windows and distribute them on the screen.
[0118] In other embodiments, in order to avoid the first operating system being unable to accurately distinguish which container application each application window corresponds to after creating multiple application windows, the first operating system can respectively establish a mapping relationship between each application window and the corresponding container application. When the first operating system sends the operation information of the second operation to the first application, the first operating system can determine the first application corresponding to the second interface according to the second interface corresponding to the first application and the pre-established mapping relationship, and after determining the first application, send the operation information of the second operation to the first application.
[0119] 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 respond to the user's selection operation by first identifying the target window selected by the user, and then determining the container application corresponding to the selection operation, or determining the container application corresponding to the target window, based on the target window and the mapping relationship. 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.
[0120] 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.
[0121] 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, the display of the application window in the prior art may have at least two frames of delay, and the delay time is about 33.33ms, while the display of the application window in the embodiment of the present application may have at least one frame of delay, and the delay time is about 16.67ms; and, 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 about 1s / 33.33ms≈30Hz, while the display delay time in the embodiment of the present application, the refresh rate of a single application window corresponding to the container application can reach about 1s / 16.67ms≈60Hz. It can be seen that compared with the prior art, the performance of the electronic device when displaying the application window in the embodiment of the present application has been greatly improved.
[0122] Table 1
[0123] plan Display Delay Zero-copy transmission of window information Single window refresh rate Prior art 33.33ms Not supported 30Hz Embodiments of the present application 16.67ms support 60Hz
[0124] It can be understood 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.
[0125] 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 show that the execution order is the only order in which these operations can be performed. A person of ordinary skill in the art will think of a variety of 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.
[0126] In addition, some steps in the method embodiment may be equivalently replaced by other possible steps. Alternatively, some steps in the method embodiment may be optional and may be deleted in certain usage scenarios. Alternatively, other possible steps may be added to the method embodiment.
[0127] Furthermore, the various method embodiments may be implemented separately or in combination.
[0128] 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 the present application.
[0129] In this embodiment, the electronic device can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0130] The present application also provides an electronic device, such as Fig. 9 As shown, the electronic device 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.
[0131] Among them, the communication interface 903 is used to transmit data with other devices. Computer program code is stored in the memory 902. 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. Among them, the processor 901 can be a processor or a controller, for example, it can be a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the contents of the embodiments of the present application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. Among them, the bus 904 can be a peripheral component interconnect standard (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, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0132] An embodiment of the present application further provides a computer-readable storage medium, in which a 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.
[0133] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the relevant method steps in the above method embodiment.
[0134] 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.
[0135] 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.
[0136] In the several embodiments provided in the present 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 only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, 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.
[0137] The units described as separate components may or may not be physically separated, 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 different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0138] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0139] 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 part that contributes 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, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0140] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope 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
Dual system based application management method and mobile terminal thereof
CN106502653A
Virtual screen sharing method and device and electronic equipment
CN109725867A
Object dragging method and device and storage medium
CN113407086A
Collaborative window processing method and system and electronic equipment
CN113873679A
System memory processing method and device, electronic equipment and storage medium
CN113900798A
Cited By
Application window display method and electronic device
EP4660766A1