Window display method, device, equipment and storage medium

The virtual display layer is configured through the interface rendering component to match the display output information, which solves the problem of poor window display effect of Android APP on Linux system, and achieves a high matching display effect.

CN114168240BActive Publication Date: 2024-11-26DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111229622.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2024-11-26
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

When running Android APP on Linux system, the Android APP does not consider the display output parameters of the display screen when rendering the window, resulting in poor matching between the window and the display screen and poor display effect.

Method used

The interface rendering component configures the virtual display layer according to the display output information on the display side, ensuring that the virtual display layer matches the display content of the Android APP, and then displays a window with a high matching degree in the window manager.

Benefits of technology

It improves the display effect of Android applications on Linux systems, ensures that the display content matches the display screen with high degree of matching, and optimizes the display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168240B_ABST
    Figure CN114168240B_ABST
Patent Text Reader

Abstract

The present invention provides a window display method, device, equipment and storage medium. The method is applied to an electronic device, the electronic device comprising: a first operating system and a second operating system, the first operating system comprising a window manager, the second operating system comprising a first application APP, and an interface rendering component; the method comprises: the interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side, so that it has the first configuration information; the interface rendering component renders the first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained according to the first configuration information; the interface rendering component sends the first window to the window manager. In the method of the embodiment of the present invention, the first configuration information and the first display content of the virtual display layer are both obtained according to the first display output information, and the matching degree is high, so that the display effect of the display content is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a window display method, device, equipment and storage medium. Background Art

[0002] With the development of computer technology, in order to expand the application programs (Aplication, APP for short) under the Linux system and enrich the application environment, the Linux system can support running the application programs APP of the Android system.

[0003] At present, when running Android APP under Linux system, the window manager of Linux system directly receives the window rendered by Android APP for display. When rendering the window, Android APP does not consider the display output parameters of the display screen, which may cause the Android APP window to have a poor match with the display output parameters of the display screen, resulting in poor display effect. Summary of the invention

[0004] The present invention provides a window display method, device, equipment and storage medium, which are used to improve the display effect of an Android application window displayed on a Linux system.

[0005] The present invention provides a window display method. The window display method is applied to an electronic device, the electronic device comprising: a first operating system and a second operating system deployed in the first operating system in a containerized manner, the first operating system comprising a window manager, the second operating system comprising a first application APP, and an interface rendering component; the method comprises:

[0006] The interface rendering component configures a virtual display layer corresponding to the first APP according to the first display output information of the display side, and the virtual display layer has first configuration information;

[0007] The interface rendering component renders the first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information;

[0008] The interface rendering component sends the first window to the window manager;

[0009] The window manager displays the first window.

[0010] According to a window display method provided by the present invention, the interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side, including:

[0011] The interface rendering component determines a virtual display layer corresponding to the first APP;

[0012] The interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side.

[0013] According to a window display method provided by the present invention, the interface rendering component determines a virtual display layer corresponding to the first APP, including:

[0014] The interface rendering component determines the virtual display layer corresponding to the first APP according to the target correspondence relationship and the allocation rule of the virtual display layer; the target correspondence relationship includes: a correspondence relationship between at least one APP and at least one virtual display layer.

[0015] According to a window display method provided by the present invention, the interface rendering component determines a virtual display layer corresponding to the first APP, including:

[0016] If the virtual display layer corresponding to the first APP does not exist, the virtual display layer is created, and a corresponding relationship between the first APP and the virtual display layer is established.

[0017] According to a window display method provided by the present invention, the method further includes:

[0018] The first APP obtains a layout mode matching the first configuration information;

[0019] The first APP generates first display content according to a layout method matching the first configuration information.

[0020] According to a window display method provided by the present invention, the method further includes:

[0021] When a change occurs on the display side, the interface rendering component obtains second display output information after the screen is changed;

[0022] The interface rendering component adjusts the first configuration information of the virtual display layer corresponding to the first APP according to the second display output information to obtain second configuration information;

[0023] The interface rendering component renders the second display content adjusted by the first APP on the virtual display layer to obtain a second window; the second display content is obtained by the first APP adjusting the first display content according to the second configuration information;

[0024] The interface rendering component sends the second window to the window manager; and the window manager displays the second window.

[0025] According to a window display method provided by the present invention, the first APP obtains a layout mode matching the second configuration information;

[0026] The first APP adjusts the first display content according to a layout method matching the second configuration information to obtain the second display content.

[0027] According to a window display method provided by the present invention, the first display output information includes at least one of the following: resolution and physical size information;

[0028] The second display output information includes at least one of the following: resolution and physical size information.

[0029] According to a window display method provided by the present invention, the window manager displays the first window, comprising:

[0030] The window manager converts the coordinates of the first window according to the scale parameter of the display side, obtains the converted first window and displays it;

[0031] The window manager displays the second window, including:

[0032] The window manager transforms the coordinates of the second window according to the changed scale parameter of the display side, obtains the transformed second window and displays it.

[0033] The present invention also provides a window display device. Applied to an electronic device, the electronic device comprises: a first operating system and a second operating system deployed in the first operating system in a containerized manner, the first operating system comprises a window manager, the second operating system comprises a first application APP, and an interface rendering component; the interface rendering component comprises:

[0034] An acquisition module, configured to configure a virtual display layer corresponding to the first APP according to first display output information of a display side, wherein the virtual display layer has first configuration information;

[0035] a processing module, configured to render the first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information;

[0036] The sending module is used to send the first window to the window manager; the window manager displays the first window.

[0037] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned window display methods when executing the program.

[0038] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned window display methods are implemented.

[0039] The window display method, apparatus, device and storage medium provided by the present invention, the interface rendering component included in the second operating system can configure the virtual display layer corresponding to the first APP according to the first display output information of the display side, so that the virtual display layer has the first configuration information. And, the first display content of the first APP is obtained by the first APP according to the first configuration information. It can be seen that the first configuration information of the virtual display layer and the first display content of the first APP are both obtained according to the first display output information of the display side, and both have a high degree of match with the first display output information of the display side. The first window for display on the first operating system obtained by the interface rendering component rendering the first display content of the first APP on the virtual display layer has a high degree of match with the display side and a better display effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 It is a schematic diagram of multi-screen output of a Linux system when the display output is not adjusted in the prior art;

[0042] Figure 2 It is a schematic diagram of multi-screen output after the Linux system is adjusted according to the proportional parameters in the prior art;

[0043] Figure 3 This is one of the flowcharts of the window display method provided by an embodiment of the present invention;

[0044] Figure 4 This is a second flow chart of the window display method provided by an embodiment of the present invention;

[0045] Figure 5 This is a third flow chart of the window display method provided by an embodiment of the present invention;

[0046] Figure 6 This is one of the interactive flow diagrams of the window display method provided by an embodiment of the present invention;

[0047] Figure 7This is the second interactive flow diagram of the window display method provided by the embodiment of the present invention;

[0048] Figure 8 is a structural schematic diagram of a window display device provided by an embodiment of the present invention;

[0049] Fig. 9 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] First, some vocabulary and application scenarios involved in the embodiments of the present invention are introduced.

[0052] A window manager is a management service in a graphical operating system that manages how all application and system graphical windows are displayed and how input events such as mouse, keyboard, and touch are distributed.

[0053] The window task of an application, i.e., Task, is a container of an application with a specific width and height to display the application. Each application can create one or more window tasks to display different contents. The window in the embodiment of the present invention refers to the window task.

[0054] In the embodiment of the present invention, an application program APP generally refers to an application having one or more functions in an operating system, such as a file manager, a picture viewer, a music player, a video player, etc.

[0055] In an embodiment of the present invention, the second operating system runs in the first operating system in a containerized manner. As known to those skilled in the art, containerization is LXC implemented based on the Linux kernel characteristics, which makes full use of cgroups and Namespace characteristics to isolate processes and resources, so that the second operating system is implemented efficiently and lightweight.

[0056] In an embodiment of the present invention, although not explicitly described, the first operating system and the second operating system are both operating systems based on the Linux Kernel, and the two may be the same, for example, the first operating system and the second operating system are both Linux OS distributions (such as Ubuntu) or both are Android; the two may also be different, for example, one of the first operating system and the second operating system is a Linux OS distribution and the other is Android.

[0057] In the embodiments of the present invention, although not explicitly described, the communication and notification between the first operating system and the second operating system can be implemented through inter-process communication IPC such as Socket, MQ, shared memory, or through system-level broadcast notification Broadcast.

[0058] As those skilled in the art know, Android has multiple derivative versions. The Android referred to in the present invention covers the Android OS released by Google, as well as AOSP and various derivative systems based on AOSP, such as MIUI, EMUI, OneUI, etc.

[0059] As known to those skilled in the art, the Linux operating system, also known as GNU / Linux, includes but is not limited to various distributions thereof, such as Ubuntu, Redhat, Arch, Debian, etc.

[0060] As those skilled in the art know, there are many other Linux Kernel-based operating systems, such as Tizen, etc., which are also applicable to the technical solution of the present invention.

[0061] The electronic devices in the embodiments of the present invention include, for example, terminal devices such as mobile phones, tablet computers, laptop computers, and computers.

[0062] For the convenience of explanation, the implementation process and principle of the embodiment of the present invention are described below by taking the first operating system as Linux OS and the second operating system as Android as an example. This is only illustrative and does not constitute a special limitation to the present invention.

[0063] The method provided in the embodiment of the present invention may be implemented by an electronic device such as a processor executing corresponding software codes, or may be implemented by an electronic device executing corresponding software codes while performing data interaction with a server.

[0064] In view of the above scenario, in the related art, when running Android APP under Linux system, the window manager of Linux system directly receives the window rendered by Android APP for display. When rendering the window, Android APP does not consider the display output parameters of the display screen, which may cause the Android APP window to have a poor match with the display output parameters of the display screen, resulting in poor display effect.

[0065] In addition, when the Linux graphics system is outputting windows to multiple screens, if the display output is not adjusted, the following will occur: Figure 1 The display effect is not good. Figure 1 As shown in the figure, when the display content of the triangle moves from screen 1 with a resolution of 1920×1080 and 96 dots per inch (DPI) DPI to screen 2 with a resolution of 2560×1440 and 128 DPI, the display content of the triangle will be smaller. When the display content of the triangle moves from screen 2 with a resolution of 2560×1440 and 128 DPI to screen 3 with a resolution of 3480×2160 and 192 DPI, the display content of the triangle will be further reduced, and the display effect will be poor.

[0066] The window manager of the Linux graphics system can set a scale value for each screen. Figure 2 As shown, when the triangular display content of the Linux application moves from screen 1 with a resolution of 1920×1080 and 96DPI to screen 2 with a resolution of 2560×1440 and 128DPI, the logical coordinate system can be scaled according to the scale value of screen 2. In addition, the Linux application's own graphical user interface framework supports the high dots per inch (HDPI) feature, so the triangular display content is consistent in size on different screens and has a good display effect. When the triangular display content moves from screen 2 with a resolution of 2560×1440 and 128DPI to screen 3 with a resolution of 3480×2160 and 192DPI, the logical coordinate system can be scaled according to the scale value of screen 3. In addition, the Linux application's own graphical user interface framework supports the HDPI feature, so the triangular display content has a good display effect on different screens.

[0067] The technical concept of the window display method of the embodiment of the present invention is as follows:

[0068] When the window of the Android APP is displayed on the Linux system, the interface rendering component of the Android system can configure the virtual display layer corresponding to the first APP according to the first display output information of the display side, so that the virtual display layer has the first configuration information. In addition, the first APP generates the first display content according to the first configuration information, and then renders the first display content on the virtual display layer with the first configuration information, so as to obtain a first window with a high degree of matching with the display side and a good display effect.

[0069] Combine the following Figure 3-Figure 8 The technical solution of the present invention is described in detail with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0070] Figure 3 FIG. 1 is one of the flow charts of the window display method provided by an embodiment of the present invention. Figure 3 As shown, the window display method of the embodiment of the present invention is applied to an electronic device. The electronic device includes: a first operating system and a second operating system deployed in the first operating system in a containerized manner, the first operating system includes a window manager, and the second operating system includes a first application APP and an interface rendering component; the window display method includes:

[0071] Step 101: The interface rendering component configures a virtual display layer corresponding to a first APP according to first display output information of a display side, and the virtual display layer has first configuration information.

[0072] Specifically, for the Android system, the interface rendering component may be a SurfaceFlinger component, which mainly receives graphics display data from multiple sources, synthesizes them, and renders them.

[0073] In the embodiments of the present invention, the display side refers to an input / output device with a display function, or a display tool that displays images and pictures on a screen through a specific transmission device and then reflects them to the human eye. It can be a display screen such as LCD, OLED, etc., or a display projected on a curtain or wall by an LED projector, laser projector, etc., or a virtual imaging display such as AR, VR, etc. The picture output by the display side can be a horizontal screen or a vertical screen, etc.

[0074] Optionally, the first display output information includes at least one of the following: resolution and physical size information. For example, the first display output information may include: resolution is 4800×1200, and physical size information is 40 cm long and 35 cm high. For another example, the first display output information may include: physical size information is 25 cm long and 18 cm high.

[0075] The virtual display layer corresponding to the above-mentioned first APP refers to a virtual display screen in the second operating system that has a corresponding relationship with the first APP. The process of configuring the virtual display layer according to the first display output information of the display side and configuring the virtual display layer so that it has the first configuration information refers to configuring the virtual display layer (virtual display screen) corresponding to the first APP according to the resolution and physical size information of the display side to be displayed by the first APP, so that the virtual display layer has the first configuration information. It should be understood that the first configuration information is obtained according to the first display output information. The information included in the first configuration information corresponds to the first display output information. For example, when the first display output information includes a resolution of 4800×1200 and a physical size information of 40cm long and 35cm high, the first configuration information includes a resolution of 4800×1200 and a physical size information of 40cm long and 35cm high.

[0076] For example, when the window of a shopping app of the Android system is to be displayed on display side 1, the SurfaceFlinger component of the Android system can first obtain the first display output information such as the resolution and physical size information of display side 1. Among them, the resolution is 4800×1200, and the physical size information is 40 cm long and 35 cm high. Then the SurfaceFlinger component configures the virtual display layer corresponding to the shopping app according to the resolution and physical size information of display side 1, so that the virtual display layer has the first configuration information. The first configuration information matches the first display output information. The first configuration information includes: the resolution is 4800×1200, and the physical size information is 40 cm long and 35 cm high.

[0077] Step 102: The interface rendering component renders the first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information.

