Touch response method and device, terminal equipment and storage medium

文档序号:1798136 发布日期:2021-11-05 浏览:9次 中文

阅读说明:本技术 触控响应方法、装置、终端设备和存储介质 (Touch response method and device, terminal equipment and storage medium ) 是由 陈玉香 于 2021-06-28 设计创作,主要内容包括:本发明实施例公开了触控响应方法、装置、终端设备和存储介质,该方法用于交互平板,交互平板包括显示屏、触控模组和弹性波传感器,中接收在显示屏检测触控操作时,由触控模组生成的位置数据和由弹性波传感器生成的弹性波数据;将位置数据缓存到第一缓存队列,将弹性波数据缓存到第二缓存队列,第一缓存队列和第二缓存队列互相关联;轮询第一缓存队列和第二缓存队列,确认第一缓存队列和第二缓存队列同时出现数据的响应时刻;根据弹性波数据确认触控操作对应的交互结果的显示属性,从响应时刻开始根据位置数据和显示属性,在显示屏更新交互结果。本方案实现对同一触控操作的交互响应保持前后准确一致的显示效果。(The embodiment of the invention discloses a touch response method, a touch response device, terminal equipment and a storage medium, wherein the method is used for an interactive flat plate, the interactive flat plate comprises a display screen, a touch module and an elastic wave sensor, and position data generated by the touch module and elastic wave data generated by the elastic wave sensor are received when the display screen detects touch operation; buffering the position data into a first buffer queue, and buffering the elastic wave data into a second buffer queue, wherein the first buffer queue and the second buffer queue are associated with each other; polling the first buffer queue and the second buffer queue, and confirming the response time of the data of the first buffer queue and the second buffer queue; and confirming the display attribute of the interaction result corresponding to the touch operation according to the elastic wave data, and updating the interaction result on the display screen according to the position data and the display attribute from the response moment. According to the scheme, accurate and consistent display effects before and after interactive response of the same touch operation are kept.)

1. A touch response method is used for an interactive flat panel, the interactive flat panel comprises a display screen, a touch module and an elastic wave sensor, and the touch response method is characterized by comprising the following steps:

receiving position data generated by the touch module and elastic wave data generated by the elastic wave sensor when the display screen detects touch operation;

buffering the position data into a first buffer queue, and buffering the elastic wave data into a second buffer queue, wherein the first buffer queue and the second buffer queue are associated with each other;

polling the first buffer queue and the second buffer queue, and confirming the response time of the data of the first buffer queue and the second buffer queue;

and confirming the display attribute of the interaction result corresponding to the touch operation according to the elastic wave data, and updating the interaction result on the display screen according to the position data and the display attribute from the response moment.

2. The method of claim 1, wherein the polling the first buffer queue and the second buffer queue to confirm the response time of the simultaneous data in the first buffer queue and the second buffer queue comprises:

polling the first buffer queue and the second buffer queue, acquiring a first moment when the first buffer queue starts to generate position data, and acquiring a second moment when the second buffer queue starts to generate elastic wave data;

and taking the latter one of the first time and the second time as a response time.

3. The method according to claim 1, wherein the position data includes a contact range, and the display attribute includes a default contact shape preset corresponding to each elastic wave data;

correspondingly, the determining, according to the elastic wave data, a display attribute of an interaction result corresponding to the touch operation, and updating, on the display screen, the interaction result according to the position data and the display attribute from the response time includes:

confirming a corresponding default contact point shape according to the elastic wave data, and replacing the shape corresponding to the contact range with the default contact point shape;

and moving the default contact point shape according to the position data from the response moment so as to update the interaction result on the display screen.

4. The touch response method according to claim 1, wherein the buffering the position data into a first buffer queue and the buffering the elastic wave data into a second buffer queue specifically comprises:

and confirming that position data and elastic wave data begin to be generated within a first time period, buffering the position data into a first buffer queue, and buffering the elastic wave data into a second buffer queue.

5. The touch response method of claim 4, further comprising:

confirming the moment when the touch operation starts to obtain the elastic wave data, exceeding a second duration after the moment when the position data starts to be obtained, and ignoring the elastic wave data;

and responding to the touch operation according to the position data.

6. The touch response method of claim 3, wherein the display attributes further include color and operation type.

7. The touch response method according to claim 6, wherein the operation types include an input operation and an erase operation.

8. The touch response method according to claim 1, wherein the first buffer queue and the second buffer queue are first-in-first-out queues.

9. The utility model provides a touch-control response device for mutual dull and stereotyped, mutual dull and stereotyped includes display screen, touch-control module and elastic wave sensor, its characterized in that includes:

