Multi-frame corresponding multi-host real-time touch interaction method
Technical Field
The invention relates to a touch interaction method, in particular to a multi-screen multi-host corresponding real-time touch interaction method, and belongs to the technical field of man-machine interaction of display equipment.
Background
With the development of the technology, the demand of human-computer interaction on the display device is higher and higher, the requirement of touch interaction operation between the display device and each information source host needs to be met by multi-picture splicing display, when signals of a plurality of hosts are input into a single large-size touch display device, the display pictures of the hosts can be spliced and displayed, and the pictures of the hosts are simultaneously displayed on a screen. However, the touch control of the display device cannot be respectively corresponding to the multiple hosts, so that real-time touch interaction of the multiple hosts cannot be realized, and the operation of each host can be realized only by matching with other peripherals such as a keyboard, a mouse and the like.
In the prior art, in a patent (CN111857391A, a freely configurable touch screen splicing system and control method), a plurality of touch screens and a plurality of touch data processing devices are mainly used, and after processing, touch data is sent to a host; in the patent (CN 111857391A-a freely configurable touch screen splicing system and control method), a method of splicing multiple touch screens is mainly adopted.
Based on the prior art, the splicing display of multiple host information source pictures on a large-size high-resolution display device is a mature technology and application at present, but as the final display picture is displayed by splicing and synthesizing a plurality of host information sources, when touch operation is performed on the display device, touch response coordinates cannot be transmitted to each information source host in real time, and meanwhile, the touch operation and the display picture do not correspond to each other, so that the man-machine interaction of the spliced picture touch cannot be completed.
Disclosure of Invention
The present invention provides a method for multi-screen multi-host real-time touch interaction to solve the problem.
The invention realizes the purpose through the following technical scheme: a multi-screen multi-host real-time touch interaction method comprises the following steps:
s1, receiving original data sent by an external touch screen through a USB interface, and carrying out protocol analysis on the original data to obtain an original coordinate of the touch operation of an operator on a picture;
s2, outputting splicing mode state information when the external touch screen performs image processing of splicing display pictures;
s3, according to a coordinate mapping algorithm, different splicing modes carry out data mapping processing on the original coordinate data of the picture area and the final touch coordinate of the information source host, and processed touch data are formed;
s4 distributes the processed touch data to hosts of different information sources based on the difference between the USB interface and the display screen bound to the hosts of different information sources.
As a still further scheme of the invention: in the step S1, the method specifically comprises
1) The USB interface receives original data sent by an external touch screen, an internal software interface function is analyzed according to the HID protocol of the USB, and original touch coordinate values of a splicing picture in the original touch coordinate values are extracted;
2) the USB interface is used for receiving original data of the external touch screen, has no requirement on the implementation mode of the external touch screen, can be any one of capacitive touch, infrared touch, resistive touch and the like, and can meet the standard USB protocol.
As a still further scheme of the invention: in the step S2, the method specifically comprises
1) The method is suitable for various splicing modes, including various user-defined splicing modes, and only the area of each spliced picture needs to be determined;
2) the splicing mode and the resolution information comprise the original resolution of each host information source and the resolution of each spliced sub-picture and also comprise the starting point of each spliced sub-picture in the spliced whole picture;
3) and receiving externally transmitted mode information by using a common low-speed interface such as a serial port or I2C.
As a still further scheme of the invention: in the step S3, the method specifically comprises
Dividing the original touch coordinate values acquired in the step S1 according to S2, judging which single spliced picture belongs to, and determining to which information source host the touch operation needs to be transmitted;
determining a coordinate mapping algorithm; setting the resolution ratio of the touch screen for tiled display as (W, H), the number of sub-touch areas divided by the touch screen in the transverse direction and the longitudinal direction as (Nx, Ny), the resolution ratio of the input host source of the nth path (Wn, Hn), the original touch point coordinates (x, y) of the touch screen, and then mapping to the coordinates of the source host of the nth path:
as a still further scheme of the invention: in the step S4, the method specifically comprises
1) Packaging the final coordinate data after mapping calculation according to the HID protocol of the USB;
2) and according to different spliced pictures, transmitting the encapsulated final coordinate data to the corresponding information source host by using different USB interfaces.
The invention has the beneficial effects that:
1) by using the method, the pictures of the plurality of hosts are spliced and displayed on the touch screen, and the simultaneous control of the plurality of hosts can be realized through one touch device, so that the convenience of human-computer interaction is provided, the external devices of the hosts are reduced, and the occupied space is reduced;
2) the method enables the spliced picture to support multi-point touch, has no limitation of the number of touch points under the existing hardware condition, can support multi-point touch of operators, improves the diversification of touch operation, can support gesture operation, and avoids the singleness of single-point touch operation;
3) the method has strong universality, has no requirement on a touch implementation mode, can be implemented by infrared touch, capacitive touch and the like, can be used universally, and is not influenced by an external touch screen;
4) according to the method, physical layer switching or switching is not needed among a plurality of hosts, touch data are processed only by software, the processing level is low, the speed is high, and the touch interaction delay is low in use experience;
5) the method is convenient to realize, can be realized without more modification to the original design, only needs to perform a small amount of expansion outside the USB interface of the touch screen, and can realize low cost and small development workload.
Drawings
FIG. 1 is a schematic block diagram of the method of the present invention;
FIG. 2 is a schematic view of a touch coordinate processing flow according to the present invention;
FIG. 3 is a schematic diagram of a tiled display according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
As shown in fig. 1 and fig. 2, a method for multi-screen multi-host real-time touch interaction includes the following steps:
s1, receiving the original data sent by the external touch screen through the USB interface of the information source host, analyzing the original data protocol, and obtaining the original coordinates after the operator touches the picture.
In step S1, the method specifically includes: 1) the method comprises the steps that a USB interface is used for receiving original data sent by an external touch screen, the original data are analyzed according to a USB HID protocol through an internal software interface function, original touch coordinate values of a splicing picture in the original data are extracted, it is noted that the internal software interface is a software system, the software interface function refers to partial functions related to interfaces in software and mainly extracts coordinates in the USB data, and the internal software interface function is used for protocol analysis; 2) the USB interface is used for receiving original data sent by an external touch screen, has no requirement on the implementation mode of the external touch screen, can be any one of capacitive touch, infrared touch, resistive touch and the like, and can meet the standard USB protocol. The USB-based interface is only used for receiving the original data sent by the external touch screen, and has no requirement on a touch mode, so that the universality and the application scene of the method are greatly improved.
When the external touch screen performs image processing for display screen stitching, the stitching mode state information is output at S2.
In step S2, the method specifically includes: 1) when the external touch screen carries out picture splicing based on the picture splicing module, the output splicing mode state information comprises a splicing mode and resolution ratio information, wherein common splicing modes comprise 2-picture splicing, 4-picture splicing or 16-picture splicing and the like; 2) the splicing mode and the resolution information comprise the original resolution of each host information source and the resolution of each spliced sub-picture and also comprise the starting point of each spliced sub-picture in the spliced whole picture; 3) and receiving externally transmitted mode information by using a common low-speed interface such as a serial port or I2C.
And S3, according to the coordinate mapping algorithm, carrying out data mapping processing on the original coordinate data of the picture area and the final touch coordinate of the information source host in different splicing modes, and forming processed touch data.
In step S3, the method specifically includes: 1) dividing the original coordinates obtained in the step S1 according to S2, judging which single spliced picture belongs to, and determining which information source host computer the touch operation needs to be transmitted to; 2) determining a coordinate mapping algorithm; setting the resolution ratio of the touch screen for tiled display as (W, H), the number of sub-touch areas divided by the touch screen in the transverse direction and the longitudinal direction as (Nx, Ny), the resolution ratio of the input host source of the nth path (Wn, Hn), the original touch point coordinates (x, y) of the touch screen, and then mapping to the coordinates of the source host of the nth path:
s4 distributes the processed touch data to hosts of different information sources based on the difference between the USB interface and the display screen bound to the hosts of different information sources.
In step S4, the method specifically includes: 1) packaging the final coordinate data after mapping calculation according to the HID protocol of the USB; 2) and according to different spliced pictures, transmitting the encapsulated final coordinate data to the corresponding information source host by using different USB interfaces.
Example two
As shown in fig. 3, taking a touch display device with a resolution of 3840 × 2160 as an example, a 4-channel host signal source is input for tiled display, and a resolution of each host output video signal source is 1920 × 1080, including the following steps:
1) when the touch display equipment is operated by fingers of an operator, reporting the operation through a USB interface, and analyzing the original coordinate hypothesis (1700 ) of a touch point of the touch display equipment through an HID protocol;
2) the image splicing module transmits that the splicing mode is 4-image 2 x 2 splicing, and the starting points of the 4 paths of host signal sources are (0,0), (1920,0), (1080,0) and (1920,1080) respectively;
3) by comparison, the original touch point is judged to be on the screen 1, and is converted by using a formula, the coordinate corresponding to the 1# host system is (1700,620),
and packaging the final touch coordinate (1700,620) according to the requirements of the HID protocol, sending the final touch coordinate to the 1# host system, and responding to the final touch coordinate by the 1# host, namely finishing the touch interactive operation.
The working principle is as follows: firstly, the image splicing module splices the video signals of all host information sources and transmits splicing mode and resolution information to the touch data processing module. And then the touch processing module analyzes the touch data, judges which host is the spliced picture, calculates the final touch coordinate of the host through an original touch coordinate data mapping algorithm according to the splicing mode and the resolution information, and finally encapsulates the coordinate data subjected to mapping calculation according to the HID protocol of the USB and distributes the coordinate data to the corresponding signal source host.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.