Multi-screen display method and electronic device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUJIAN LANDI COMMERCIAL EQUIPMENT CO LTD
- Filing Date
- 2024-05-15
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]然而,相关技术中的多屏显示技术存在适配性低、成本高,硬件配置复杂的问题
[0016]本发明的有益效果在于:在电子设备启动后,创建虚拟设备进程,并设置虚拟设备进程为后台常驻进程,保证该进程始终处于后台运行状态以实现显示设备的数据处理,且无需与用户交互,实现用户无感知操作。在显示设备接入后,获取显示设备的显示参数,根据显示参数分别创建显示服务进程和通信服务进程,实现对显示设备的双进程处理,保证显示服务与通信服务的独立处理,且无需为显示设备配置独立处理器,降低设备显示成本,同时无需基于实际物理端口进行显示配置,降低硬件配置复杂度。此外,在显示服务进程和通信服务进程之间创建对应关系,实现显示参数、显示服务进程以及通信服务进程三者之间的一一对应,基于通信服务进程接收与该显示参数相关的显示设备的数据,再通过显示服务进程将数据显示在对应的显示设备,能够适应不同显示参数下的显示设备,实现单处理器的多屏异显,提高适配性。
Smart Images

Figure CN118605824B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of display technology, and more particularly to a multi-screen display method and electronic device. Background Technology
[0002] As intelligence continues to advance, many areas of life require the use of multiple screens to display different content, thus giving rise to multi-screen display technology.
[0003] However, multi-screen display technology in related technologies suffers from problems such as low adaptability, high cost, and complex hardware configuration. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a multi-screen display method and electronic device that can improve the adaptability of electronic devices to different types of display devices, reduce display costs, and simplify hardware configuration.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0006] A multi-screen display method is applied to an electronic device, wherein the electronic device is connected to multiple display devices, the method comprising:
[0007] In response to the startup signal of the electronic device, a virtual device process is created and the virtual device process is set as a background resident process;
[0008] In response to the access signal of the display device, the display parameters of the display device are acquired;
[0009] Based on the virtual device process, a display service process is created according to the display parameters;
[0010] Based on the virtual device process, a communication service process is created according to the display parameters;
[0011] Establish the correspondence between the display service process and the communication service process;
[0012] Obtain the data to be displayed from the display device;
[0013] According to the correspondence, the data to be displayed is transmitted to the display device.
[0014] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:
[0015] An electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the multi-screen display method described above.
[0016] The beneficial effects of this invention are as follows: After the electronic device is started, a virtual device process is created and set as a background resident process, ensuring that the process always runs in the background to process data from the display device without user interaction, achieving seamless user operation. After the display device is connected, the display parameters of the display device are obtained, and a display service process and a communication service process are created according to the display parameters to achieve dual-process processing of the display device, ensuring independent processing of the display service and communication service, and eliminating the need to configure a separate processor for the display device, thus reducing device display costs. Furthermore, display configuration based on actual physical ports is eliminated, reducing hardware configuration complexity. In addition, a correspondence is established between the display service process and the communication service process, achieving a one-to-one correspondence between the display parameters, the display service process, and the communication service process. The communication service process receives data from the display device related to the display parameters, and then the display service process displays the data on the corresponding display device. This adapts to display devices with different display parameters, enabling multi-screen display with a single processor and improving adaptability. Attached Figure Description
[0017] Figure 1 A flowchart illustrating a multi-screen display method provided in an embodiment of the present invention;
[0018] Figure 2 Another flowchart of a multi-screen display method provided in an embodiment of the present invention;
[0019] Figure 3 A schematic diagram illustrating the process of a multi-screen display method provided in an embodiment of the present invention;
[0020] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0021] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0022] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0023] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0024] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in one embodiment," "in one embodiment of this application," "in some other embodiments," and "in other embodiments" appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0025] Multi-screen display technology in related technologies suffers from problems such as low adaptability, high cost, and complex hardware configuration.
[0026] The high cost is mainly due to the related technologies. Multi-screen display technology requires multiple processors, each controlling and processing one display screen, resulting in high costs. Low adaptability and complex hardware configuration are primarily reflected in the fact that most multi-screen display methods rely on actual physical ports (such as MIPI, LVDS, EDP, HDMI, etc.) to complete the display task. The display resolution of these physical ports is basically fixed in electronic devices and cannot be adjusted according to the connected display device; it can only display according to the system's default resolution. Furthermore, some processors may not have multiple display interfaces (for example, some processors only have one display interface), therefore, these processors can only display at a fixed resolution and cannot achieve multi-screen display.
[0027] To address the aforementioned problems, this application provides a multi-screen display method applied to an electronic device, specifically to the processor of the electronic device. The electronic device has multiple display devices connected to it. Specifically, the electronic device includes cash registers, self-service terminals, or payment devices that require multi-screen display. The operating system of the processor in the electronic device includes, but is not limited to, Windows, Android, iOS, OpenHarmony, and Linux.
[0028] Based on this, please refer to Figure 1 The method includes steps S110-S160.
[0029] Step S110: In response to the start signal of the electronic device, create a virtual device process and set the virtual device process as a background resident process.
[0030] Step S120: In response to the access signal of the display device, obtain the display parameters of the display device.
[0031] Step S130: Create a display service process based on the display parameters according to the virtual device process.
[0032] Step S140: Create a communication service process based on the virtual device process according to the displayed parameters.
[0033] Step S150: Establish the correspondence between the display service process and the communication service process.
[0034] Step S160: Obtain the data to be displayed from the display device. 。
[0035] Step S170: According to the correspondence, transmit the data to be displayed to the display device.
[0036] As described above, after the electronic device starts up, a virtual device process is created and set as a persistent background process. This ensures that the process always runs in the background to process data from the display device without requiring user interaction, achieving seamless user operation. After the display device is connected, its display parameters are obtained. Based on these parameters, a display service process and a communication service process are created, enabling dual-process processing of the display device. This ensures independent processing of the display and communication services, eliminating the need for a dedicated processor for the display device, reducing display costs, and eliminating the need for display configuration based on actual physical ports, thus reducing hardware configuration complexity. Furthermore, a correspondence is established between the display service process and the communication service process, achieving a one-to-one correspondence between display parameters, the display service process, and the communication service process. The communication service process receives data from the display device related to the display parameters, and the display service process then displays the data on the corresponding display device. This adapts to display devices with different display parameters, enabling multi-screen display and improving compatibility.
[0037] In one embodiment of this application, the virtual device process in step S110 is a background resident process. Even if the electronic device's memory is low after the virtual device process is created, it will not be reclaimed or stopped. This virtual device process differs from ordinary processes, which have lower priority and are closed first when the electronic device's memory is low or when a process needs to be closed. However, the virtual device process in this application is a background resident process, which is not reclaimed when the system is in a low memory state. Therefore, setting the virtual device process as a background resident process avoids the virtual device process being reclaimed by the system due to low memory and ensures that the virtual device process always runs in the background during system startup. Furthermore, since the virtual device process in this application is a background process, unlike foreground processes which require user operation, it does not require manual user startup, achieving seamless user operation and improving the user experience.
[0038] In one embodiment of this application, step S110, in response to the access signal of the display device, includes step S210 for obtaining the display parameters of the display device.
[0039] Step S210: In response to the access signal of the display device, determine the data transmission protocol of the display device according to the access signal, and obtain the display parameters of the display device through the data transmission protocol based on the virtual device process.
[0040] As can be seen from the above embodiments, the data transmission protocol of the display device is determined based on the access signal of the display device, so as to quickly obtain the display parameters of the display device and improve the processing efficiency of display data.
[0041] In one embodiment of this application, in response to an access signal from a display device, the virtual device process obtains the display parameters of the display device according to the data transmission protocol of the access signal. For example, if the display device is connected to an electronic device via a USB interface, the virtual device process obtains the display parameters of the display device via the USB data transmission protocol in response to the USB access signal of the display device. Alternatively, if the display device is connected to an electronic device via a Wi-Fi signal, the virtual device process obtains the display parameters of the display device via the Wi-Fi data transmission protocol in response to the Wi-Fi access signal of the display device. Alternatively, if the display device is connected to an electronic device via a Bluetooth signal, the virtual device process obtains the display parameters of the display device via the Bluetooth data transmission protocol in response to the Bluetooth access signal of the display device. Alternatively, if the display device is connected to an electronic device via a distributed soft bus under the OpenHarmony system, the virtual device process obtains the display parameters of the display device via the distributed soft bus in response to the access signal of the display device. Alternatively, if the display device is connected to an electronic device via SPI, the virtual device process obtains the display parameters of the display device via the SPI communication protocol in response to the SPI access signal of the display device.
[0042] As can be seen from the above embodiments, compared with the display methods in related technologies that require the configuration of specific physical ports, the multi-screen display method of this application responds and processes through a dual-process (display service process and communication service process) approach, without the need to set specific physical ports. It can access display devices through various methods such as USB, SPI, Wifi, Bluetooth and distributed soft bus, thereby flexibly expanding and setting up multiple display screens, effectively reducing the complexity of hardware configuration, and broadening the application scenarios of multi-screen display.
[0043] In one embodiment of this application, step S130, which involves creating a display service process based on display parameters using a virtual device process, includes step S310.
[0044] Step S310: Based on the virtual device process, create a unique virtual device identifier according to the display parameters, and create a display service process based on the virtual device identifier.
[0045] As can be seen from the above embodiments, since the virtual device process is a background resident process and will not be recycled, a unique virtual device identifier is created based on the display parameters, which can effectively manage multiple display devices and avoid device confusion; at the same time, a display service process is created based on the virtual device identifier, which is used by the system to identify and query the corresponding display service process.
[0046] In one embodiment of this application, step S140, which involves creating a communication service process based on display parameters using a virtual device process, includes step S320:
[0047] Step S320: Create a communication service process based on the virtual device process, and create a memory pool queue corresponding to the display parameters through the communication service process. The memory pool queue is used to receive data to be displayed.
[0048] As can be seen from the above embodiments, after creating the communication service process, creating a memory pool queue corresponding to the display parameters can avoid data interference between different display parameters and achieve data isolation between different display devices.
[0049] In one embodiment of this application, the display parameters include the screen resolution of the display device. After the virtual device process obtains the screen resolution of the display device, it creates a unique virtual device identifier based on the screen resolution. This virtual device identifier is a global identifier. By using the virtual device identifier as the unique identifier of the display device, display data can be transmitted to a specific object based on the virtual device identifier, avoiding data transmission errors.
[0050] It should be noted that display parameters can also include other parameters of the display device, such as the display device model. If the display parameter is the display device model, a mapping between the display device model and the corresponding data required by the display device can be pre-stored in the electronic device, and data transmission can be achieved through this mapping.
[0051] In one embodiment of this application, the step S150 of establishing the correspondence between the display service process and the communication service process includes step S410.
[0052] Step S410: Based on a preset mapping method, establish a mapping relationship between the virtual device identifier of the display service process and the memory pool queue of the communication service process.
[0053] As can be seen from the above embodiments, since different display parameters will create different memory pool queues, in order for the electronic device to be able to identify the memory pool queue corresponding to the display parameters, it is necessary to establish a mapping relationship between the unique virtual device identifier in the electronic device and the memory pool queue, so as to ensure a one-to-one correspondence between each display device and the memory pool queue, in order to solve the data storage problem when different display devices with the same display parameters are connected at the same time, and to ensure that the data of each display device will not be confused with each other.
[0054] In one embodiment of this application, different mapping methods are used depending on the operating system of the electronic device.
[0055] In one embodiment of this application, when the operating system of the electronic device's processor is Android, a mapping relationship between the virtual device identifier and the memory pool queue can be established based on the AIDL callback method of the Android system. AIDL (Android Interface Definition Language) is a mechanism specifically designed for cross-process communication in the Android system. Since different processes in the Android system cannot share memory (user space), AIDL can define the programming interface for inter-process communication (IPC) between the client and server processes. Under this technology, when server-side data increases, the latest data can be passed to the client through interface callbacks, thereby achieving communication between different processes.
[0056] In one embodiment of this application, when the operating system of the electronic device's processor is Linux, a mapping relationship between the virtual device identifier and the memory pool queue can be established based on the mmap method of the Linux system. mmap is a memory-mapped file method that can map a file or other object into memory, with the file mapped to multiple pages. The mmap method enables processes to share memory by mapping the same ordinary file. Once the ordinary file is mapped into the process's address space, the process can access the file as if it were ordinary memory, without needing to call read(), write(), or other similar operations.
[0057] In one embodiment of this application, creating a mapping relationship between virtual device identifiers and memory pool queues can effectively reduce the number of data copies and improve data processing efficiency. Without creating a mapping relationship, the operating system needs to copy data from user space to kernel space for processing, and then copy data from kernel space to user space for interaction. This results in low data display efficiency and stuttering. After establishing the mapping relationship, user space and kernel space can point to the same physical memory, thus directly obtaining data without data copying. Furthermore, the mapping relationship ensures the uniqueness and sustainability of the data.
[0058] In one embodiment of this application, different memory pool queues are created for different screen resolutions. Since there is a correspondence between the virtual device identifier and the memory pool queues, the electronic device can transfer data for the corresponding screen resolution to the designated memory pool queue based on the virtual device identifier. Therefore, based on the one-to-one correspondence between screen resolution, virtual device identifier, and memory pool queues, the electronic device can identify and determine which memory pool queue the current data should be transferred to. When not needed, the virtual device identifier can be destroyed to indicate that there is no memory pool queue for that resolution. If a new display device with a different screen resolution is connected, the virtual device process will allocate a new, unique virtual device identifier and create a memory pool queue. This ensures that the screen data for each screen resolution remains unique.
[0059] In one embodiment of this application, step S320, which involves creating a memory pool queue corresponding to the display parameters through a communication service process, includes steps S510-S520.
[0060] Step S510: Request a memory space whose size matches the display parameters through the communication service process. The memory space includes multiple memory blocks.
[0061] Step S520: Based on the first-in-first-out data linked list structure, the memory blocks are sequentially connected according to the order in which the data to be displayed is written to obtain the memory pool queue.
[0062] As can be seen from the above embodiments, creating memory spaces of the same size according to the display parameters improves memory utilization. Simultaneously, memory blocks are sequentially connected according to a data linked list structure based on the first-in, first-out (FIFO) principle. When the memory pool needs to read data, it retrieves data from the head of the list; when the memory pool needs to write data, it adds it to the tail of the list, avoiding data read / write errors and thus preventing data display errors.
[0063] In one embodiment of this application, the display parameters include screen resolution and RGB color mode. Step S510 specifically involves: if the screen resolution is 1920×1080 and the RGB color mode is RGB565, then the communication service process needs to allocate a memory space of 1920×1080×2 bytes. If the screen resolution is 1920×1080 and the RGB color mode is RGB888, then the communication service process needs to allocate a memory space of 1920×1080×3 bytes. Therefore, the size of the memory space allocated by the communication service process matches the display parameters.
[0064] In one embodiment of this application, each frame of data to be displayed is stored in a memory block. Each time a block is written to memory, it is added to the tail of a data linked list. When data to be displayed needs to be read, it is retrieved from the head of the data linked list, thus achieving a first-in, first-out (FIFO) system for the data to be displayed. This method ensures the uniqueness and continuity of the data.
[0065] In one embodiment of this application, obtaining the data to be displayed from the display device in step S160 includes step S610.
[0066] Step S610: If a data change is detected in the memory pool queue corresponding to the display device, then read the data to be displayed from the memory pool queue.
[0067] As can be seen from the above embodiments, when the data in the memory pool queue changes, it means that the current system needs the display device to display the relevant data. Therefore, by reading the data to be displayed and sending it to the display service process for processing, the display data and communication data can be processed independently, thereby improving the fault tolerance of the display processing.
[0068] Furthermore, most current solutions for multi-resolution display are based on a single process, which can easily lead to data loss and poor fault tolerance when the display device malfunctions.
[0069] In one embodiment of this application, the virtual device process is also used to listen for input events from a peripheral display device, thereby sending the input events corresponding to the display device to an electronic device for unified processing.
[0070] In one embodiment of this application, steps S710-S730 are included after step S140.
[0071] Step S710: Create a listening child process in the communication service process. The listening child process is used to listen for abnormal signals of the communication service process.
[0072] Step S720: If the communication service process receives an abnormal signal, it sends the abnormal signal to the virtual device process to determine the abnormal situation of the communication service process.
[0073] Step S730: If the communication service process is abnormal, restart the communication service process through the virtual device process.
[0074] As can be seen from the above embodiments, when the display device malfunctions, the communication service process will receive an abnormal signal. Then, the virtual device process needs to further determine whether the display device exited normally or abnormally. If it is determined to be an abnormal exit, since the virtual device process has not been recycled, the virtual device identifier has not been destroyed. Therefore, the communication service process can be restarted based on the mapping relationship of the virtual device identifier. This method will not cause data loss and does not require data transmission delay or data modification, thus improving data fault tolerance.
[0075] In one embodiment of this application, the abnormal signal is the kill signal in a Linux or Android system, indicating that the communication connection between the current display device and the electronic device has been broken or that the communication service process has encountered an abnormality. In this case, the virtual device process will not destroy the virtual device identifier corresponding to this communication service process, but will instead restart the corresponding communication service process based on this virtual device identifier to complete the data transmission.
[0076] In one embodiment of this application, step S170, which involves transmitting the data to be displayed to the display device according to the correspondence, includes steps S810-S820.
[0077] Step S810: According to the correspondence, the data to be displayed is transmitted to the corresponding communication service process through the display service process;
[0078] Step S820: Based on the communication service process, the data to be displayed is transmitted to the corresponding display device for display through a transmission method that matches the access signal.
[0079] As can be seen from the above embodiments, by transmitting data through a one-to-one correspondence between the communication service process and the display service process, independent control and processing of each display device can be achieved, thereby realizing multi-screen display. Simultaneously, by transmitting display data based on the transmission method corresponding to the access signal, the problem of current display technology requiring actual physical ports for display configuration is solved, reducing the complexity of hardware configuration.
[0080] In one embodiment of this application, such as Figure 2 As shown, the multi-screen display method of this application is applied to the processor of a cash register. A main display screen and a secondary display screen are connected to the cash register. The main display screen is connected to the cash register via a USB interface, and the secondary display screen can be connected via a Wi-Fi signal. The display screens are the display devices described in this application. The cash register can also be expanded to include multiple display screens according to actual application needs. In this scenario,
[0081] Step S1010: In response to the cash register's start signal, create a virtual device process and set it as a background resident process.
[0082] Step S1020: Obtain the display parameters of the main display screen according to the USB data transmission protocol, and obtain the display parameters of the secondary display screen according to the Wifi data transmission protocol.
[0083] Step S1030: Create virtual device identifier 1 based on the display parameters of the main display screen, and create virtual device identifier 2 based on the display parameters of the secondary display screen according to the virtual device process.
[0084] Step S1040: Based on the virtual device process, create display service process 1 and communication service process 1 respectively according to virtual device identifier 1, and create display service process 2 and communication service process 2 respectively according to virtual device identifier 2.
[0085] Step S1050: Based on the virtual device process, a listening subprocess 1 and a listening subprocess 2 are created in the communication service process 1 and communication service process 2 respectively. The listening subprocesses are used to listen for abnormal signals from the communication service process. When the secondary display screen reconnects to the cash register due to network instability, the listening subprocess 2 detects an abnormal signal from the communication service process 2 and sends the abnormal signal to the virtual device process. The virtual device process determines that the current communication service process 2 is abnormal, but the virtual device identifier 2 has not been destroyed. Therefore, the virtual device process restarts the current communication service process 2 to restore data transmission between the secondary display screen and the cash register.
[0086] Step S1060: Create the corresponding memory pool queue 1 through communication service process 1, and create the corresponding memory pool queue 2 through communication service process 2.
[0087] Step S1070: Based on the preset mapping method, establish mapping relationship 1 between virtual device identifier 1 and memory pool queue 1, and establish mapping relationship 2 between virtual device identifier 2 and memory pool queue 2.
[0088] Step S1080: The data to be displayed sent by the application is sent to the designated display service process according to the virtual device identifier. The display service process processes the data to be displayed to generate display data with corresponding display parameters, and then transmits the display data to the designated display screen for display through the communication service process.
[0089] In one embodiment of this application, such as Figure 3As shown, there are currently n display devices connected to the electronic device via USB port, SPI port, and Wi-Fi, where n is a positive integer greater than or equal to 2. In response to the electronic device's startup signal, a virtual device process is created. In response to the connection signals of the n display devices, the virtual device process creates a virtual device identifier N (N = 2, ..., n) based on the display parameters of each display device, and establishes a corresponding display service process vDisplayN and a communication service process N based on the virtual device identifier N. When the electronic device needs to control a specific display device 1 to display data, the electronic device first transmits the data to be displayed to the display service process vDisplay1 through the virtual device process for processing, obtaining display data adapted to the display device. Then, the display data is transmitted to the corresponding communication service process 1, and finally, the display data is transmitted to the display device through the SPI communication protocol of the communication service process 1, completing the display.
[0090] In one embodiment of this application, the method further includes step S910.
[0091] Step S910: In response to the exit signal of the display device, stop the communication service process and delete the virtual device identifier.
[0092] As can be seen from the above embodiments, when the display device exits normally, the communication service process is stopped, that is, the data transmission of the display device is stopped, and the virtual device identifier is deleted to indicate that the display device has exited the system, so as to avoid the virtual device process from restarting the communication service process for communication, thereby saving device memory.
[0093] In one embodiment of this application, if the normal exit is displayed, the listening subprocess in step S710 above does not receive an abnormal signal. At this time, the virtual device process will stop the communication service process and delete the corresponding virtual device identifier.
[0094] Please refer to Figure 4 Another embodiment of this application provides an electronic device 100, including a memory 101, a processor 102, and a computer program stored on the memory 101 and running on the processor 102. When the processor 102 executes the computer program, it implements the various steps in the multi-screen display method described above.
[0095] The details of the multi-screen display method have already been disclosed in the above sections and will not be repeated here.
[0096] In summary, the multi-screen display method and electronic device provided by this invention, after a display device is connected, acquires the display parameters of the display device, and creates a display service process and a communication service process respectively based on the display parameters, realizing dual-process processing of the display device. Compared with the single-process processing of the prior art, this application can retain the data to be displayed on the display device when the display device malfunctions, avoiding data loss. In this case, the user only needs to replace the malfunctioning display device to achieve data display, improving data fault tolerance. In addition, since this application creates a correspondence between the display service process and the communication service process, it achieves a one-to-one correspondence between the display parameters, the display service process, and the communication service process. Each process belongs to only one display device, and the virtual device process uniformly manages the display service process and the communication service process, realizing the scalability of the display screen, so that the display device is not limited to the actual physical interface, effectively reducing the display cost and hardware configuration cost of the system. Furthermore, since each display service process and communication service process is created based on the display parameters, the electronic device can adapt to display devices with different display parameters when expanding, realizing multi-screen display and improving adaptability.
[0097] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A multi-screen display method, characterized in that, Applied to an electronic device on which multiple display devices are connected, the method includes: In response to the startup signal of the electronic device, a virtual device process is created and the virtual device process is set as a background resident process; In response to the access signal of the display device, the display parameters of the display device are obtained, including the screen resolution and RGB color mode of the display device; Based on the virtual device process, a display service process is created according to the display parameters; Based on the virtual device process, a communication service process is created according to the display parameters; Establish the correspondence between the display service process and the communication service process; Obtain the data to be displayed from the display device; According to the correspondence, the data to be displayed is transmitted to the display device; The step of creating a display service process based on the virtual device process according to the display parameters includes: Based on the virtual device process, a unique virtual device identifier is created according to the display parameters, and a display service process is created based on the virtual device identifier; The step of creating a communication service process based on the virtual device process according to the display parameters includes: A communication service process is created based on the virtual device process, and a memory pool queue corresponding to the display parameters is created through the communication service process. The memory pool queue is used to receive the data to be displayed. Establishing the correspondence between the display service process and the communication service process includes: Based on the preset mapping method of the electronic device, a mapping relationship is established between the virtual device identifier of the display service process and the memory pool queue of the communication service process; After the virtual device process creates a communication service process based on the display parameters, the process further includes: A listening subprocess is created in the communication service process, and the listening subprocess is used to listen for abnormal signals of the communication service process; If the communication service process receives an abnormal signal, it sends the abnormal signal to the virtual device process to determine the abnormal situation of the communication service process; If the communication service process is abnormal and the virtual device identifier is not destroyed, the communication service process will be restarted through the virtual device process.
2. The multi-screen display method according to claim 1, characterized in that, The step of obtaining the display parameters of the display device in response to the access signal of the display device includes: In response to the access signal of the display device, the data transmission protocol of the display device is determined according to the access signal, and the display parameters of the display device are obtained by the virtual device process through the data transmission protocol.
3. The multi-screen display method according to claim 1, characterized in that, The step of creating a memory pool queue corresponding to the display parameters through the communication service process includes: Request a memory space whose size matches the display parameters, the memory space comprising multiple memory blocks; The memory blocks are sequentially connected according to the order in which the data to be displayed is written, based on a first-in-first-out (FIFO) linked list structure, to form a memory pool queue.
4. The multi-screen display method according to claim 1, characterized in that, The process of acquiring the data to be displayed from the display device includes: If a data change is detected in the memory pool queue corresponding to the display device, the data to be displayed in the memory pool queue is read.
5. The multi-screen display method according to claim 1, characterized in that, The step of transmitting the data to be displayed to the display device according to the correspondence includes: According to the correspondence, the data to be displayed is transmitted to the corresponding communication service process through the display service process; Based on the communication service process, the data to be displayed is transmitted to the corresponding display device for display using a transmission method that matches the access signal.
6. The multi-screen display method according to claim 1, characterized in that, Also includes: In response to the exit signal of the display device, the communication service process is stopped and the virtual device identifier is deleted.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements each step of the multi-screen display method as described in any one of claims 1-6.
Citation Information
Patent Citations
A multi-screen interactive method and system based on virtualized shared display memory
CN109343929A
Electronic equipment multi-screen display method, multi-screen display system, electronic equipment and computer readable medium
CN111752504A
IDV client multi-screen dividing and conquering method and system
CN114461157A
Application Start Method and Electronic Device
US20220308899A1