the data receiving unit is used for receiving position data generated by the touch module and elastic wave data generated by the elastic wave sensor when the display screen detects touch operation;

the data caching unit is used for caching the position data into a first caching queue and caching the elastic wave data into a second caching queue, and the first caching queue and the second caching queue are associated with each other;

the data polling unit is used for polling the first buffer queue and the second buffer queue and confirming the response time of the data of the first buffer queue and the second buffer queue;

and the operation response unit is used for confirming the display attribute of the interaction result corresponding to the touch operation according to the elastic wave data and updating the interaction result on the display screen according to the position data and the display attribute from the response moment.

10. A terminal device, comprising:

one or more processors;

a memory for storing one or more programs;

when executed by the one or more processors, cause the terminal device to implement the touch response method of any of claims 1-8.

11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a touch response method according to any one of claims 1 to 8.

Technical Field

The embodiment of the invention relates to the technical field of interaction, in particular to a touch response method, a touch response device, terminal equipment and a storage medium.

Background

Along with the development of intelligent technology, the types of electronic products contacted by people in daily life are increasingly rich, wherein the interactive electronic products realized based on the touch technology have a more comprehensive function integration trend due to good human-computer interaction experience. The interactive flat panel is one representative integrated device, is suitable for group interaction occasions such as conferences, teaching, commercial exhibition and the like, and integrates multiple functions such as a projector, a video conference and the like.

In order to enrich the interaction experience of the interaction panel, an elastic wave sensor is further arranged in the interaction panel so as to obtain more convenient interaction. However, when the inventor uses the interaction function based on the elastic wave sensor, the inventor finds that, in the interaction implementation based on the elastic wave sensor, it is necessary to fuse the elastic wave data detected by the elastic wave sensor and the position data detected by the touch module, but because the detection components of the elastic wave data and the position data are different, and the transmission process and the processing process are different, the elastic wave data and the position data cannot be fused synchronously, so that the interactive response to the same touch operation cannot maintain accurate and consistent display effect before and after.

Disclosure of Invention

The invention provides a touch response method, a touch response device, terminal equipment and a storage medium, and aims to solve the technical problem that in the prior art, elastic wave data and position data cannot be synchronously fused, so that interactive response to the same touch operation cannot keep accurate and consistent display effects before and after the interactive response.

In a first aspect, an embodiment of the present invention provides a touch response method, including:

receiving position data generated by the touch module and elastic wave data generated by the elastic wave sensor when the display screen detects touch operation;

buffering the position data into a first buffer queue, and buffering the elastic wave data into a second buffer queue, wherein the first buffer queue and the second buffer queue are associated with each other;

polling the first buffer queue and the second buffer queue, and confirming the response time of the data of the first buffer queue and the second buffer queue;

and confirming the display attribute of the interaction result corresponding to the touch operation according to the elastic wave data, and updating the interaction result on the display screen according to the position data and the display attribute from the response moment.

In a second aspect, an embodiment of the present invention further provides a touch response device, including:

the data receiving unit is used for receiving position data generated by the touch module and elastic wave data generated by the elastic wave sensor when the display screen detects touch operation;

the data caching unit is used for caching the position data into a first caching queue and caching the elastic wave data into a second caching queue, and the first caching queue and the second caching queue are associated with each other;

the data polling unit is used for polling the first buffer queue and the second buffer queue and confirming the response time of the data of the first buffer queue and the second buffer queue;

and the operation response unit is used for confirming the display attribute of the interaction result corresponding to the touch operation according to the elastic wave data and updating the interaction result on the display screen according to the position data and the display attribute from the response moment.

In a third aspect, an embodiment of the present invention further provides a terminal device, including:

one or more processors;

a memory for storing one or more programs;

when the one or more programs are executed by the one or more processors, the terminal device is enabled to implement the touch response method according to the first aspect.

In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the touch response method according to the first aspect.

In the touch response method, the touch response device, the terminal device and the storage medium, position data generated by the touch module and elastic wave data generated by the elastic wave sensor are received when the display screen detects touch operation; buffering the position data into a first buffer queue, and buffering the elastic wave data into a second buffer queue, wherein the first buffer queue and the second buffer queue are associated with each other; polling the first buffer queue and the second buffer queue, and confirming the response time of the data of the first buffer queue and the second buffer queue; and confirming the display attribute of the interaction result corresponding to the touch operation according to the elastic wave data, and updating the interaction result on the display screen according to the position data and the display attribute from the response moment. The position data and the elastic wave data are respectively stored through the two buffer queues, the moment when the two buffer queues confirm that the data simultaneously appear is used as the response moment, the response of the touch operation is carried out from the response moment, the situation that the corresponding position data and the elastic wave data guarantee the complete information of one touch operation in the response process is guaranteed, and accurate and consistent display effects before and after the interactive response of the same touch operation is kept through synchronous fusion from the response moment.