[0078] Optionally, the first display content may be obtained through the following steps:

[0079] The first APP obtains a layout mode matching the first configuration information;

[0080] The first APP generates the first display content according to the layout mode that matches the first configuration information. At this time, the first APP provides the best layout mode according to the first configuration information so that the drawn first display content matches the first configuration information.

[0081] Specifically, the first APP of the Android system pre-stores multiple layouts according to the horizontal screen layout, the vertical screen layout and different DPIs. When the first APP is displayed, the best layout can be matched according to the display output information of the display side, and then the first display content of the first APP is drawn according to the layout.

[0082] For example, when a shopping app on an Android system is displayed on a Linux system, the shopping app can first communicate with the interface rendering component to obtain the first configuration information such as the resolution and physical size information of the virtual display side. Among them, the resolution is 4800×1200, and the physical size information is 40 cm long and 35 cm high. Subsequently, the shopping app selects a horizontal screen and supports a resolution of 4800×1200, and a physical size information of 40 cm long and 35 cm high from the pre-stored multiple layout modes, and draws the first display content of the shopping app according to the layout mode.

[0083] Specifically, in the process of rendering the first window, the interface rendering component communicates with the first APP, obtains the first display content, and renders the first display content on the virtual display layer to obtain the first window.

[0084] For example, the SurfaceFlinger component communicates with a shopping app to obtain the first display content drawn in a layout mode that supports a horizontal screen with a resolution of 4800×1200 and a physical size of 40 cm long and 35 cm high. Then, the first display content is rendered on a virtual display layer with a resolution of 4800×1200 and a physical size of 40 cm long and 35 cm high to obtain a first window. During the rendering process, the layout mode of the first display content matches the first configuration information of the virtual display layer.

[0085] Step 103: The interface rendering component sends the first window to the window manager.

[0086] Specifically, when the rendering of the first window is completed, the interface rendering component of the Android system sends the first window to the window manager of the Linux system.

[0087] Step 104: The window manager displays the first window.

[0088] Specifically, the window manager receives the rendered first window, provides services such as a window frame for the first window, and displays the first window on the display side. The display output information of the display side matches the first configuration information of the virtual display layer, and the first configuration information of the virtual display layer matches the layout of the first display content of the first APP, so that the first display content of the first APP has a high degree of matching with the display side, thereby improving its display effect.

[0089] Optionally, the window manager may display the first window by the following steps:

[0090] The window manager converts the coordinates of the first window according to the scale parameter of the display side, obtains the converted first window, and displays it.

[0091] Since the virtual display layer and the first display content are configured according to the display side, the first window sent by the virtual display layer matches the display side and needs to be output to the display side with a scale parameter of 1. When the window manager displays the first window according to the scale parameter of the display side, the coordinates of the first window are converted, and the coordinate conversion operation is superimposed on the operation of displaying according to the scale parameter of the display side, so that the first window on the virtual display layer can be displayed on the display side with a scale parameter of 1, thereby ensuring the display effect of the first window.

[0092] Specifically, if the scale parameter of the display side is not 1, the coordinate system of the first window can be adjusted to ensure that the first window on the virtual display layer is displayed on the display side according to the scale parameter 1. That is, ensure that the physical size information of the first window displayed on the display side is the same as that of the first window on the virtual display layer. If the scale parameter of the display side is 1, the coordinates of the first window do not need to be converted, and the first window of the virtual display layer can be directly displayed on the display side according to the scale parameter of 1.

[0093] For example, when the first window of a shopping app on the Android system is displayed on the Linux system, the window manager needs to display the first window on the virtual display layer on the display side according to the scale parameter of 1. If the scale parameter of the display side is 1, the first window on the virtual display layer is directly displayed on the display side. If the scale parameter of the display side is 2, the coordinates of the first window on the virtual display layer are converted to reduce the first window by a ratio of 0.5, and then the first window is displayed on the display side according to the scale parameter 2 preset by the display side. At this time, the window manager displays the first window according to the scale parameter of 1.

[0094] In the window display method of the embodiment of the present invention, the interface rendering component included in the second operating system can configure the virtual display layer corresponding to the first APP according to the first display output information of the display side, so that the virtual display layer has the first configuration information. And, the first display content of the first APP is obtained by the first APP according to the first configuration information. It can be seen that the first configuration information of the virtual display layer and the first display content of the first APP are both obtained according to the first display output information of the display side, and both have a high degree of match with the first display output information of the display side. The first window for display on the first operating system obtained by the interface rendering component rendering the first display content of the first APP on the virtual display layer has a high degree of match with the display side and a better display effect.

[0095] In one embodiment, if Figure 4 As shown, in step 101, the interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side, and the virtual display layer has the first configuration information, which can be specifically implemented by the following steps:

[0096] Step 1011: The interface rendering component determines a virtual display layer corresponding to the first APP.

[0097] Specifically, the virtual display layer can be a newly created virtual display layer by the interface rendering component, or it can be an already created virtual display layer, and the interface rendering component establishes a corresponding relationship between the created virtual display layer and the first APP. At this time, the virtual display layer can receive the graphic display data of the first APP, and synthesize and render it.

[0098] For example, when a shopping app of the Android system is displayed on the Linux system, the SurfaceFlinger component of the Android system first creates a virtual display layer corresponding to the shopping app, and establishes a corresponding relationship between the shopping app and the virtual display layer.

[0099] Step 1012: The interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side, and the virtual display layer has the first configuration information.

[0100] In the method of the embodiment of the present invention, the interface rendering component first determines the virtual display layer corresponding to the first APP, and then configures the virtual display layer according to the first display output information of the display side. Based on this, on the one hand, due to the existence of the virtual display layer, the display content of the first APP can be rendered on the virtual display layer of the Android system, without the need for the first operating system to render the window, and without the need for multiple interactions of window display information between the two operating systems, the rendering work can be completed quickly, and the efficiency of window rendering and display can be improved; on the other hand, the virtual display layer is configured according to the first display output information of the display side, and its matching degree with the display side is relatively high, so that the first window rendered on the virtual display layer has a relatively high matching degree with the display side, and the display effect is relatively good.

[0101] Optionally, the interface rendering component determines the virtual display layer corresponding to the first APP, which can be implemented by the following steps:

[0102] The interface rendering component determines the virtual display layer corresponding to the first APP according to the target correspondence and the allocation rule of the virtual display layer; the target correspondence includes: the correspondence between at least one APP and at least one virtual display layer.

[0103] Specifically, the target correspondence may include a correspondence between an APP and a virtual display layer, or a correspondence between an APP and multiple virtual display layers, or a correspondence between multiple APPs and one virtual display layer, or a correspondence between multiple APPs and multiple virtual display layers.

[0104] The allocation rule of the virtual display layer can be set as needed. For example, the allocation rule of the virtual display layer can allocate a virtual display layer to each independent APP; can also allocate a virtual display layer to APPs of the same type; can also allocate a virtual display layer for every n APPs according to the startup order, where n is an integer greater than 0.

[0105] In actual applications, the virtual display layer corresponding to the first APP is determined in combination with the target correspondence and the set virtual display layer allocation rules. The correspondence between the created virtual display layer and the first APP can be determined based on the established correspondence between the first APP and the virtual display layer and the allocation relationship of the virtual display layer.

[0106] For example, when displaying the window of a game APP of the Android system on the Linux system, if the target correspondence is the correspondence between the game APP and the created virtual display layer, and the allocation rule of the virtual display layer is to allocate a virtual display layer to the same type of APP, then the interface rendering component determines that the virtual display layer corresponding to the game APP is the created virtual display layer belonging to the game category.

[0107] The method of the embodiment of the present invention can allocate one or more virtual display layers to the first APP according to the target correspondence and the preset virtual display layer allocation grid, which can improve the flexibility of window display. In addition, reasonable allocation of virtual display layers can reduce the number of virtual display layers created and improve the system operation speed.

[0108] Optionally, if there is no virtual display layer corresponding to the first APP, a virtual display layer is created, and a corresponding relationship between the first APP and the virtual display layer is established.

[0109] Specifically, if there is no virtual display layer corresponding to the first APP, it means that there is no virtual display layer corresponding to the first APP in the second operating system. In this case, it is necessary to create a virtual display layer and establish a corresponding relationship between the virtual display layer and the first APP.

[0110] For example, when displaying the online store window of a shopping app on the Android system on the Linux system, the interface rendering component searches for a virtual display layer that corresponds to the shopping app. If there is no virtual display layer, the interface rendering component creates a new virtual display layer and establishes the corresponding relationship between the shopping app and the virtual display layer.

[0111] In the above embodiment, when the second system does not have a virtual display layer corresponding to the first APP, a new virtual display layer can be created, thereby ensuring that the window of the first APP can be rendered and synthesized on the virtual display layer.

[0112] In one embodiment, if Figure 5 As shown, the window display method can also perform the following operations:

[0113] Step 105: When a change occurs on the display side, the interface rendering component obtains the second display output information after the screen is changed.

[0114] Optionally, the second display output information includes at least one of the following: resolution and physical size information. In this case, the resolution and physical size information can better represent the display information of the display side.

[0115] Specifically, the display side changes, which means that the display output information of the display side, such as the resolution and physical size of the display side, changes. For example, when changing from display side 1 to display side 2, the display output information changes from a resolution of 4800×1200 and a physical size of 40 cm long and 35 cm high to a resolution of 6050×4500 and a physical size of 60 cm long and 45 cm high.

[0116] When the display side changes, the interface rendering component communicates with the window manager of the Linux operating system to obtain the changed second display output information.

[0117] For example, when the display side changes from display side 1 with a resolution of 4800×1200 and physical size information of 40 cm long and 35 cm high to display side 2 with a resolution of 6050×4500 and physical size information of 60 cm long and 45 cm high, the SurfaceFlinger component of the Android system communicates with the window manager of the Linux system to obtain the second display output information of display side 2 (resolution 6050×4500, physical size information of 60 cm long and 45 cm high).

[0118] Step 106: The interface rendering component adjusts the first configuration information of the virtual display layer corresponding to the first APP according to the second display output information to obtain second configuration information.

[0119] Specifically, the interface rendering component adjusts the original first configuration information of the virtual display layer, so that the configuration information of the virtual display layer is changed from the first configuration information to the second configuration information, and the second configuration information matches the second display output information.

[0120] For example, the interface rendering component adjusts the first configuration information of the virtual display layer according to the second display output information (resolution 6050×4500, physical size information of 60 cm long and 45 cm high) of the display side 2 obtained in step 201, so that the virtual display layer has the second configuration information, wherein the second configuration information includes the resolution 6050×4500, and the physical size information of 60 cm long and 45 cm high. The second configuration information matches the second display output information.

[0121] Step 107: The interface rendering component renders the second display content adjusted by the first APP on the virtual display layer to obtain a second window; the second display content is obtained by the first APP adjusting the first display content according to the second configuration information.

[0122] Optionally, the second display content can be obtained by the following steps:

[0123] The first APP obtains a layout mode matching the second configuration information;

[0124] The first APP adjusts the first display content according to the layout mode that matches the second configuration information to obtain the second display content. At this time, the first APP can provide a layout mode that matches the second configuration information according to the second configuration information, and adjust the display content accordingly to obtain the second display content, so that the second display content matches the second configuration information.

[0125] Specifically, when the display side is changed, the best layout mode can be matched according to the second display output information of the changed display side, and then the original first display content can be adjusted according to the layout mode to draw the second display content.

[0126] For example, when the display side changes and the configuration information of the virtual display layer changes, the first APP communicates with the interface rendering component to obtain the second configuration information such as the resolution and physical size information of the virtual display side. Among them, the resolution is 6050×4500, and the physical size information is 60cm long and 45cm high. Subsequently, the shopping APP selects a horizontal screen and supports a resolution of 6050×4500 and a physical size information of 60cm long and 45cm high from the pre-stored multiple layout methods, and adjusts the first display content according to the layout method, and draws the second display content. At this time, the layout method of the second display content matches the second configuration information of the virtual display screen and the second display output information of the display side.

[0127] Step 108: The interface rendering component sends the second window to the window manager; the window manager displays the second window.

[0128] Optionally, the window manager displays the second window, which can be implemented by the following steps:

[0129] The window manager converts the coordinates of the second window according to the changed scale parameter of the display side, obtains the converted second window and displays it. The display process of the second window is basically the same as the display process and technical effect of the first window, and will not be repeated here.

[0130] In this embodiment, when the display side of the first APP changes, that is, when the first APP is displayed on multiple display sides, the interface rendering component adjusts the virtual display layer from the first configuration information to the second configuration information according to the second display output information, and the second configuration information matches the second display output information after the display side is changed. In addition, the first APP re-matches the layout mode according to the second configuration information, and adjusts the first display content to draw the second display content according to the layout mode matching the second configuration information. It can be seen that the second configuration information on the display side and the second display content of the first APP are obtained according to the second display output information after the display side is changed, and can have a better display effect. At this time, when the first display content, the first configuration information and the first display output information match, the second display content and the second configuration information are matched with the second display output information after the display side is changed through the adjustment of the virtual display layer and the first APP. It can be seen that through the adjustment of the virtual display layer and the first APP, the multi-screen display of the first APP of the second operating system running on the first operating system can be realized.

[0131] For example, Figure 6 As shown, the window display method of this embodiment includes the following steps:

[0132] Step 1: The window manager sends first display output information to the interface rendering component.

[0133] Step 2: The interface rendering component creates and configures a virtual display layer having first configuration information according to the received first display output information.

[0134] Step 3: The interface rendering component sends the first configuration information to the Android application.

[0135] Step 4: The Android application matches the layout mode according to the first configuration information and draws the first display content.

[0136] Step 5: The Android application sends the first display content to the interface rendering component.

[0137] Step 6: The interface rendering component renders the first display content to obtain a first window.

[0138] Step 7: The interface rendering component sends the first window to the window manager.

[0139] Step 8: Display the first window. The window manager displays the first window according to the scale parameter of 1.

[0140] Step 9: When the display side is changed, the window manager sends the second display output information after the screen change to the interface rendering component.

[0141] Step 10: The interface rendering component adjusts the first configuration information of the virtual display layer, obtains the second configuration information, and applies for video memory.

[0142] Step 11: The interface rendering component sends the second configuration information to the Android application.

[0143] Step 12: The Android application re-matches the layout mode and re-draws the second display content.

[0144] Step 13: The Android application sends the second display content to the interface rendering component.

[0145] Step 14: The interface rendering component renders the second display content on the virtual display layer having the second configuration information to obtain a second window.

