Virtual screen implementation method, device, equipment and storage medium
By obtaining the screen identification information of the guest system and the physical screen information of the host system, the virtual screen is dynamically allocated, which solves the hardware-dependent screen segmentation problem in the existing technology and realizes flexible virtual screen segmentation and size setting, which is suitable for multi-domain vehicle systems.
Patent Information
- Application Number
- CN202310690596.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-06-09
AI Technical Summary
Existing virtualization technologies lack physical screen splitting solutions. Hardware-implemented screen splitting solutions require specific hardware support, have a fixed splitting layout, and cannot be modified by software. In addition, each operating system requires a hardware display interface.
By obtaining the screen identification information of the target guest system, combining the screen configuration information and the physical screen information of the host system to generate display information, dynamically allocating and setting the virtual screen, and realizing arbitrary segmentation display of the physical screen.
It realizes flexible screen splitting without the need for specific hardware support, dynamically allocates virtual screen size, supports arbitrary display of multiple virtual machine systems, and saves hardware costs.
Smart Images

Figure CN116719496B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of virtualization technology, and in particular to a method, apparatus, device, and storage medium for implementing a virtual screen. Background Art
[0002] Virtualization technology is increasingly being used. For example, in multi-domain vehicle systems, virtualization is often used to improve hardware utilization and resource allocation flexibility, thereby reducing costs. For example, a "super-large screen" might need to display multiple virtual machine systems. Virtualization systems widely use QEMU (Quick Emulator) to provide display functionality. However, components that provide display functionality, such as QEMU, currently do not offer a solution for splitting the physical screen.
[0003] In addition, some current monitors support PIP (Picture in Picture) and PBP (Picture by Picture) functions, allowing the content of multiple operating systems to be displayed on a single physical screen, achieving physical screen splitting. However, these existing hardware-based screen splitting solutions have limitations. For example, first, they require specific hardware support; second, the split layout settings are limited to one or a few predefined ones and cannot be modified using software; and third, each operating system's display requires a hardware display interface, such as a High Definition Multimedia Interface (HDMI) or Display Port. Summary of the Invention
[0004] The present application provides a virtual screen implementation method, apparatus, device and storage medium, which are used to provide a solution for physical screen segmentation for components that provide display functions in virtualization technology and overcome the defects of using hardware to implement screen segmentation.
[0005] In a first aspect, the present application provides a method for implementing a virtual screen, comprising:
[0006] Acquire screen identification information of a target guest system, where the screen identification information is used to uniquely identify a target virtual screen allocated to the target guest system;
[0007] generating first display information according to the screen identification information, the screen configuration information, and the physical screen information of the host system, wherein the screen configuration information includes coordinate information and enabling information of multiple virtual screens, and the first display information includes the position and size of the target virtual screen on the physical screen of the host system and the enabling information of the target virtual screen;
[0008] The target virtual screen is generated on the physical screen of the host system according to the first display information, and a display output is provided for the target guest system.
[0009] In a possible design, before obtaining the screen identification information of the target passenger aircraft system, the method further includes:
[0010] A configuration file is obtained, and the screen configuration information is parsed into a global memory according to the configuration file, wherein the file content of the configuration file includes the screen configuration information.
[0011] In one possible design, generating the first display information according to the screen identification information, the screen configuration information, and the physical screen information of the host system includes:
[0012] Matching the screen configuration information with the screen identification information to obtain the screen configuration information of the target virtual screen;
[0013] generating the first display information according to the screen configuration information of the target virtual screen and the physical screen information;
[0014] Among them, the screen configuration information of the target virtual screen includes the coordinate information of the target virtual screen and the enable information of the target virtual screen, the coordinate information of the target virtual screen includes the height and width of the target virtual screen, and the physical screen information includes the physical screen position and physical screen size of the host system.
[0015] In a possible design, before generating the target virtual screen according to the first display information, the method further includes:
[0016] Matching the screen configuration information with the screen identification information to obtain the screen configuration information of the target virtual screen;
[0017] Second display information is generated according to the coordinate information of the target virtual screen, where the second display information is used to represent the size of the target virtual screen when providing display output for the target guest system.
[0018] In one possible design, providing a display output for the target guest system includes:
[0019] Output a display instruction, and send the display instruction to the target guest system, so that the target guest system responds to the display instruction and sends a display message to the host system, so as to display the display message on the target virtual screen according to the second display information.
[0020] In one possible design, generating the target virtual screen on the physical screen of the host system according to the first display information includes:
[0021] A display window and a texture area of the display window are generated on the physical screen according to the first display information, and the target virtual screen includes the display window and the texture area.
[0022] In a possible design, the number of the target guest systems is one or more, and the number of the target virtual screens is one or more.
[0023] In a possible design, before parsing the screen configuration information, the method further includes:
[0024] Performing display initialization includes initializing a display service environment and an open graphics library context according to a specific UI component in the host system.
[0025] In a second aspect, the present application provides a virtual screen implementation device, comprising:
[0026] an acquisition module, configured to acquire screen identification information of a target guest system, wherein the screen identification information is used to uniquely identify a target virtual screen allocated to the target guest system;
[0027] a first processing module, configured to generate first display information based on the screen identification information, the screen configuration information, and the physical screen information of the host system, wherein the screen configuration information includes coordinate information and enable information of multiple virtual screens, and the first display information includes a position and size of the target virtual screen on the physical screen of the host system and the enable information of the target virtual screen;
[0028] The second processing module is configured to generate the target virtual screen on the physical screen of the host system according to the first display information, and provide display output for the target guest system.
[0029] In one possible design, the virtual screen implementation device further includes: a parsing module; the parsing module is configured to:
[0030] A configuration file is obtained, and the screen configuration information is parsed into a global memory according to the configuration file, wherein the file content of the configuration file includes the screen configuration information.
[0031] In one possible design, the first processing module is specifically configured to:
[0032] Matching the screen configuration information with the screen identification information to obtain the screen configuration information of the target virtual screen;
[0033] generating the first display information according to the screen configuration information of the target virtual screen and the physical screen information;
[0034] Among them, the screen configuration information of the target virtual screen includes the coordinate information of the target virtual screen and the enable information of the target virtual screen, the coordinate information of the target virtual screen includes the height and width of the target virtual screen, and the physical screen information includes the physical screen position and physical screen size of the host system.
[0035] In one possible design, the second processing module is specifically configured to:
[0036] Matching the screen configuration information with the screen identification information to obtain the screen configuration information of the target virtual screen;
[0037] Second display information is generated according to the coordinate information of the target virtual screen, where the second display information is used to represent the size of the target virtual screen when providing display output for the target guest system.
[0038] In one possible design, the second processing module is further configured to:
[0039] Output a display instruction, and send the display instruction to the target guest system, so that the target guest system responds to the display instruction and sends a display message to the host system, so as to display the display message on the target virtual screen according to the second display information.
[0040] In one possible design, the second processing module is further configured to:
[0041] A display window and a texture area of the display window are generated on the physical screen according to the first display information, and the target virtual screen includes the display window and the texture area.
[0042] In a possible design, the number of the target guest systems is one or more, and the number of the target virtual screens is one or more.
[0043] In one possible design, the virtual screen implementation device further includes: a display initialization module; the display initialization module is used to:
[0044] Performing display initialization includes initializing a display service environment and an open graphics library context according to a specific UI component in the host system.
[0045] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0046] The memory stores computer-executable instructions;
[0047] The processor executes the computer-executable instructions stored in the memory to implement any possible virtual screen implementation method provided in the first aspect.
[0048] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement any possible virtual screen implementation method provided in the first aspect.
[0049] In a fifth aspect, the present application provides a computer program product, comprising computer-executable instructions, which, when executed by a processor, are used to implement any possible virtual screen implementation method provided in the first aspect.
[0050] The present application provides a virtual screen implementation method, apparatus, device and storage medium. First, screen identification information of a target guest system is obtained, and the screen identification information is used to uniquely identify a target virtual screen assigned to the target guest system. Then, first display information is generated according to the screen identification information, screen configuration information and physical screen information of a host system. The screen configuration information includes coordinate information and enable information of multiple virtual screens. The first display information represents the position and size of the target virtual screen in the physical screen of the host system and the enable information of the target virtual screen. Then, according to the first display information, a target virtual screen is generated on the physical screen of the host system, and display output is provided for the target guest system, thereby realizing arbitrary screen segmentation display for a multi-virtual machine system, and overcoming the defects of the prior art of using hardware to implement screen segmentation. It also has the advantages of dynamically allocating virtual screens and dynamically setting virtual screen sizes, facilitating the flexible application of virtualization technology in multi-domain vehicle systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0052] Figure 1 A schematic diagram of a system structure provided in an embodiment of the present application;
[0053] Figure 2 A flowchart of a method for implementing a virtual screen provided in an embodiment of the present application;
[0054] Figure 3A flowchart of another method for implementing a virtual screen provided in an embodiment of the present application;
[0055] Figure 4 A schematic diagram of dividing a physical screen into multiple virtual screens provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of the structure of a virtual screen implementation device provided in an embodiment of the present application;
[0057] Figure 6 A schematic diagram of the structure of another virtual screen implementation device provided in an embodiment of the present application;
[0058] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of methods and apparatus consistent with certain aspects of the present application, as detailed in the appended claims.
[0060] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the numbers used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0061] Currently, components that can provide display functions, including QEMU, do not provide a solution for physical screen splitting. Some existing monitors can display the contents of multiple operating systems on a physical screen by supporting PIP (Picture in Picture) and PBP (Picture by Picture) functions, thereby realizing physical screen split display. However, this screen splitting solution implemented using hardware has many limitations. For example, first, specific hardware support is required; second, the split layout settings are only predefined one or a few types, and cannot be modified using software; third, each operating system display requires a hardware display interface, such as a High Definition Multimedia Interface (HDMI) or a Display Port interface.
[0062] In response to the above-mentioned problems existing in the prior art, the present application provides a virtual screen implementation method, apparatus, device and storage medium. The inventive concept of the virtual screen implementation method provided in the present application is that: through the configuration of a global virtual screen, a physical screen can be divided into multiple virtual screens, and a virtual screen can also span multiple physical screens. By configuring the corresponding target virtual screen for the guest system, that is, the virtual machine system, the function of arbitrary split display can be realized for multiple virtual machine systems on the physical screen according to the user configuration, overcoming the defects of the prior art of using hardware to implement screen splitting, and also having the advantages of dynamically allocating virtual screens and dynamically setting the virtual screen size, facilitating the flexible application of virtualization technology in multi-domain vehicle systems.
[0063] Figure 1 This is a schematic diagram of a system structure provided in an embodiment of the present application. Figure 1 As shown, QEMU can be used together with Hypervisor (such as KVM (Keyboard Video Mouse), XEN, etc.) to provide functions such as simulated display devices (VGA / GPU) for each guest system (Guest OS). Each Guest OS corresponds to a QEMU process, for example, Guest OS1 corresponds to QEMU1, Guest OS2 corresponds to QEMU2, Guest OS N corresponds to QEMU N, etc. These QEMU processes can provide one or more virtual screens for each Guest OS through the virtual screen function. The one or more virtual screens are the target virtual screens that provide display output for the corresponding Guest OS. For example, Figure 1As shown in , the target virtual screens providing display output for Guest OS 1 are virtual screen 1 and virtual screen 2, the target virtual screen providing display output for Guest OS 2 is virtual screen 3, and the target virtual screen providing display output for Guest OS N is virtual screen 4. Virtual screen 1, virtual screen 2, virtual screen 3, and virtual screen 4 are screen identification information used to uniquely identify the virtual screen.
[0064] In addition, it should be noted that the virtual screen in the embodiment of the present application refers to the screen defined by position and height in the virtual screen function, that is, each screen obtained by dividing the physical screen. The virtual screen function refers to the function of the virtual screen implementation method provided in the embodiment of the present application, that is, the use of software-defined screens to achieve arbitrary division of the physical screen. In addition, the virtual screen implementation method provided in the embodiment of the present application can be configured to run Figure 1 The electronic device of the host system (Host) in the present application is executed. The embodiment of the present application does not limit the type of electronic device. For example, it can be a vehicle's vehicle controller, a vehicle's electronic control unit (ECU), etc.
[0065] It should be noted that the virtual screen implementation method, apparatus, device and storage medium provided in the embodiments of the present application include but are not limited to the system architecture described above.
[0066] Figure 2 This is a flow chart of a method for implementing a virtual screen provided in an embodiment of the present application. Figure 2 As shown, the virtual screen implementation method provided by the embodiment of the present application includes:
[0067] S101: Acquire screen identification information of a target guest system.
[0068] The screen identification information is used to uniquely identify the target virtual screen allocated to the target guest system.
[0069] Each virtual screen is uniquely identified by its own screen identification information. The target guest system is assigned corresponding virtual screens based on its requirements. For example, virtual screen 1 and virtual screen 2 are assigned to Guest OS 1. Virtual screens 1 and 2 are the screen identification information of the target guest system. The screen identification information of the target guest system indicates the specific virtual screen or screens assigned to the target guest system. These virtual screens are the target virtual screens assigned to the target guest system. Therefore, the target virtual screens can be one or more, depending on the display requirements of the target guest system in actual working conditions.
[0070] The number of target guest systems can be one or more, that is, the target guest system can be as follows: Figure 1 One or more of the guest systems shown in , for example, the target guest system may be Guest OS 1, or Guest OS 1, Guest OS 2, etc., determined according to actual working conditions.
[0071] S102: Generate first display information according to the screen identification information, the screen configuration information, and the physical screen information of the host system.
[0072] The screen configuration information includes coordinate information and enablement information for multiple virtual screens, or in other words, all virtual screens. These multiple virtual screens include one or more virtual screens allocated to the target guest system. The coordinate information indicates the coordinate position, width, and height of the virtual screens, while the enablement information indicates whether the display function is enabled or disabled. For example, if the enablement information is enabled, display is enabled; if the enablement information is disabled, display is disabled. It should be noted that these multiple virtual screens are the screens obtained by segmenting the physical screen.
[0073] For example, the screen configuration information is matched according to the screen identification information to obtain the screen configuration information of the target virtual screen, and then the first display information is generated according to the screen configuration information of the target virtual screen and the physical screen information.
[0074] Specifically, the screen configuration information of the target virtual screen is obtained. Since the screen configuration information of the target virtual screen includes the coordinate information of the target virtual screen and the enable information of the target virtual screen, and the coordinate information of the target virtual screen includes the height and width of the target virtual screen, the position and size of the target virtual screen in the physical screen of the host system are initialized, and the position and size obtained after initialization, as well as the enable information of the target virtual screen are determined as the first display information. The first display information can be generated according to the screen configuration information of the target virtual screen and the physical screen information, that is, the first display information includes the position and size of the target virtual screen in the physical screen of the host system and the enable information of the target virtual screen.
[0075] Optionally, the process of initializing the position and size of the target virtual screen on the physical screen of the host system may include determining the position and size of the target virtual screen on the physical screen based on the coordinate information of the target virtual screen, the physical screen position of the host system, and the physical screen size of the host system. The physical screen information of the host system includes the physical screen position and the physical screen size of the host system.
[0076] S103: Generate a target virtual screen on the physical screen of the host system according to the first display information, and provide display output for the target guest system.
[0077] After obtaining the first display information, the target virtual screen is generated on the host system's physical screen based on the position and size of the target virtual screen in the first display information, as well as the target virtual screen's enablement information, thereby completing the target virtual screen generation process on the host system. Furthermore, the host system provides a display output to the target guest system, so that the target guest system's display content can be displayed on the target virtual screen.
[0078] In one possible design, a possible implementation of generating a target virtual screen on a physical screen of the host system in step S103 includes:
[0079] A display window and a texture area of the display window are generated on the physical screen according to the first display information. The display window and the texture area of the display window are the target virtual screen, that is, the target virtual screen includes the display window and the texture area.
[0080] Among them, the position and size of the target virtual screen in the physical screen of the host system in the first display information are used to indicate the position and size of the display window on the physical screen, and the enable information of the target virtual screen in the first display information is used to generate a texture in the display window to obtain a texture area.
[0081] As can be seen from the description of the above embodiments, the virtual screen implementation method provided in the embodiment of the present application first allocates a target virtual screen to the target guest system to obtain the screen identification information of the target guest system, and then generates first display information based on the screen identification information, screen configuration information and physical screen information of the host system, generates a target virtual screen on the physical screen of the host system based on the first display information, and provides a display output for the target guest system, so that the display content of the target guest system can be displayed on the target virtual screen. Since the screen configuration information includes the coordinate information and enable information of multiple virtual screens, by allocating the target virtual screen from the multiple virtual screens to the target guest system, the generation of the target virtual screen is completed, and the display output is provided for the target guest system, thereby realizing arbitrary split display of the physical screen for the multi-virtual machine system, overcoming the defects of the prior art of using hardware to realize screen splitting. In addition, by allocating the corresponding target virtual screen to the target guest system, the virtual screen implementation method provided in the embodiment of the present application also has the advantages of dynamically allocating virtual screens and dynamically setting the virtual screen size, thereby facilitating the flexible application of virtualization technology in multi-domain vehicle system.
[0082] Figure 3 This is a flow chart of another virtual screen implementation method provided in an embodiment of the present application. Figure 3 As shown, the virtual screen implementation method provided by the embodiment of the present application includes:
[0083] S201: Initialize the display.
[0084] The host system performs display initialization operations, wherein display initialization includes initializing the display service environment and Open Graphics Library (OpenGL) context, etc., related to UI display, based on specific UI components in the host system. Specific UI components include UI libraries and UI tools of the UI layer.
[0085] S202: Parsing screen configuration information.
[0086] For example, obtain the configuration file, and parse the screen configuration information into the global memory according to the configuration file for subsequent use. This step is to obtain the coordinate information and enable information of each virtual screen from the configuration file to realize the global virtual screen configuration. The file content of the configuration file includes screen configuration information, and the screen configuration information includes the coordinate information and enable information of multiple virtual screens. The coordinate information includes the X coordinate, Y coordinate, height and width of multiple virtual screens. Among them, the multiple virtual screens are the screens obtained by dividing the physical screen. Figure 4 As shown, Figure 4 It is to combine two 3840×2160 physical screens horizontally into one 7680×2160 logical screen, so that the virtual screen can span multiple physical screens, and then split the logical screen into five virtual screens. Figure 4 The coordinate information of each virtual screen can be described in YAML as follows:
[0087] enable:yes
[0088] virtual_screen_layout:
[0089] -{x:0,y:0,w:1920,h:1080}
[0090] -{x:1920,y:0,w:1920,h:1080}
[0091] -{x:0,y:1080,w:1920,h:1080}
[0092] -{x:1920,y:1080,w:1920,h:1080}
[0093] -{x:3840,y:0,w:3840,h:2160}
[0094] The coordinate information of each virtual screen described in the YAML file is, in order, the coordinate information of virtual screen 1, virtual screen 2, virtual screen 3, virtual screen 4, and virtual screen 5. Each virtual screen is uniquely identified by screen identification information, such as the number of the virtual screen.
[0095] S203: Acquire screen identification information of the target guest system.
[0096] The screen identification information is used to uniquely identify the target virtual screen allocated to the target guest system.
[0097] S204: Generate first display information according to the screen identification information, the screen configuration information, and the physical screen information of the host system.
[0098] The possible implementation methods, principles and technical effects of step S203 and step S204 are similar to the possible implementation methods, principles and technical effects of step S101 and step S102. For details, please refer to the description of the above embodiments and will not be repeated here.
[0099] S205: Generate second display information according to the screen identification information and the screen configuration information.
[0100] For example, the screen configuration information is matched against the screen identification information to obtain the screen configuration information of the target virtual screen. Then, the second display information is generated based on the coordinate information of the target virtual screen. Specifically, the height and width of the target virtual screen in the coordinate information of the target virtual screen are set as the size of the target virtual screen when the host system provides display output to the target guest system. In other words, the second display information represents the size of the target virtual screen when the host system provides display output to the target guest system.
[0101] Optionally, the size represented by the second display information may also be determined as a default display resolution of the target guest system.
[0102] It should be noted that there is no order between step S204 and step S205. Figure 3 This is only a schematic diagram and is not intended to limit the order of execution.
[0103] S206: Generate a target virtual screen on the physical screen of the host system according to the first display information.
[0104] The possible implementation method, principle and technical effect of step S206 are similar to the possible implementation method, principle and technical effect of step S103. For details, please refer to the description of the above embodiment and will not be repeated here.
[0105] S207: Output a display instruction, and send the display instruction to the target guest system, so that the target guest system responds to the display instruction and sends a display message to the host system, so as to display the display message on the target virtual screen according to the second display information.
[0106] After generating the target virtual screen, the host system provides a display output for the target guest system. Specifically, the host system outputs a display instruction and sends the display instruction to the target guest system. The target guest system receives the display instruction and, in response to the display instruction, sends a display message to the host system. The display message is then displayed on the target virtual screen on the host system's physical screen according to the second display information, thereby displaying the display content of the target guest system. The display content is the content corresponding to the display message.
[0107] The virtual screen implementation method provided in the embodiments of this application allows a physical screen to be split into multiple virtual screens through global virtual screen configuration. Furthermore, by configuring corresponding target virtual screens for the target guest system (i.e., the target virtual machine system), the user-configured display function can be implemented for multiple virtual machine systems on the physical screen in any split display mode. This method not only eliminates the need for specific hardware support, provides more flexible software segmentation, allows multiple virtual machine systems to connect to only one hardware display interface without the limitation of insufficient interfaces, and reduces hardware costs, but also offers the advantages of dynamically allocating virtual screens and dynamically setting virtual screen sizes, facilitating the flexible application of virtualization technology in multi-domain vehicle systems.
[0108] Figure 5 This is a structural diagram of a virtual screen implementation device provided in an embodiment of the present application. Figure 5 As shown, the virtual screen implementation device 400 provided in the embodiment of the present application includes:
[0109] An acquisition module 401 is used to acquire screen identification information of a target guest system, where the screen identification information is used to uniquely identify a target virtual screen allocated to the target guest system;
[0110] A first processing module 402 is configured to generate first display information based on the screen identification information, the screen configuration information, and the physical screen information of the host system, wherein the screen configuration information includes coordinate information and enable information of multiple virtual screens, and the first display information includes the position and size of a target virtual screen on the physical screen of the host system, and the enable information of the target virtual screen;
[0111] The second processing module 403 is configured to generate a target virtual screen on the physical screen of the host system according to the first display information, and provide display output for the target guest system.
[0112] exist Figure 5 On the basis of Figure 6This is a structural diagram of another virtual screen implementation device provided in an embodiment of the present application. Figure 6 As shown, the virtual screen implementation device 400 provided in the embodiment of the present application further includes: a parsing module 404; the parsing module 404 is used to:
[0113] Obtain a configuration file, and parse screen configuration information into global memory according to the configuration file, wherein the file content of the configuration file includes the screen configuration information.
[0114] In one possible design, the first processing module 402 is specifically configured to:
[0115] Matching the screen configuration information with the screen identification information to obtain the screen configuration information of the target virtual screen;
[0116] generating first display information according to screen configuration information of the target virtual screen and physical screen information;
[0117] The screen configuration information of the target virtual screen includes coordinate information of the target virtual screen and enable information of the target virtual screen. The coordinate information of the target virtual screen includes the height and width of the target virtual screen. The physical screen information includes the physical screen position and physical screen size of the host system.
[0118] In one possible design, the second processing module 403 is specifically configured to:
[0119] Matching the screen configuration information with the screen identification information to obtain the screen configuration information of the target virtual screen;
[0120] Second display information is generated according to the coordinate information of the target virtual screen, where the second display information is used to represent the size of the target virtual screen when providing display output for the target guest system.
[0121] In one possible design, the second processing module 403 is further configured to:
[0122] Output a display instruction, and send the display instruction to the target guest system, so that the target guest system responds to the display instruction and sends a display message to the host system, so as to display the display message on the target virtual screen according to the second display information.
[0123] In one possible design, the second processing module 403 is further configured to:
[0124] A display window and a texture area of the display window are generated on the physical screen according to the first display information, and the target virtual screen includes the display window and the texture area.
[0125] In a possible design, the number of target guest systems is one or more, and the number of target virtual screens is one or more.
[0126] In one possible design, the virtual screen implementation apparatus 400 further includes: a display initialization module; the display initialization module is configured to:
[0127] Perform display initialization, which includes initializing the display service environment and the open graphics library context according to specific UI components in the host system.
[0128] The virtual screen implementation device provided in the embodiment of the present application can execute the corresponding steps of the virtual screen implementation method in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0129] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 500 may include: a processor 501 and a memory 502 communicatively connected to the processor 501 .
[0130] The memory 502 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer-executable instructions.
[0131] The memory 502 may include a high-speed RAM memory, and may also include a non-volatile memory (NoN-volatile memory), such as at least one disk memory.
[0132] The processor 501 is configured to execute the computer-executable instructions stored in the memory 502 to implement the various steps in the virtual screen implementation method in the above embodiment.
[0133] The processor 501 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0134] Optionally, the memory 502 may be independent or integrated with the processor 501. When the memory 502 is a device independent of the processor 501, the electronic device 500 may further include:
[0135] Bus 503 is used to connect processor 501 and memory 502. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, control buses, etc., but this does not mean that there is only one bus or only one type of bus.
[0136] Optionally, in a specific implementation, if the memory 502 and the processor 501 are integrated on a chip, the memory 502 and the processor 501 can communicate through an internal interface.
[0137] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores computer-executable instructions, which are used for each step of the method in the above embodiment.
[0138] The present application also provides a computer program product, including computer-executable instructions, which implement the various steps of the method in the above embodiment when executed by a processor.
[0139] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present application are indicated by the claims.
[0140] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A virtual screen implementation method, applied to an electronic device of a host system, characterized in that: include: Performing a display initialization operation, wherein the display initialization includes initializing a display service environment and an open graphics library context according to a specific UI component in the host system, wherein the specific UI component includes a UI library and a UI tool of a UI layer; Obtaining a configuration file, and parsing screen configuration information into a global memory according to the configuration file, wherein the file content of the configuration file includes the screen configuration information; Obtaining screen identification information of a target guest system, where the screen identification information is used to uniquely identify a target virtual screen allocated to the target guest system. The number of target guest systems may be one or more, and the number of target virtual screens is determined based on display requirements of the target guest system in actual operating conditions. generating first display information based on the screen identification information, the screen configuration information, and the physical screen information of the host system, wherein the screen configuration information includes coordinate information and enable information of multiple virtual screens, the first display information includes the position and size of the target virtual screen in the physical screen of the host system and the enable information of the target virtual screen, and the physical screen information of the host system includes the physical screen position and physical screen size of the host system; Matching the screen configuration information with the screen identification information to obtain the screen configuration information of the target virtual screen; generating second display information according to the coordinate information of the target virtual screen, wherein the second display information is used to represent the size of the target virtual screen when providing display output for the target guest aircraft system; generating the target virtual screen on the physical screen of the host system according to the first display information, horizontally combining multiple physical screens into one logical screen, so that the target virtual screen spans across multiple physical screens; Output a display instruction, and send the display instruction to the target guest system, so that the target guest system responds to the display instruction and sends a display message to the host system, so as to display the display message on the target virtual screen according to the second display information.
2. The virtual screen implementation method according to claim 1, characterized in that: The generating first display information according to the screen identification information, the screen configuration information, and the physical screen information of the host system includes: Matching the screen configuration information with the screen identification information to obtain the screen configuration information of the target virtual screen; generating the first display information according to the screen configuration information of the target virtual screen and the physical screen information; The screen configuration information of the target virtual screen includes coordinate information of the target virtual screen and enable information of the target virtual screen, and the coordinate information of the target virtual screen includes the height and width of the target virtual screen.
3. The method for realizing a virtual screen according to any one of claims 1 to 2, wherein: Generating the target virtual screen on the physical screen of the host system according to the first display information includes: A display window and a texture area of the display window are generated on the physical screen according to the first display information, and the target virtual screen includes the display window and the texture area.
4. The virtual screen implementation method according to claim 1, characterized in that: The target virtual screen is one or more.
5. A virtual screen implementation device, characterized in that: include: A display initialization module, configured to perform a display initialization operation, wherein the display initialization includes initializing a display service environment and an open graphics library context according to specific UI components in a host system, wherein the specific UI components include a UI library and UI tools of a UI layer; a parsing module, configured to obtain a configuration file, and parse the screen configuration information into a global memory according to the configuration file, wherein the file content of the configuration file includes the screen configuration information; an acquisition module, configured to acquire screen identification information of a target guest system, wherein the screen identification information is used to uniquely identify a target virtual screen allocated to the target guest system. The number of target guest systems may be one or more, and the number of target virtual screens is determined based on display requirements of the target guest system in actual operating conditions; a first processing module, configured to generate first display information based on the screen identification information, the screen configuration information, and the physical screen information of the host system, wherein the first display information includes a position and size of the target virtual screen on the physical screen of the host system and enablement information of the target virtual screen, the screen configuration information includes coordinate information and enablement information of multiple virtual screens, and the physical screen information of the host system includes a physical screen position and physical screen size of the host system; A second processing module is configured to perform a match in the screen configuration information according to the screen identification information to obtain the screen configuration information of the target virtual screen; generating second display information according to the coordinate information of the target virtual screen, wherein the second display information is used to represent the size of the target virtual screen when providing display output for the target guest aircraft system; generating the target virtual screen on the physical screen of the host system according to the first display information, horizontally combining multiple physical screens into one logical screen, so that the target virtual screen spans across multiple physical screens; Output a display instruction, and send the display instruction to the target guest system, so that the target guest system responds to the display instruction and sends a display message to the host system, so as to display the display message on the target virtual screen according to the second display information.
6. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the virtual screen implementation method as claimed in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the virtual screen implementation method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Program list self-adaptation editing method and device
CN104063196A
Method and device for achieving user-defined graphical user interface
CN104267951A
Virtual screen construction method, computing device and storage medium
CN112965771A
XEN-based multi-system different display control system and method, and related product
CN113589730A
Emergency broadcast platform big data display method
CN115904200A