Drawings

Fig. 1 is a flowchart of a method of a touch response method according to an embodiment of the present invention;

FIG. 2 is a schematic diagram illustrating a touch operation performed by two writing pens on an interactive tablet;

FIG. 3 is a schematic diagram of elastic wave detection provided in an embodiment of the present application;

FIG. 4 is a schematic diagram of the transmission timing of position data and elastic wave data;

FIG. 5 is a schematic diagram of position data and elastic wave data stored in a buffer queue;

fig. 6 is a schematic structural diagram of a touch response device according to an embodiment of the present invention;

fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

It should be noted that, for the sake of brevity, this description does not exhaust all alternative embodiments, and it should be understood by those skilled in the art after reading this description that any combination of features may constitute an alternative embodiment as long as the features are not mutually inconsistent.

The following examples are described in detail.

Fig. 1 is a flowchart of a method of a touch response method according to an embodiment of the present invention, where the touch response method is used for a terminal device, and as shown in the figure, the touch response method includes:

step S110: and receiving position data generated by the touch module and elastic wave data generated by the elastic wave sensor when the display screen detects touch operation.

Step S120: and buffering the position data into a first buffer queue, and buffering the elastic wave data into a second buffer queue, wherein the first buffer queue and the second buffer queue are associated with each other.

For convenience of understanding, the detailed process of performing touch response in the interactive tablet is exemplarily described in the embodiments. The interactive flat panel can be an integrated device which controls contents displayed on a display screen and realizes man-machine interaction operation through a touch technology, and integrates one or more functions of a projector, an electronic whiteboard, a curtain, a sound, a television, a video conference terminal and the like. Of course, the interactive tablet does not include a definition of the surface features of the display surface, for example, the surface features of the interactive tablet may be a plane, a curved surface, or a mosaic of multiple planes.

The range covered by the graphical interface displayed in the display screen of the interactive flat panel can be a touch detection area for detecting user operation, namely the ranges of the graphical interface and the touch detection area are basically overlapped or not overlapped. When the touch detection area is used for touch operation, for example, when a writing pen or a finger is used for writing by touching the display screen with a touch function, the touch module of the display screen can sense the change of infrared light, the change of current, the change of voltage, the change of magnetic flux or the change of pressure (corresponding to the specific setting type of the infrared display screen, the capacitance display screen, the resistance display screen, the electromagnetic display screen or the pressure display screen), thereby obtaining a touch signal containing the coordinates of the touch position and the trigger time of the touch signal after conversion, according to the coordinates of the touch position and the trigger time of the touch signal, track data of a writing track input during the process that the writing pen or the fingers of the user press and write each time to lift and stop writing can be obtained, and the writing track input by the user is displayed on a graphical interface of the display screen in real time according to the track data. Of course, the writing process is not limited to writing, and any entry process implemented on the display screen of the interactive tablet for displaying the operation track can be regarded as the writing process. In addition, according to the difference of the display elements of the occurrence positions of the touch operations, the touch operations can respond to operations such as clicking, dragging and the like of the user. The way in which these different responses are processed at the bottom level is the same. Various interactive display designs of the interactive flat panel can be realized based on the hardware realization of basic functions such as touch and display. It should be noted that, from the experience of user interaction, the display interface and the touch detection area of the interactive tablet are generally the same interface, and for the notebook computer, the display interface and the touch detection area may be completely independent from each other, or may be partially independent and partially overlapped.

As shown in fig. 2, the interactive tablet 1 includes at least one display screen. For example, the interactive tablet 1 is configured with a display screen with touch function, and the display screen with touch function may be an infrared display screen, a capacitive display screen, a resistive display screen, an electromagnetic display screen, or a pressure-sensitive display screen. On the display screen with touch function, a user can implement touch operation by touching the display screen with a finger or a writing pen, and fig. 2 shows that two different writing pens (i.e. a first writing pen 21 and a second writing pen 22) perform writing operation simultaneously, and accordingly, the interactive tablet detects a touch position and responds according to the touch position to implement the touch function. When the touch sensing modules adopted on the display screen with the touch function are different, the original touch signals collected by the touch sensing modules are different, and the converted touch signals are not completely the same.

For the infrared display screen, the touch module is an infrared touch frame, the touch signals collected by the infrared display screen can include signals representing blocked infrared rays, the converted touch signals can include position touch signals, and the position touch signals can include X coordinates and Y coordinates of touch positions. For the capacitive display screen, the touch module is a capacitive touch pad, the touch signal collected by the capacitive touch module may include a current flowing through each electrode of the touch screen, and the touch signal obtained by conversion may include a position touch signal, which may include an X coordinate and a Y coordinate of a touch position. For the resistive display screen, the touch module is a resistive touch pad, the touch signal collected by the resistive touch pad may include a voltage of a touch position, and the touch signal obtained by conversion may include a position touch signal, which may include an X coordinate and a Y coordinate of the touch position. For the electromagnetic display screen, the touch module is an electromagnetic plate, the touch signal acquired by the touch module can comprise the variation of magnetic flux and the frequency of the received electromagnetic signal, the touch signal obtained by conversion can comprise a position touch signal corresponding to the variation of the magnetic flux and a pressure signal corresponding to the frequency, and the position touch signal can comprise an X coordinate and a Y coordinate of a touch position; the pressure-sensitive signal may include a pressure value. For the pressure-sensitive display screen, the touch module is a pressure sensor, the touch signal acquired by the pressure sensor can comprise a pressure signal, the touch signal obtained by conversion can comprise a position touch signal, and the position touch signal can comprise an X coordinate and a Y coordinate of a touch position.

The interactive flat panel to which the interaction method provided by the embodiment of the application is applied comprises the display screen and the touch module arranged on the display screen, and further comprises an elastic wave detection device.

In the scheme, the interactive panel detects the touch operation not only by detecting the touch position information, but also by detecting a signal which vibrates when a touch object is in contact with the display interface of the interactive panel during the touch operation, namely acquiring an elastic wave signal. Here, mechanical vibration below the audio frequency, sound in the audio frequency range, and ultrasonic waves beyond the audio frequency are all wave phenomena of media such as gas, liquid, and solid, and such wave phenomena are called elastic waves with respect to light and electromagnetic waves.

In the implementation process of the present solution, as shown in fig. 3, for the detection of the elastic wave signal, the detection is performed by the elastic wave sensor 11 in the elastic wave detection device, and the elastic wave sensor 11 is specifically installed at a position where the vibration generated by the display screen can be transmitted, so as to realize the detection of the event that the touch object touches the display screen on the display screen, and is not necessarily installed at the position where the vibration occurs. As shown in fig. 3, elastic wave sensors 11 may be arranged at 4 corners of the display screen, and of course, there may be other arrangement manners, for example, the elastic wave sensors 11 are arranged at the middle point of each side of the rectangular frame, and the number may also be other numbers, for example, 2, 5, as long as the elastic wave sensors 11 can detect the vibration when the touch object is in contact with the display screen during the touch operation, the specific arrangement number may be set specifically according to the size and the detection accuracy of the display screen, and generally, the larger the size of the display screen is, the higher the detection accuracy requirement is, and the larger the number of the elastic wave sensors 11 is. Elastic wave sensor 11 may be mounted directly on the surface of the display screen, for example, directly on the upper surface of the display screen or the lower surface of the display screen, so as to receive the vibration transmitted by the display screen and improve the accuracy of touch detection. The elastic wave sensor 11 can also be installed in the frame of the display screen, so that the influence on the internal structure is reduced, and the common-mode noise interference from the display screen is reduced. Of course, the elastic wave sensor 11 may be mounted on another member in contact with the display screen, and receive the vibration occurring in the display screen through transmission of the other member.

The elastic wave sensors can be all passive elastic wave detection sensors or one or more of the elastic wave sensors can actively excite elastic waves outwards, the excited elastic waves can be detected by all the elastic wave sensors, when external touch occurs on the cover plate of the display screen, the elastic waves can be generated in addition and detected by all the elastic wave sensors, and the system can judge the type of media corresponding to the external touch according to signals generated by the comprehensive action of a plurality of elastic waves.

When an object touches (including touching, sliding) on the cover of the display screen, an elastic wave having characteristics is generated, and the elastic wave propagates from the contact point, along the cover to the periphery, or to the inside of the cover. The elastic wave sensor positioned at the screen frame or in the cover plate can convert the vibration signal into a sensing signal according to different detection modes, and the sensing signal is transmitted to a processor with temperature compensation, amplified and converted into a digital elastic wave signal. Here, the sensing signal includes a voltage signal, a current signal, or a magnetic flux signal. And in the process of detecting the sensing signal, the elastic wave sensor judges whether the signal is effectively touched according to the strength of the sensing signal and filters a noise signal.