[0146] Step 15: The interface rendering component sends the second window to the window manager.

[0147] Step 16: Display the second window. The window manager converts the coordinates of the second window according to the changed scale parameter of the display side, so that the second window is displayed according to the scale parameter of 1, so as to ensure normal rendering and input processing of the Linux window and the Android window on the same screen.

[0148] In the window display method provided by the present invention, the interface rendering component included in the second operating system can configure the virtual display layer corresponding to the first APP according to the first display output information of the display side, so that the virtual display layer has the first configuration information. In addition, the first display content of the first APP is obtained by the first APP according to the first configuration information. It can be seen that the first configuration information of the virtual display layer and the first display content of the first APP are both obtained according to the first display output information of the display side, and both have a high degree of match with the first display output information of the display side. The first window for display on the first operating system obtained by the interface rendering component rendering the first display content of the first APP on the virtual display layer has a high degree of match with the display side and a better display effect.

[0149] For example, Figure 7 As shown, the window display method of this embodiment includes the following steps:

[0150] Step a: Sending the changed display output information: When the Android window changes the display side, the window manager sends a display side change start event and the changed display output information to the Android window protocol agent.

[0151] Step b: sending the changed display output information: The Android window protocol agent sends the changed display output information to the interface rendering component.

[0152] Step c: Adjust configuration information: The interface rendering component adjusts the configuration information of the virtual display layer and applies for video memory.

[0153] Step d: Sending the adjusted configuration information: The interface rendering component sends the adjusted configuration information to the process management service component.

[0154] Step e: Send the adjusted configuration information: The process management service component sends the adjusted configuration information to the Android application.

[0155] Step f: Re-match the layout mode of the Android application.

[0156] Step g: The Android application redraws the display content.

[0157] Step h: The Android application sends the redrawn display content to the interface rendering component.

[0158] Step i: Rendering: The interface rendering component renders the redrawn display content on the virtual display layer to obtain a new Android window.

[0159] Step 1: The interface rendering component sends a new Android window to the Android window protocol agent.

[0160] Step m: The Android window protocol agent sends a new Android window to the window manager.

[0161] The window display device provided by the present invention is described below. The window display device described below and the window display method described above can be referred to each other.

[0162] Figure 8 : is a structural diagram of an embodiment of a window display device provided by the present invention. The window display device provided by this embodiment is applied to an electronic device, wherein the electronic device comprises: a first operating system and a second operating system deployed in the first operating system in a containerized manner, wherein the first operating system comprises a window manager, and the second operating system comprises a first application program APP and an interface rendering component; Figure 8 As shown, the interface rendering component provided in this embodiment includes:

[0163] An acquisition module 210 is used to configure a virtual display layer corresponding to the first APP according to the first display output information of the display side, and the virtual display layer has first configuration information;

[0164] The processing module 220 is configured to render the first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information;

[0165] The sending module 230 is used to send the first window to the window manager; the window manager displays the first window.

[0166] Optionally, the processing module 220 is further configured to determine a virtual display layer corresponding to the first APP;

[0167] The processing module 220 is further specifically configured to configure the virtual display layer corresponding to the first APP according to the first display output information of the display side.

[0168] Optionally, the processing module 220 is further specifically used to determine the virtual display layer corresponding to the first APP according to the target correspondence relationship and the allocation rule of the virtual display layer; the target correspondence relationship includes: a correspondence between at least one APP and at least one virtual display layer.

[0169] Optionally, the processing module 220 is further configured to create the virtual display layer if the virtual display layer corresponding to the first APP does not exist, and establish a corresponding relationship between the first APP and the virtual display layer.

[0170] Optionally, the first APP obtains a layout mode matching the first configuration information;

[0171] The first APP generates first display content according to a layout method matching the first configuration information.

[0172] Optionally, the acquisition module 210 is further configured to acquire second display output information after the screen is changed when a change occurs on the display side;

[0173] The processing module 220 is further configured to adjust the first configuration information of the virtual display layer corresponding to the first APP according to the second display output information to obtain second configuration information;

[0174] The processing module 220 is further configured to render the second display content adjusted by the first APP on the virtual display layer to obtain a second window; the second display content is obtained by the first APP adjusting the first display content according to the second configuration information;

[0175] The sending module 230 is further configured to send the second window to a window manager; and the window manager displays the second window.

[0176] Optionally, the first APP obtains a layout mode matching the second configuration information;

[0177] The first APP adjusts the first display content according to a layout method matching the second configuration information to obtain the second display content.

[0178] Optionally, the first display output information includes at least one of the following: resolution and physical size information; the second display output information includes at least one of the following: resolution and physical size information.

[0179] Optionally, the window manager displays the first window, comprising: the window manager converts the coordinates of the first window according to the scale parameter of the display side, obtains the converted first window, and displays it;

[0180] The window manager displays the second window, including: the window manager converts the coordinates of the second window according to the changed scale parameter of the display side, obtains the converted second window, and displays it.

