Dual-screen different display and different touch implementation method, device and storage medium
By creating a virtual screen and establishing a matching relationship with the second screen touch port number when the chip supports a physical display port, the implementation problem of dual-screen unique display and different touch function is solved, achieving efficient user experience and cost-reducing effect.
Patent Information
- Application Number
- CN202411626537.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-04-08
AI Technical Summary
When the chip only supports one physical display port, how to achieve the dual-screen unique display function, especially because the Android system cannot provide the touch effect of the independent touch panel for the virtual screen.
By creating a virtual screen and assigning a virtual port number to it, connecting the second screen to the USB interface of the electronic device, displaying the content to be displayed in the virtual screen on the second screen, and obtaining the touch port number of the second screen, establishing a matching relationship between the virtual port number and the touch port number to realize touch control of the second screen.
The dual-screen different display and touch function of the first and second screens is realized when the chip only supports one physical display port, reducing hardware requirements, reducing costs and improving user experience.
Smart Images

Figure CN119781707A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of screen display control technology, and in particular to a method, device and storage medium for realizing dual-screen different display and different touch. Background Art
[0002] The Android system supports dual-screen touch by default, but the chip platform must support two display serial interfaces (DSI) or one DSI plus one display port (DP), that is, dual-screen touch depends on the support of the hardware chip. When the chip has only one DSI, the chip cannot support dual-screen touch. Although the dual-screen effect can be achieved through USB to HDMI, the USB to HDMI screen cannot be directly recognized by the Android system at this time. A virtual screen needs to be created by software to display content on this screen, and the Android system cannot provide the touch effect of an independent touch panel (TP) for the virtual screen. Summary of the invention
[0003] The present application provides a dual-screen different display and different touch implementation method, device and storage medium to solve the technical problem of how to implement dual-screen different display and different touch when the chip only supports one physical display port.
[0004] In a first aspect, the present application provides a dual-screen different display and different touch implementation method, which is applied to an electronic device, wherein the electronic device includes a physical display port, and the electronic device is connected to a first screen through the physical display port. The method includes:
[0005] When receiving a display request for dual-screen different display, creating a virtual screen; wherein the virtual screen includes a virtual port number;
[0006] When the USB interface of the electronic device is connected to a second screen, displaying the content to be displayed in the virtual screen on the second screen;
[0007] Obtain the touch port number of the second screen;
[0008] Establishing a matching relationship between the virtual port number and the touch port number;
[0009] When a touch control instruction for touching the second screen is acquired, touch control is performed on the second screen according to the touch control instruction based on the matching relationship.
[0010] Optionally, when a display request for dual-screen different display is received, creating a virtual screen includes:
[0011] When receiving a display request for dual-screen different display, creating a first virtual screen through a display manager; wherein the first virtual screen is configured with content to be displayed;
[0012] Configuring the virtual port number for the first virtual screen;
[0013] The first virtual screen is used as the virtual screen.
[0014] Optionally, configuring the virtual port number for the first virtual screen includes:
[0015] Configuring a virtual display identifier for the first virtual screen;
[0016] Creating a display address based on the virtual display identifier; wherein the display address includes a virtual display port of the first virtual screen;
[0017] The virtual port number is determined according to the virtual display port of the first virtual screen.
[0018] Optionally, establishing a matching relationship between the virtual port number and the touch port number includes:
[0019] Configuring the viewport type of the virtual screen as a virtual type in a touch input mapper;
[0020] Establishing a matching relationship between the virtual port number and the touch port number of the second screen according to the virtual type;
[0021] The matching relationship is added to the matching configuration file.
[0022] Optionally, in the case of acquiring a touch control instruction for touching the second screen, performing touch control on the second screen according to the touch control instruction according to the matching relationship includes:
[0023] When the touch control instruction is obtained, obtaining a virtual port number of the second screen;
[0024] Reading a matching relationship in the matching configuration file according to the virtual port number to determine a touch port number corresponding to the second screen;
[0025] The second screen is touch-controlled according to the touch port number and the touch control instruction.
[0026] Optionally, before displaying the content to be displayed in the virtual screen on the second screen, the method further includes:
[0027] The second screen is connected to the USB interface of the electronic device via a USB to HDMI data cable.
[0028] Optionally, before establishing a matching relationship between the virtual port number and the touch port number, the method further includes:
[0029] Perform touch calibration on the second screen.
[0030] In a second aspect, the present application provides a dual-screen different display and different touch implementation device, which is applied to an electronic device, wherein the electronic device includes a physical display port, and the electronic device is connected to a first screen through the physical display port, and the device includes:
[0031] A creation module, used for creating a virtual screen when receiving a display request for dual-screen different display; wherein the virtual screen includes a virtual port number;
[0032] The special display module is used to display the content to be displayed in the virtual screen on the second screen when the USB interface of the electronic device is connected to the second screen;
[0033] An acquisition module, used for acquiring a touch port number of the second screen;
[0034] A matching module, used to establish a matching relationship between the virtual port number and the touch port number;
[0035] The different touch module is used for, when a touch instruction for touching the second screen is acquired, performing touch control on the second screen according to the touch instruction based on the matching relationship.
[0036] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0037] Memory, used to store computer programs;
[0038] The processor is used to implement the dual-screen different display and different touch implementation method described in any embodiment of the first aspect when executing the program stored in the memory.
[0039] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for realizing dual-screen different display and different touch as described in any embodiment of the first aspect is implemented.
[0040] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application creates a virtual screen when receiving a display request for dual-screen differential display; wherein the virtual screen includes a virtual port number; when the USB interface of the electronic device is connected to the second screen, the content to be displayed in the virtual screen is displayed in the second screen; the touch port number of the second screen is obtained; a matching relationship is established between the virtual port number and the touch port number; when a touch control instruction for touching the second screen is obtained, the second screen is touch-controlled according to the touch control instruction according to the matching relationship. The method can establish a matching relationship between the touch port number of the second screen and the virtual port number of the virtual screen, and can realize touch control of the second screen based on the matching relationship, thereby realizing differential display and differential touch functions based on the first screen and the second screen, reducing the hardware requirements for dual-screen differential display and differential touch, thereby reducing costs and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0044] Figure 1 A system architecture diagram of a method for implementing dual-screen different display and different touch provided in one embodiment of the present application;
[0045] Figure 2 A schematic diagram of a flow chart of a method for implementing dual-screen different display and different touch provided in one embodiment of the present application;
[0046] Figure 3 A schematic diagram of a process for implementing dual-screen different display and different touch provided in one embodiment of the present application;
[0047] Figure 4 A schematic diagram of a dual-screen different display and different touch implementation architecture provided for one embodiment of the present application;
[0048] Figure 5A schematic diagram of the structure of a dual-screen different display and different touch implementation device provided in one embodiment of the present application;
[0049] Figure 6 A schematic diagram of the structure of an electronic device provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0051] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0052] In order to solve the technical problem in the prior art of how to achieve dual-screen different display and different touch when the chip only supports one physical display port, the present application provides a dual-screen different display and different touch implementation method, device and storage medium, which can reduce the hardware requirements for dual-screen different display and different touch, thereby reducing costs and improving user experience.
[0053] The first embodiment of the present application provides a method for realizing dual-screen different display and different touch. The method can be applied to Figure 1The system architecture shown, the system architecture includes at least an electronic device with a physical display port (such as DSI), the electronic device can be connected to the first screen through the physical display port, and can be connected to the second screen through other interfaces (such as USB interfaces). The first screen can be a MIPI screen, which is a display screen using a mobile industry processor interface (Mobile Industry Processor Interface, referred to as MIPI), and the second screen can be other screens connected via a USB to HDMI data cable, such as an HDMI screen, which is a display screen that supports a high-definition multimedia interface (High Definition Multimedia Interface, referred to as HDMI). The embodiment of the present application does not limit the type of the second screen, and only needs to include a touch panel to support touch. Specifically, the electronic device can be a dual-screen different display and different touch module. Since the first screen is connected to the electronic device through a physical display port, it can directly have display and touch functions. The solution of the embodiment of the present application is mainly aimed at how to make the second screen also have display and touch functions when the chip only supports one physical display port, thereby realizing the dual-screen different display and different touch of the first screen and the second screen.
[0054] Next, based on the system architecture, the dual-screen different display and different touch implementation method is described in detail. Figure 2 The dual-screen different display and different touch implementation method includes:
[0055] Step 201: upon receiving a display request for dual-screen different display, create a virtual screen; wherein the virtual screen includes a virtual port number.
[0056] In one embodiment, when a display request for dual-screen different display is received, a virtual screen is created, including: when a display request for dual-screen different display is received, a first virtual screen is created through a display manager; wherein the first virtual screen is configured with content to be displayed; a virtual port number is configured for the first virtual screen; and the first virtual screen is used as a virtual screen.
[0057] In this embodiment, the display request for dual-screen display can be initiated by the application APP, and can also be set to directly trigger the display request of the second screen when the USB interface of the electronic device is detected to be connected to the second screen when there is display content on the first screen, or, regardless of whether the first screen has display content, only when it is detected that the electronic device is connected to the second screen, the display request of the second screen is directly triggered without restriction. When a display request for dual-screen display is received, a first virtual screen is created through the display manager DisplayManager, and the first virtual screen is configured with content to be displayed. Next, a fixed virtual port number is configured for the first virtual screen, and the first virtual screen configured with the virtual port number is used as the virtual screen. When it is confirmed that the second screen is connected, the content to be displayed of the virtual screen can be directly displayed on the second screen.
[0058] In one embodiment, configuring a virtual port number for a first virtual screen includes: configuring a virtual display identifier for the first virtual screen; creating a display address based on the virtual display identifier; wherein the display address includes a virtual display port of the first virtual screen; and determining a virtual port number based on the virtual display port of the first virtual screen.
[0059] In this embodiment, since the default virtual screen interface VirtualDisplayDevice of the Android system does not have the insertion detection logic of the physical MIPI screen or HDMI screen, the physical display identifier physicalDisplayId cannot be obtained, and thus the address attribute of the virtual screen cannot be specified, that is, there is no display port displayPort, and it can only display but not support touch. In order to make the second screen support touch, the operating system can be customized. For example, a virtual display identifier is configured for the first virtual screen, and a display address is created based on the virtual display identifier. The display address includes the virtual display port of the first virtual screen, and the virtual port number of the second screen is determined according to the virtual display port of the first virtual screen.
[0060] Step 202: When the USB interface of the electronic device is connected to a second screen, the content to be displayed in the virtual screen is displayed on the second screen.
[0061] In one embodiment, before displaying the content to be displayed in the virtual screen on the second screen, the method further includes: connecting the second screen to a USB interface of the electronic device via a USB to HDMI data cable.
[0062] In this embodiment, before displaying the content to be displayed in the virtual screen on the second screen, the second screen can be connected to the USB interface of the electronic device via a USB to HDMI data cable. After confirming that the USB interface is connected to the second screen, the content to be displayed in the virtual screen can be directly displayed on the second screen.
[0063] Step 203: Obtain the touch port number of the second screen.
[0064] The touch port number of the second screen is the touch port number of the touch panel of the second screen.
[0065] Step 204: Establish a matching relationship between the virtual port number and the touch port number.
[0066] In one embodiment, a matching relationship is established between the virtual port number and the touch port number, including: configuring the viewport type of the virtual screen as a virtual type in the touch input mapper; establishing a matching relationship between the virtual port number and the touch port number of the second screen according to the virtual type; and adding the matching relationship to a matching configuration file.
[0067] In this embodiment, to establish a matching relationship between the virtual port number and the touch port number, the viewport type viewportType of the virtual screen can be first configured as the virtual type VIRTUAL in the touch input mapper TouchInputMapper, such as setting viewportTypeToUse = ViewportType::VIRTUAL, and then establishing a matching relationship between the virtual port number and the touch port number of the second screen according to the virtual type, and adding the matching relationship to the matching configuration file. The matching configuration file includes the matching relationship between the screen and the touch device, such as the physical display port physical displayPort corresponding to the input touch1 of the first screen, and the virtual display port virtual displayPort corresponding to the input touch2 of the second screen. Specifically, the matching configuration file can be an input-port-associations.xml file, and the matching relationship between the virtual port number and the touch port number of the second screen can be directly added to the matching configuration file without limitation. By establishing a matching relationship between the virtual port number and the touch port number of the second screen, and adding the matching relationship to the matching configuration file, when the second screen needs to be touch-controlled, the touch port number corresponding to the virtual port number can be found through the matching relationship, so that the second screen can be touch-controlled according to the touch instruction, and the dual-screen different display and touch functions of the first screen and the second screen can be realized when the chip only supports one physical display port.
[0068] Step 205 : When a touch control instruction for touching the second screen is acquired, touch control is performed on the second screen according to the touch control instruction based on the matching relationship.
[0069] The method can establish a matching relationship between the touch port number of the second screen and the virtual port number of the virtual screen, and can implement touch control of the second screen based on the matching relationship, thereby realizing the different display and touch functions based on the first screen and the second screen, reducing the hardware requirements for the dual-screen different display and touch, thereby reducing costs and improving user experience.
[0070] In one embodiment, when a touch instruction for touching a second screen is obtained, touch control is performed on the second screen according to the touch instruction based on a matching relationship, including: when the touch instruction is obtained, the virtual port number of the second screen is obtained; the matching relationship in the matching configuration file is read according to the virtual port number to determine the touch port number corresponding to the second screen; and touch control is performed on the second screen according to the touch port number according to the touch instruction.
[0071] In this embodiment, when a touch instruction is obtained, the virtual port number of the virtual screen corresponding to the second screen can be obtained; the matching relationship in the matching configuration file is read according to the virtual port number, and the touch port number corresponding to the second screen is determined according to the matching relationship and the virtual port number, so that the display content of the second screen corresponds to the touch panel of the second screen, and then the second screen can be touch-controlled according to the touch instruction based on the touch port number.
[0072] In this embodiment, the second screen connected via a USB to HDMI data cable can not only display the content to be displayed, but also can be touch-controlled. Compared with the current devices that must require the chip to support dual MIPI to achieve dual-screen different display and different touch, the solution of this embodiment saves costs.
[0073] In one embodiment, before establishing a matching relationship between the virtual port number and the touch port number, the method further includes: performing touch calibration on the second screen.
[0074] In this embodiment, in order to ensure the touch accuracy of the second screen during use, the touch panel of the second screen may be calibrated before a matching relationship is established between the virtual port number and the touch port number.
[0075] In a specific embodiment, Figure 3 A schematic diagram of a dual-screen different display and different touch implementation process, including:
[0076] Step S1, create a virtual screen. Create a virtual screen through DisplayManager, start another interface display through Presentation, and when the virtual screen object is successfully created, it can be displayed on a screen of USB to HDMI, such as a second screen.
[0077] Step S2, add a fixed display port for the virtual screen. Since the default virtual screen interface VirtualDisplayDevice of the Android system does not have the insertion detection logic of the physical MIPI screen or HDMI screen, it is impossible to obtain the physical display identifier physicalDisplayId, and thus it is impossible to specify the address attribute of the virtual screen, that is, there is no display port displayPort, and it can only display but not support touch.
[0078] Step S3, adding a matching relationship between the screen and the touch device. In order to support touch, the operating system needs to be customized, and a fixed virtual display identifier mVirtualDisplayId is created for the virtual screen by customizing the virtual display adapter VirtualDisplayAdapter, thereby creating a display address based on mVirtualDisplayId.
[0079] For example, create an address for the virtual screen through DisplayAddress.fromPhysicalDisplayId(mVirtualDisplayId), and the virtual screen will create its own displayPort in the address. Modify the touch input mapper TouchInputMapper to add its own type for the virtual screen, that is, viewportTypeToUse = ViewportType::VIRTUAL. Add the matching relationship between the virtual screen and the touch device, such as the physical display port physicaldisplayPort corresponds to the input touch1 of the first screen, and the virtual display port virtual displayPort corresponds to the input touch2 of the second screen.
[0080] Step S4, query the input device TP touch port according to the virtual screen type when displaying the request. When the customer uses the different display and touch functions, according to different display requirements, the system can query the touch port that matches the displayPort of the current display device according to the interface mConfig.getDisplayViewportByType(viewportTypeToUse), so that display and touch can be performed on the physical screen or the virtual screen.
[0081] Step S5: the display port and the input port are matched successfully.
[0082] Step S6: the virtual screen can be touched successfully.
[0083] In this embodiment, the routing relationship between the virtual screen display port and the input device TP port is opened through the above steps, so that functions such as clicking, sliding, and touching can be realized on the extended USB to HDMI screen, thereby improving the user experience.
[0084] In this embodiment, Figure 4 This is a schematic diagram of an architecture for realizing dual-screen heterogeneous display and touch. The MIPI screen is connected to a screen 1 with a touch function and capable of display through a physical port. Based on the physical port, an input touch driver 1 can drive the touch function of the screen 1. The content of the virtual display can be displayed in a USB to HDMI screen. The USB to HDMI screen has no physical interface to support the input touch driver 2. At this time, a new virtual interface needs to be added. The dual-screen heterogeneous display and touch implementation method provided in this embodiment can enable the screen 2 with a touch function and capable of display to realize the touch function when the dual-screen heterogeneous display and touch module is a single DSI.
[0085] In this embodiment, a matching relationship is established between the virtual screen (the content is displayed on the USB to HDMI screen) and the input touch, so that the virtual screen can also support touch. This matching relationship can be added in input-port-associations.xml, where the virtual screen port number created by the software and the input touch port number are added. Finally, the module supports the USB to HDMI screen to display the second screen, and the screen has a touch function. Compared with devices whose chips need to support dual MIPI, this solution is much cheaper.
[0086] Based on the same technical concept, the second embodiment of the present application provides a dual-screen different display and different touch implementation device, such as Figure 5 , applied to an electronic device, the electronic device includes a physical display port, the electronic device is connected to a first screen via the physical display port, the device includes:
[0087] A creation module 501 is used to create a virtual screen when receiving a display request for dual-screen different display; wherein the virtual screen includes a virtual port number;
[0088] The display module 502 is used to display the content to be displayed in the virtual screen on the second screen when the USB interface of the electronic device is connected to the second screen;
[0089] An acquisition module 503 is used to acquire a touch port number of the second screen;
[0090] A matching module 504, configured to establish a matching relationship between the virtual port number and the touch port number;
[0091] The abnormal touch module 505 is used for, when a touch control instruction for touching the second screen is acquired, performing touch control on the second screen according to the touch control instruction based on the matching relationship.
[0092] The device can establish a matching relationship between the touch port number of the second screen and the virtual port number of the virtual screen, and can implement touch control of the second screen based on the matching relationship, thereby realizing the different display and touch functions based on the first screen and the second screen, reducing the hardware requirements for the dual-screen different display and touch, thereby reducing costs and improving user experience.
[0093] like Figure 6 As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0094] A memory 113, for storing computer programs;
[0095] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the dual-screen different display and different touch implementation method provided by any of the above method embodiments, including:
[0096] When receiving a display request for dual-screen different display, creating a virtual screen; wherein the virtual screen includes a virtual port number;
[0097] When the USB interface of the electronic device is connected to a second screen, displaying the content to be displayed in the virtual screen on the second screen;
[0098] Obtain the touch port number of the second screen;
[0099] Establishing a matching relationship between the virtual port number and the touch port number;
[0100] When a touch control instruction for touching the second screen is acquired, touch control is performed on the second screen according to the touch control instruction based on the matching relationship.
[0101] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0102] The communication interface is used for communication between the above terminal and other devices.
[0103] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0104] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0105] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the dual-screen different display and different touch implementation method provided in any one of the aforementioned method embodiments is implemented.
[0106] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0108] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0109] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. In the description, the suffixes such as "module", "component" or "unit" used to represent the elements are only used to facilitate the description of the present application and have no specific meaning in themselves. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0110] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for realizing dual-screen different display and different touch, characterized in that: Applied to an electronic device, the electronic device includes a physical display port, the electronic device is connected to a first screen via the physical display port, and the method includes: When receiving a display request for dual-screen different display, creating a virtual screen; wherein the virtual screen includes a virtual port number; When the USB interface of the electronic device is connected to a second screen, displaying the content to be displayed in the virtual screen on the second screen; Obtain the touch port number of the second screen; Establishing a matching relationship between the virtual port number and the touch port number; When a touch control instruction for touching the second screen is acquired, touch control is performed on the second screen according to the touch control instruction based on the matching relationship.
2. The method according to claim 1, characterized in that When a display request for dual-screen different display is received, a virtual screen is created, including: When receiving a display request for dual-screen different display, creating a first virtual screen through a display manager; wherein the first virtual screen is configured with content to be displayed; Configuring the virtual port number for the first virtual screen; The first virtual screen is used as the virtual screen.
3. The method according to claim 2, characterized in that Configuring the virtual port number for the first virtual screen includes: Configuring a virtual display identifier for the first virtual screen; Creating a display address based on the virtual display identifier; wherein the display address includes a virtual display port of the first virtual screen; The virtual port number is determined according to the virtual display port of the first virtual screen.
4. The method according to claim 3, characterized in that Establishing a matching relationship between the virtual port number and the touch port number includes: Configuring the viewport type of the virtual screen as a virtual type in a touch input mapper; Establishing a matching relationship between the virtual port number and the touch port number of the second screen according to the virtual type; The matching relationship is added to the matching configuration file.
5. The method according to claim 4, characterized in that In the case of acquiring a touch control instruction for touching the second screen, performing touch control on the second screen according to the touch control instruction according to the matching relationship, including: When the touch control instruction is obtained, obtaining a virtual port number of the second screen; Reading a matching relationship in the matching configuration file according to the virtual port number to determine a touch port number corresponding to the second screen; The second screen is touch-controlled according to the touch port number and the touch control instruction.
6. The method according to claim 1, characterized in that Before displaying the content to be displayed in the virtual screen on the second screen, the method further includes: The second screen is connected to the USB interface of the electronic device via a USB to HDMI data cable.
7. The method according to claim 1, characterized in that Before establishing a matching relationship between the virtual port number and the touch port number, the method further includes: Perform touch calibration on the second screen.
8. A dual-screen different display and different touch implementation device, characterized in that: Applied to an electronic device, the electronic device includes a physical display port, the electronic device is connected to a first screen via the physical display port, and the device includes: A creation module, used for creating a virtual screen when receiving a display request for dual-screen different display; wherein the virtual screen includes a virtual port number; The special display module is used to display the content to be displayed in the virtual screen on the second screen when the USB interface of the electronic device is connected to the second screen; An acquisition module, used for acquiring a touch port number of the second screen; A matching module, used to establish a matching relationship between the virtual port number and the touch port number; The different touch module is used for, when a touch instruction for touching the second screen is acquired, performing touch control on the second screen according to the touch instruction based on the matching relationship.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the dual-screen different display and different touch implementation method described in any one of claims 1-7 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the dual-screen different display and different touch implementation method as described in any one of claims 1 to 7 is implemented.