Taking the voltage signal as an example, the voltage signal obtained by the elastic wave sensor during the contact of the object with the cover plate of the display screen is scanned at a certain frequency f, and when the voltage value is greater than the first voltage threshold V1, the voltage value is recorded as an effective voltage value higher than noise, otherwise, the voltage value is recorded as zero voltage. In a specific determination process, the first voltage threshold V1 may change with temperature because the circuit noise changes with temperature and the coupling coefficient of the piezoelectric material also changes with temperature. K voltage signals recorded continuously are an elastic wave signal segment, and the duration of the segment is T0 ═ K/f. In the segment, if none of the K signals in the segment is greater than the first voltage threshold V2, the signal strength is not reached to the effective touch strength, and the signal is determined to be a noise signal and discarded; on the contrary, if one of the K voltage signals is greater than the first voltage threshold V2, it indicates that the intensity of the signal reaches the valid touch intensity, and the signal is recorded as a valid touch signal.

Of course, the type of the signal converted by the elastic wave is different according to the detection mode of the elastic wave sensor, for example, the signal may also be a change of magnetic flux, and then corresponding digital information is generated according to the change of the magnetic flux, so as to realize the detection of the elastic wave.

From the sensing signal detected by the elastic wave sensor, the center position and the contact shape of the touch object at the time ti can be known. In combination with the temperature information, the speed of propagation of different elastic waves in the cover plate can be derived, for example, the wave speed of a surface wave, va (T), which is a function of the temperature T, which may be anisotropic (e.g., anisotropy of the cover plate material, or anisotropy due to differences in internal stresses). According to the position information, the distance between the touch object and one elastic wave sensor is Sk, and the elastic wave signal of the touch object reaches the elastic wave sensor at the (ti + Sk/va) moment; and the intensity of the elastic wave will attenuate with distance, the ratio of the signal intensity reaching the elastic wave sensor to the original signal intensity is-1/(Sk ^ 2). The specific attenuation rate is also related to the cover plate temperature of the display screen and the frequency of the elastic wave, and overall, the higher the cover plate temperature is, the faster the attenuation rate is; the higher the frequency, the faster the decay rate. The same can be obtained, and the signal receiving time and the signal intensity relation of other elastic wave sensors are obtained.

All the elastic wave signals obtained by the elastic wave sensor can remove some noise signals according to different characteristic quantities of signals such as time, frequency and the like. Firstly, vibration signals from other than touch behaviors, such as external vibration, internal vibration generated by a speaker or a frame, can be judged in the time period when the effective signal appears with the help of the signals detected by the elastic wave sensor, and the elastic wave signals in other time periods are signals caused by non-touch. The non-effective touch signals in the piezoelectric sensors in different time periods are removed, and the identification and judgment of the follow-up steps on the object are facilitated. Secondly, the characteristics from the touch behavior but the touch object were not recorded before. For a touch gesture or other object touch used for interaction, there is a known characteristic frequency distribution, for example, when a finger is touched or slid with a stylus pen or an eraser, the characteristic frequency is between 1kHz and 20kHz, and signals of other frequencies are noise or unsupported signals; therefore, the voltage signal can be subjected to fast Fourier transform, and unsupported frequency intervals are filtered out from the signal interval.

It should be noted that the elastic wave sensors at the same position may be combined with one or more sensors with polarization directions. For example, two polarization directions are +/-Z directions, a difference circuit can be used for obtaining the difference value of two piezoelectric signals, the signals can be amplified, and the piezoelectric coefficient change caused by temperature and the like can be reduced. For example, one or more piezoelectric sensors in the polarization direction in the XY plane can sense one more dimension of elastic wave signals, detect propagation of different elastic waves, increase the amount of information (facilitating identification and judgment of multiple points), and increase the function of water resistance (using the characteristic signal of tangential waves due to the low shear modulus of water) or other stains.

To this end, the elastic wave sensor may output a valid elastic wave signal, which is recorded in the form of a corresponding voltage signal, in which information such as amplitude, frequency and phase may be confirmed.

From the source of elastic wave generation, the device comprises various noise-generating elements (such as a motor, a loudspeaker, a fan and the like) in the interactive flat panel and noise-generating equipment (such as an indoor air conditioner, a television and the like) outside the interactive flat panel, and the elements can cause the interactive flat panel to generate elastic waves which are not intended by a user during use. Through the type of the component, the way of generating noise by the component can be confirmed, for example, the noise generated by the speaker mainly comes from the elastic wave generated in the whole medium of the interactive flat plate when the speaker makes a sound, and for the elastic wave sensor, various elastic wave signals can be detected at any time, but many of the elastic wave signals are not from the touch operation itself.