[0181] The device of the embodiment of the present invention is used to execute the method in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0182] Here is an example:

[0183] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the window display method, which includes: the interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side, and the virtual display layer has the first configuration information; the interface rendering component renders the first display content of the first APP on the virtual display layer to obtain the first window; the first display content is obtained by the first APP according to the first configuration information; the interface rendering component sends the first window to the window manager; the window manager displays the first window.

[0184] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0185] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the window display method provided by the above methods, and the method includes: the interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side, and the virtual display layer has first configuration information; the interface rendering component renders the first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information; the interface rendering component sends the first window to the window manager; the window manager displays the first window.

[0186] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned window display methods, the method comprising: the interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side, and the virtual display layer has first configuration information; the interface rendering component renders the first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information; the interface rendering component sends the first window to the window manager; the window manager displays the first window.

[0187] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0188] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0189] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A window display method, It is characterized in that Applied to an electronic device, the electronic device comprises: a first operating system and a second operating system deployed in the first operating system in a containerized manner, the first operating system comprises a window manager, and the second operating system comprises a first application APP and an interface rendering component; the method comprises: The interface rendering component configures a virtual display layer corresponding to the first application APP according to the first display output information of the display side, and the virtual display layer has first configuration information; The interface rendering component renders the first display content of the first application APP on the virtual display layer to obtain a first window; the first display content is obtained by the first application APP according to the first configuration information; the interface rendering component determines the virtual display layer corresponding to the first application APP according to the target correspondence and the allocation rule of the virtual display layer; the allocation rule of the virtual display layer includes: allocating one virtual display layer to each independent first application APP, or allocating one virtual display layer to the first application APP of the same type, or allocating one virtual display layer to a number of the first application APP greater than zero according to the startup order; The interface rendering component sends the first window to the window manager; The window manager displays the first window.

2. The method according to claim 1, It is characterized in that The interface rendering component configures the virtual display layer corresponding to the first application APP according to the first display output information of the display side, including: The interface rendering component determines a virtual display layer corresponding to the first application APP; The interface rendering component configures the virtual display layer corresponding to the first application APP according to the first display output information of the display side.

3. The method according to claim 2, It is characterized in that The target correspondence relationship includes: a correspondence relationship between at least one application program APP and at least one virtual display layer.

4. The method according to claim 3, It is characterized in that The method further comprises: If the virtual display layer corresponding to the first application APP does not exist, the virtual display layer is created, and a corresponding relationship between the first application APP and the virtual display layer is established.

5. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: The first application APP obtains a layout mode matching the first configuration information; The first application APP generates first display content according to a layout method matching the first configuration information.

6. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: When a change occurs on the display side, the interface rendering component obtains second display output information after the screen is changed; The interface rendering component adjusts the first configuration information of the virtual display layer corresponding to the first application APP according to the second display output information to obtain second configuration information; The interface rendering component renders the second display content adjusted by the first application APP on the virtual display layer to obtain a second window; the second display content is obtained by the first application APP adjusting the first display content according to the second configuration information; The interface rendering component sends the second window to the window manager; and the window manager displays the second window.

7. The method according to claim 6, It is characterized in that The method further includes: the first application APP acquires a layout mode matching the second configuration information; The first application APP adjusts the first display content according to a layout method matching the second configuration information to obtain the second display content.

8. The method according to claim 6, It is characterized in that The first display output information includes at least one of the following: resolution and physical size information; The second display output information includes at least one of the following: resolution and physical size information.

9. The method according to claim 6, It is characterized in that The window manager displays the first window, including: The window manager converts the coordinates of the first window according to the scale parameter of the display side, obtains the converted first window and displays it; The window manager displays the second window, including: The window manager transforms the coordinates of the second window according to the changed scale parameter of the display side, obtains the transformed second window and displays it.

10. A window display device, It is characterized in that Applied to an electronic device, the electronic device comprises: a first operating system and a second operating system deployed in the first operating system in a containerized manner, the first operating system comprises a window manager, the second operating system comprises a first application APP, and an interface rendering component; the interface rendering component comprises: an acquisition module, configured to configure a virtual display layer corresponding to the first application APP according to the first display output information of the display side, wherein the virtual display layer has first configuration information; a processing module, configured to render the first display content of the first application APP on the virtual display layer to obtain a first window; the first display content is obtained by the first application APP according to the first configuration information; the interface rendering component determines the virtual display layer corresponding to the first application APP according to the target correspondence and the allocation rule of the virtual display layer; the allocation rule of the virtual display layer includes: allocating one virtual display layer to each independent first application APP, or allocating one virtual display layer to the first application APP of the same type, or allocating one virtual display layer to a number of the first application APP greater than zero according to the startup order; The sending module is used to send the first window to the window manager; the window manager displays the first window.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the window display method according to any one of claims 1 to 9 are implemented.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the window display method according to any one of claims 1 to 9 are implemented.