CN113204293B - Touch sensing processing method, touch sensing processing device, medium and electronic equipment - Google Patents
Touch sensing processing method, touch sensing processing device, medium and electronic equipment Download PDFInfo
- Publication number
- CN113204293B CN113204293B CN202110438102.1A CN202110438102A CN113204293B CN 113204293 B CN113204293 B CN 113204293B CN 202110438102 A CN202110438102 A CN 202110438102A CN 113204293 B CN113204293 B CN 113204293B
- Authority
- CN
- China
- Prior art keywords
- touch
- event
- points
- distance threshold
- point
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 22
- 238000012545 processing Methods 0.000 title claims abstract description 17
- 238000000034 method Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 4
- 210000003811 finger Anatomy 0.000 description 17
- 238000003825 pressing Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000007726 management method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000001939 inductive effect Effects 0.000 description 3
- 238000010295 mobile communication Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 229920001690 polydopamine Polymers 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 210000003813 thumb Anatomy 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/044—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
- G06F3/0418—Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
- G06F3/04186—Touch location disambiguation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/041—Indexing scheme relating to G06F3/041 - G06F3/045
- G06F2203/04104—Multi-touch detection in digitiser, i.e. details about the simultaneous detection of a plurality of touching locations, e.g. multiple fingers or pen and finger
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本公开提供一种触摸感应处理方法、触摸感应处理装置、计算机可读存储介质与电子设备,涉及计算机技术领域。所述触摸感应处理方法包括:根据历史触摸事件中的触摸点数量,确定距离阈值;获取当前触摸事件中各触摸点的位置;当检测所述当前触摸事件中的两个触摸点间的距离小于所述距离阈值时,将所述两个触摸点合并为一个触摸点。本公开能够有效准确的触摸点进行合点处理。
The present disclosure provides a touch sensing processing method, a touch sensing processing device, a computer-readable storage medium and an electronic device, and relates to the field of computer technology. The touch sensing processing method includes: determining a distance threshold based on the number of touch points in historical touch events; obtaining the position of each touch point in the current touch event; when detecting that the distance between two touch points in the current touch event is less than When the distance threshold is reached, the two touch points are merged into one touch point. The present disclosure enables effective and accurate touch point processing.
Description
技术领域Technical field
本公开涉及计算机技术领域,尤其涉及一种触摸感应处理方法、触摸感应处理装置、计算机可读存储介质与电子设备。The present disclosure relates to the field of computer technology, and in particular, to a touch sensing processing method, a touch sensing processing device, a computer-readable storage medium, and an electronic device.
背景技术Background technique
随着终端设备的快速发展与广泛使用,触摸屏作为连接用户与终端设备进行交互操作的重要介质,受到了广泛关注。触摸屏的基本原理是电容感应,当人体通过手指或者其他物体在触摸屏表面进行触控操作时,触摸屏能够通过感应数据的变化,识别出当前进行触控操作的手指或可触控对象的信息,例如个数和位置。特别的,随着用户对终端设备要求的逐渐提高,触摸屏可以同时识别出多个触摸点,以满足用户在多指触控操作应用场景中的需求。然而,这种情况下触摸屏可能会出现对触摸点的个数进行误识别的情况,例如用户使用一个手指进行操作时,被认为是两个触摸点等等,因此,需要对触摸点进行适当合并,以提高用户触控操作的准确性,以及用户的使用体验。With the rapid development and widespread use of terminal devices, touch screens, as an important medium for connecting users and terminal devices for interactive operations, have received widespread attention. The basic principle of the touch screen is capacitive sensing. When the human body performs a touch operation on the surface of the touch screen with fingers or other objects, the touch screen can identify the information of the finger or touchable object currently performing the touch operation through changes in sensing data, such as number and location. In particular, as users' requirements for terminal devices gradually increase, the touch screen can identify multiple touch points at the same time to meet the needs of users in multi-finger touch operation application scenarios. However, in this case, the touch screen may misrecognize the number of touch points. For example, when the user uses one finger to operate, it is considered to be two touch points, etc. Therefore, the touch points need to be appropriately merged. , to improve the accuracy of user touch operations and user experience.
发明内容Contents of the invention
本公开提供了一种触摸感应处理方法、触摸感应处理装置、计算机可读存储介质与电子设备,进而至少在一定程度上改善现有技术中不能对触摸点进行有效合并的情况。The present disclosure provides a touch sensing processing method, a touch sensing processing device, a computer-readable storage medium and an electronic device, thereby improving the inability to effectively merge touch points in the prior art at least to a certain extent.
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。Additional features and advantages of the disclosure will be apparent from the following detailed description, or, in part, may be learned by practice of the disclosure.
根据本公开的第一方面,提供一种触摸感应处理方法,包括:根据历史触摸事件中的触摸点数量,确定距离阈值;获取当前触摸事件中各触摸点的位置;当检测所述当前触摸事件中的两个触摸点间的距离小于所述距离阈值时,将所述两个触摸点合并为一个触摸点。According to a first aspect of the present disclosure, a touch sensing processing method is provided, including: determining a distance threshold based on the number of touch points in historical touch events; obtaining the position of each touch point in the current touch event; when detecting the current touch event When the distance between two touch points in is less than the distance threshold, the two touch points are merged into one touch point.
根据本公开的第二方面,提供一种触摸感应处理装置,包括:距离阈值确定模块,用于根据历史触摸事件中的触摸点数量,确定距离阈值;触摸点位置获取模块,用于获取当前触摸事件中各触摸点的位置;触摸点合并模块,用于当检测所述当前触摸事件中的两个触摸点间的距离小于所述距离阈值时,将所述两个触摸点合并为一个触摸点。According to a second aspect of the present disclosure, a touch sensing processing device is provided, including: a distance threshold determination module for determining a distance threshold based on the number of touch points in historical touch events; a touch point position acquisition module for acquiring the current touch The position of each touch point in the event; a touch point merging module, used to merge the two touch points into one touch point when it is detected that the distance between the two touch points in the current touch event is less than the distance threshold. .
根据本公开的第三方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面的触摸感应处理方法及其可能的实现方式。According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the touch sensing processing method of the first aspect and its possible implementation methods are implemented.
根据本公开的第四方面,提供一种电子设备,包括:处理器;存储器,用于存储所述处理器的可执行指令。其中,所述处理器配置为经由执行所述可执行指令,来执行上述第一方面的触摸感应处理方法及其可能的实现方式。According to a fourth aspect of the present disclosure, an electronic device is provided, including: a processor; and a memory for storing executable instructions of the processor. Wherein, the processor is configured to execute the touch sensing processing method and its possible implementations of the first aspect by executing the executable instructions.
本公开的技术方案具有以下有益效果:The technical solution of the present disclosure has the following beneficial effects:
根据历史触摸事件中的触摸点数量,确定距离阈值;获取当前触摸事件中各触摸点的位置;当检测当前触摸事件中的两个触摸点间的距离小于距离阈值时,将两个触摸点合并为一个触摸点。一方面,本示例性实施例可以根据当前触摸事件中各触摸点之间的距离与距离阈值的判断结果,确定是否需要对两个触摸点进行合并,以合理有效的方式,避免了由于触摸屏对触摸点数量的误识别,导致触摸操作异常的情况,改善用户体验;另一方面,距离阈值是根据历史触摸事件中的触摸点数量确定,具有可变性,当历史触摸事件中的触摸点数量发生变化时,可以确定出不同的距离阈值,即当前触摸事件中的两个触摸点间的距离是否满足触摸点的合并要求,并非是固定不变,能够根据实际应用中触摸操作的情况进行自适应调整,具有更高的灵活性,以及触摸点合并的可靠性和准确性。Determine the distance threshold based on the number of touch points in historical touch events; obtain the position of each touch point in the current touch event; when the distance between two touch points in the current touch event is detected to be less than the distance threshold, merge the two touch points for a touch point. On the one hand, this exemplary embodiment can determine whether two touch points need to be merged based on the judgment result of the distance between each touch point in the current touch event and the distance threshold, in a reasonable and effective manner, avoiding the need for the touch screen to Misidentification of the number of touch points leads to abnormal touch operations and improves user experience; on the other hand, the distance threshold is determined based on the number of touch points in historical touch events and has variability. When the number of touch points in historical touch events occurs When changing, different distance thresholds can be determined, that is, whether the distance between the two touch points in the current touch event meets the merging requirements of the touch points. It is not fixed and can be adapted according to the touch operations in actual applications. Adjustments for greater flexibility, reliability and accuracy of touch point merging.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and do not limit the present disclosure.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.
图1示出本示例性实施方式中一种电子设备的结构图;Figure 1 shows a structural diagram of an electronic device in this exemplary embodiment;
图2示出本示例性实施方式中一种触摸感应处理方法的流程图;Figure 2 shows a flow chart of a touch sensing processing method in this exemplary embodiment;
图3示出本示例性实施方式的一种触控事件处理方法中发送中断信号的系统结构;Figure 3 shows the system structure for sending interrupt signals in a touch event processing method in this exemplary embodiment;
图4示出本示例性实施方式中一种触摸感应处理方法的子流程图;Figure 4 shows a sub-flow chart of a touch sensing processing method in this exemplary embodiment;
图5示出本示例性实施方式中触摸区域的感应数据示意图;Figure 5 shows a schematic diagram of sensing data of the touch area in this exemplary embodiment;
图6示出本示例性实施方式中另一种触摸感应处理方法的子流程图;Figure 6 shows a sub-flow chart of another touch sensing processing method in this exemplary embodiment;
图7示出本示例性实施方式中另一种触摸感应处理方法的流程图;Figure 7 shows a flow chart of another touch sensing processing method in this exemplary embodiment;
图8示出本示例性实施方式中一种触摸感应处理装置的结构图。FIG. 8 shows a structural diagram of a touch sensing processing device in this exemplary embodiment.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concepts of the example embodiments. To those skilled in the art. The described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details being omitted, or other methods, components, devices, steps, etc. may be adopted. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the disclosure.
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and/or processor devices and/or microcontroller devices.
本公开的示例性实施方式提供一种用于实现触摸感应处理方法的电子设备,该电子设备至少包括处理器和存储器,存储器用于存储处理器的可执行指令,处理器配置为经由执行可执行指令来执行触摸感应处理方法。Exemplary embodiments of the present disclosure provide an electronic device for implementing a touch sensing processing method. The electronic device at least includes a processor and a memory. The memory is used to store executable instructions of the processor. The processor is configured to execute executable instructions via Instructions to perform touch sensing processing methods.
下面以图1中的移动终端100为例,对上述电子设备的构造进行示例性说明。本领域技术人员应当理解,除了特别用于移动目的的部件之外,图1中的构造也能够应用于固定类型的设备。The following takes the mobile terminal 100 in FIG. 1 as an example to illustrate the structure of the above electronic device. It will be understood by those skilled in the art that, in addition to components specifically intended for mobile purposes, the configuration in Figure 1 can also be applied to stationary type equipment.
如图1所示,移动终端100具体可以包括:处理器110、内部存储器121、外部存储器接口122、USB(Universal Serial Bus,通用串行总线)接口130、充电管理模块140、电源管理模块141、电池142、天线1、天线2、移动通信模块150、无线通信模块160、音频模块170、扬声器171、受话器172、麦克风173、耳机接口174、传感器模块180、显示屏幕190、摄像模组191、指示器192、马达193、按键194以及SIM(Subscriber Identification Module,用户标识模块)卡接口195等。As shown in Figure 1, the mobile terminal 100 may specifically include: a processor 110, an internal memory 121, an external memory interface 122, a USB (Universal Serial Bus, Universal Serial Bus) interface 130, a charging management module 140, a power management module 141, Battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 171, receiver 172, microphone 173, headphone interface 174, sensor module 180, display screen 190, camera module 191, instructions 192, motor 193, button 194, SIM (Subscriber Identification Module, user identification module) card interface 195, etc.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括AP(Application Processor,应用处理器)、调制解调处理器、GPU(Graphics ProcessingUnit,图形处理器)、ISP(Image Signal Processor,图像信号处理器)、控制器、编码器、解码器、DSP(Digital Signal Processor,数字信号处理器)、基带处理器和/或NPU(Neural-Network Processing Unit,神经网络处理器)等。编码器可以对图像或视频数据进行编码(即压缩);解码器可以对图像或视频的码流数据进行解码(即解压缩),以还原出图像或视频数据。The processor 110 may include one or more processing units. For example, the processor 110 may include an AP (Application Processor, application processor), a modem processor, a GPU (Graphics Processing Unit, a graphics processor), an ISP (Image Signal Processor). , image signal processor), controller, encoder, decoder, DSP (Digital Signal Processor, digital signal processor), baseband processor and/or NPU (Neural-Network Processing Unit, neural network processor), etc. The encoder can encode (i.e., compress) the image or video data; the decoder can decode (i.e., decompress) the code stream data of the image or video to restore the image or video data.
在一些实施方式中,处理器110可以包括一个或多个接口,通过不同的接口和移动终端100的其他部件形成连接。In some implementations, the processor 110 may include one or more interfaces to form connections with other components of the mobile terminal 100 through different interfaces.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括易失性存储器、非易失性存储器等。处理器110通过运行存储在内部存储器121的指令和/或存储在设置于处理器中的存储器的指令,执行移动终端100的各种功能应用以及数据处理。Internal memory 121 may be used to store computer executable program code, which includes instructions. The internal memory 121 may include volatile memory, nonvolatile memory, or the like. The processor 110 executes various functional applications and data processing of the mobile terminal 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
外部存储器接口122可以用于连接外部存储器,例如Micro SD卡,实现扩展移动终端100的存储能力。外部存储器通过外部存储器接口122与处理器110通信,实现数据存储功能,例如存储音乐,视频等文件。The external memory interface 122 can be used to connect an external memory, such as a Micro SD card, to expand the storage capacity of the mobile terminal 100 . The external memory communicates with the processor 110 through the external memory interface 122 to implement data storage functions, such as storing music, video and other files.
USB接口130是符合USB标准规范的接口,可以用于连接充电器为移动终端100充电,也可以连接耳机或其他电子设备。The USB interface 130 is an interface that complies with the USB standard specification and can be used to connect a charger to charge the mobile terminal 100, and can also be used to connect headphones or other electronic devices.
充电管理模块140用于从充电器接收充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为设备供电;电源管理模块141还可以监测电池的状态。The charging management module 140 is used to receive charging input from the charger. While charging the battery 142, the charging management module 140 can also provide power to the device through the power management module 141; the power management module 141 can also monitor the status of the battery.
移动终端100的无线通信功能可以通过天线1、天线2、移动通信模块150、无线通信模块160、调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。移动通信模块150可以提供应用在移动终端100上的包括2G/3G/4G/5G等无线通信的解决方案。无线通信模块160可以提供应用在移动终端100上的包括WLAN(Wireless LocalArea Networks,无线局域网)(如Wi-Fi(Wireless Fidelity,无线保真)网络)、BT(Bluetooth,蓝牙)、GNSS(Global Navigation Satellite System,全球导航卫星系统)、FM(Frequency Modulation,调频)、NFC(Near Field Communication,近距离无线通信技术)、IR(Infrared,红外技术)等无线通信解决方案。移动终端100可以通过GPU、显示屏幕190及AP等实现显示功能,显示用户界面。The wireless communication function of the mobile terminal 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor. Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the mobile terminal 100. The wireless communication module 160 can provide WLAN (Wireless Local Area Networks, wireless LAN) (such as Wi-Fi (Wireless Fidelity, wireless fidelity) network), BT (Bluetooth, Bluetooth), GNSS (Global Navigation) applied on the mobile terminal 100. Satellite System, global navigation satellite system), FM (Frequency Modulation, frequency modulation), NFC (Near Field Communication, short-range wireless communication technology), IR (Infrared, infrared technology) and other wireless communication solutions. The mobile terminal 100 can realize the display function and display the user interface through the GPU, the display screen 190 and the AP.
移动终端100可以通过ISP、摄像模组191、编码器、解码器、GPU、显示屏幕190及AP等实现拍摄功能,还可以通过音频模块170、扬声器171、受话器172、麦克风173、耳机接口174及AP等实现音频功能。The mobile terminal 100 can realize the shooting function through the ISP, camera module 191, encoder, decoder, GPU, display screen 190, AP, etc., and can also implement the shooting function through the audio module 170, speaker 171, receiver 172, microphone 173, headphone interface 174 and AP, etc. implement audio functions.
传感器模块180可以包括深度传感器1801、压力传感器1802、陀螺仪传感器1803、气压传感器1804等,以实现不同的感应检测功能。The sensor module 180 may include a depth sensor 1801, a pressure sensor 1802, a gyroscope sensor 1803, an air pressure sensor 1804, etc., to implement different sensing detection functions.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。马达193可以产生振动提示,也可以用于触摸振动反馈等。按键194包括开机键,音量键等。The indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc. The motor 193 can generate vibration prompts and can also be used for touch vibration feedback, etc. The buttons 194 include a power button, a volume button, etc.
移动终端100可以支持一个或多个SIM卡接口195,用于连接SIM卡,以实现通话以及数据通信等功能。The mobile terminal 100 may support one or more SIM card interfaces 195 for connecting SIM cards to implement functions such as calls and data communications.
本公开的示例性实施方式提供一种触摸感应处理方法,其可以应用于触控终端,该触控终端可以包括触摸屏或触摸板等触控器件。其中,触控终端可以包括但不限于智能手机、平板电脑、笔记本电脑、掌上电脑、个人数字助理(Personal Digital Assistant,PDA)、便携式媒体播放器(Protable Media Player,PMP)、电子阅读器、车载设备、导航装置、可穿戴设备等包含有触摸器件的设备。触摸元件设置于终端设备中,可以用于实现用户与终端设备的交互操作。本示例性实施例以触摸屏为例进行后续的解释说明。Exemplary embodiments of the present disclosure provide a touch sensing processing method, which can be applied to a touch terminal, which may include a touch device such as a touch screen or a touch pad. Among them, touch terminals may include but are not limited to smartphones, tablet computers, notebook computers, PDAs, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Protable Media Player, PMP), e-readers, vehicle-mounted Equipment, navigation devices, wearable devices and other devices containing touch devices. The touch element is provided in the terminal device and can be used to implement interactive operations between the user and the terminal device. This exemplary embodiment takes a touch screen as an example for subsequent explanation.
触摸屏又称为“触控屏”、“触控面板”,是一种可以用于接收用户输入信号的感应式液晶显示装置。根据触摸屏的工作原理和传输介质,可以将其分成多类,包括电阻式触摸屏、电容式触摸屏、红外线式触摸屏和表面声波触摸屏等;其中,电容式触摸屏是终端设备中应用最广的触摸屏种类之一。在本示例性实施例中,触摸屏可以为电容式触摸屏,它可以利用触摸屏的电容感应原理进行工作。The touch screen, also known as "touch screen" or "touch panel", is an inductive liquid crystal display device that can be used to receive user input signals. According to the working principle and transmission medium of touch screens, they can be divided into many categories, including resistive touch screens, capacitive touch screens, infrared touch screens and surface acoustic wave touch screens. Among them, capacitive touch screens are one of the most widely used types of touch screens in terminal equipment. one. In this exemplary embodiment, the touch screen may be a capacitive touch screen, which may work using the capacitive sensing principle of the touch screen.
图2示出了触摸感应处理方法的示例性流程,包括以下步骤S210至S230:Figure 2 shows an exemplary flow of the touch sensing processing method, including the following steps S210 to S230:
步骤S210,根据历史触摸事件中的触摸点数量,确定距离阈值。Step S210: Determine a distance threshold based on the number of touch points in historical touch events.
其中,触摸事件是指用户与触摸屏进行接触的操作事件,例如用户在触摸屏进行单击、按压、移动或长按等操作的事件,用户可以通过特定对象,例如手指、触控笔或其他可触控物体等,与触摸屏进行触摸事件,以实现相应的功能。触摸事件中通常可以包括多种信息,例如用户通过手指按压触摸屏时,其按压力度、按压所使用的手指个数、手指的按压区域、按压区域所产生的感应数据以及按压时间等等。Among them, a touch event refers to an operation event in which the user comes into contact with the touch screen, such as an event in which the user clicks, presses, moves, or long-presses on the touch screen. The user can use a specific object, such as a finger, stylus, or other touchable Control objects, etc., and perform touch events with the touch screen to implement corresponding functions. Touch events can usually include a variety of information, such as when the user presses the touch screen with his fingers, the pressing force, the number of fingers used for pressing, the pressing area of the fingers, the sensing data generated by the pressing area, and the pressing time, etc.
用户在触摸屏中进行触摸操作时,触摸屏可以持续对用户的触摸操作进行数据采集,历史触摸事件是指当前触摸事件之前的触摸事件,具体而言,可以是当前时刻对应的触摸事件之前任一时刻的触摸事件,例如用户在触摸屏进行了2秒的按压操作,当前触摸事件为第2秒对应的按压操作,则第1秒对应的按压操作可以为历史触摸事件,第1.5秒对应的按压操作也可以为历史触摸事件,具体时间粒度的划分可以更细致,本公开对此不做具体限定。除了按照时间维度确定历史触摸事件,还可以按照触摸屏对触摸操作的采集频率确定历史触摸事件,例如触摸屏周期性采集触摸事件,当前周期对应当前触摸事件,则上一周期对应历史触摸事件等等。When the user performs a touch operation on the touch screen, the touch screen can continue to collect data on the user's touch operation. Historical touch events refer to touch events before the current touch event. Specifically, they can be any time before the touch event corresponding to the current moment. Touch events, for example, the user performs a pressing operation on the touch screen for 2 seconds, and the current touch event is the pressing operation corresponding to the 2nd second, then the pressing operation corresponding to the 1st second can be a historical touch event, and the pressing operation corresponding to the 1.5th second can also be It can be a historical touch event, and the specific time granularity can be divided in more detail. This disclosure does not specifically limit this. In addition to determining historical touch events based on the time dimension, historical touch events can also be determined based on the touch screen's collection frequency of touch operations. For example, the touch screen periodically collects touch events. The current cycle corresponds to the current touch event, and the previous cycle corresponds to historical touch events, etc.
触摸点是指反映用户在触摸屏哪一位置或区域进行操作的点,其实,可以将触摸点视为系统能够接收到触摸操作的感应区域,例如用户使用两个手指进行操作时,触摸点可以是两个手指与触摸屏的接触点,触摸点数量通常为2。在实际应用中,由于用户进行按压操作时按压方式、力度、角度等参数的不同,也可能会出现一个手指出现两个感应区域的情况,例如用户使用大拇指的指腹平压在触摸屏上进行触摸操作时,由于指腹面积较大,也可能会被识别为两个或多个触摸点的情况,具体的,触摸屏可以根据实际接收到的感应区域的感应数据确定。The touch point refers to the point that reflects the position or area of the touch screen where the user operates. In fact, the touch point can be regarded as the sensing area where the system can receive touch operations. For example, when the user uses two fingers to operate, the touch point can be The contact points between two fingers and the touch screen, the number of touch points is usually 2. In actual applications, due to differences in parameters such as the pressing method, strength, and angle when the user performs pressing operations, there may be two sensing areas on one finger. For example, the user uses the pulp of his thumb to press flat on the touch screen. During a touch operation, due to the large area of the fingertips, it may also be recognized as two or more touch points. Specifically, the touch screen can determine based on the sensing data of the sensing area actually received.
距离阈值是指用于判断不同触摸点之间是否需要进行合并的判断标准,在本示例性实施例中,可以通过历史触摸事件,确定距离阈值。以在不同的应用场景中,自适应调整距离阈值,保证更有效的合点策略。The distance threshold refers to a criterion used to determine whether different touch points need to be merged. In this exemplary embodiment, the distance threshold can be determined through historical touch events. In different application scenarios, the distance threshold can be adaptively adjusted to ensure a more effective convergence strategy.
在本示例性实施例中,触摸屏可以具有其独立的存储器和处理器,当触摸屏接收到用户输入的触摸事件后,如图3所示,触摸屏310通常会通过特定引脚,例如INT引脚或I2C(Inter-Integrated Circuit,两线式串行总线)/SPI(Serial Peripheral Interface,串行外设接口),周期性的触发中断信号以使触控终端的处理器320来读取触摸事件,即本示例性实施例可以由触摸屏系统接收触摸事件,并上报给触控终端以进行信息处理过程。In this exemplary embodiment, the touch screen may have its own independent memory and processor. When the touch screen receives a touch event input by the user, as shown in FIG. 3 , the touch screen 310 usually passes a specific pin, such as an INT pin or I2C (Inter-Integrated Circuit, two-wire serial bus)/SPI (Serial Peripheral Interface, serial peripheral interface) periodically triggers interrupt signals to enable the processor 320 of the touch terminal to read touch events, that is, In this exemplary embodiment, the touch event can be received by the touch screen system and reported to the touch terminal for information processing.
步骤S220,获取当前触摸事件中各触摸点的位置。Step S220: Obtain the position of each touch point in the current touch event.
进一步的,本示例性实施例可以获取当前触摸事件中各触摸点的位置,考虑到触摸点实际上为能够表征当前发生触摸事件的感应区域的点,因此,可以先在感应区域中确定出触摸点,再获取触摸点的位置。触摸点的位置可以是触摸点在触摸屏上的坐标,或者在感应显示界面上的坐标位置,例如在由接收通道和发送通道构成的界面中的坐标等。在本示例性实施例中,触控终端可以直接从触摸屏系统读取触摸点的位置,也可以在触摸屏系统确定触摸点位置后返回给触控终端。Furthermore, this exemplary embodiment can obtain the position of each touch point in the current touch event. Considering that the touch point is actually a point that can characterize the sensing area where the touch event currently occurs, the touch can be determined in the sensing area first. Click, and then get the position of the touch point. The position of the touch point may be the coordinates of the touch point on the touch screen, or the coordinate position on the sensing display interface, such as the coordinates in an interface composed of a receiving channel and a transmitting channel. In this exemplary embodiment, the touch terminal can directly read the position of the touch point from the touch screen system, or can return it to the touch terminal after the touch screen system determines the position of the touch point.
在一示例性实施例中,如图4所示,上述触摸感应处理方法还可以包括以下步骤:In an exemplary embodiment, as shown in Figure 4, the above touch sensing processing method may further include the following steps:
步骤S410,获取当前触摸事件中的多个触摸区域;Step S410, obtain multiple touch areas in the current touch event;
步骤S420,在每个触摸区域中确定一个触摸点,并获取触摸点的位置。Step S420: Determine a touch point in each touch area and obtain the location of the touch point.
通常,用户在触摸屏进行操作时,触摸屏会根据触摸对象生成对应的感应区域,例如用户使用两个手指进行操作时,两个手指对应可以产生两个或者多个感应区域,感应区域中会包括感应数据,例如按压区域对应生成的感应电容值,不同位置的感应电容值不同,上述感应区域即为触摸区域。在本示例性实施例中,可以在每个触摸区域中确定一个触摸点,以对当前触摸区域进行表征。具体而言,每个触摸区域的触摸点可以通过多种方式确定,例如触摸点可以是感应区域中的任意一点,也可以是根据感应区域中各个点的感应数据计算出的某一点,还可以是感应区域中感应数据处于峰值的点等等,此外,每个触摸区域确定触摸点的方式可以相同也可以不同,本公开对此不做具体限定。Usually, when a user operates a touch screen, the touch screen will generate a corresponding sensing area according to the touch object. For example, when the user uses two fingers to operate, the two fingers can generate two or more sensing areas, and the sensing area will include a sensing area. Data, such as the sensing capacitance value generated corresponding to the pressed area. The sensing capacitance values at different locations are different. The above sensing area is the touch area. In this exemplary embodiment, a touch point may be determined in each touch area to characterize the current touch area. Specifically, the touch point of each touch area can be determined in a variety of ways. For example, the touch point can be any point in the sensing area, or it can be a certain point calculated based on the sensing data of each point in the sensing area, or it can It is the point in the sensing area where the sensing data is at a peak value, etc. In addition, the method of determining the touch point in each touch area may be the same or different, and this disclosure does not specifically limit this.
特别的,在一示例性实施例中,上述步骤S420中,在每个触摸区域中确定一个触摸点,可以包括:Specifically, in an exemplary embodiment, in the above step S420, determining a touch point in each touch area may include:
将每个触摸区域中感应信号值最高的点确定为触摸区域的触摸点。The point with the highest sensing signal value in each touch area is determined as the touch point of the touch area.
其中,感应信号值是指触摸屏接收到用户输入的触摸事件后,产生的感应数据,例如感应电容值,感应信号值最高的点即为感应电容值最高的点。举例说明,图5示出了触摸屏接收到用户输入的触摸事件后,触摸屏采集到不同感应点在发送通道和接收通道组成的列表中感应电容值的示意图,图5所示,触摸区域S以及触摸区域P中所包括的感应点具有不同的感应电容值,而其他区域的感应电容值基本为0,可以认为其他区域用户没有进行触摸操作,本示例性实施例可以将感应电容值最高的点,即将触摸区域S中感应电容值为50的点确定为触摸区域S的触摸点,将触摸区域P中感应电容值为50的点确定为触摸区域P的触摸点,需要说明的是,实际应用中,不同触摸区域中感应电容值的峰值可能不同,具体可以根据实际情况进行确定,图5仅为示意性说明。Among them, the sensing signal value refers to the sensing data generated after the touch screen receives the touch event input by the user, such as the sensing capacitance value. The point with the highest sensing signal value is the point with the highest sensing capacitance value. For example, Figure 5 shows a schematic diagram of the sensing capacitance values of different sensing points in a list composed of sending channels and receiving channels collected by the touch screen after the touch screen receives a touch event input by the user. As shown in Figure 5, the touch area S and the touch The sensing points included in area P have different sensing capacitance values, while the sensing capacitance values in other areas are basically 0. It can be considered that users in other areas have not performed touch operations. In this exemplary embodiment, the point with the highest sensing capacitance value can be That is, the point in the touch area S with an inductive capacitance value of 50 is determined as the touch point of the touch area S, and the point in the touch area P with an inductive capacitance value of 50 is determined as the touch point of the touch area P. It should be noted that in practical applications , the peak values of the sensing capacitance values in different touch areas may be different, and the details can be determined according to the actual situation. Figure 5 is only a schematic illustration.
步骤S230,当检测当前触摸事件中的两个触摸点间的距离小于距离阈值时,将两个触摸点合并为一个触摸点。Step S230: When it is detected that the distance between two touch points in the current touch event is less than the distance threshold, the two touch points are merged into one touch point.
本示例性实施例可以通过对两个触摸点之间的距离与距离阈值进行比较,以确定是否将两个触摸点进行合并,换而言之,也可以认为根据两个触摸点之间的距离,确定是否将两个触摸点对应的触摸区域进行合并,使得触控终端认为当前是一个触摸区域,例如当用户使用大拇指指腹进行按压操作时,检测出两个触摸点,但实际上用户仅需要进行单指触控,此时,基于上述触摸点合并的判断流程,若满足合并要求,则可以将两个触摸点合并为一个触摸点,以保证触控终端当前对用户的单指操作进行准确识别。This exemplary embodiment can determine whether to merge the two touch points by comparing the distance between the two touch points with a distance threshold. In other words, it can also be considered that based on the distance between the two touch points , determine whether to merge the touch areas corresponding to the two touch points, so that the touch terminal thinks that the current area is one touch area. For example, when the user uses the thumb pad to perform a pressing operation, two touch points are detected, but in fact the user Only single-finger touch is required. At this time, based on the above-mentioned judgment process of touch point merging, if the merging requirements are met, the two touch points can be merged into one touch point to ensure the current single-finger operation of the touch terminal for the user. for accurate identification.
具体的,将两个触摸区域合并为一个触摸区域后,该触摸区域对应的触摸点可以通过多种方式确定,例如可以采用为合并之前其中一个触摸点作为合并后的触摸点,也可以采用合并之前两个触摸点进行计算,确定合并后的触摸点等等,本公开对此不做具体限定。Specifically, after merging two touch areas into one touch area, the touch point corresponding to the touch area can be determined in a variety of ways. For example, one of the touch points before merging can be used as the touch point after merging, or merging can be used. The previous two touch points are calculated to determine the merged touch point, etc. This disclosure does not specifically limit this.
另外,在本示例性实施例中,当前触摸事件中的两个触摸点间的距离可以通过以下方式确定,先获取两个触摸点在第一轴向方向上的第一距离,以及在第二轴向方向上的第二距离,其中,第一轴向方向与第二轴向方向垂直,例如第一轴向方向可以是水平方向,第二轴向方向可以是竖直方向,进一步,根据第一距离与第二距离基于勾股定理进行计算,以确定出,两个触摸点的直线路径距离。此外,其他能够计算两个触摸点见的距离的方式也应当属于本公开的保护范围之内。In addition, in this exemplary embodiment, the distance between the two touch points in the current touch event can be determined by first obtaining the first distance between the two touch points in the first axial direction, and in the second The second distance in the axial direction, wherein the first axial direction is perpendicular to the second axial direction, for example, the first axial direction may be a horizontal direction, and the second axial direction may be a vertical direction, further, according to the second axial direction The first distance and the second distance are calculated based on the Pythagorean theorem to determine the straight-line path distance between the two touch points. In addition, other methods capable of calculating the distance between two touch points should also fall within the scope of the present disclosure.
在一示例性实施例中,上述步骤S230,可以包括以下步骤:In an exemplary embodiment, the above step S230 may include the following steps:
当检测当前触摸事件中的多个触摸点中任意两个触摸点间的距离均小于距离阈值时,将多个触摸点合并为一个触摸点。When the distance between any two touch points among the multiple touch points in the current touch event is detected to be less than the distance threshold, the multiple touch points are merged into one touch point.
在实际应用中,可能会出现检测到多个触摸点的情况,是否确定将多个触摸点进行合并,确定一个触摸点,本示例性实施例中,可以对多个触摸点进行两两触摸点的距离判断,当任意两个触摸点之间的距离均小于距离阈值时,说明当前多个触摸点距离很近,大概率属于误判确定出的多个触摸点,因此,可以将其合并为一个触摸点。In practical applications, multiple touch points may be detected. Whether to determine whether to merge multiple touch points to determine one touch point. In this exemplary embodiment, multiple touch points can be touched in pairs. distance judgment. When the distance between any two touch points is less than the distance threshold, it means that the current multiple touch points are very close. There is a high probability that they are multiple touch points determined by misjudgment. Therefore, they can be merged into A touch point.
综上,本示例性实施方式中,根据历史触摸事件中的触摸点数量,确定距离阈值;获取当前触摸事件中各触摸点的位置;当检测当前触摸事件中的两个触摸点间的距离小于距离阈值时,将两个触摸点合并为一个触摸点。一方面,本示例性实施例可以根据当前触摸事件中各触摸点之间的距离与距离阈值的判断结果,确定是否需要对两个触摸点进行合并,以合理有效的方式,避免了由于触摸屏对触摸点数量的误识别,导致触摸操作异常的情况,改善用户体验;另一方面,距离阈值是根据历史触摸事件中的触摸点数量确定,具有可变性,当历史触摸事件中的触摸点数量发生变化时,可以确定出不同的距离阈值,即当前触摸事件中的两个触摸点间的距离是否满足触摸点的合并要求,并非是固定不变,能够根据实际应用中触摸操作的情况进行自适应调整,具有更高的灵活性,以及触摸点合并的可靠性和准确性。To sum up, in this exemplary embodiment, the distance threshold is determined based on the number of touch points in the historical touch event; the position of each touch point in the current touch event is obtained; when it is detected that the distance between two touch points in the current touch event is less than When the distance threshold is reached, two touch points are merged into one touch point. On the one hand, this exemplary embodiment can determine whether two touch points need to be merged based on the judgment result of the distance between each touch point in the current touch event and the distance threshold, in a reasonable and effective manner, avoiding the need for the touch screen to Misidentification of the number of touch points leads to abnormal touch operations and improves user experience; on the other hand, the distance threshold is determined based on the number of touch points in historical touch events and has variability. When the number of touch points in historical touch events occurs When changing, different distance thresholds can be determined, that is, whether the distance between the two touch points in the current touch event meets the merging requirements of the touch points. It is not fixed and can be adapted according to the touch operations in actual applications. Adjustments for greater flexibility, reliability and accuracy of touch point merging.
在一示例性实施例中,上述步骤S210,可以包括:In an exemplary embodiment, the above step S210 may include:
当历史触摸事件中的触摸点数量小于预设数量阈值时,将距离阈值确定为第一距离阈值;When the number of touch points in the historical touch event is less than the preset number threshold, determine the distance threshold as the first distance threshold;
当历史触摸事件中的触摸点数量大于或等于预设数量阈值时,将距离阈值确定为第二距离阈值;When the number of touch points in the historical touch event is greater than or equal to the preset number threshold, determine the distance threshold as the second distance threshold;
其中,第一距离阈值小于第二距离阈值。Wherein, the first distance threshold is smaller than the second distance threshold.
本示例性实施例可以预先设定以预设数量阈值,用于判断历史触摸事件中的触摸点数量是否过多,以确定当前触摸点采用哪一距离阈值,进行是否合点判断。该预设数量阈值可以根据实际需要或应用场景的需要进行自定义设置,例如如果在一些社交应用程序内,很少涉及需要用户进行三个以上手指进行触摸操作的场景,因此,可以设置预设数量阈值为3,在游戏应用程序内,可能会涉及用户进行多个手指进行触摸操作的场景,可以设置预设数量阈值为4等等,本公开对此不做具体限定。In this exemplary embodiment, a preset quantity threshold can be set in advance to determine whether the number of touch points in historical touch events is too many, to determine which distance threshold to use for the current touch point, and to determine whether the touch points are aligned. This preset number threshold can be customized according to actual needs or application scenarios. For example, in some social applications, there are few scenarios that require users to perform touch operations with more than three fingers. Therefore, a preset can be set. The quantity threshold is 3. In a game application, a scenario may involve the user performing touch operations with multiple fingers. The preset quantity threshold can be set to 4 and so on. This disclosure does not specifically limit this.
当历史触摸事件中的触摸点数量大于预设数量阈值时,认为可能出现触摸点数量识别有误的情况,例如设置预设数量阈值为4时,确定触摸点数量为4时,可能是用户使用四个手指进行操作,也可能是用户使用三个手指进行操作被误识别为四个触摸点等,此时,更倾向于将触摸点进行合点处理,因此,可以确定较大的第二距离阈值;而当历史触摸事件中的触摸点数量小于预设数量阈值时,认为当前触摸点数量的识别结果准确率较高,因此,可以设置较小的第一距离阈值,即当用户使用的手指之间的很近的时,才会考虑对其进行合并。其中,第一距离阈值和第二距离阈值可以根据实际需要进行自定义设置,例如第一距离阈值可以为5mm(毫米)或10个像素单位,第二距离阈值可以是10mm或者20个像素单位等,本公开对此不做具体限定。基于此,本示例性实施例可以实现,对不同的应用场景,针对性且灵活的设置不同的距离阈值,以确定是否对触摸点进行合点。When the number of touch points in historical touch events is greater than the preset number threshold, it is considered that the number of touch points may be incorrectly recognized. For example, when the preset number threshold is set to 4, when the number of touch points is determined to be 4, it may be that the user has used Four fingers are used to operate, or it may be that the user uses three fingers to operate and is mistakenly recognized as four touch points, etc. At this time, the touch points are more likely to be combined, so a larger second distance threshold can be determined. ; When the number of touch points in historical touch events is less than the preset number threshold, the recognition result of the current number of touch points is considered to be more accurate. Therefore, a smaller first distance threshold can be set, that is, when the user uses a finger between Only when they are very close will they be considered for merging. Among them, the first distance threshold and the second distance threshold can be customized according to actual needs. For example, the first distance threshold can be 5mm (millimeters) or 10 pixel units, and the second distance threshold can be 10mm or 20 pixel units, etc. , this disclosure does not specifically limit this. Based on this, this exemplary embodiment can realize that for different application scenarios, different distance thresholds can be set in a targeted and flexible manner to determine whether to converge the touch points.
在一示例性实施例中,如图6所示,历史触摸事件包括上一次触摸事件,上述触摸感应处理方法可以包括以下步骤:In an exemplary embodiment, as shown in Figure 6, historical touch events include the last touch event, and the above touch sensing processing method may include the following steps:
步骤S610,通过预设变量记录上一次触摸事件的触摸点数量;Step S610, record the number of touch points of the last touch event through a preset variable;
步骤S620,在当前触摸事件结束时,根据当前触摸事件中的触摸点数量更新预设变量。Step S620: When the current touch event ends, update the preset variable according to the number of touch points in the current touch event.
本示例性实施例可以设置一预设变量,用于对上一次触摸事件的触摸点数量其进行统计,例如预设变量Mlast。该预设变量可以跟随触摸事件时间属性的变化进行更新,例如假如用户进行了2秒或以上时间的按压操作,第1秒时触摸事件对应的触摸点数量为3,第2秒时触摸事件对应的触摸点数量为2,则当第2秒触摸事件为当前触摸事件时,预设变量Mlast=3,当第2秒触摸事件结束进入下一当前触摸事件,第2秒触摸事件变成历史触摸事件时,预设变量Mlast将被更新为2。This exemplary embodiment may set a preset variable for counting the number of touch points of the last touch event, such as the preset variable Mlast. This preset variable can be updated following changes in the time attributes of the touch event. For example, if the user performs a pressing operation for 2 seconds or more, the number of touch points corresponding to the touch event at the first second is 3, and the number of touch points corresponding to the touch event at the second second is The number of touch points is 2, then when the second second touch event is the current touch event, the default variable Mlast=3, when the second second second touch event ends and enters the next current touch event, the second second second touch event becomes a historical touch event, the default variable Mlast will be updated to 2.
特别的,在一示例性实施例中,上述触摸感应处理方法还可以包括以下步骤:In particular, in an exemplary embodiment, the above touch sensing processing method may further include the following steps:
当当前触摸事件为抬起事件时,将预设变量置为0。When the current touch event is a lift event, the preset variable is set to 0.
如果当前触摸事件为抬起事件,例如用户进行按压操作后抬起,当前触摸事件对应用户进行抬起的操作,则认为无需对触摸事件的触摸点进行是否合点的判断,因为,可以将预设变量置为0,以便于下次进行预设变量的更新。If the current touch event is a lift event, for example, the user presses and then lifts, and the current touch event corresponds to the user's lift operation, it is considered that there is no need to judge whether the touch point of the touch event is in contact, because the preset can be The variable is set to 0 to facilitate the next update of the preset variable.
图7示出了本示例性实施例中另一种触控感应处理方法的流程图,具体可以包括以下步骤:Figure 7 shows a flow chart of another touch sensing processing method in this exemplary embodiment, which may specifically include the following steps:
步骤S702,获取当前触摸事件;Step S702, obtain the current touch event;
步骤S704,判断当前触摸事件是否为抬起事件;Step S704, determine whether the current touch event is a lift event;
步骤S706,如果当前触摸事件是抬起事件,则将预设变量置为0;Step S706, if the current touch event is a lift event, set the preset variable to 0;
步骤S708,如果当前触摸事件不是抬起事件,则通过预设变量记录上一次触摸事件的触摸点数量;Step S708, if the current touch event is not a lift event, record the number of touch points of the last touch event through a preset variable;
步骤S710,判断上一次触摸事件中的触摸点数量是否小于预设数量阈值;Step S710, determine whether the number of touch points in the last touch event is less than a preset number threshold;
步骤S712,如果上一次触摸事件中的触摸点数量小于预设数量阈值,则将距离阈值确定为第一距离阈值;Step S712, if the number of touch points in the last touch event is less than the preset number threshold, determine the distance threshold as the first distance threshold;
步骤S714,如果上一次触摸事件中的触摸点数量大于或等于预设数量阈值,则将距离阈值确定为第二距离阈值;Step S714, if the number of touch points in the last touch event is greater than or equal to the preset number threshold, determine the distance threshold as the second distance threshold;
步骤S716,确定当前触摸事件中的多个触摸区域,并将每个触摸区域中感应信号值最高的点确定为触摸区域的触摸点,并获取触摸点的位置;Step S716, determine multiple touch areas in the current touch event, determine the point with the highest sensing signal value in each touch area as the touch point of the touch area, and obtain the position of the touch point;
步骤S718,检测当前触摸事件中的两个触摸点间的距离是否小于距离阈值;Step S718, detect whether the distance between the two touch points in the current touch event is less than the distance threshold;
步骤S720,如果当前触摸事件中的两个触摸点间的距离小于距离阈值,则将两个触摸点合并为一个触摸点;Step S720, if the distance between the two touch points in the current touch event is less than the distance threshold, merge the two touch points into one touch point;
步骤S722,如果当前触摸事件中的两个触摸点间的距离大于距离阈值,则不进行合点处理。Step S722: If the distance between the two touch points in the current touch event is greater than the distance threshold, no point processing is performed.
本公开的示例性实施方式还提供一种触摸感应处理装置。如图8所示,该触摸感应处理装置800可以包括:距离阈值确定模块810,用于根据历史触摸事件中的触摸点数量,确定距离阈值;触摸点位置获取模块820,用于获取当前触摸事件中各触摸点的位置;触摸点合并模块830,用于当检测当前触摸事件中的两个触摸点间的距离小于距离阈值时,将两个触摸点合并为一个触摸点。Exemplary embodiments of the present disclosure also provide a touch sensing processing device. As shown in Figure 8, the touch sensing processing device 800 may include: a distance threshold determination module 810, used to determine the distance threshold according to the number of touch points in historical touch events; a touch point position acquisition module 820, used to acquire the current touch event The touch point merging module 830 is configured to merge the two touch points into one touch point when the distance between the two touch points in the current touch event is detected to be less than the distance threshold.
在一示例性实施例中,距离阈值确定模块包括:第一距离确定单元,用于当历史触摸事件中的触摸点数量小于预设数量阈值时,将距离阈值确定为第一距离阈值;当历史触摸事件中的触摸点数量大于或等于预设数量阈值时,将距离阈值确定为第二距离阈值;其中,第一距离阈值小于第二距离阈值。In an exemplary embodiment, the distance threshold determination module includes: a first distance determination unit, configured to determine the distance threshold as the first distance threshold when the number of touch points in the historical touch event is less than a preset quantity threshold; When the number of touch points in the touch event is greater than or equal to the preset quantity threshold, the distance threshold is determined as the second distance threshold; wherein the first distance threshold is smaller than the second distance threshold.
在一示例性实施例中,历史触摸事件包括上一次触摸事件;触摸感应处理装置还包括:触摸点数量记录模块,用于通过预设变量记录上一次触摸事件的触摸点数量;预设变量更新模块,用于在当前触摸事件结束时,根据当前触摸事件中的触摸点数量更新预设变量。In an exemplary embodiment, historical touch events include the last touch event; the touch sensing processing device further includes: a touch point number recording module, configured to record the number of touch points of the last touch event through a preset variable; and update the preset variable Module used to update preset variables based on the number of touch points in the current touch event when the current touch event ends.
在一示例性实施例中,触摸感应处理装置还包括:置零模块,用于当当前触摸事件为抬起事件时,将预设变量置为0。In an exemplary embodiment, the touch sensing processing device further includes: a zero setting module, configured to set the preset variable to 0 when the current touch event is a lift event.
在一示例性实施例中,触摸点位置获取模块,包括:触摸区域获取单元,用于获取当前触摸事件中的多个触摸区域;触摸点位置获取单元,用于在每个触摸区域中确定一个触摸点,并获取触摸点的位置。In an exemplary embodiment, the touch point position acquisition module includes: a touch area acquisition unit, used to acquire multiple touch areas in the current touch event; a touch point position acquisition unit, used to determine a touch area in each touch area. Touch the point and get the location of the touch point.
在一示例性实施例中,触摸点位置获取单元,用于将每个触摸区域中感应信号值最高的点确定为触摸区域的触摸点,并获取触摸点的位置。In an exemplary embodiment, the touch point position acquisition unit is configured to determine the point with the highest sensing signal value in each touch area as the touch point of the touch area, and acquire the position of the touch point.
在一示例性实施例中,触摸点合并模块包括:当检测当前触摸事件中的多个触摸点中任意两个触摸点间的距离均小于距离阈值时,将多个触摸点合并为一个触摸点。In an exemplary embodiment, the touch point merging module includes: when it is detected that the distance between any two touch points among the multiple touch points in the current touch event is less than a distance threshold, merging the multiple touch points into one touch point. .
上述装置中各部分的具体细节在方法部分实施方式中已经详细说明,因而不再赘述。The specific details of each part of the above-mentioned device have been described in detail in the method implementation, and will not be described again.
本公开的示例性实施方式还提供了一种计算机可读存储介质,可以实现为程序产品的形式,包括程序代码,当程序产品在终端设备上运行时,程序代码用于使终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤,例如可以执行图2、图4图6或图7中任意一个或多个步骤。该程序产品可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本公开的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which can be implemented in the form of a program product, including program code. When the program product is run on a terminal device, the program code is used to cause the terminal device to execute this specification. The steps described in the above "Exemplary Method" section according to various exemplary embodiments of the present disclosure may, for example, perform any one or more steps in FIG. 2, FIG. 4, FIG. 6, or FIG. 7. The program product may take the form of a portable compact disk read-only memory (CD-ROM) and include the program code, and may be run on a terminal device such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The Program Product may take the form of one or more readable media in any combination. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory, read only memory (ROM), erasable programmable Read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium that can send, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., as well as conventional procedural programming. Language—such as "C" or a similar programming language. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server execute on. In situations involving remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device, such as provided by an Internet service. (business comes via Internet connection).
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施方式。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施方式仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Those skilled in the art will understand that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be embodied in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which may be collectively referred to herein as "Circuit", "Module" or "System". Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the disclosure that follow the general principles of the disclosure and include common common sense or customary technical means in the technical field that are not disclosed in the disclosure. . It is intended that the specification and embodiments be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限定。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the disclosure is limited only by the appended claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110438102.1A CN113204293B (en) | 2021-04-22 | 2021-04-22 | Touch sensing processing method, touch sensing processing device, medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110438102.1A CN113204293B (en) | 2021-04-22 | 2021-04-22 | Touch sensing processing method, touch sensing processing device, medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113204293A CN113204293A (en) | 2021-08-03 |
CN113204293B true CN113204293B (en) | 2023-09-08 |
Family
ID=77027941
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110438102.1A Active CN113204293B (en) | 2021-04-22 | 2021-04-22 | Touch sensing processing method, touch sensing processing device, medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113204293B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115033165B (en) * | 2022-06-29 | 2024-12-03 | Oppo广东移动通信有限公司 | Touch event processing method and device, storage medium and electronic equipment |
CN115808990B (en) * | 2022-12-19 | 2025-05-23 | 深圳市鸿合创新信息技术有限责任公司 | Touch detection method, touch detection device, electronic equipment and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101604220A (en) * | 2009-07-20 | 2009-12-16 | 华硕电脑股份有限公司 | Resistance type touch panel and detection method of contact point form thereof |
CN102681738A (en) * | 2012-05-04 | 2012-09-19 | 敦泰科技有限公司 | Multi-point touch identifying method and touch device for mutual capacitance type touch equipment |
CN103955334A (en) * | 2014-04-02 | 2014-07-30 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN106484194A (en) * | 2015-08-26 | 2017-03-08 | 上海精研电子科技有限公司 | A kind of infrared touch panel multipoint positioning method |
CN108196708A (en) * | 2017-12-19 | 2018-06-22 | 迈巨(深圳)科技有限公司 | A kind of touch point anti-loss method, electronic equipment and storage medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100141607A1 (en) * | 2008-12-04 | 2010-06-10 | Electronics And Telecommunications Research Institute | Apparatus and method for recognizing multi touch point |
TWI503730B (en) * | 2009-07-20 | 2015-10-11 | Asustek Comp Inc | Resistive touch panel and method of detecting type of touch point on resistive touch panel |
US9158401B2 (en) * | 2010-07-01 | 2015-10-13 | Flatfrog Laboratories Ab | Data processing in relation to a multi-touch sensing apparatus |
TW201333787A (en) * | 2011-10-11 | 2013-08-16 | Flatfrog Lab Ab | Improved multi-touch detection in a touch system |
JP5979916B2 (en) * | 2012-03-07 | 2016-08-31 | キヤノン株式会社 | Information processing apparatus and control method thereof |
TWI610211B (en) * | 2014-02-07 | 2018-01-01 | 財團法人工業技術研究院 | Touching device, processor and touching signal accessing method thereof |
US9406025B2 (en) * | 2014-06-04 | 2016-08-02 | International Business Machines Corporation | Touch prediction for visual displays |
CN105892877A (en) * | 2015-10-23 | 2016-08-24 | 乐卡汽车智能科技(北京)有限公司 | Multi-finger closing/opening gesture recognition method and device as well as terminal equipment |
US10895927B2 (en) * | 2019-01-23 | 2021-01-19 | Novatek Microelectronics Corp. | Touch display device |
-
2021
- 2021-04-22 CN CN202110438102.1A patent/CN113204293B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101604220A (en) * | 2009-07-20 | 2009-12-16 | 华硕电脑股份有限公司 | Resistance type touch panel and detection method of contact point form thereof |
CN102681738A (en) * | 2012-05-04 | 2012-09-19 | 敦泰科技有限公司 | Multi-point touch identifying method and touch device for mutual capacitance type touch equipment |
CN103955334A (en) * | 2014-04-02 | 2014-07-30 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN106484194A (en) * | 2015-08-26 | 2017-03-08 | 上海精研电子科技有限公司 | A kind of infrared touch panel multipoint positioning method |
CN108196708A (en) * | 2017-12-19 | 2018-06-22 | 迈巨(深圳)科技有限公司 | A kind of touch point anti-loss method, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113204293A (en) | 2021-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109828688B (en) | Screen damage processing method, mobile terminal and computer readable storage medium | |
CN111106821B (en) | Touch control method and wearable device | |
EP3133473A1 (en) | Method of sensing pressure by touch sensor and electronic device adapted thereto | |
CN108701043A (en) | A display processing method and device | |
US10747357B2 (en) | Coordinate measuring apparatus for measuring input position of a touch and a coordinate indicating apparatus and driving method thereof | |
EP2869253A1 (en) | Method for operating message application and electronic device implementing the same | |
EP2899614A1 (en) | Method for obtaining touch input in electronic device combining self and mutual capacitance measurements | |
KR20140070150A (en) | Electronic apparatus providing hovering input effect and control method thereof | |
KR20140079012A (en) | Mobile apparatus having function of face recognition with additional component | |
CN113204293B (en) | Touch sensing processing method, touch sensing processing device, medium and electronic equipment | |
CN108287655A (en) | A kind of interface display method, interface display apparatus and mobile terminal | |
CN110837343A (en) | Snapshot processing method and device and terminal | |
CN111078108A (en) | Screen display method and device, storage medium and mobile terminal | |
CN110475020A (en) | Apparatus control method and Related product | |
CN109495573A (en) | Data transmission method, device, storage medium and terminal | |
WO2020135010A1 (en) | Method and device for processing hosted application, and computer readable storage medium | |
CN104915625B (en) | A method and device for face recognition | |
US10114496B2 (en) | Apparatus for measuring coordinates and control method thereof | |
JP6742385B2 (en) | Electronic device for measuring water content using display and method of operating electronic device | |
CN111522613B (en) | Screen capturing method and electronic equipment | |
US20140348334A1 (en) | Portable terminal and method for detecting earphone connection | |
CN107943406B (en) | A method and terminal for determining a touch point on a touch screen | |
KR102106354B1 (en) | Method and apparatus for controlling operation in a electronic device | |
CN108803961A (en) | Data processing method, device and mobile terminal | |
KR20200133945A (en) | Electronic device for fast scrolling of pages and method for the same |
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 |