For the elements or the devices, elastic wave signals generated by the elements or the devices under different driving voltages within a preset time period can be collected in advance, and electric signals obtained by correspondingly converting the elastic wave signals are used as noise signals. All signals detected by the elastic wave sensor are subjected to noise filtering, and after noise interference is eliminated, effective elastic wave signals can be obtained. In the process of filtering out the noise, considering that the interferences generated by the noise signals are different, the signals generated by the touch operation can be adaptively amplified or reduced by referring to the noise signals, so as to highlight the difference between the noise signals and the signals generated by the touch operation.

Considering that when noise generated by a noise source such as a horn is slight, an elastic wave signal generated when a touch object touches the touch object is obviously higher than an elastic wave signal (namely, a noise signal) generated by the noise source such as the horn, at the moment, the difference between the two signals is not obvious, and the elastic wave band generated by the noise can be more easily confirmed and removed by setting a threshold of voltage limited by a voltage range, so that the condition of calculation amount is reduced, the efficiency of noise filtering is effectively improved, and a signal corresponding to touch operation, namely, the elastic wave signal, is quickly obtained. Specifically, within the range of the threshold value composition of the voltage, all the detected elastic wave signals and noise signals are subjected to phase comparison, signal data which is consistent with the phase of the noise signals are removed, and unnecessary calculation amount in actual calculation is reduced. In the filtering process, all the elastic wave signals and the noise signals can be compared in phase, if the phase of the elastic wave signals is consistent with that of the noise signals, signal data in the elastic wave signals, which are consistent with that of the noise signals, are deleted, and if the phase of the elastic wave signals is opposite to that of the noise signals, signal data in the elastic wave signals, which are opposite to that of the noise signals, are reserved, so that errors caused by direct subtraction under the condition that the wave bands of the noise signals are opposite to those of the elastic wave signals are avoided, and signals which really originate from touch operation in the elastic wave signals are reserved. And generating a digital signal according to the real signal from the touch operation, namely obtaining elastic wave data corresponding to the touch operation.

In the scheme, the position data detected by the touch module and the elastic wave data detected by the elastic sensor are further subjected to depth processing. In the actual touch operation response process, the position data and the elastic wave data cannot be processed and responded without gaps, but the response can be realized only through a receiving, caching and processing process, and the process is generally millisecond-level, so that the touch operation is a real-time response experience for a user. In the scheme, position data and elastic wave data obtained during touch operation detection are firstly and respectively cached in a first cache queue and a second cache queue which are associated, and during specific implementation, the first cache queue and the second cache queue are first-in first-out queues. In a computer, a fifo queue is an in-order execution method in which data that enters first is processed and retired before subsequent data is executed. When the processor is not in time to process all data for a certain period of time, the data is arranged in the fifo queue, for example, the data No. 0 is firstly queued, then the data No. 1 and the data No. 2 … … are executed after the processor finishes the current data by taking the data No. 0 out of the fifo queue, and the data No. 1 takes over the position of the data No. 0, and similarly, the data No. 2 and the data No. 3 … … are both shifted forward by one position.

In the scheme, the first buffer queue and the second buffer queue do not independently process but comprehensively respond, and the comprehensive response starts from the buffer of data, specifically, the position data and the elastic wave data are confirmed to start to be generated within a first time period, the position data is buffered in the first buffer queue, and the elastic wave data is buffered in the second buffer queue. Considering that the touch data and the elastic wave data are from the same touch operation, the data generation generally comes from the same time (for example, capacitive touch detection) or two immediately preceding and following times (for example, infrared touch detection), and the difference in the transmission and processing processes is small, so the first time length is generally limited to several milliseconds, and only the position data and the elastic wave data which start to be detected in sequence within several milliseconds are regarded as the data generated by the same touch operation and need to be correspondingly stored in two associated buffer queues.

In a specific precedence relationship, as shown in fig. 4, it is possible that position data is generated before elastic wave data; it is possible that the position data is generated simultaneously with the elastic wave data; it is also possible that the position data is generated after the elastic wave data, and the data storing states of the two buffer queues are different corresponding to the three generation order relationships, as shown in fig. 5, it is possible that the position data is buffered first in the first buffer queue (FIFO _ 1); it is possible that elastic wave data is buffered in the second buffer queue (FIFO _2) while position data is buffered in the first buffer queue (FIFO _ 1); it is also possible that the second buffer queue (FIFO _2) buffers the elastic wave data first.

Step S130: polling the first buffer queue and the second buffer queue, and confirming the response time of the data of the first buffer queue and the second buffer queue.

