CN108415655B - Touch data processing method and device, all-in-one machine and storage medium - Google Patents

Touch data processing method and device, all-in-one machine and storage medium Download PDF

Info

Publication number
CN108415655B
CN108415655B CN201810131235.2A CN201810131235A CN108415655B CN 108415655 B CN108415655 B CN 108415655B CN 201810131235 A CN201810131235 A CN 201810131235A CN 108415655 B CN108415655 B CN 108415655B
Authority
CN
China
Prior art keywords
data
touch
algorithm
frame
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810131235.2A
Other languages
Chinese (zh)
Other versions
CN108415655A (en
Inventor
吉日恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cvtouch Electronics Science & Technology Co ltd
Original Assignee
Guangzhou Cvtouch Electronics Science & Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Cvtouch Electronics Science & Technology Co ltd filed Critical Guangzhou Cvtouch Electronics Science & Technology Co ltd
Priority to CN201810131235.2A priority Critical patent/CN108415655B/en
Publication of CN108415655A publication Critical patent/CN108415655A/en
Application granted granted Critical
Publication of CN108415655B publication Critical patent/CN108415655B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention discloses a touch data processing method, which comprises the following steps: receiving data generated by a touch frame connected currently; if the data is detected to be touch data, reading a frame of light state data from the touch data; processing the read light state data according to an initialized algorithm to generate original coordinate data; wherein the initialized algorithm is generated by an original algorithm and initialization parameters from the touch frame; and triggering a touch event according to the original coordinate data. The invention also discloses a device, an all-in-one machine and a storage medium for processing the touch data, which can solve the problem that the overall performance of the MCU is reduced because the touch frame MCU occupies too much resources by the algorithm, can change the algorithm scheme at any time by utilizing the advantages of hardware resources of a TV complete machine or a computer and the like, can adapt to different algorithm mechanisms, and can complete complex algorithm operation and large data volume processing.

Description

Touch data processing method and device, all-in-one machine and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, an all-in-one machine and a storage medium for processing touch data.
Background
With the continuous development of scientific technology, the touch frame market is in a five-color situation, touch frames adopting different technologies adapt to different application environments, and the infrared touch technology is only one of the technologies and has own advantages and disadvantages. Specifically, the infrared touch frame mainly comprises infrared LED lamps distributed around, chips on the board card, resistors, capacitors and the like, wherein the infrared LED lamps comprise transmitting lamps and receiving lamps, and the transmitting lamps and the receiving lamps are combined into a lamp tube pair in a certain mode. In the using process, the hardware is controlled to scan the light signal of the infrared lamp tube through the scanning algorithm of the software, whether infrared rays are blocked by an object (such as a finger) or not is detected through continuous scanning, and then the infrared rays are converted into a coordinate position of touch control to realize the response of operation.
However, in the process of implementing the present invention, the inventor finds that, to implement a high-precision and high-performance touch frame, both the size of the data volume itself and the complexity of the algorithm are increased, and to process a large data volume, a complex algorithm operation is performed, so that the performance requirement on a Micro Controller Unit (MCU) of the touch frame becomes more and more strict.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method, an apparatus, an all-in-one machine, and a storage medium for processing touch data, which can solve the problem that the MCU of a touch frame occupies too many resources by an algorithm, thereby reducing the overall performance of the MCU, adapt to different algorithm mechanisms while maintaining the hardware resources of the touch frame unchanged, perform more complicated algorithm operations, and implement a high-precision and high-performance touch frame.
In a first aspect, an embodiment of the present invention provides a method for processing touch data, including the following steps:
receiving data generated by a touch frame connected currently;
if the data is detected to be touch data, reading a frame of light state data from the touch data;
processing the read light state data according to an initialized algorithm to generate original coordinate data; wherein the initialized algorithm is generated by an original algorithm and initialization parameters from the touch frame;
and triggering a touch event according to the original coordinate data.
In a first implementation manner of the first aspect, before receiving data generated from a currently connected touch frame, the method further includes:
acquiring equipment information of the connected touch frame;
identifying the touch frame according to the equipment information;
receiving initialization parameters from the touch frame; wherein the initialization parameters include a total number of rays of the optical network, a parameter value representing one ray, and a data type;
and initializing the original algorithm according to the initialization parameters to generate an initialized algorithm.
According to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the initializing an original algorithm according to the initialization parameter to generate an initialized algorithm specifically includes:
identifying the initialization parameters to obtain algorithm initialization data;
and transmitting the algorithm initialization data to an original algorithm for initialization processing to generate an initialized algorithm.
In a third implementation manner of the first aspect, the processing the read light state data according to the initialized algorithm to generate original coordinate data specifically includes:
and transmitting the read light state data to the initialized algorithm to obtain original coordinate data corresponding to the light state data.
According to a third implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the triggering a touch event according to the original coordinate data specifically includes:
performing coordinate mapping on the original coordinate data to generate target coordinate data;
transmitting the target coordinate data to an input subsystem;
and reporting the target coordinate data to a main system through the input subsystem so as to trigger a touch event.
According to a third implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the triggering a touch event according to the original coordinate data specifically includes:
returning the original coordinate data to the touch frame, wherein the original coordinate data is used for triggering the original coordinate data to be subjected to coordinate mapping on the touch frame;
and receiving target coordinate data subjected to coordinate mapping processing of the touch frame, and triggering a touch event according to the target coordinate data.
In a sixth implementation manner of the first aspect, the method further includes:
and if the data is detected to be instruction data, responding the instruction data to a function processing function, and generating an instruction result to perform related setting according to the instruction result.
In a second aspect, an embodiment of the present invention further provides an apparatus for touch data processing, including:
the data receiving module is used for receiving data generated by the currently connected touch frame;
the data detection module is used for reading a frame of light state data from the touch data if the data is detected to be the touch data;
the data processing module is used for processing the read light state data according to an initialized algorithm to generate original coordinate data; wherein the initialized algorithm is generated by an original algorithm and initialization parameters from the touch frame;
and the event triggering module is used for triggering a touch event according to the original coordinate data.
In a third aspect, an embodiment of the present invention further provides an all-in-one machine, including an infrared touch frame and an electronic device; the electronic device includes a controller; the infrared touch frame is connected with the electronic device; the infrared touch frame is used for sending touch data to the electronic device after being connected to the electronic device; the controller comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the touch data processing method according to any one of the above items when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the above methods for processing touch data.
One of the above technical solutions has the following advantages: receiving initialization parameters from the touch frame and initializing an algorithm, and changing an algorithm scheme at any time by using the advantages of hardware resources of an electronic device such as a TV complete machine or a computer connected with the touch frame, so that the algorithm can be adapted to different algorithm mechanisms; on the electronic device, the read light state data is processed according to the initialized algorithm, so that complex algorithm operation and large data volume processing can be completed; the algorithm module is stripped from the bottom layer software of the touch frame, so that the problem that the overall performance of the MCU is reduced due to the fact that the MCU of the touch frame occupies too many resources by the algorithm can be solved. Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for processing touch data according to a first embodiment of the present invention.
Fig. 2 is a processing flow chart of a method for processing touch data according to a first embodiment of the present invention.
Fig. 3 is a schematic diagram of transmission data types of a method for processing touch data according to a first embodiment of the present invention.
Fig. 4 is a flowchart of an implementation manner of a method for processing touch data according to a second embodiment of the present invention.
Fig. 5 is an optical network diagram of a touch data processing method according to a second embodiment of the present invention.
Fig. 6 is a schematic structural diagram of an apparatus for touch data processing according to a third embodiment of the present invention.
Fig. 7 is a schematic structural diagram of an apparatus for touch data processing according to a third embodiment of 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.
Referring to fig. 1, a first embodiment of the present invention provides a method for processing touch data, which can be executed on a TV set, and includes the following steps:
and S10, receiving the data generated by the touch frame connected currently.
In this embodiment, the touch frame may be an Infrared touch frame, the Infrared touch frame (Infrared TouchScreen Technology) is formed by Infrared emitting and receiving sensing elements mounted on a touch screen frame, an Infrared detection net is formed on the screen surface, and any touch object can block the Infrared on the touch points to realize the touch screen operation. The infrared touch frame product can be mounted on electronic devices such as a personal computer, a television, a tablet personal computer and the like, for example, the external infrared touch frame is fixed in front of a display of the TV complete machine and can be connected with the TV complete machine through a USB communication interface. In the embodiment, the complete TV set can be understood as a large flat TV, and an Android board card is configured on the TV set, and the TV set basically has the same functions as a PC (computer), such as USB communication, UART communication, HDMI communication, VGA communication, and the like. It can be understood that the method can also be executed on an electronic device such as a personal computer, a tablet computer, a notebook computer, and the like, so as to implement processing of the touch data.
In this embodiment, the algorithm module has been stripped from the touch frame bottom software, and is run in a system of a TV complete machine in a driving manner, as shown in fig. 2 as an example, the driving module mainly consists of three parts, which are a driving communication module, a driving data processing module (protocol module), and a driving algorithm module, wherein in the driving communication module, its main function is to communicate with a USB interface of a device, and can communicate with the USB interface of the touch frame through an interface packaged in a libusb library under Windows and Linux, while in the Android system, since its kernel is Linux, the bottom USB interface (USB _ fill _ bulk _ ub, USB _ submit _ urb, etc.) reserved by Linux kernel can also be used to communicate with the device.
In this embodiment, as an example, after the touch frame is powered on, the touch frame will perform a scanning operation. When the touch frame is detected to be successfully connected with the complete TV set, the driving communication module sends a notification instruction to the touch frame to enable the touch frame to start sending touch data, and it should be noted that the driving communication module enables the touch frame to send the touch data through the instruction, so that other communication abnormalities caused by the fact that the touch frame sends the touch data all the time can be avoided, for example, some matched application programs or software are used. Here, the touch frame is scanned once at intervals, and the scanned data is stored in the USB buffer, but the data may also be stored in another predetermined buffer, and it should be noted that not only the touch data but also other data, such as command data, are stored in the buffer. Here, if the buffer is full in the buffer, the old touch data is overwritten by the new touch data. In this embodiment, the driving communication module is in a state of always reading the data in the buffer after sending the notification command, so that the data generated by scanning from the touch frame can be received.
And S20, if the data is detected to be touch data, reading a frame of light state data from the touch data.
In this embodiment, after the drive communication module reads the data, all the read data are transmitted to the drive data processing module, and the drive data processing module performs related operations. As an example, if the driving data processing module detects that the data is touch data, one frame of light state data is read from the touch data each time, where the one frame of light state data is different according to a different data format and contains different data amounts.
In this embodiment, the touch frames with different sizes have different numbers of light rays included in the optical net, and the number of light rays included in the touch frames is also different according to the requirement of the touch frames on precision. The larger the size, the more the lamp tubes are, the more light rays are, the higher the precision, the more light rays are contained, and the light density of the optical net is higher. The more the light is, the more the data representing the three values a, b and c are, and in order to more effectively transmit the large amount of data to the driving end, the scanned touch data sometimes needs to be compressed and then transmitted. However, it is necessary to distinguish between the compressed data and the uncompressed data when transmitting, otherwise, it cannot be determined whether the data is compressed or uncompressed data, so the format of the compressed touch data may be defined as data beginning with 0x0a, the format of the uncompressed touch data may be defined as data beginning with 0x0b, and the format of the other command data may be defined as command data beginning with 0 xab. In this embodiment, the USB transfer transfers 64 bytes at a time, as shown in FIG. 3, where FIG. 3 shows two types of transfer data. In this embodiment, the amount of data included in the light status data represents the data size that can be used for calculating the seek point at a time, i.e., the data of one frame. For example, if one frame of light status data in the uncompressed touch data is fixed to be data with a size of 3kb, and the intensity of light in the compressed touch data is different according to the touch position, the one frame of light status data in the compressed touch data is different from 1kb to 4 kb. In this embodiment, the driving data processing module may determine whether the data is the touch data according to a format of the data.
S30, processing the read light state data according to the initialized algorithm to generate original coordinate data; wherein the initialized algorithm is generated from an original algorithm and initialization parameters from the touch frame.
And S40, triggering a touch event according to the original coordinate data.
In this embodiment, before receiving touch data, a system memory is applied on the complete TV set and an initialized algorithm is generated according to an original algorithm and initialization parameters from the touch frame. After the driving data processing module reads a frame of light state data, the light state data is transmitted to the initialized algorithm to be operated and calculated to generate original coordinate data, and a touch event is triggered according to the original coordinate data. In this embodiment, the processing the read light state data according to the initialized algorithm to generate original coordinate data specifically includes: and transmitting the light ray state data to the initialized algorithm to obtain original coordinate data corresponding to the light ray state data. In this embodiment, as an example, if the light state data is read by the driving data processing module, the light state data is input into the initialized algorithm to perform point finding, stain removing, point matching, gesture processing, and the like, so as to generate original coordinate data related to the light state data.
In an implementation manner of this embodiment, as shown in fig. 2, coordinate mapping may be performed on the calculated coordinate data in the driving, and the mapped coordinates are reported to the TV system in response to the event reported by the driving. Specifically, coordinate mapping is carried out on the original coordinate data to generate target coordinate data; transmitting the target coordinate data to an input subsystem; and reporting the target coordinate data to a main system through the input subsystem so as to trigger a touch event. In this embodiment, since the generated original coordinate data may have a difference with respect to a position on a display of the complete TV, coordinate mapping (calibration) needs to be performed on the original coordinate data to generate target coordinate data, and the target coordinate data is returned to the driving communication module by the driving data processing module in the final sending processing, and then the driving communication module transmits the target coordinate data to the host system, and the host system triggers a touch event according to the target coordinate data. In this embodiment, the touch event may be reported by calling an Input subsystem (i.e., an Input subsystem), for example, after the drive communication processing module receives the target coordinate data, the target coordinate data is uploaded to the Input subsystem, the Input subsystem directly uploads the target coordinate data to the host system, and the host system triggers the touch event according to the target coordinate data.
In this embodiment, for sending the target coordinate data to the host system, in addition to directly reporting through the Input subsystem, the target coordinate data may also be returned to the touch frame, and the touch frame sends the touch event through an hid (human interface device) interface.
In another implementation manner of this embodiment, the original coordinate data obtained through the algorithm without coordinate mapping may be sent to the touch frame for coordinate mapping, and the TV system may respond to the touch event reported by the touch frame. Specifically, the drive data processing module transmits the read touch data to the initialized algorithm for operation and calculation, original coordinate data (namely target coordinate data) which are not subjected to coordinate mapping are obtained through algorithm calculation, the original coordinate data are subjected to coordinate mapping through the touch frame, and the mapped data are reported to the TV system to trigger a touch event. In this embodiment, the triggering a touch event according to the target coordinate data specifically includes: returning the original coordinate data to the touch frame, wherein the original coordinate data is used for triggering the original coordinate data to be subjected to coordinate mapping on the touch frame; and receiving first data subjected to coordinate mapping processing of the touch frame, and triggering a touch event according to the first data. In this embodiment, the driving communication module needs to transmit the original coordinate data which is not subjected to coordinate mapping and calculated according to the algorithm to the touch frame, for example, the driving communication module transmits the original coordinate data which is not subjected to coordinate mapping back to the data processing module in the touch frame through the USB interface, and the data processing module in the touch frame may transmit the original coordinate data to the data transmission processing function according to the packet header of the original coordinate data, perform related coordinate mapping on the original coordinate data, obtain the first data after coordinate mapping processing by the touch frame, and upload the first data to the TV system after repackaging processing, so as to trigger a touch event on the TV system according to the first data. It should be noted that, in addition to the instruction data, other data that cannot be used for calculating the coordinates may be regarded as interference data, and the interference data may be discarded.
In this embodiment, the method further includes: and if the data is detected to be instruction data, responding the instruction data to a function processing function, and generating an instruction result to perform related setting according to the instruction result.
In this embodiment, not only touch data but also instruction data is stored in the USB buffer, where the instruction data may be setting instruction data in a received transmission format, or external calibration instruction data, or the like. When the driving data processing module detects that the data sent by the driving communication module is instruction data, the instruction data are sent to the function processing function to respond, after an instruction result is obtained through the response, the driving can perform corresponding setting according to the instruction result, for example, a calibration instruction, and when the driving receives the calibration instruction, the driving can perform corresponding setting, including whether coordinate data are returned to the touch frame or not, and the setting is that only single-point touch is responded. Here, the drive data processing module processes one packet of instruction data every time it reads one packet of instruction data.
In this embodiment, in order to synchronize data as much as possible, a mutual exclusion lock, a kernel lightweight semaphore complete, and other synchronization mechanisms may be used in the driver, so that data can be transmitted as much as possible in time, and data synchronization is achieved.
To facilitate an understanding of embodiments of the present invention, several practical examples will be described below.
The first embodiment is as follows: and moving the algorithm drive into an android whole machine system for operation, and performing scheduling operation by using system resources. The touch frame infrared LED lamp scans data, the obtained original data (namely touch data) are transmitted to an algorithm driver in the android whole machine system through a USB interface, calculation is carried out through the driver, an Input subsystem is called, and the coordinate data obtained through calculation are directly uploaded to the android whole machine system.
Example two: the algorithm is stripped from the touch frame software and independently developed into a drive to be operated on the whole machine system. The scanning data of the touch frame infrared LED lamp is transmitted through the USB interface and transmitted to the algorithm driver in the whole machine system, the coordinate data is obtained through algorithm calculation, the coordinate data is thrown to another driver through a system interface function, the other driver can be developed and maintained by a client, and the touch event is reported and triggered by the driver developed by the client, so that the client driver can realize the functions of touch penetration, touch extension and the like on the touch data driven by the algorithm.
In summary, the present embodiment provides a method for processing touch data, in which an algorithm is stripped from a touch frame software, and is separately developed to be a driver to run on a complete machine system, and by using the advantages of hardware resources of an electronic device connected to the touch frame, complex algorithm operations and processing of a large data volume can be completed, so that the utilization rate of the hardware resources in the overall touch scheme is improved; according to the initialized algorithm, touch data from the touch frame are processed to trigger a touch event, so that the problem that the MCU of the touch frame occupies too many resources by the algorithm to reduce the overall performance of the MCU can be solved, and the problem that the existing touch frame hardware cannot improve the multitask parallel processing capability of software can be solved; and under the premise of not changing the hardware of the touch frame, the expansibility and the portability of software can be improved.
Second embodiment of the invention:
referring to fig. 4, on the basis of the first embodiment, before S10, the method further includes:
s101, acquiring equipment information of a connected touch frame;
s102, identifying the touch frame according to the equipment information;
in this embodiment, the algorithm module needs to be stripped from the underlying software of the touch frame and run in a driving manner in the system of the TV set, so that before processing touch data, the related algorithm in the TV set needs to be initialized. As an example, the touch frame may be connected to a TV set via a USB interface (i.e., a communication interface), and when the touch frame is powered on, the touch frame uploads device information to a system layer of the TV set, where the device information may be generated according to a vendor number (VID) and a product identification code (PID), and represents a unique identifier of the touch frame, and when the touch frame successfully uploads the device information, the touch frame is in a state of monitoring a command. Therefore, the driving communication module can acquire the equipment information of the touch frame connected with the whole TV and identify the touch frame according to the equipment information.
S103, receiving initialization parameters from the touch frame; wherein the initialization parameters include a total number of rays of the optical network, a parameter value representing one ray, and a data type;
and S104, initializing the original algorithm according to the initialization parameters to generate an initialized algorithm.
In this embodiment, after the driving communication module identifies the touch frame, that is, after the touch frame and the TV complete machine successfully establish a communication connection, the driving communication module sends a command or instruction of "reading the algorithm initialization parameter" to the touch frame through the USB interface, and when the touch frame receives the command of reading the algorithm initialization parameter, the driving communication module starts to upload the initialization parameter. And then, after the drive communication module receives the initialization parameter, applying for an internal memory to a main system of the complete TV set, and initializing the original algorithm according to the initialization parameter.
In the present embodiment, the initialization parameter includes, as examples, the total number of rays of the optical network, three values (a, b, c) representing one ray, a data type, and the like. It should be noted that the basic principle of realizing touch by the infrared touch frame is that the transmitting lamp transmits a signal, the receiving lamp receives the signal transmitted by the transmitting lamp, and once the receiving lamp does not receive the signal, it is considered that shielding exists between transmitting and receiving at this time, and one transmitting and one receiving are actually equivalent to connecting a line between the transmitting lamp and the receiving lamp. The whole touch frame has many transmitting lamps and receiving lamps, many lines can be abstracted according to the arrangement and combination mode, all the lines are combined into a touch frame optical network diagram, as shown in fig. 5, fig. 5 shows a simple optical network diagram, and the arrow points to the receiving lamp. Mathematically, a ray can be represented by the equation a x + b y + c 0, so that three values a, b, and c can be determined to plot a ray. Storing these three values is storing an optical network.
In this embodiment, the initializing an original algorithm according to the initialization parameter to generate an initialized algorithm specifically includes:
identifying the initialization parameters to obtain algorithm initialization data;
and transmitting the algorithm initialization data to an original algorithm for initialization processing to generate an initialized algorithm.
In this embodiment, after the driving communication module obtains the initialization parameters, the initialization parameters are transmitted to the driving data processing module, the driving data processing module identifies the initialization parameters, and after the initialization parameters are successfully identified as algorithm initialization data, the algorithm initialization data are transmitted to an original algorithm, a memory is applied to a system, the original algorithm is initialized, and an initialized algorithm is obtained. And after the algorithm is initialized successfully, the driving communication module sends a notification command or an instruction to the touch frame to enable the touch frame to send touch data.
By the method, the algorithm module is stripped from the bottom layer software of the touch frame, so that the problem that the overall performance of the MCU is reduced due to the fact that the MCU of the touch frame is occupied by too many resources by the algorithm can be solved; and receiving initialization parameters from the touch frame and initializing the algorithm, and changing the algorithm scheme at any time by using the advantages of the hardware resources of the whole TV set, so that the method can be adapted to different algorithm mechanisms.
Referring to fig. 6, a third embodiment of the invention provides a touch data processing apparatus, including:
a data receiving module 10, configured to receive data generated by a currently connected touch frame;
the data detection module 20 is configured to, if it is detected that the data is touch data, read a frame of light state data from the touch data;
the data processing module 30 is configured to process the read light state data according to an initialized algorithm, and generate original coordinate data; wherein the initialized algorithm is generated by an original algorithm and initialization parameters from the touch frame;
and the event triggering module 40 is used for triggering a touch event according to the original coordinate data.
Preferably, referring to fig. 7, the touch data processing apparatus further includes:
an information obtaining module 101, configured to obtain device information of a connected touch frame;
the device identification module 102 is configured to identify the touch frame according to the device information;
a parameter data receiving module 103, configured to receive an initialization parameter from the touch frame; wherein the initialization parameters include a total number of rays of the optical network, a parameter value representing one ray, and a data type;
and an algorithm initialization module 104, configured to initialize the original algorithm according to the initialization parameter, and generate an initialized algorithm.
Further, the algorithm initialization module specifically includes:
the parameter identification unit is used for identifying the initialization parameters to obtain algorithm initialization data;
and the initialization unit is used for transmitting the algorithm initialization data to the original algorithm for initialization processing to generate an initialized algorithm.
Preferably, the data processing module 30 specifically includes:
and the algorithm processing unit is used for transmitting the read light state data to the initialized algorithm to obtain original coordinate data corresponding to the light state data.
Preferably, the event triggering module 40 specifically includes:
the coordinate mapping unit is used for carrying out coordinate mapping on the original coordinate data to generate target coordinate data;
the transmission unit is used for transmitting the target coordinate data to the input subsystem;
and the reporting unit is used for reporting the target coordinate data to the main system through the input subsystem so as to trigger the touch event.
Preferably, the event triggering module 40 specifically includes:
the data returning unit is used for returning the original coordinate data to the touch frame, wherein the original coordinate data is used for triggering the touch frame to perform coordinate mapping on the original coordinate data;
and the triggering unit is used for receiving the target coordinate data subjected to the coordinate mapping processing of the touch frame and triggering a touch event according to the target coordinate data.
Preferably, the touch data processing apparatus further includes:
and the function response module is used for responding the instruction data to a function processing function if the data is detected to be the instruction data, and generating an instruction result to carry out related setting according to the instruction result.
The fourth embodiment of the invention also provides an all-in-one machine. The all-in-one machine of the embodiment comprises an infrared touch frame and an electronic device; the electronic device includes a controller; the infrared touch frame is connected with the electronic device; the infrared touch frame is used for sending data to the electronic device after being connected to the electronic device and also receiving data from the electronic device; the controller includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, such as a touch data processing program. The processor, when executing the computer program, implements the steps in the embodiments of the methods for touch data processing described above, such as S10 shown in fig. 1. Alternatively, the processor, when executing the computer program, implements the functions of the modules and units in the above device embodiments, such as the data receiving module 10 shown in fig. 6. In this embodiment, the electronic device may be an electronic device such as a flat panel television, a personal computer, a tablet computer, and a notebook computer; here, the infrared touch frame may be connected to the electronic device through a communication interface such as a USB or a serial port, or may be connected to the electronic device through another method to implement data transmission.
Illustratively, the computer program may be partitioned into one or more modules that are stored in the memory and executed by the processor to implement the invention. The one or more modules may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the kiosk.
The all-in-one machine can comprise, but is not limited to, an infrared touch frame, an electronic device, a processor, a memory and a display. Those skilled in the art will appreciate that the components described above are merely examples of a kiosk and are not meant to be limiting, and that the kiosk may include more or less components than depicted, or some components may be combined, or different components, e.g., the kiosk may also include input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc., and the processor is a control center of the all-in-one machine with the touch data processing function, and various interfaces and lines are used for connecting various parts of the whole all-in-one machine.
The memory can be used for storing the computer program and/or the module, and the processor can realize various functions of the all-in-one machine by running or executing the computer program and/or the module stored in the memory and calling the data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, a text conversion function, etc.), and the like; the storage data area may store data (such as audio data, text message data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the modules integrated in the all-in-one machine can be stored in a computer readable storage medium if the modules are realized in the form of software functional units and sold or used as independent products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be 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 the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A method of touch data processing, comprising:
receiving data generated by a touch frame connected currently;
if the data is detected to be touch data, reading a frame of light state data from the touch data;
processing the read light state data according to an initialized algorithm to generate original coordinate data; wherein the initialized algorithm is generated by an original algorithm and initialization parameters from the touch frame; the initialization parameters comprise the total number of rays of the optical network, a parameter value representing one ray and a data type;
and triggering a touch event according to the original coordinate data.
2. The method of touch data processing according to claim 1, further comprising, prior to receiving data generated from a currently connected touch frame:
acquiring equipment information of the connected touch frame;
identifying the touch frame according to the equipment information;
receiving initialization parameters from the touch frame;
and initializing the original algorithm according to the initialization parameters to generate an initialized algorithm.
3. The method according to claim 2, wherein the initializing an original algorithm according to the initialization parameter to generate an initialized algorithm specifically comprises:
identifying the initialization parameters to obtain algorithm initialization data;
and transmitting the algorithm initialization data to an original algorithm for initialization processing to generate an initialized algorithm.
4. The method according to claim 1, wherein the read light state data is processed according to an initialized algorithm to generate original coordinate data, specifically:
and transmitting the read light state data to the initialized algorithm to obtain original coordinate data corresponding to the light state data.
5. The method according to claim 4, wherein the triggering a touch event according to the raw coordinate data includes:
performing coordinate mapping on the original coordinate data to generate target coordinate data;
transmitting the target coordinate data to an input subsystem;
and reporting the target coordinate data to a main system through the input subsystem so as to trigger a touch event.
6. The method according to claim 4, wherein the triggering of the touch event according to the raw coordinate data is specifically:
returning the original coordinate data to the touch frame, wherein the original coordinate data is used for performing coordinate mapping on the original coordinate data on the touch frame;
and receiving target coordinate data subjected to coordinate mapping processing of the touch frame, and triggering a touch event according to the target coordinate data.
7. The method of touch data processing according to claim 1, further comprising:
and if the data is detected to be instruction data, responding the instruction data to a function processing function, and generating an instruction result to perform related setting according to the instruction result.
8. An apparatus for touch data processing, comprising:
the data receiving module is used for receiving data generated by the currently connected touch frame;
the data detection module is used for reading a frame of light state data from the touch data if the data is detected to be the touch data;
the data processing module is used for processing the read light state data according to an initialized algorithm to generate original coordinate data; wherein the initialized algorithm is generated by an original algorithm and initialization parameters from the touch frame; the initialization parameters comprise the total number of rays of the optical network, a parameter value representing one ray and a data type;
and the event triggering module is used for triggering a touch event according to the original coordinate data.
9. An all-in-one machine is characterized by comprising an infrared touch frame and an electronic device; the electronic device includes a controller; the infrared touch frame is connected with the electronic device; the infrared touch frame is used for sending touch data to the electronic device after being connected to the electronic device; the controller comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the method of touch data processing of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, comprising a stored computer program, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform a method of touch data processing according to any one of claims 1 to 7.
CN201810131235.2A 2018-02-08 2018-02-08 Touch data processing method and device, all-in-one machine and storage medium Active CN108415655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810131235.2A CN108415655B (en) 2018-02-08 2018-02-08 Touch data processing method and device, all-in-one machine and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810131235.2A CN108415655B (en) 2018-02-08 2018-02-08 Touch data processing method and device, all-in-one machine and storage medium

Publications (2)

Publication Number Publication Date
CN108415655A CN108415655A (en) 2018-08-17
CN108415655B true CN108415655B (en) 2020-10-23

Family

ID=63127097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810131235.2A Active CN108415655B (en) 2018-02-08 2018-02-08 Touch data processing method and device, all-in-one machine and storage medium

Country Status (1)

Country Link
CN (1) CN108415655B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022077243A1 (en) * 2020-10-14 2022-04-21 深圳市康冠商用科技有限公司 Touch signal processing method and system, and touch integrated machine
CN113703613B (en) * 2021-09-01 2022-12-30 广州朗国电子科技股份有限公司 Electronic whiteboard interface signal switching device and method based on touch frame

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI524238B (en) * 2009-03-31 2016-03-01 萬國商業機器公司 Multi-touch optical touch panel
CN103853391B (en) * 2012-12-05 2016-12-21 北京汇冠新技术股份有限公司 A kind of method improving infrared touch panel touch precision
CN102981675B (en) * 2012-12-07 2015-09-09 广东威创视讯科技股份有限公司 A kind of multiple point touching data processing method and system thereof
CN104699328A (en) * 2013-12-06 2015-06-10 大连灵动科技发展有限公司 Infrared interaction identification method
CN105373267B (en) * 2015-12-14 2018-09-18 广州华欣电子科技有限公司 A kind of infrared touch screen multi-point recognition method, device and infrared touch panel
CN106557209B (en) * 2016-10-28 2019-09-17 青岛海信电器股份有限公司 Processing method, device and the terminal device of infrared touch panel touching signals

Also Published As

Publication number Publication date
CN108415655A (en) 2018-08-17

Similar Documents

Publication Publication Date Title
CN107786794B (en) Electronic device and method for providing an image acquired by an image sensor to an application
US20180365086A1 (en) Method for Processing Data Collected by Touch Panel, and Terminal Device
CN107515759B (en) Screen capture method and device, electronic equipment and readable storage medium
US20210256077A1 (en) Methods, devices and computer-readable storage media for processing a hosted application
TW201602866A (en) Efficient lossless compression for peripheral interface data transfer
US10110691B2 (en) Systems and methods for enabling virtual keyboard-video-mouse for external graphics controllers
US20160224493A1 (en) Universal serial bus (usb) kvm switch using virtual usb for switching among multiple hosts
CN107278294B (en) Input device implementation method and implementation device thereof
CN111813713B (en) Data acceleration operation processing method and device and computer readable storage medium
CN108415655B (en) Touch data processing method and device, all-in-one machine and storage medium
US20170277614A1 (en) Intelligent test robot system
CN112765082B (en) Multi-host arbitration method, device and readable storage medium
CN112764817A (en) Equipment function awakening method and device
CN105278662A (en) Interactive control method and apparatus for electronic whiteboard system and system
CN116419049A (en) Image processing method, image processing system, device and electronic equipment
CN113326093A (en) Data processing method and device, electronic equipment and computer readable medium
CN109308862B (en) Signal control method, control device, processing device and signal control equipment
CN115309455A (en) Three-dimensional scanner processing system and data processing method thereof
CN112202965B (en) Communication equipment control method, device, system and storage medium
CN112084099B (en) Method, device, equipment and storage medium for acquiring alarm state value based on host
CN114070892A (en) Data transmission method and device
CN111290689B (en) Electronic equipment, main control device, control method and touch control sharing system thereof
CN111352357B (en) Robot control method and device and terminal equipment
US9704214B2 (en) Rendering video data in an information handling system by converting the video data to bulk video data
CN111209248A (en) Edge calculation server and edge calculation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant