Touch data processing method and interactive panel
By fusing infrared touch data and pressure-sensitive touch data in the kernel thread of the kernel driver layer of the interactive flat panel, the inefficiency caused by cross-thread operation is solved, and efficient touch data processing and fast response are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU CHUANGZHI TECH CO LTD
- Filing Date
- 2021-09-07
- Publication Date
- 2026-04-24
AI Technical Summary
The current method requires cross-thread operation when fusing infrared touch data and pressure-sensitive touch data at the application layer, resulting in low touch data processing efficiency and affecting the response speed of touch operations.
In the kernel driver layer of the interactive flat panel's processing module, infrared touch data and pressure-sensitive touch data are obtained through the kernel thread, fused together, and uploaded to the application layer through the pre-registered input device interface, thus avoiding cross-thread data fusion operations.
It improves the efficiency of touch data processing, reduces the consumption of computing resources and time, increases the response speed of touch operation, and simplifies the registration process of device interfaces.
Smart Images

Figure CN115774492B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of touch interaction technology, and in particular to a touch data processing method and an interactive flat panel. Background Technology
[0002] An infrared touch frame is a display device that uses a dense matrix of infrared rays in the X and Y directions to detect and locate user touches. When a user touches a display screen equipped with an infrared touch frame, their finger blocks the horizontal and vertical infrared rays passing through that location, thus allowing the system to determine the position of the touch point on the display screen.
[0003] Infrared touch frames can only detect touch position using infrared light. To achieve pressure sensitivity, they need to be combined with pressure-sensitive touch data measured by an active pressure-sensitive pen. The infrared touch data collected by the infrared touch frame and the pressure-sensitive touch data collected by the active pressure-sensitive pen are fused to obtain touch data including touch position, touch area, and touch pressure. However, the inventors discovered that existing methods for fusing infrared and pressure-sensitive touch data at the application layer require cross-thread data fusion, which is complex and results in low touch data processing efficiency. Summary of the Invention
[0004] This application provides a touch data processing method and an interactive flat panel, which solves the problem of low data processing efficiency in existing touch data processing methods.
[0005] In a first aspect, embodiments of this application provide a touch data processing method applied to an interactive flat panel, the interactive flat panel including a display screen, a processing module, and an infrared touch frame, the interactive flat panel being equipped with an active pressure-sensitive pen, the infrared touch frame being disposed on the bezel of the display screen to form a touch detection area of the interactive flat panel, the method running in the kernel driver layer of the processing module, the method comprising:
[0006] The infrared touch data sent by the infrared touch frame is obtained through the kernel thread, and the infrared touch data is parsed to obtain the first touch information of the touch point corresponding to the infrared touch data; wherein, the infrared touch data is detected by the infrared touch frame when the active pressure-sensitive pen performs a touch operation on the touch detection area of the interactive tablet.
[0007] The kernel thread obtains the pressure-sensitive touch data sent by the active pressure-sensitive pen, packages the pressure-sensitive touch data with the first touch information, and obtains the second touch information of the touch point; wherein, the pressure-sensitive touch data is detected by the active pressure-sensitive pen when the active pressure-sensitive pen performs a touch operation on the touch detection area of the interactive tablet;
[0008] The second touch information is uploaded to the input subsystem of the application layer through a pre-registered input device interface.
[0009] In a second aspect, embodiments of this application provide an interactive flat panel, including a display screen, a processing module, and an infrared touch frame. The interactive flat panel is equipped with an active pressure-sensitive pen, and the infrared touch frame is disposed on the edge of the display screen to form a touch detection area of the interactive flat panel. Both the infrared touch frame and the active pressure-sensitive pen are connected to the processing module.
[0010] The infrared touch frame is used to detect continuous infrared touch data and send the continuous infrared touch data to the processing module. The infrared touch data is generated by the active pressure-sensitive pen when it performs a touch operation on the touch detection area of the interactive tablet.
[0011] The active pressure-sensitive pen is used to detect continuous pressure-sensitive touch data and send the continuous pressure-sensitive touch data to the processing module. The pressure-sensitive touch data is generated by the active pressure-sensitive pen when it performs a touch operation on the touch detection area of the interactive tablet.
[0012] The processing module is used for:
[0013] The kernel thread obtains the infrared touch data sent by the infrared touch frame, and parses the infrared touch data to obtain the first touch information of the touch point corresponding to the infrared touch data.
[0014] The kernel thread obtains the pressure-sensitive touch data sent by the active pressure-sensitive pen, packages the pressure-sensitive touch data with the first touch information, and obtains the second touch information of the touch point.
[0015] The second touch information is uploaded to the input subsystem of the application layer through a pre-registered input device interface.
[0016] The aforementioned touch data processing method and interactive flat panel read infrared touch data through a kernel thread, parse the infrared touch data to obtain the first touch information of the touch point corresponding to the infrared touch data, and read pressure-sensitive touch data through a kernel thread, packaging the pressure-sensitive touch data with the first touch information to obtain the second touch information of the touch point. The second touch information is then uploaded to the user layer's input subsystem through a pre-registered input device interface. By using these techniques, high-precision touch data is obtained by reading infrared and pressure-sensitive touch data at the kernel driver layer and fusing them using the same kernel thread. This avoids cross-thread data fusion operations at the application layer, saving computing resources and reducing computation time, improving touch data processing efficiency, and thus increasing the response speed of touch operations. Uploading the fused data to the application layer through a pre-registered input device interface avoids the need to pre-register infrared and pressure-sensitive device interfaces when performing data fusion at the application layer, simplifying the device interface registration process and saving resources for setting up input device interfaces. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the structure of an interactive flat panel provided in one embodiment of this application;
[0018] Figure 2 This is a flowchart of a touch data processing method provided in one embodiment of this application;
[0019] Figure 3 This is a flowchart of another touch data processing method provided in one embodiment of this application;
[0020] Figure 4 This is a structural block diagram of an interactive flat panel provided in one embodiment of this application. Detailed Implementation
[0021] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and not for limiting the scope of the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present application are shown in the drawings, not the entire structure.
[0022] It should be noted that in this paper, relational terms such as "first" and "second" are used only to distinguish one entity, operation, or object from another entity, operation, or object, and do not necessarily require or imply any such actual relationship or order between these entities, operations, or objects. For example, "first" and "second" in "first sample set" and "second sample set" are used to distinguish different sample sets.
[0023] The touch data processing method provided in this application embodiment can be executed by a touch data processing device, which can be implemented by software and / or hardware. The touch data processing device can consist of two or more physical entities, or it can consist of a single physical entity. For example, the touch data processing device can be the interactive flat panel itself, or it can be a processing component included in the interactive flat panel.
[0024] The touch data processing device is equipped with at least one type of operating system, including but not limited to Android, Linux, and Windows. In this embodiment, the touch data processing device can be an application running on the kernel driver layer of the operating system.
[0025] For ease of understanding, the embodiments use an interactive flat panel as a touch data processing device for exemplary description.
[0026] Figure 1 This is a schematic diagram of the structure of an interactive flat panel according to an embodiment of this application. Figure 1As shown, the interactive flat panel includes an infrared touch frame 11, a display screen 12, a processor 16, a communication bus 14, and a display bus 17. The infrared touch frame includes infrared lamps 13 and a main control board 18. One side of the infrared lamp 13 is an infrared emitter, and the other side is an infrared receiver. The infrared lamps 13 arranged vertically and horizontally form an infrared matrix. When the object touches the display screen, it blocks the infrared rays emitted by the infrared emitter at the corresponding position, preventing the infrared receiver from receiving the infrared rays. The main control board 18 performs coordinate calculations based on the infrared receiver that did not receive the infrared rays to determine the touch position and touch area when the object touches the display screen. The main control board 18 packages the touch position and touch area into infrared touch data and sends it to the processor 16 via the communication bus 14. The processor 16 parses and processes the infrared touch data to obtain the touch position and touch area. Furthermore, the interactive flat panel is equipped with an active pressure-sensitive pen 19. The pen tip of the active pressure-sensitive pen 19 is equipped with a travel sensor, which collects the extension and retraction displacement of the pen tip and converts it into pressure-sensitive touch data. The processor 16 is equipped with a wireless receiver 15, and the active pressure-sensitive pen 19 is equipped with a wireless transmitter. The active pressure-sensitive pen 19 transmits pressure-sensitive touch data to the wireless receiver 15 via the wireless transmitter. The processor 16 determines the touch operation based on the touch position and touch area in the infrared touch data and the touch pressure in the pressure-sensitive touch data, responds to the touch operation, and sends the response result to the display screen 12 via the display bus 17, so that the display screen 12 displays the response result. Existing touch data processing methods set up infrared device interfaces and pressure-sensitive device interfaces in the kernel driver layer of the processor 16 to upload infrared touch data and pressure-sensitive touch data uploaded by the pressure-sensitive device interfaces, respectively. In the user layer of the processor 16, the pressure-sensitive touch data uploaded by the infrared device interfaces and pressure-sensitive device interfaces are read separately through two different user threads, and the infrared touch data and pressure-sensitive touch data are fused through cross-thread communication. Existing touch data processing methods require cross-thread data fusion operations, but cross-thread operations are relatively complex and consume a lot of computing time and computing resources, resulting in low touch data processing efficiency and thus affecting the response speed of touch operations. Based on this, the touch data processing method provided in this application aims to fuse infrared touch data collected by the infrared touch frame and pressure-sensitive touch data collected by the active pressure-sensitive pen at the kernel driver layer of the processing module of the interactive flat panel. This eliminates the need for cross-thread data fusion operations, saving computing resources and reducing computation time, thereby improving touch data processing efficiency and ultimately increasing the response speed of touch operations. The processing module can be the processor of the interactive flat panel or the main control board of the infrared touch frame.
[0027] For example, Figure 2 This is a flowchart illustrating a touch data processing method according to an embodiment of this application. (Reference) Figure 2The touch data processing method runs in the kernel driver layer of the processing module, and includes:
[0028] S110. Obtain the infrared touch data sent by the infrared touch frame through the kernel thread, and parse the infrared touch data to obtain the first touch information of the touch point corresponding to the infrared touch data; wherein, the infrared touch data is detected by the infrared touch frame when the active pressure-sensitive pen performs a touch operation in the touch detection area of the interactive tablet.
[0029] For example, the touch data processing method can be understood as an application running in the kernel driver layer of the processing module, which runs through a kernel thread. (Refer to...) Figure 1 The touch detection area of the interactive flat panel is an infrared matrix composed of infrared lamps 13, which is equivalent to the display interface of the interactive flat panel's screen. When an active pressure-sensitive pen or other touch object is used to perform a touch operation at any position on the touch detection area, the infrared touch frame can detect the infrared touch data generated by the active pressure-sensitive pen or other touch object's touch operation at any position on the touch detection area.
[0030] The following description uses a processor in an interactive flat panel as an example of the processing module. When a user touches the display screen with an active pressure-sensitive pen, the infrared touch frame collects the touch position and area of the touch point between the pen tip and the display screen. This touch position and area are then packaged and compressed into infrared touch data, which is transmitted to the processor via a communication bus. Simultaneously, when the active pressure-sensitive pen touches the display screen, the pen's travel sensor collects the extension and retraction displacement of the pen tip, converts this displacement into pressure-sensitive touch data for that touch point, and transmits this pressure-sensitive touch data to the processor's wireless receiver via a wireless transmitter. The processor acquires the infrared touch data and pressure-sensitive touch data via the communication bus and wireless receiver, respectively, and performs data fusion processing on the infrared touch data and pressure-sensitive touch data at the kernel driver layer to obtain the touch data for that touch point.
[0031] The following description uses a main control board with an infrared touch frame as the processing module. The main control board is equipped with a wireless receiver. Pressure-sensitive touch data collected by the active pressure-sensitive pen is transmitted to the main control board via wireless communication. The main control board performs data fusion processing on the infrared touch data and pressure-sensitive touch data in its kernel driver layer.
[0032] In this embodiment, the wireless receiver 15 can be a wireless dongle, and the wireless communication can be Bluetooth or Wi-Fi. Alternatively, the processor 16 does not have a wireless receiver 15; instead, it communicates wirelessly with the active pressure-sensitive pen 19 via its built-in Wi-Fi or Bluetooth module. Correspondingly, if the processing module is a main control board, the wireless receiver can be replaced with the main control board's built-in Bluetooth or Wi-Fi module.
[0033] On the other hand, taking the processor as an example of the processing module, Figure 3 This is a flowchart of another touch data processing method provided in one embodiment of this application. Figure 3 As shown, the processor executes step S210, which calls a kernel interrupt function to cache infrared touch data, through the first kernel thread S200; step S310, which calls a kernel interrupt function to cache pressure-sensitive touch data, through the second kernel thread S300; and steps S110-S130, which execute touch data processing, through the third kernel thread S100. For example, for infrared touch data transmitted via the communication bus and pressure-sensitive touch data transmitted via the wireless receiver, the first and second kernel threads respectively call kernel interrupt functions to cache the infrared touch data and pressure-sensitive touch data, without performing data fusion processing; otherwise, the processor would waste processing resources and affect real-time performance. The data fusion processing is executed by the third kernel thread or by the bottom half of the interrupt, ensuring real-time performance. Therefore, before the third kernel thread performs data fusion processing on the pressure-sensitive touch data and infrared touch data, the first kernel thread needs to call a kernel interrupt function to obtain the infrared touch data transmitted via the communication bus and cache it, and the second kernel thread needs to call a kernel interrupt function to obtain the pressure-sensitive touch data transmitted via the wireless receiver and cache it.
[0034] In this embodiment, the step S210, in which the first kernel thread calls the kernel interrupt function to cache the infrared touch data before the third kernel thread reads the infrared touch data, specifically includes steps S2101-S2103:
[0035] S2101. Respond to the first interrupt request sent by the first device and obtain the first data sent by the first device through the kernel interrupt function.
[0036] For example, the first device refers to the communication bus, and the first data refers to the data uploaded by the communication bus to the processor, which may include infrared touch data, proprietary upgrade protocol data, or mouse data, etc. Before transmitting the first data to the processor, the communication bus sends a first interrupt request to the processor. The processor responds to the first interrupt request through the first kernel thread and calls the kernel interrupt function to obtain the first data transmitted by the communication bus. The communication bus can be a serial bus such as a USB interface, I2C, or a serial port.
[0037] S2102. Determine whether the first identification information of the first data meets the preset first identification conditions. The first identification information includes the first data identification code, the supplier identification code of the first device, and the product identification code.
[0038] For example, each piece of first data corresponds to a first identifier. The first identifier is used to distinguish the data type for the processor, so that different threads can process different types of data. The first identification condition can be understood as the condition for determining that the first data is infrared touch data. If the first identifier meets the first identification condition, then the currently acquired first data is determined to be infrared touch data; if the first identifier does not meet the first identification condition, then the currently acquired first data is determined not to be infrared touch data.
[0039] The following description uses a USB interface as an example. USB interfaces have a Vendor Identifier (VID) and a Product Identifier (PID). The processor uses different VIDs and PIDs to distinguish the data transmitted by various input devices. The ReportID represents the data packet header. For example, a USB interface may transmit many types of data, such as infrared touch data, proprietary upgrade protocol data, or mouse data. The ReportID can distinguish the data type currently being uploaded by the USB interface. The first identification condition includes the VID and PID of the USB interface uploading the infrared touch data, as well as the ReportID. The VID + PID + ReportID of the infrared touch data is used as the first identification condition. If the VID + PID + ReportID of the infrared touch data is exactly the same as the VID + PID + ReportID of the first data, then the first identification information is determined to meet the first identification condition; otherwise, the first identification information is determined not to meet the first identification condition.
[0040] S2103. When the first identification information meets the first identification condition, the first data is determined to be infrared touch data, and the infrared touch data is cached in the first cache queue.
[0041] For example, if the first identification information does not meet the first identification condition, it is determined that the first data is not infrared touch data, and no further processing is performed on the first data to ensure that it does not affect other first data besides infrared touch data, such as some proprietary protocols. If the first identification information meets the first identification condition, it is determined that the first data is infrared touch data, and the infrared touch data is cached in the first cache queue so that the subsequent third kernel thread can read the infrared touch data from the first cache queue. The first cache queue is a circular cache area, and the infrared touch data is cached in the circular cache area using the kfifo caching method. The kfifo caching method has a first-in, first-out (FIFO) characteristic, which ensures that the subsequent third kernel thread reads the data collected first in the first cache queue, guaranteeing data real-time performance.
[0042] Furthermore, after the first kernel thread caches the infrared touch data to the first cache queue, the third kernel thread needs to read the corresponding infrared touch data from the first cache queue when performing data fusion processing. The read infrared touch data is then parsed using the HID protocol or a fixed protocol. In this embodiment, the infrared touch data is read from the first cache queue, parsed according to the HID-Multiplex protocol, and the first touch information is extracted. The first touch information includes the touch position and touch area of the corresponding touch point. For example, the packet format of the infrared touch data for each touch point is shown in Table 1:
[0043] Table 1
[0044] byte effect 0 Message ID (0x02) 1 Touch point status (DOWN: 0x04; MOVE: 0x07; UP: 0x04) 2 Touch point ID (0x00, ascending order) 3 Touch point X coordinate low byte data 4 Touch point X coordinate high byte data 5 Touch point Y coordinate low byte data 6 Touch point Y coordinate high byte data 7 Touch point width low byte data 8 Touch point width high byte data 9 Touch point height low byte data 10 Touch point height high byte data
[0045] As shown in Table 1, after parsing the infrared touch data, the first touch information (X, Y, W, H) of the corresponding touch point can be obtained. X and Y are the horizontal and vertical coordinates of the touch point on the display screen, respectively, which represent the touch position of the touch point. W and H are the width and height of the touch point, respectively, which represent the touch area of the touch point.
[0046] S120. Obtain the pressure-sensitive touch data sent by the active pressure-sensitive pen through the kernel thread, and package the pressure-sensitive touch data with the first touch information to obtain the second touch information of the touch point; wherein, the pressure-sensitive touch data is detected by the active pressure-sensitive pen when the active pressure-sensitive pen performs a touch operation in the touch detection area of the interactive tablet.
[0047] For example, when an active pressure-sensitive pen is used to perform a touch operation on any position information on the touch detection area of the interactive tablet, the active pressure-sensitive pen detects the pressure-sensitive touch data generated by the touch operation based on the extension and retraction displacement of the pen tip collected by the travel sensor.
[0048] Accordingly, after the wireless receiver receives the pressure-sensitive touch data and uploads it to the processor, the second kernel thread calls a kernel interrupt function to cache the pressure-sensitive touch data. In this embodiment, the step S320 of the second kernel thread calling the kernel interrupt function to cache the pressure-sensitive touch data specifically includes steps S3201-S3203:
[0049] S3201 responds to the second interrupt request sent by the second device and obtains the second data sent by the second device through the kernel interrupt function.
[0050] For example, the second device refers to a wireless receiver, and the second data refers to the data uploaded by the wireless receiver to the processor, which may include pressure-sensitive touch data, proprietary upgrade protocol data, or mouse data, etc. Before transmitting the second data to the processor, the wireless receiver sends a second interrupt request to the processor. The processor responds to the second interrupt request through a second kernel thread and calls the kernel interrupt function to obtain the second data transmitted by the wireless receiver.
[0051] S3202. Confirm whether the second identification information of the second data meets the preset second identification conditions. The second identification information includes the second data identification code, the supplier identification code of the second device, and the product identification code.
[0052] For example, each piece of second data corresponds to a second identifier. The second identifier is used to distinguish the data type for the processor, so that different threads can process different types of data. The second identification condition can be understood as the condition for determining that the second data is pressure-sensitive touch data. If the second identifier meets the second identification condition, then the currently acquired second data is determined to be pressure-sensitive touch data; if the second identifier does not meet the second identification condition, then the currently acquired second data is determined not to be pressure-sensitive touch data.
[0053] The following description uses a Bluetooth dongle as an example. Similarly, Bluetooth dongles have a Vendor Identifier (VID) and a Product Identifier (PID). The ReportID represents the data packet header, and it can be used to distinguish the data type uploaded by the Bluetooth dongle. The second identification condition includes the VID and PID of the Bluetooth dongle uploading the pressure-sensitive touch data, as well as the ReportID. The VID + PID + ReportID of the pressure-sensitive touch data is used as the first identification condition. If the VID + PID + ReportID of the pressure-sensitive touch data is exactly the same as the VID + PID + ReportID of the second data, then the second identification information is determined to meet the second identification condition; otherwise, the second identification information is determined not to meet the second identification condition.
[0054] S3203. When the second identification information meets the second identification condition, the second data is determined to be pressure-sensitive touch data, and the pressure-sensitive touch data is cached in the second cache queue.
[0055] For example, if the second identification information does not meet the second recognition condition, it is determined that the second data is not pressure-sensitive touch data, and no further processing is performed on the second data to ensure that it does not affect other second data besides pressure-sensitive touch data. If the second identification information meets the second recognition condition, it is determined that the second data is pressure-sensitive touch data, and the pressure-sensitive touch data is cached in the second cache queue so that the third kernel thread can subsequently read the pressure-sensitive touch data from the second cache queue. Similarly, the second cache queue is a circular cache, and the pressure-sensitive touch data is cached in the circular cache using the kfifo caching method.
[0056] It's important to note that since pressure-sensitive touch data is transmitted wirelessly, it consumes power from the pen. To ensure pen battery life and security, the reporting rate of pressure-sensitive touch data is lower than that of infrared touch data. For example, if the reporting rate of infrared touch data is 100Hz, the reporting rate of pressure-sensitive touch data is 50Hz. This means that for every two infrared touch data uploads by the bus device, the wireless receiver uploads only one pressure-sensitive touch data upload. Therefore, when the first kernel thread calls the kernel interrupt function to cache the infrared touch data, the wireless receiver may not have yet sent the second interrupt request. At this point, the processor will handle the data fusion process through the third kernel thread. During the data fusion process in the third kernel thread, if the processor receives the second interrupt request from the wireless receiver, it will interrupt the data fusion process in the third kernel thread and handle the caching of the pressure-sensitive touch data through the second kernel thread.
[0057] Furthermore, after the third kernel thread parses the infrared touch data to obtain the first touch information of the corresponding touch point, the third kernel thread continues to read pressure-sensitive touch data from the second buffer queue and fuses the pressure-sensitive touch data with the first touch information. In this embodiment, the steps for the third kernel thread to obtain pressure-sensitive touch data include S1201-S1203:
[0058] S1201. Confirm whether pressure-sensitive touch data is cached in the second buffer queue. If pressure-sensitive touch data is cached in the second buffer queue, proceed to step S1202. If pressure-sensitive touch data is not cached in the second buffer queue, proceed to step S1203.
[0059] For example, since the reporting rate of pressure-sensitive touch data is lower than that of infrared touch data, when infrared touch data is already cached in the first cache queue, pressure-sensitive touch data may not yet be cached in the second cache queue. In this embodiment, the pre-registered input device interface includes a pressure-sensitive description; therefore, touch data uploaded through the input device interface must include pressure-sensitive touch data. Thus, when pressure-sensitive touch data is not cached in the second cache queue, it is necessary to supplement it through other means to ensure normal upload of touch data. Accordingly, this embodiment determines whether pressure-sensitive touch data is cached in the second cache queue before reading it, and executes the corresponding pressure-sensitive touch data acquisition method based on the determination result.
[0060] S1202: Read pressure-sensitive touch data from the second buffer queue, and package the pressure value in the pressure-sensitive touch data with the first touch information to obtain the second touch information. The second touch point information includes the touch position, touch area and touch pressure of the corresponding touch point.
[0061] For example, when it is determined that the second buffer queue contains pressure-sensitive touch data, the third kernel thread reads the pressure-sensitive touch data from the second buffer queue and merges the pressure-sensitive value in the pressure-sensitive touch data with the first touch information (X, Y, W, H) to obtain the third touch information (X, Y, W, H, P), where P is the pressure-sensitive value of the touch point, which represents the touch pressure of the touch point. The third touch information (X, Y, W, H, P) is packaged together with the touch point state and touch point ID in the infrared touch data to form the second touch information (state, ID, X, Y, W, H, P).
[0062] S1203. If the second buffer queue does not have cached pressure-sensitive touch data, then obtain the pressure-sensitive touch data read last time, and package the pressure value in the pressure-sensitive touch data with the first touch information to obtain the second touch information.
[0063] For example, if the second buffer queue does not cache pressure-sensitive touch data, the pressure-sensitive value packaged with the first touch information in the previous round is used and packaged together with the currently acquired first touch information. Specifically, assuming the infrared touch data reporting rate is 100Hz and the pressure-sensitive touch data reporting rate is 50Hz, when the first buffer queue caches two infrared touch data, the second buffer queue only caches one pressure-sensitive touch data. After the third kernel thread reads one infrared touch data and one pressure-sensitive touch data and completes one round of data packaging and uploading, no new pressure-sensitive touch data is stored in the second buffer queue. When the third kernel thread reads the second infrared touch data from the first buffer queue, and the second buffer queue does not cache pressure-sensitive touch data, the pressure-sensitive value packaged with the first infrared touch data in the previous round is retrieved and packaged together with the second infrared touch data. Alternatively, a fitting method can be used, taking the average of the pressure-sensitive values fused in the previous round and the pressure-sensitive values fused in the previous two rounds as the pressure-sensitive touch data fused in the current round.
[0064] In this embodiment, if the infrared touch data is the first infrared touch data read after power-on, a preset pressure sensitivity value is obtained, and the preset pressure sensitivity value is packaged with the first touch information to obtain the second touch information. For example, since the pressure sensitivity data reporting rate is lower than the infrared touch data reporting rate, when the third kernel thread reads the first infrared touch data from the first cache queue, the second cache queue has not yet cached any pressure sensitivity data, and the third kernel thread is performing the first round of data fusion processing, it cannot obtain the pressure sensitivity data packaged with the first touch information from the previous round. At this time, the third kernel thread can obtain the preset pressure sensitivity value and package it with the first touch information to obtain the second touch information. The preset pressure sensitivity value is the maximum pressure sensitivity value corresponding to the pressure sensitivity level described in the input device interface. For example, if the pressure sensitivity level of the input device interface is 2048, and its pressure sensitivity range is 0-2047, then the preset pressure sensitivity value is 2047. Based on this, the pressure sensitivity value used by the third kernel thread in the previous round, which was packaged together with the first touch information, may be the pressure sensitivity value of the pressure sensitivity touch data read from the second cache queue in the previous round, or it may be a preset pressure sensitivity value.
[0065] Furthermore, if the object used by the user to touch the interactive tablet is not an active pressure-sensitive pen, pressure-sensitive touch data will not be stored in the second cache queue. The third kernel thread will either reuse the pressure-sensitive value packaged with the first touch information from the previous round or obtain a preset pressure-sensitive value. Although the pressure-sensitive touch data at this time is invalid data, the contact position and contact area in the second touch information uploaded by the input device interface are valid data. Therefore, this embodiment can still normally obtain the touch data collected by the infrared touch frame even when using a non-active pressure-sensitive pen to touch the interactive tablet.
[0066] S130. Upload the second touch information to the input subsystem of the application layer through the pre-registered input device interface.
[0067] For example, both Linux and Windows systems provide functions for registering input device interfaces. These functions are used to create and describe devices, registering the input device interface with the input subsystem. The registration function defines the data types transmitted by the input device interface and completes the device description. A pressure-sensitive description is added to the device description to ensure the normal reporting of pressure-sensitive touch data. It is understood that when the input subsystem receives touch data, it assumes that the touch data was acquired and uploaded by the input device. From the input subsystem's perspective, the input device has the function of collecting both infrared and pressure-sensitive touch data. Normally, uploading infrared and pressure-sensitive touch data requires registering the corresponding pressure-sensitive touch data interface for the infrared device interface separately. Therefore, this embodiment provides fusion of pressure-sensitive and infrared touch data at the kernel driver layer, simplifying the device interface registration process. Furthermore, data from different device sources cannot be fused in the same thread at the application layer, requiring cross-thread data fusion operations, which are complex and affect data fusion efficiency. This embodiment simplifies the processing and improves data processing efficiency by using a single kernel thread for data fusion.
[0068] In summary, the touch data processing method provided in this embodiment reads infrared touch data through a kernel thread, parses the infrared touch data to obtain the first touch information of the touch point corresponding to the infrared touch data, reads pressure-sensitive touch data through a kernel thread, packages the pressure-sensitive touch data with the first touch information to obtain the second touch information of the touch point, and uploads the second touch information to the user layer input subsystem through a pre-registered input device interface. Through the above technical means, by reading infrared touch data and pressure-sensitive touch data at the kernel driver layer and fusing the infrared touch data and pressure-sensitive touch data by the same kernel thread to obtain high-precision touch data, cross-thread data fusion operations at the application layer are avoided, saving computing resources and reducing computing time, improving touch data processing efficiency, and thus improving the response speed of touch operations. Uploading the fused data to the application layer through a pre-registered input device interface avoids the need to pre-register infrared device interfaces and pressure-sensitive device interfaces when performing data fusion at the application layer, simplifying the device interface registration process and saving resources for building input device interfaces.
[0069] Figure 4 This is a structural block diagram of an interactive flat panel according to one embodiment of this application. (Reference) Figure 4The interactive flat panel includes a display screen, a processing module, and an infrared touch frame. The interactive flat panel is equipped with an active pressure-sensitive pen. The infrared touch frame is set on the bezel of the display screen to form the touch detection area of the interactive flat panel. Both the infrared touch frame and the active pressure-sensitive pen are connected to the processing module.
[0070] The infrared touch frame is used to detect continuous infrared touch data and send it to the processing module. The infrared touch data is generated when the active pressure-sensitive pen performs a touch operation on the touch detection area of the interactive tablet.
[0071] An active pressure-sensitive pen is used to detect continuous pressure-sensitive touch data and send the continuous pressure-sensitive touch data to the processing module. The pressure-sensitive touch data is generated when the active pressure-sensitive pen performs a touch operation on the touch detection area of the interactive flat panel.
[0072] Processing module, used for:
[0073] The infrared touch data sent by the infrared touch frame is obtained through the kernel thread, and the first touch information of the touch point corresponding to the infrared touch data is obtained by parsing the infrared touch data.
[0074] The kernel thread obtains the pressure-sensitive touch data sent by the active pressure-sensitive pen, packages the pressure-sensitive touch data with the first touch information, and obtains the second touch information of the touch point.
[0075] The second touch information is uploaded to the input subsystem of the application layer through the pre-registered input device interface.
[0076] Based on the above embodiments, the interactive flat panel also includes a communication bus, one end of which is connected to the infrared touch frame and the other end is connected to the processing module; the communication bus is used to send the infrared touch data continuously detected by the infrared touch frame to the processing module.
[0077] Based on the above embodiments, the interactive flat panel also includes a wireless receiver, and the active pressure-sensitive pen is equipped with a wireless transmitter. The wireless receiver is connected to the wireless transmitter and the processing module. The wireless transmitter is used to send the pressure-sensitive touch data continuously detected by the active pressure-sensitive pen to the wireless receiver. The wireless receiver is used to receive the pressure-sensitive touch data sent by the wireless transmitter and send the pressure-sensitive touch data to the processing module.
[0078] Based on the above embodiments, the processing module is further configured to respond to a first interrupt request sent by the first device before reading infrared touch data through the kernel thread, obtain the first data sent by the first device through the kernel interrupt function; determine whether the first identification information of the first data meets the preset first identification condition, the first identification information including the first data identification code, the supplier identification code of the first device and the product identification code; when the first identification information meets the first identification condition, determine that the first data is infrared touch data, and cache the infrared touch data to the first cache queue.
[0079] Based on the above embodiments, the processing module is further configured to: respond to a second interrupt request sent by the second device, obtain the second data sent by the second device through a kernel interrupt function; confirm whether the second identification information of the second data meets the preset second identification conditions, wherein the second identification information includes a second data identification code, a supplier identification code of the second device, and a product identification code; when the second identification information meets the second identification conditions, determine that the second data is pressure-sensitive touch data, and cache the pressure-sensitive touch data in a second cache queue.
[0080] Based on the above embodiments, when the processing module reads infrared touch data through the kernel thread and parses the infrared touch data to obtain the first touch information of the touch point corresponding to the infrared touch data, the specific steps are as follows:
[0081] Infrared touch data is read from the first buffer queue, and the infrared touch data is parsed according to the hid-multitotuch protocol to extract the first touch information, which includes the touch position and touch area of the corresponding touch point.
[0082] Based on the above embodiments, the processing module is also used to confirm whether pressure-sensitive touch data is cached in the second cache queue before reading pressure-sensitive touch data through the kernel thread;
[0083] Accordingly, when the processing module reads the pressure-sensitive touch data, packages the pressure-sensitive touch data with the first touch information, and obtains the second touch information of the touch point, it does so as follows:
[0084] If the second buffer queue contains pressure-sensitive touch data, then the pressure-sensitive touch data is read from the second buffer queue; the pressure value in the pressure-sensitive touch data is packaged with the first touch information to obtain the second touch information, which includes the touch position, touch area and touch pressure of the corresponding touch point.
[0085] Based on the above embodiments, when the processing module reads pressure-sensitive touch data through the kernel thread, packages the pressure-sensitive touch data with the first touch information to obtain the second touch information of the touch point, the specific steps are as follows: if the second buffer queue does not cache pressure-sensitive touch data, the previously read pressure-sensitive touch data is obtained, and the pressure value in the pressure-sensitive touch data is packaged with the first touch information to obtain the second touch information.
[0086] Based on the above embodiments, when the processing module reads pressure-sensitive touch data through the kernel thread, packages the pressure-sensitive touch data with the first touch information to obtain the second touch information of the touch point, the specific steps are as follows: if the infrared touch data is the first infrared touch data read after power-on, then a preset pressure value is obtained, and the preset pressure value is packaged with the first touch information to obtain the second touch information.
[0087] In summary, the processing module reads infrared touch data through a kernel thread, parses the infrared touch data to obtain the first touch information of the corresponding touch point, and then reads pressure-sensitive touch data through the kernel thread, packaging the pressure-sensitive touch data with the first touch information to obtain the second touch information of the touch point. Finally, the second touch information is uploaded to the user-layer input subsystem through a pre-registered input device interface. By using these techniques, high-precision touch data is obtained by reading infrared and pressure-sensitive touch data at the kernel driver layer and fusing them using the same kernel thread. This avoids cross-thread data fusion operations at the application layer, saving computing resources and reducing computation time, improving touch data processing efficiency, and thus increasing the response speed of touch operations. Uploading the fused data to the application layer through a pre-registered input device interface avoids the need to pre-register infrared and pressure-sensitive device interfaces when performing data fusion at the application layer, simplifying the device interface registration process and saving resources for setting up input device interfaces.
[0088] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is used to perform the touch data processing method provided in the above embodiments.
[0089] Of course, the computer-readable storage medium provided in the embodiments of this application has computer-executable instructions that are not limited to the above-described method operations, but can also perform related operations in the touch data processing method provided in any embodiment of this application.
[0090] Based on the above description of the implementation methods, those skilled in the art can clearly understand that this application can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0091] Note that the above description is merely a preferred embodiment and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this application, and the scope of this application is determined by the scope of the appended claims.
Claims
1. A touch data processing method applied to an interactive flat panel, the interactive flat panel including a display screen, a processing module, and an infrared touch frame, the interactive flat panel being equipped with an active pressure-sensitive pen, the infrared touch frame being disposed on the bezel of the display screen to form a touch detection area of the interactive flat panel, the method running in the kernel driver layer of the processing module, characterized in that... include: The infrared touch data transmitted by the infrared touch frame is received and cached by the first kernel thread, and the cached infrared touch data is obtained by the third kernel thread and parsed to obtain the first touch information of the touch point corresponding to the infrared touch data; wherein, the infrared touch data is detected by the infrared touch frame when the active pressure-sensitive pen performs a touch operation on the touch detection area of the interactive tablet. The second kernel thread receives and caches the pressure-sensitive touch data sent by the active pressure-sensitive pen. The third kernel thread retrieves the cached pressure-sensitive touch data and packages it with the first touch information to obtain the second touch information of the touch point. The pressure-sensitive touch data is detected by the active pressure-sensitive pen when it performs a touch operation on the touch detection area of the interactive tablet. The reporting rate of the infrared touch data is higher than that of the pressure-sensitive touch data. If a second interrupt request is received during the data processing of the third kernel thread, the data processing of the third kernel thread is interrupted, and the second kernel thread responds to the second interrupt request to cache the corresponding pressure-sensitive touch data. The second touch information is uploaded to the input subsystem of the application layer through a pre-registered input device interface.
2. The method according to claim 1, characterized in that, The process of receiving and caching the infrared touch data transmitted by the infrared touch frame through the first kernel thread includes: In response to the first interrupt request sent by the first device, the first data sent by the first device is obtained through the kernel interrupt function; Determine whether the first identification information of the first data meets the preset first identification condition. The first identification information includes a first data identification code, a supplier identification code of the first device, and a product identification code. When the first identification information meets the first identification condition, the first data is determined to be the infrared touch data, and the infrared touch data is cached in the first cache queue.
3. The method according to claim 1, characterized in that, The process of receiving and caching the pressure-sensitive touch data sent by the active pressure-sensitive pen through the second kernel thread includes: In response to the second interrupt request sent by the second device, the second data sent by the second device is obtained through the kernel interrupt function; Confirm whether the second identification information of the second data meets the preset second identification conditions. The second identification information includes the second data identification code, the supplier identification code of the second device, and the product identification code. When the second identification information meets the second identification condition, the second data is determined to be the pressure-sensitive touch data, and the pressure-sensitive touch data is cached in the second cache queue.
4. The method according to claim 2, characterized in that, The step of obtaining cached infrared touch data through a third kernel thread and parsing the infrared touch data to obtain the first touch information of the touch point corresponding to the infrared touch data includes: The infrared touch data is read from the first cache queue, parsed according to the hid-multitouch protocol, and the first touch information is extracted. The first touch information includes the touch position and touch area of the corresponding touch point.
5. The method according to claim 3, characterized in that, Before retrieving the cached pressure-sensitive touch data via a third kernel thread, the following is also included: Confirm whether the pressure-sensitive touch data is cached in the second cache queue; Accordingly, the step of obtaining the cached pressure-sensitive touch data through a third kernel thread and packaging the pressure-sensitive touch data with the first touch information to obtain the second touch information of the touch point includes: If the second cache queue contains the pressure-sensitive touch data, then the pressure-sensitive touch data is read from the second cache queue; The pressure sensitivity value in the pressure-sensitive touch data is packaged with the first touch information to obtain the second touch information, which includes the touch position, touch area, and touch pressure sensitivity of the corresponding touch point.
6. The method according to claim 5, characterized in that, The step of obtaining cached pressure-sensitive touch data through a third kernel thread and packaging the pressure-sensitive touch data with the first touch information to obtain the second touch information of the touch point includes: If the second cache queue does not cache the pressure-sensitive touch data, then the previously read pressure-sensitive touch data is retrieved, and the pressure value in the pressure-sensitive touch data is packaged with the first touch information to obtain the second touch information.
7. The method according to claim 1, characterized in that, The step of obtaining cached pressure-sensitive touch data through a third kernel thread and packaging the pressure-sensitive touch data with the first touch information to obtain the second touch information of the touch point includes: If the infrared touch data is the first infrared touch data read after power-on, then a preset pressure sensitivity value is obtained, and the preset pressure sensitivity value is packaged with the first touch information to obtain the second touch information.
8. An interactive flat panel, characterized in that, The interactive flat panel includes a display screen, a processing module, and an infrared touch frame. The interactive flat panel is equipped with an active pressure-sensitive pen. The infrared touch frame is set on the edge of the display screen to form the touch detection area of the interactive flat panel. Both the infrared touch frame and the active pressure-sensitive pen are connected to the processing module. The infrared touch frame is used to detect continuous infrared touch data and send the continuous infrared touch data to the processing module. The infrared touch data is generated by the active pressure-sensitive pen when it performs a touch operation on the touch detection area of the interactive tablet. The active pressure-sensitive pen is used to detect continuous pressure-sensitive touch data and send the continuous pressure-sensitive touch data to the processing module. The pressure-sensitive touch data is generated by the active pressure-sensitive pen when it performs a touch operation on the touch detection area of the interactive tablet. The processing module is used for: The first kernel thread receives and caches the infrared touch data transmitted by the infrared touch frame, and the third kernel thread obtains the cached infrared touch data and parses the infrared touch data to obtain the first touch information of the touch point corresponding to the infrared touch data. The second kernel thread receives and caches the pressure-sensitive touch data sent by the active pressure-sensitive pen. The third kernel thread retrieves the cached pressure-sensitive touch data and packages it with the first touch information to obtain the second touch information of the touch point. The reporting rate of the infrared touch data is higher than that of the pressure-sensitive touch data. If a second interrupt request is received during the data processing of the third kernel thread, the data processing of the third kernel thread is interrupted, and the second kernel thread responds to the second interrupt request to cache the corresponding pressure-sensitive touch data. The second touch information is uploaded to the input subsystem of the application layer through a pre-registered input device interface.
9. The interactive flat panel according to claim 8, characterized in that, The interactive flat panel also includes a communication bus, one end of which is connected to the infrared touch frame and the other end of which is connected to the processing module. The communication bus is used to send the infrared touch data continuously detected by the infrared touch frame to the processing module.
10. The interactive flat panel according to claim 8, characterized in that, The interactive flat panel also includes a wireless receiver, the active pressure-sensitive pen is equipped with a wireless transmitter, and the wireless receiver is connected to the wireless transmitter and the processing module. The wireless transmitter is used to send the pressure-sensitive touch data continuously detected by the active pressure-sensitive pen to the wireless receiver. The wireless receiver is used to receive pressure-sensitive touch data sent by the wireless transmitter and send the pressure-sensitive touch data to the processing module.
Citation Information
Patent Citations
Touch data processing method and touch data processing system for infrared touch screen based on pressure-sensitive pen
CN106775014A
Touch responding method, man-machine interaction device, chip and intelligent device
CN107272955A
Touch information processing method, apparatus, equipment, and storage medium
CN109144396A