The data in the two buffer queues are not processed immediately after appearing, but the data is polled, so that the data is confirmed to be cached in the first buffer queue and the second buffer queue, the position data and the elastic wave data for realizing a complete touch operation are confirmed to appear, and the touch operation is responded from the appearing position data and the appearing elastic wave data. The polling process is a process of periodically accessing the first buffer queue and the second buffer queue, and in order to ensure that the response of the touch operation and the synchronization of the user operation are ensured as much as possible, the polling cycle is generally only a few milliseconds, so as to start processing the position data and the elastic wave data as soon as possible. Specifically, polling the first buffer queue and the second buffer queue to obtain a first time when the first buffer queue starts to generate position data and obtain a second time when the second buffer queue starts to generate elastic wave data; and taking the latter one of the first time and the second time as a response time. As shown in the first state in fig. 5, when position data appears in the first buffer queue, the second buffer queue has no data yet, and it is obvious that the first time is prior, and the second time is later, and the second time corresponds to the response time. Similarly, the third state in fig. 5 should use the first time as the response time, while in the second state, the first time and the second time have no obvious difference, and both of them can be regarded as the response time at the later time.

Step S140: and confirming the display attribute of the interaction result corresponding to the touch operation according to the elastic wave data, and updating the interaction result on the display screen according to the position data and the display attribute from the response moment.

In the prior art, the display attributes of different writing pens corresponding to touch operations are mainly realized by judging the contact surface. For example, the pen point of a white pen is thin, the pen point of a red pen is thick, the contact surface of the eraser is the largest, the area S is obtained by W (width) and H (height) information of the first point in the position data, and the logic for making the area S is determined. That is, when the touch data first point falls is that if the area S is less than the threshold S1 of the area of the white pen, i.e., S < S1, white handwriting is displayed; if the area S is larger than the threshold S1 of the white pen but smaller than the threshold S2 of the red pen, namely S1< S < S2, red handwriting is displayed; if the area S is larger than the minimum area S3 of the eraser, i.e., S > S3, the eraser is displayed. In summary, the dual pen is dual color, depending on the contact area of the first dot, and the display color is confirmed by determining that the area of the first dot is within that threshold interval until the pen leaves the display screen.

In this aspect, the elastic wave data may confirm the display attribute of the control operation corresponding to the response in a more accurate manner. For example, the tips of the first writing pen 21 and the second writing pen 22 in fig. 2 have different media types, and different elastic waves are generated according to the different media types, so that the writing of the first writing pen 21 can be fixed to one color (for example, red) and the writing of the second writing pen 22 can be fixed to another color (for example, yellow) based on the recognition of the writing pens by the elastic waves. In addition to the difference in color, the type of operation is also different. The difference in the specific operation types is, for example, the input operation for inputting handwriting and the erasing operation for erasing handwriting as described above. The erasing operation is generally realized by the tip (i.e. the end opposite to the pen tip) of the writing pen, that is, when the tip of the writing pen moves in contact with the interactive tablet, the writing in the corresponding position is deleted.

Besides color, there can be a determination of handwriting thickness. Specifically, the position data includes a touch range, and the display attribute includes a default touch point shape preset corresponding to each elastic wave data. Based on the basic range and the default contact shape, in the implementation, step S140 may be implemented by step S141 and step S142:

step S141: confirming a corresponding default contact point shape according to the elastic wave data, and replacing the shape corresponding to the contact range with the default contact point shape;

step S142: and moving the default contact point shape according to the position data from the response moment so as to update the interaction result on the display screen.

The contact range refers to a contact surface between the writing pen and the display screen in the actual touch operation process, and because the writing habits of different users are different or the actions of the same user are changed in the writing process, the contact range is likely to be changed at any time. By the standardized replacement of the contact range, the handwriting thickness of the same writing pen can be unified. The default preset contact shapes, for example, the tips of different pens correspond to circles of different sizes, and the tip of the pen (for erasing) corresponds to a rectangle.

On the basis of the above embodiment, the present solution further includes step S140 and step S150, which are used to implement touch operation in an abnormal state of elastic wave detection.

Step S150: confirming the moment when the touch operation starts to obtain the elastic wave data, exceeding a second duration after the moment when the position data starts to be obtained, and ignoring the elastic wave data;

step S160: and responding to the touch operation according to the position data.

When the interactive tablet in the scheme is used for realizing touch operation, corresponding elastic wave data may not be detected all the time, or the elastic wave data cannot be accurately corresponding, or the elastic wave data does not correspond to a preset default contact shape, at the moment, response of the touch operation can be carried out according to a conventional processing mode, namely, which operation and corresponding display attribute belong to is judged according to the size of a contact position, and then response is carried out, so that realization of basic touch operation is ensured.

Receiving position data generated by the touch module and elastic wave data generated by the elastic wave sensor when the display screen detects touch operation; buffering the position data into a first buffer queue, and buffering the elastic wave data into a second buffer queue, wherein the first buffer queue and the second buffer queue are associated with each other; polling the first buffer queue and the second buffer queue, and confirming the response time of the data of the first buffer queue and the second buffer queue; and confirming the display attribute of the interaction result corresponding to the touch operation according to the elastic wave data, and updating the interaction result on the display screen according to the position data and the display attribute from the response moment. The position data and the elastic wave data are respectively stored through the two buffer queues, the moment when the two buffer queues confirm that the data simultaneously appear is used as the response moment, the response of the touch operation is carried out from the response moment, the situation that the corresponding position data and the elastic wave data guarantee the complete information of one touch operation in the response process is guaranteed, and accurate and consistent display effects before and after the interactive response of the same touch operation is kept through synchronous fusion from the response moment.

Fig. 6 is a schematic structural diagram of a touch response device according to an embodiment of the present invention. Referring to fig. 6, the touch response apparatus includes: a data receiving unit 210, a data buffering unit 220, a data polling unit 230, and an operation response unit 240.

The data receiving unit 210 is configured to receive position data generated by the touch module and elastic wave data generated by the elastic wave sensor when the display screen detects a touch operation; a data buffering unit 220, configured to buffer the position data into a first buffer queue and buffer the elastic wave data into a second buffer queue, where the first buffer queue and the second buffer queue are associated with each other; a data polling unit 230, configured to poll the first buffer queue and the second buffer queue, and confirm a response time when data occurs in the first buffer queue and the second buffer queue at the same time; an operation response unit 240, configured to determine a display attribute of an interaction result corresponding to the touch operation according to the elastic wave data, and update the interaction result on the display screen according to the position data and the display attribute from the response time.

On the basis of the above embodiment, the data polling unit 230 includes:

the time confirmation module is used for polling the first buffer queue and the second buffer queue, acquiring a first time when the first buffer queue starts to generate position data, and acquiring a second time when the second buffer queue starts to generate elastic wave data;

and the time sequence confirmation module is used for taking the later one of the first time and the second time as a response time.

On the basis of the above embodiment, the position data includes a contact range, and the display attribute includes a default contact shape preset corresponding to each elastic wave data;

the operation response unit 240 includes:

the contact confirmation module is used for confirming the corresponding default contact shape according to the elastic wave data and replacing the shape corresponding to the contact range with the default contact shape;

and the contact movement module is used for moving the default contact shape according to the position data from the response moment so as to update the interaction result on the display screen.

On the basis of the foregoing embodiment, the data caching unit 220 is specifically configured to:

and confirming that position data and elastic wave data begin to be generated within a first time period, buffering the position data into a first buffer queue, and buffering the elastic wave data into a second buffer queue.

On the basis of the above embodiment, the touch response apparatus further includes:

the data filtering unit is used for confirming the moment of detecting that the touch operation starts to obtain the elastic wave data, exceeding a second duration after the moment of obtaining the position data and neglecting the elastic wave data;

and the second response unit is used for responding to the touch operation according to the position data.

On the basis of the above embodiment, the display attributes further include a color and an operation type.

On the basis of the above embodiment, the operation types include an input operation and an erase operation.

On the basis of the above embodiment, the first buffer queue and the second buffer queue are both first-in first-out queues.

The touch response device provided by the embodiment of the invention is included in the electronic equipment of the equipment, can be used for executing any touch response method provided by the embodiment, and has corresponding functions and beneficial effects.

It should be noted that, in the embodiment of the touch response device, the units and modules included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.

Fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 7, the terminal device includes a processor 310, a memory 320, an input means 330, an output means 340, and a communication means 350; the number of the processors 310 in the terminal device may be one or more, and one processor 310 is taken as an example in fig. 7; the processor 310, the memory 320, the input device 330, the output device 340 and the communication device 350 in the terminal equipment may be connected by a bus or other means, and fig. 7 illustrates the connection by the bus as an example.

The memory 320 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the touch response method in the embodiment of the present invention (for example, the data receiving unit 210, the data caching unit 220, the data polling unit 230, and the operation response unit 240 in the touch response device). The processor 310 executes various functional applications and data processing of the terminal device by running software programs, instructions and modules stored in the memory 320, that is, the touch response method is implemented.

The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 320 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 320 may further include memory located remotely from processor 310, which may be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The input device 330 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal apparatus. The output device 340 may include a display device such as a display screen.

The terminal equipment comprises the touch response device, can be used for executing any touch response method, and has corresponding functions and beneficial effects.

Embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform operations related to the touch response method provided in any of the embodiments of the present application, and have corresponding functions and advantages.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product.

Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.

Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.

It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于深度学习和K-曲率法的指尖跟踪方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类