WO2021081738A1 - 滑动信号的识别方法、mcu、触控设备及存储介质 - Google Patents

滑动信号的识别方法、mcu、触控设备及存储介质 Download PDF

Info

Publication number
WO2021081738A1
WO2021081738A1 PCT/CN2019/113929 CN2019113929W WO2021081738A1 WO 2021081738 A1 WO2021081738 A1 WO 2021081738A1 CN 2019113929 W CN2019113929 W CN 2019113929W WO 2021081738 A1 WO2021081738 A1 WO 2021081738A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
touch
sliding window
sliding
pressing position
Prior art date
Application number
PCT/CN2019/113929
Other languages
English (en)
French (fr)
Inventor
朱明�
李庆斌
周伟
Original Assignee
深圳市汇顶科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to CN201980002442.0A priority Critical patent/CN110945464B/zh
Priority to PCT/CN2019/113929 priority patent/WO2021081738A1/zh
Publication of WO2021081738A1 publication Critical patent/WO2021081738A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0414Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means using force sensing means to determine a position

Definitions

  • This application relates to the field of touch technology, and in particular to a method for identifying a sliding signal, an MCU, a touch device and a storage medium.
  • Touch devices are frequently used in people's daily lives, such as gas stoves, touch lights, etc. These touch devices include: Microcontroller Unit (MCU), in which a touch sensor controller is integrated on the MCU, and there is a channel between the touch sensor controller and the touch screen or touch buttons on the touch panel. The direction of the sliding signal for the touch device is determined according to the signal collected by the channel.
  • MCU Microcontroller Unit
  • the general method of judging the sliding direction is to record the position of the user's initial contact and the position when the user leaves, and then subtract the value corresponding to the position of the initial contact from the value corresponding to the position when the user leaves, according to the positive difference. Negative to determine the direction of the slide.
  • the above method only records the position changes when the user first touches and leaves. If the user slides in the opposite direction during the middle process, the state information of the middle slide will be lost, and the user's action behavior cannot be accurately described.
  • the circular touch sensor is connected end to end, when the finger slides from the tail to the head position, the above method cannot correctly determine the sliding direction.
  • the present application provides a method for identifying a sliding signal, an MCU, a touch device, and a storage medium, which can accurately identify the user's sliding operation direction for the sensor, and improve the recognition accuracy of the touch sensor.
  • an embodiment of the present application provides a method for identifying a sliding signal, which is applied to a micro-control unit MCU.
  • the MCU is integrated with a touch sensor controller.
  • the touch sensor controller communicates with N channels through N channels.
  • the touch button is connected to collect the touch signals of N touch buttons; wherein the N touch buttons are arranged in a ring structure, and N is an integer greater than 1; the method includes:
  • the first value corresponding to the last pressed position is a valid value, acquiring the second value corresponding to the current pressed position, where the last pressed position and the current pressed position correspond to at least one of the N touch buttons;
  • the method before obtaining the second value corresponding to the current pressing position, the method further includes:
  • the numerical values corresponding to the respective areas on the ring structure arranged by the N touch keys are constructed; wherein, the numerical values corresponding to the areas in different positions are different.
  • the method before obtaining the second value corresponding to the current pressing position, the method further includes:
  • the first value is an invalid flag value, it is determined that the first value is an invalid value; wherein, when the amount of electrical signal transformation generated by the pressing position is less than a preset threshold value, the first value is set as an invalid flag value ;
  • the first value is not an invalid flag value, it is determined that the first value is a valid value.
  • the method before determining the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window, the method further includes:
  • a first sliding window and a second sliding window are determined on the ring structure; wherein, the first sliding window is located on the right side of the last pressing position; the second sliding window Located on the left side of the last pressed position;
  • the determining the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window includes:
  • it also includes:
  • the obtaining the second value corresponding to the current pressing position includes:
  • the pressing position is converted into the second numerical value.
  • determining the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window includes:
  • a first out-of-bounds sliding window and a second out-of-bounds sliding window are determined on the ring structure; wherein the first out-of-bounds sliding window is located on the right side of the last pressing position; the first 2. The out-of-bounds sliding window is located on the left side of the last pressed position;
  • an embodiment of the present application provides an MCU, the MCU is integrated with a touch sensor controller, and the touch sensor controller is connected to N touch buttons through N channels to collect N touch buttons The touch signal; wherein the N touch buttons are arranged in a ring structure, and N is an integer greater than 1; the MCU includes:
  • the acquisition module is used to obtain the second value corresponding to the current pressing position when the first value corresponding to the last pressing position is a valid value, wherein the last pressing position and the current pressing position correspond to the N touch keys At least one of
  • the first determining module is configured to determine the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window.
  • the numerical values corresponding to the respective areas on the ring structure arranged by the N touch keys are constructed; wherein, the numerical values corresponding to the areas in different positions are different.
  • a judgment module for:
  • the first value is an invalid flag value, it is determined that the first value is an invalid value; wherein, when the amount of electrical signal transformation generated by the pressing position is less than a preset threshold value, the first value is set as an invalid flag value ;
  • the first value is not an invalid flag value, it is determined that the first value is a valid value.
  • a second determining module for:
  • a first sliding window and a second sliding window are determined on the ring structure; wherein, the first sliding window is located on the right side of the last pressing position; the second sliding window Located on the left side of the last pressed position;
  • the first determining module is specifically used for:
  • a processing module for:
  • the acquisition module is specifically used for:
  • the pressing position is converted into the second numerical value.
  • the first determining module is also used for:
  • a first out-of-bounds sliding window and a second out-of-bounds sliding window are determined on the ring structure; wherein the first out-of-bounds sliding window is located on the right side of the last pressing position; the first 2. The out-of-bounds sliding window is located on the left side of the last pressed position;
  • an embodiment of the present application provides a touch control device, including: a micro control unit MCU, the MCU is integrated with a touch sensor controller, and the touch sensor controller uses N channels and N touch buttons Connected to collect the touch signals of N touch buttons; wherein, the N touch buttons are arranged in a ring structure, and N is an integer greater than 1; the MCU is used to perform any one of the first aspect The identification method of the sliding signal.
  • an embodiment of the present application provides a computer-readable storage medium, including: program instructions, which when run on a computer, cause the computer to execute the program instructions, so as to implement the program instructions described in any one of the first aspect The identification method of the sliding signal.
  • the first value corresponding to the last pressed position is obtained through the microcontroller unit MCU. If the first value is a valid value, the first value corresponding to the current pressed position is obtained The second value; the direction of the sliding signal is determined according to the relationship between the second value and the value interval corresponding to the sliding window.
  • the MCU is integrated with a touch sensor controller, which is connected to N touch buttons through N channels to collect the touch signals of the N touch buttons; the last pressing position corresponds to the current pressing position At least one of the N touch buttons; wherein the N touch buttons are arranged in a ring structure, and N is an integer greater than 1.
  • the method in this application can accurately identify the user's sliding operation direction on the sensor, and improve the recognition accuracy of the touch sensor.
  • Figure 1 is a schematic diagram of the principle of an application scenario of this application.
  • FIG. 2 is a flowchart of a method for identifying a sliding signal according to an embodiment of the application
  • FIG. 3 is a schematic diagram of coordinates of a circular touch sensor provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of the position of a dual sliding window provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of the process of discriminating dual sliding windows according to an embodiment of the application.
  • FIG. 6 is a schematic diagram of the flow of cross-border processing and dual sliding window discrimination provided by an embodiment of the application
  • FIG. 7 is a schematic diagram of an MCU provided by an embodiment of the application.
  • Touch devices are frequently used in people's daily lives, such as gas stoves, touch lights, etc. These touch devices include: Microcontroller Unit (MCU) and touch buttons.
  • MCU Microcontroller Unit
  • touch buttons are integrated with a touch sensor controller.
  • the signal determines the direction of the sliding signal for the touch device.
  • the touch button can be set on the touch screen or a touch panel without display function, and an electrode array is set below the touch button.
  • the slave touch sensor controller integrated in the MCU may also be called a touch sensor circuit.
  • the channel can be a metal electrode line, or a channel composed of a metal electrode line plus resistors, capacitors, other components or circuits.
  • the general method of judging the sliding direction is to record the position of the user's initial contact and the position when the user leaves, and then subtract the value corresponding to the position of the initial contact from the value corresponding to the position when the user leaves, according to the positive difference. Negative to determine the direction of the slide.
  • the above method only records the position changes when the user first touches and leaves. If the user slides in the opposite direction during the middle process, the state information of the middle slide will be lost, and the user's action behavior cannot be accurately described.
  • the circular touch sensor is connected end to end, when the finger slides from the tail to the head position, the above method cannot correctly determine the sliding direction.
  • the present application provides a sliding signal recognition method, MCU, touch device, and storage medium, which can accurately recognize the user's sliding operation direction on the sensor and improve the recognition accuracy of the touch sensor.
  • the kernel in this application can be the core computing unit in products such as Microcontroller Unit (MCU), Central Processing Unit/Processor (CPU), etc., used to complete calculations, receive/storage commands, data processing, etc. And so on.
  • FIG. 1 is a schematic diagram of the principle of an application scenario of this application.
  • the touch device includes: Microcontroller Unit (MCU) and touch buttons.
  • the MCU is integrated with a touch sensor controller, and the touch sensor
  • the sensor controller is connected to N touch buttons through N channels to collect the touch signals of the N touch buttons; among them, the N touch buttons are arranged in a ring structure, and N is an integer greater than 1.
  • the circular touch button is equivalent to 6 touch buttons or units, and each touch button or unit is connected to the touch sensor controller through a channel, for example: buttons 0, 1, 2 , 3, 4, and 5 are connected to the touch sensor controller through channels 0, 1, 2, 3, 4, and 5 respectively.
  • the MCU collects the data of each channel of the circular touch sensor controller according to the preset frequency to complete the data collection. Then, it is determined whether the collected value has a pressing action according to whether the change of the electrical signal corresponding to the pressing operation meets the change of the preset reference signal, for example, according to the change of the voltage value of the channel to determine whether there is a pressing action. If it is a pressing action, the pressing position is converted into a second value according to the value corresponding to each area on the ring structure arranged by the N touch buttons. Then, the direction of the sliding signal is determined according to the relationship between the second value and the value interval corresponding to the sliding window. Therefore, the user's sliding operation direction on the sensor can be accurately recognized, and the recognition accuracy of the touch sensor can be improved.
  • the method is applied to a microcontroller unit MCU.
  • the MCU is integrated with a touch sensor controller, and the touch sensor controller communicates with each other through N channels.
  • the N touch buttons are connected to collect the touch signals of the N touch buttons; among them, the N touch buttons are arranged in a ring structure, and N is an integer greater than 1, as shown in Figure 2.
  • the method includes the following steps:
  • Step S201 If the first value corresponding to the last pressing position is a valid value, obtain the second value corresponding to the current pressing position.
  • the last pressed position and the current pressed position correspond to at least one of the N touch keys.
  • the second value corresponding to the current pressing position is read.
  • step S202 collects the pressing operation for the touch button; if the change of the electrical signal corresponding to the pressing operation meets the change of the preset reference signal, then obtain the pressing position corresponding to the pressing operation; according to the ring shape arranged by the N touch buttons The value corresponding to each area on the structure is converted to the second value by pressing the position.
  • step S202 determines whether the second value corresponding to the current pressing position is a valid value, and if it is a valid value, step S202 is executed; if the second value is an invalid value, the second value corresponding to the current pressing position is read again. Numerical value until the second value read is a valid value.
  • Step S202 Determine the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window.
  • the correspondence between different values and pressing positions is known in advance, so the last pressing position and the current pressing position can be determined according to the first value and the second value.
  • the numerical value corresponding to each area on the ring structure arranged by the N touch buttons can be constructed in a clockwise sequence; wherein, the numerical value corresponding to the area at different positions is different.
  • FIG. 3 is a schematic diagram of the coordinates of the circular touch sensor provided by an embodiment of the application.
  • n touch buttons on the circular touch sensor there are a total of n touch buttons on the circular touch sensor.
  • key 0, key 1, key 2, ..., key n In clockwise order, respectively, key 0, key 1, key 2, ..., key n.
  • the maximum value for example, the maximum value to 1023 according to actual accuracy requirements.
  • the relative distance of each key center position point is 256/n.
  • the pressing action at any position on the circular touch sensor can calculate the pressing position value from 0 to 255.
  • the position information will be calculated in real time at the frequency of data collection. It should be noted that there are electrodes arranged in an array under the touch button. Therefore, the pressing position can be determined according to the electrical signal transformation of each electrode. At this time, the determined position accuracy is much greater than the accuracy of the button indication.
  • the first sliding window and the second sliding window are determined on the ring structure; wherein the first sliding window is located to the right of the last pressing position; the second sliding window is located at the last pressing position Left; determine the first value interval corresponding to the first sliding window, and the second value interval corresponding to the second sliding window. If the second value is within the first value interval, it is determined that the direction of the sliding signal is clockwise; if the second value is within the second value interval, it is determined that the direction of the sliding signal is counterclockwise.
  • a circular touch sensor arranged on the touch screen is taken as an example for detailed description.
  • the circular touch sensor is provided with touch buttons arranged in a ring shape, so the circular touch sensor can not only reflect the pressing/non-pressing state,
  • the pressed position information can also be used to determine the direction of the sliding operation for the touch button (clockwise or counterclockwise) through an algorithm.
  • a double sliding window and a sliding direction determination method of cross-border processing are adopted to improve the accuracy of touch action recognition.
  • the basic design idea of the dual sliding window is to calculate and record the current position of the finger in real time during the sliding process of the finger, and use the current position as the center point to divide the discrimination window on the left and right sides.
  • Cross-border processing is an indispensable part of the circular touch sensor. The main idea is to determine whether the data is out of range before determining the sliding direction. If there is no cross-border, then the normal sliding direction is judged. If the boundary is exceeded, the judgment is based on the amount of change. Swipe left or right. When the finger slides from the head to the tail or from the tail to the head, the position changes greatly. Using this data feature, the sliding of the finger can be judged when it crosses the boundary.
  • the sliding direction of the circular touch sensor is divided into clockwise and counterclockwise directions. Therefore, after determining the position information, two sliding windows need to be designed to determine the sliding direction.
  • 4 is a schematic diagram of the position of the dual sliding window provided by an embodiment of the application. As shown in FIG. 4, the first sliding window and the second sliding window can be determined on the ring structure with the pressing position as the center; wherein, the first sliding window The window is located on the right side of the last pressing position and is used to indicate the window range that slides clockwise; the second sliding window is located on the left side of the last pressing position and is used to indicate the window range that slides counterclockwise.
  • the length of the sliding window can be set to a fixed value, such as 256/(2n), of course, it can also be flexibly adjusted according to the frequency of data collection.
  • the position of the sliding window can be calculated based on the pressed position. Let the last pressing position last_coordinate be x, then the first value interval corresponding to the first sliding window can be set to [x+256/(2n), x+256/n], the second value corresponding to the second sliding window The interval can be set to [x–256/n,x–256/(2n)].
  • the absolute value of the difference between the first value and the second value is obtained; if the absolute value of the difference is greater than either If the length of the value interval corresponding to the touch button is determined, the second value corresponding to the current pressing position is determined to be an invalid value; if the absolute value of the difference is not greater than the length of the value interval corresponding to any touch button, the first value corresponding to the current pressing position is determined.
  • the two values are valid values.
  • FIG. 5 is a schematic diagram of the process of dual sliding window discrimination provided by an embodiment of the application.
  • the MCU first collects circular touch sensing control at a preset frequency
  • the data of each channel of the device is used to complete data collection.
  • it is determined whether the collected value has a pressing action for example, according to the change of the voltage value of the channel to determine whether there is a pressing action. If it is a pressing action, the pressing position is converted into the second numerical value position according to the numerical value corresponding to each area on the ring structure arranged by the N touch keys.
  • the first value last_coordinate corresponding to the last pressing position is set to an invalid value of -1, and the MCU continues to collect data. Then, it is judged whether the first value last_coordinate corresponding to the last pressing position is a valid value. If last_coordinate is not a valid value, the second value position corresponding to the current pressing position is assigned to last_coordinate, and the MCU continues to perform data collection. If last_coordinate is a valid value, the position of the sliding window is determined according to the position of the finger.
  • the first value last_coordinate corresponding to the last pressing position be x, which means that the first value interval in the clockwise direction is [x+256/(2n), x+256/n], which means the second counterclockwise window direction
  • the value range is [x–256/n,x–256/(2n)]. If the second value is within the first value interval, that is, the second value position corresponding to the current pressing position is within the clockwise window position [x+256/(2n), x+256/n], then the direction of the sliding signal is determined It is clockwise, and the second value position corresponding to the current pressing position is assigned to last_coordinate.
  • the second value position corresponding to the current pressing position is in the counterclockwise window position [x–256/n,x–256/(2n)]
  • the direction of the sliding signal is determined It is counterclockwise, and the second value position corresponding to the current pressing position is assigned to last_coordinate. If the second value position is not within the first value range and the second value range, then obtain the absolute value of the difference between the first value and the second value
  • the first value last_coordinate is set to an invalid value and then returned to continue Collect the next press; if the absolute value of the difference is not greater than the length of the value interval corresponding to any touch button, that is,
  • various operating conditions during sliding such as slow sliding or fast sliding, can be effectively met.
  • the first out-of-bounds sliding window and the second out-of-bounds sliding window are determined on the ring structure; wherein the first out-of-bounds sliding window is located to the right of the last pressing position; the second out-of-bounds sliding window is located on the upper side Press the left side of the position once; determine the third value interval corresponding to the first out-of-bounds sliding window, and the fourth value interval corresponding to the second out-of-bounds sliding window; if the second value is within the third value interval, determine the sliding The direction of the signal is counterclockwise; if the second value is within the fourth value interval, it is determined that the direction of the sliding signal is clockwise.
  • Cross-border processing needs to determine the first cross-border sliding window and the second cross-border sliding window on the ring structure according to the last pressing position; the first cross-border sliding window is located to the right of the last pressing position; the second cross-border sliding window is located in the last time Press the left side of the position.
  • the third value interval corresponding to the first out-of-bounds sliding window is [x+256-256/n, x+256-256/(2n)], and the fourth value interval corresponding to the second out-of-bounds sliding window It is [x–(256-256/(2n)),x–(256-256/n)], where x represents the value corresponding to the last pressed position.
  • FIG. 6 is a schematic diagram of the flow of cross-border processing and double sliding window discrimination provided by an embodiment of the application. As shown in FIG. 6, the difference between the flow shown in FIG. 6 and the flow shown in FIG. Before the first value interval or the second value interval, the out-of-bounds processing logic is added first, that is, it is judged whether the second value is within the third value interval or the fourth value interval.
  • the second value is within the third value interval, that is, the second value position corresponding to the current pressing position is at the counterclockwise window position [x+256-256/n, x+256-256/(2n )]
  • the second value position corresponding to the current pressing position is assigned to last_coordinate.
  • the second value is in the fourth value interval, that is, the second value position corresponding to the current pressing position is in the clockwise window position [x–(256-256/(2n)),x–(256-256/n)]
  • the second value position corresponding to the current pressing position is assigned to last_coordinate. If the second value position is not within the third value interval and the fourth value interval, it is further judged whether the second value position is within the first value interval and the second value interval, which will not be repeated here.
  • the first value corresponding to the last pressing position is obtained through the microcontroller unit MCU. If the first value is a valid value, the second value corresponding to the current pressing position is obtained; according to the second value and the value corresponding to the sliding window The relationship between the intervals determines the direction of the sliding signal.
  • the MCU is integrated with a touch sensor controller, which is connected to N touch buttons through N channels to collect the touch signals of the N touch buttons; the last pressing position and the current pressing position correspond to N At least one of the three touch buttons; wherein, the N touch buttons are arranged in a ring structure, and N is an integer greater than 1.
  • the method in this application can accurately identify the user's sliding operation direction on the sensor, and improve the recognition accuracy of the touch sensor.
  • FIG. 7 is a schematic diagram of an MCU provided by an embodiment of the application.
  • the MCU is integrated with a touch sensor controller, and the touch sensor controller is connected to N touch buttons through N channels to collect information about the N touch buttons. Touch signal; Among them, N touch buttons are arranged in a ring structure, and N is an integer greater than 1.
  • the MCU includes:
  • the acquisition module 701 is configured to obtain the second value corresponding to the current pressing position when the first value corresponding to the last pressing position is a valid value, wherein the last pressing position and the current pressing position correspond to at least one of the N touch buttons ;
  • the first determining module 702 is configured to determine the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window.
  • a building module 703 for:
  • the numerical values corresponding to the respective areas on the ring structure arranged by the N touch buttons are constructed; among them, the numerical values corresponding to the areas in different positions are different.
  • a judgment module 704 for:
  • the first value is not an invalid flag value, it is determined that the first value is a valid value.
  • a second determining module 705 configured to:
  • the last pressing position determine the first sliding window and the second sliding window on the ring structure; wherein, the first sliding window is located on the right side of the last pressing position; the second sliding window is located on the left side of the last pressing position;
  • the first determining module 702 is specifically used for:
  • a processing module 706 for:
  • the acquisition module 701 is specifically used for:
  • the pressed position is converted into a second numerical value.
  • the first determining module 702 is also used for:
  • the first out-of-bounds sliding window and the second out-of-bounds sliding window are determined on the ring structure; among them, the first out-of-bounds sliding window is located to the right of the last pressing position; the second out-of-bounds sliding window is located at the last pressing position Left
  • the MCU provided in this application can execute the above-mentioned sliding signal identification method.
  • the content and effect please refer to the method embodiment part, which will not be repeated here.
  • the touch control device includes: a micro-control unit MCU, the MCU is integrated with a touch sensor controller, and the touch sensor controller is connected to N touch buttons through N channels , To collect the touch signals of N touch buttons; among them, the N touch buttons are arranged in a ring structure, and N is an integer greater than 1.
  • the circular touch button is equivalent to six touch buttons or units, and each touch button or unit is connected to the touch sensor controller through a channel, for example: buttons 0, 1, 2 , 3, 4, and 5 are connected to the touch sensor controller through channels 0, 1, 2, 3, 4, and 5 respectively.
  • the above-mentioned MCU is used to execute the above-mentioned sliding signal identification method, and its content and effect can be referred to the method embodiment part, which will not be repeated here.
  • This application also provides a readable storage medium, including program instructions, which when run on a computer, cause the computer to execute the above-mentioned sliding signal recognition method.
  • program instructions which when run on a computer, cause the computer to execute the above-mentioned sliding signal recognition method.
  • the present application also provides a computer program product, including program instructions, which are used to try the above-mentioned sliding signal recognition method.
  • program instructions which are used to try the above-mentioned sliding signal recognition method.

Abstract

本申请提供一种滑动信号的识别方法、MCU、触控设备及存储介质。该方法应用于微控制单元MCU,所述MCU上集成有触摸传感控制器,所述触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,所述N个触摸按键排布成环形结构,N为大于1的整数;所述方法包括:若上一次按压位置对应的第一数值为有效值,则获取当前按压位置对应的第二数值,其中上一次按压位置和当前按压位置对应于N个触摸按键中的至少一个;根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向。从而可以准确地识别出用户针对传感器的滑动操作方向,提高触摸传感器的识别精度。

Description

滑动信号的识别方法、MCU、触控设备及存储介质 技术领域
本申请涉及触控技术领域,尤其涉及一种滑动信号的识别方法、MCU、触控设备及存储介质。
背景技术
触控设备在人们的日常生活中被频繁使用,如燃气灶、触控灯等。这些触控设备中包括:微控制单元(Microcontroller Unit,MCU),其中MCU上集成有触摸传感控制器,触摸传感控制器与触控屏或者触摸面板上的触摸按键之间存在通道,以使得根据通道采集的信号确定针对该触控设备的滑动信号的方向。
目前,滑动方向的通用判别方法是记录用户手指起始接触的位置以及离开时的位置,然后将起始接触的位置所对应的数值减去离开时的位置所对应的数值,根据差值的正负来判断滑动的方向。
但是,上述方式只记录刚接触和离开时的位置变化,如果用户在中间的过程中朝相反的方向滑动,则会丢失中间滑动的状态信息,从而无法准确描述用户的动作行为。此外,针对于圆形触摸传感器首尾相接的特殊情况,当手指从尾部滑动到首部位置时,上述方式就不能正确地判断出滑动方向。
发明内容
本申请提供一种滑动信号的识别方法、MCU、触控设备及存储介质,可以准确地识别出用户针对传感器的滑动操作方向,提高触摸传感器的识别精度。
第一方面,本申请实施例提供一种滑动信号的识别方法,应用于微控制单元MCU,所述MCU上集成有触摸传感控制器,所述触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其 中,所述N个触摸按键排布成环形结构,N为大于1的整数;所述方法包括:
若上一次按压位置对应的第一数值为有效值,则获取当前按压位置对应的第二数值,其中所述上一次按压位置和当前按压位置对应于所述N个触摸按键中的至少一个;
根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向。
在一种可能的设计中,在获取当前按压位置对应的第二数值之前,还包括:
按照顺时针顺序,构建所述N个触摸按键所排布的环形结构上各个区域所对应的数值;其中,不同位置的区域对应的数值不同。
在一种可能的设计中,在获取当前按压位置对应的第二数值之前,还包括:
读取上一次按压位置对应的第一数值;
若所述第一数值为无效标记值,则确定所述第一数值为无效值;其中,当按压位置所生成的电信号变换量小于预设阈值时,设置所述第一数值为无效标记值;
若所述第一数值不是无效标记值,则确定所述第一数值为有效值。
在一种可能的设计中,在根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向之前,还包括:
根据所述上一次按压位置,在所述环形结构上确定第一滑动窗口和第二滑动窗口;其中,所述第一滑动窗口位于所述上一次按压位置的右侧;所述第二滑动窗口位于所述上一次按压位置的左侧;
确定所述第一滑动窗口对应的第一取值区间,以及所述第二滑动窗口对应的第二取值区间。
在一种可能的设计中,所述根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向,包括:
若所述第二数值位于所述第一取值区间内,则确定所述滑动信号的方向为顺时针方向;
若所述第二数值位于所述第二取值区间内,则确定所述滑动信号的方向为逆时针方向。
在一种可能的设计中,还包括:
若所述第二数值不位于所述第一取值区间和所述第二取值区间内,则获取所述第一数值与所述第二数值之间的差值的绝对值;
若所述差值的绝对值大于任一所述触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为无效值;
若所述差值的绝对值不大于任一所述触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为有效值。
在一种可能的设计中,所述获取当前按压位置对应的第二数值,包括:
采集针对所述触摸按键的按压操作;
若所述按压操作对应的电信号变化情况符合预设的参考信号的变化情况,则获取所述按压操对应的按压位置;
根据所述N个触摸按键所排布的环形结构上各个区域所对应的数值,将所述按压位置转换为所述第二数值。
在一种可能的设计中,根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向,包括:
根据所述上一次按压位置,在所述环形结构上确定第一越界滑动窗口和第二越界滑动窗口;其中,所述第一越界滑动窗口位于所述上一次按压位置的右侧;所述第二越界滑动窗口位于所述上一次按压位置的左侧;
确定所述第一越界滑动窗口对应的第三取值区间,以及所述第二越界滑动窗口对应的第四取值区间;
若所述第二数值位于所述第三取值区间内,则确定所述滑动信号的方向为逆时针方向;
若所述第二数值位于所述第四取值区间内,则确定所述滑动信号的方向为顺时针方向。
第二方面,本申请实施例提供一种MCU,所述MCU上集成有触摸传感控制器,所述触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,所述N个触摸按键排布成环形结构,N为大于1的整数;所述MCU包括:
采集模块,用于在上一次按压位置对应的第一数值为有效值时,获取当前按压位置对应的第二数值,其中所述上一次按压位置和当前按压位置对应于所述N个触摸按键中的至少一个;
第一确定模块,用于根据所述第二数值与滑动窗口对应的取值区间之 间的关系,确定滑动信号的方向。
在一种可能的设计中,还包括:构建模块,用于:
按照顺时针顺序,构建所述N个触摸按键所排布的环形结构上各个区域所对应的数值;其中,不同位置的区域对应的数值不同。
在一种可能的设计中,还包括:判断模块,用于:
读取上一次按压位置对应的第一数值;
若所述第一数值为无效标记值,则确定所述第一数值为无效值;其中,当按压位置所生成的电信号变换量小于预设阈值时,设置所述第一数值为无效标记值;
若所述第一数值不是无效标记值,则确定所述第一数值为有效值。
在一种可能的设计中,还包括:第二确定模块,用于:
根据所述上一次按压位置,在所述环形结构上确定第一滑动窗口和第二滑动窗口;其中,所述第一滑动窗口位于所述上一次按压位置的右侧;所述第二滑动窗口位于所述上一次按压位置的左侧;
确定所述第一滑动窗口对应的第一取值区间,以及所述第二滑动窗口对应的第二取值区间。
在一种可能的设计中,所述第一确定模块,具体用于:
若所述第二数值位于所述第一取值区间内,则确定所述滑动信号的方向为顺时针方向;
若所述第二数值位于所述第二取值区间内,则确定所述滑动信号的方向为逆时针方向。
在一种可能的设计中,还包括:处理模块,用于:
若所述第二数值不位于所述第一取值区间和所述第二取值区间内,则获取所述第一数值与所述第二数值之间的差值的绝对值;
若所述差值的绝对值大于任一所述触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为无效值;
若所述差值的绝对值不大于任一所述触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为有效值。
在一种可能的设计中,所述采集模块,具体用于:
采集针对所述触摸按键的按压操作;
若所述按压操作对应的电信号变化情况符合预设的参考信号的变化情 况,则获取所述按压操对应的按压位置;
根据所述N个触摸按键所排布的环形结构上各个区域所对应的数值,将所述按压位置转换为所述第二数值。
在一种可能的设计中,所述第一确定模块,还用于:
根据所述上一次按压位置,在所述环形结构上确定第一越界滑动窗口和第二越界滑动窗口;其中,所述第一越界滑动窗口位于所述上一次按压位置的右侧;所述第二越界滑动窗口位于所述上一次按压位置的左侧;
确定所述第一越界滑动窗口对应的第三取值区间,以及所述第二越界滑动窗口对应的第四取值区间;
若所述第二数值位于所述第三取值区间内,则确定所述滑动信号的方向为逆时针方向;
若所述第二数值位于所述第四取值区间内,则确定所述滑动信号的方向为顺时针方向。
第三方面,本申请实施例提供一种触控设备,包括:微控制单元MCU,所述MCU上集成有触摸传感控制器,所述触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,所述N个触摸按键排布成环形结构,N为大于1的整数;所述MCU用于执行如第一方面中任一项所述的滑动信号的识别方法。
第四方面,本申请实施例提供一种计算机可读存储介质,包括:程序指令,当其在计算机上运行时,使得计算机执行所述程序指令,以实现如第一方面中任一项所述的滑动信号的识别方法。
本申请提供的滑动信号的识别方法、MCU、触控设备及存储介质,通过微控制单元MCU获取上一次按压位置对应的第一数值,若第一数值为有效值,则获取当前按压位置对应的第二数值;根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向。其中,MCU上集成有触摸传感控制器,所述触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;上一次按压位置和当前按压位置对应于所述N个触摸按键中的至少一个;其中,所述N个触摸按键排布成环形结构,N为大于1的整数。本申请中的方法可以准确地识别出用户针对传感器的滑动操作方向,提高触摸传感器的识别精度。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图进行简单的介绍。显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请一应用场景的原理示意图;
图2为本申请一实施例提供的一种滑动信号的识别方法的流程图;
图3为本申请一实施例提供的圆形触摸传感器的坐标示意图;
图4为本申请一实施例提供的双滑动窗口的位置示意图;
图5为本申请一实施例提供的双滑动窗口判别的流程示意图;
图6为本申请一实施例提供的越界处理与双滑动窗口判别的流程示意图;
图7为本申请一实施例提供的一种MCU的示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整的描述。显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例,能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含。例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
下面以具体的实施例对本申请的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
触控设备在人们的日常生活中被频繁使用,如燃气灶、触控灯等。这些 触控设备中包括:微控制单元(Microcontroller Unit,MCU)和触摸按键,其中MCU上集成有触摸传感控制器,触摸传感控制器与触摸按键之间存在通道,以使得根据通道采集的信号确定针对该触控设备的滑动信号的方向。其中,触摸按键可以设置在触控屏或者不具有显示功能的触控面板上,并在触摸按键下方设置电极阵列,当用户手指按压触摸按键时,电极阵列与手指之间会形成电容,从而生成相应的电压变化信号,电压变化信号通过通道被MCU的触摸传感控制器采集,以使得MCU可以根据电压变化信号生成与触摸按键对应的控制信号。MCU中所集成的从触摸传感控制器也可以称作触摸传感电路。通道可以是金属电极线,或者也可以是金属电极线加上电阻、电容、其他元器件或者电路所组成的通道。
目前,滑动方向的通用判别方法是记录用户手指起始接触的位置以及离开时的位置,然后将起始接触的位置所对应的数值减去离开时的位置所对应的数值,根据差值的正负来判断滑动的方向。
但是,上述方式只记录刚接触和离开时的位置变化,如果用户在中间的过程中朝相反的方向滑动,则会丢失中间滑动的状态信息,从而无法准确描述用户的动作行为。此外,针对于圆形触摸传感器首尾相接的特殊情况,当手指从尾部滑动到首部位置时,上述方式就不能正确地判断出滑动方向。
针对上述技术问题,本申请提供一种滑动信号的识别方法、MCU、触控设备及存储介质,可以准确地识别出用户针对传感器的滑动操作方向,提高触摸传感器的识别精度。本申请中的内核可以是微控制单元(Microcontroller Unit,MCU)、中央处理器(Central Processing Unit/Processor,CPU)等产品中的核心运算单元,用来完成计算、接收/存储命令、数据处理等等操作。
图1为本申请一应用场景的原理示意图,如图1所示,触控设备中包括:微控制单元(Microcontroller Unit,MCU)和触摸按键,其中MCU上集成有触摸传感控制器,触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,N个触摸按键排布成环形结构,N为大于1的整数。示例性的,如图1所示,圆形式触摸按键相当于由6个触摸按键或单元构成,每个触摸按键或单元通过一个通道与触摸传感控制器连接, 例如:按键0、1、2、3、4、5分别通过通道0、1、2、3、4、5与触摸传感控制器连接。MCU按照预设的频率进行采集圆形触摸传感控制器各通道数据,完成数据采集。然后,根据按压操作对应的电信号变化情况是否符合预设的参考信号的变化情况来判断采集值是否有按压动作,例如根据通道的电压值大小变化来判断是否有按压动作。若为按压动作,则根据N个触摸按键所排布的环形结构上各个区域所对应的数值,将按压位置转换为第二数值。然后,根据第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向。从而可以准确地识别出用户针对传感器的滑动操作方向,提高触摸传感器的识别精度。
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请的实施例进行描述。
图2为本申请一实施例提供的一种滑动信号的识别方法的流程图,该方法应用于微控制单元MCU,MCU上集成有触摸传感控制器,触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,N个触摸按键排布成环形结构,N为大于1的整数,如图2所示,该方法包括如下步骤:
步骤S201:若上一次按压位置对应的第一数值为有效值,则获取当前按压位置对应的第二数值。
本实施例中,上一次按压位置和当前按压位置对应于N个触摸按键中的至少一个。首先读取上一次按压位置对应的第一数值;若第一数值为无效标记值,则确定第一数值为无效值;其中,当按压位置所生成的电信号变换量小于预设阈值时,设置第一数值为无效标记值;若第一数值不是无效标记值,则确定第一数值为有效值。当上一次按压位置对应的第一数值为有效值时,读取当前按压位置对应的第二数值。
示例性的,采集针对触摸按键的按压操作;若按压操作对应的电信号变化情况符合预设的参考信号的变化情况,则获取按压操对应的按压位置;根据N个触摸按键所排布的环形结构上各个区域所对应的数值,将按压位置转换为第二数值。类似的,可以采用上述方式确定当前按压位置对应的第二数值是否为有效值,若为有效值,则执行步骤S202;若第二数值为无效 值,则重新读取当前按压位置对应的第二数值,直到读取到的第二数值为有效值。
步骤S202:根据第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向。
本实施例中,预先已知不同数值与按压位置之间的对应关系,因此可以根据第一数值、第二数值确定上一次按压的位置和当前按压的位置。可选地,可以按照顺时针顺序,构建N个触摸按键所排布的环形结构上各个区域所对应的数值;其中,不同位置的区域对应的数值不同。
在具体实现过程中,首先对圆形触摸传感器建立坐标,图3为本申请一实施例提供的圆形触摸传感器的坐标示意图,如图3所示,圆形触摸传感器上一共有n个触摸按键,按照顺时针顺序分别为键0,键1,键2,…,键n。将键0的左侧位置设为0,键n的右侧位置设置为最大值255。当然,也可以根据实际的精度需求,提升最大值例如最大值调整为1023。那么每个键中心位置点的相对距离为256/n。建立完坐标后,在圆形触摸传感器上的任意位置上的按压动作都能计算出0至255中的按压位置值。在滑动的过程中,位置信息则会以数据采集的频率实时计算出。需要说明的是,触摸按键下方设置有阵列排布的电极,因此,可以根据各个电极的电信号变换确定按压的位置,此时判断出的位置精度要远大于按键指示的精度。
可选地,根据上一次按压位置,在环形结构上确定第一滑动窗口和第二滑动窗口;其中,第一滑动窗口位于上一次按压位置的右侧;第二滑动窗口位于上一次按压位置的左侧;确定第一滑动窗口对应的第一取值区间,以及第二滑动窗口对应的第二取值区间。若第二数值位于第一取值区间内,则确定滑动信号的方向为顺时针方向;若第二数值位于第二取值区间内,则确定滑动信号的方向为逆时针方向。
示例性的,以布设在触控屏上的圆形触摸传感器为例进行详细说明,圆形触摸传感器设置有环形排布的触摸按键,因此圆形触摸传感器不仅可以反映出按压/非按压状态,按压的位置信息,还能通过算法判断出针对触摸按键的滑动操作的方向(顺时针或逆时针方向)。在本实施例中,采用双滑动窗口和越界处理的滑动方向判别方法,以提高了触摸动作识别的准确性。双滑动窗口的基本设计思路是,手指在滑动的过程中实时计算并记录当前手指按压的位置,并以当前位置为中心点,左右两侧各划分出判别窗口。若下一次 或几次数据采集计算出的位置落到了左滑动窗口,则输出左滑事件,若下一次或几次数据采集计算出的位置落到了右滑动窗口,则输出右滑事件,若按压位置落到了两个窗口之外,则不输出任何事件。输出滑动事件之后,将位置更新成当前按压位置,开始下一次判别。越界处理是圆形触摸传感器必不可少的部分,其主要思路是,在进行滑动方向判别之前,先判断数据有没有越界,没有越界,就进行正常滑动方向判断,越界,则根据变化量,判断左滑还是右滑。当手指从首部滑动到尾部或者从尾部滑动到首部的过程中,位置的变化量很大,利用这一数据特点,可以判断越界时手指的滑动情况。
示例性的,圆形触摸传感器滑动方向分为顺时针和逆时针方向,所以确定了位置信息之后,需要设计两个滑动窗口来判别滑动方向。图4为本申请一实施例提供的双滑动窗口的位置示意图,如图4所示,可以在按压位置为中心,在环形结构上确定第一滑动窗口和第二滑动窗口;其中,第一滑动窗口位于上一次按压位置的右侧,用于表示顺时针滑动的窗口范围;第二滑动窗口位于上一次按压位置的左侧,用于表示逆时针滑动的窗口范围。滑动窗口的长度可以设置成固定值,比如256/(2n),当然也可以根据数据采集的频率灵活可调。滑动窗口的位置可以根据按压位置计算而来。令上一次按压位置last_coordinate为x,则第一滑动窗口对应的第一取值区间可设置为[x+256/(2n),x+256/n],第二滑动窗口对应的第二取值区间可设置为[x–256/n,x–256/(2n)]。
可选地,若第二数值不位于第一取值区间和第二取值区间内,则获取第一数值与第二数值之间的差值的绝对值;若差值的绝对值大于任一触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为无效值;若差值的绝对值不大于任一触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为有效值。
示例性的,图5为本申请一实施例提供的双滑动窗口判别的流程示意图,如图5所示,在具体操作过程中,首先由MCU按照预设的频率进行采集圆形触摸传感控制器各通道数据,完成数据采集。然后,根据按压操作对应的电信号变化情况符合预设的参考信号的变化情况来判断采集值是否有按压动作,例如根据通道的电压值大小变化来判断是否有按压动作。若为按压动作,则根据N个触摸按键所排布的环形结构上各个区域所对应的数值,将按压位置转换为第二数值position。若不是按压动作,则将上一次按压位置对应的第 一数值last_coordinate设置成无效值-1,MCU继续进行数据采集。然后,对上一次按压位置对应的第一数值last_coordinate是否为有效值进行判断。若last_coordinate不是有效值,则将当前按压位置对应的第二数值position赋值给last_coordinate,MCU继续进行数据采集。若last_coordinate是有效值,则根据手指按压位置确定滑动窗口的位置。令上一次按压位置对应的第一数值last_coordinate为x,则表示顺时针方向的第一取值区间为[x+256/(2n),x+256/n],表示逆时针窗口方向的第二取值区间为为[x–256/n,x–256/(2n)]。若第二数值位于第一取值区间内,即当前按压位置对应的第二数值position在顺时针窗口位置[x+256/(2n),x+256/n]内,则确定滑动信号的方向为顺时针方向,并将当前按压位置对应的第二数值position赋值给last_coordinate。若第二数值位于第二取值区间内,即当前按压位置对应的第二数值position在逆时针窗口位置[x–256/n,x–256/(2n)]内,则确定滑动信号的方向为逆时针方向,并将当前按压位置对应的第二数值position赋值给last_coordinate。若第二数值position不位于第一取值区间和第二取值区间内,则获取第一数值与第二数值之间的差值的绝对值|position-x|,并将|position-x|与取值区间的长度256/n进行比较。若差值的绝对值大于任一触摸按键对应的取值区间长度,即|position-x|>256/n,则确定当前按压位置无效,此时将第一数值last_coordinate设为无效值之后返回继续采集下一次按压;若差值的绝对值不大于任一触摸按键对应的取值区间长度,即|position-x|≤256/n,则确定当前按压位置对应的第二数值为有效值,不输出任何事件,继续进行滑动方向判断。在|position-x|>256/n时设置last_coordinate为无效值,是为了避免将双指交替点击误判成滑动操作。综上,通过本申请的技术方案,可以有效地满足滑动时的各种操作情况,例如慢滑或快滑。针对于慢滑,可以经过多次采集,计算出的位置会慢慢累加到滑动窗口的位置,输出正确的滑动。针对于快滑,数据采集的高刷新率能让滑动的位置落到窗口范围内,也能做正确的滑动识别。
可选地,根据上一次按压位置,在环形结构上确定第一越界滑动窗口和第二越界滑动窗口;其中,第一越界滑动窗口位于上一次按压位置的右侧;第二越界滑动窗口位于上一次按压位置的左侧;确定第一越界滑动窗口对应的第三取值区间,以及第二越界滑动窗口对应的第四取值区间;若第二数值位于第三取值区间内,则确定滑动信号的方向为逆时针方向;若 第二数值位于第四取值区间内,则确定滑动信号的方向为顺时针方向。
示例性的,当手指从0位置右侧滑动到左侧255的位置,数据的变化量是增加,但这时候是逆时针滑动,当手指从255左侧的位置滑动到0位置右侧,数据的变化量是减少,但这时候是顺时针滑动。所以针对这种情况需要做坐标越界处理。越界处理需要根据上一次按压位置,在环形结构上确定第一越界滑动窗口和第二越界滑动窗口;其中,第一越界滑动窗口位于上一次按压位置的右侧;第二越界滑动窗口位于上一次按压位置的左侧。根据上述描述,确定第一越界滑动窗口对应的第三取值区间为[x+256-256/n,x+256-256/(2n)],第二越界滑动窗口对应的第四取值区间为[x–(256-256/(2n)),x–(256-256/n)],其中x表示上一次按压位置对应的数值。
图6为本申请一实施例提供的越界处理与双滑动窗口判别的流程示意图,如图6所示,图6所示的流程与图5所示的流程的区别在于,在判断第二数值是否在第一取值区间或第二取值区间之前,先加入越界处理逻辑,即判断第二数值是否位于第三取值区间或第四取值区间内。在具体处理流程中,若第二数值位于第三取值区间内,即当前按压位置对应的第二数值position在逆时针窗口位置[x+256-256/n,x+256-256/(2n)]内,则确定滑动信号的方向为逆时针方向,并将当前按压位置对应的第二数值position赋值给last_coordinate。若第二数值位于第四取值区间内,即当前按压位置对应的第二数值position在顺时针窗口位置[x–(256-256/(2n)),x–(256-256/n)]内,则确定滑动信号的方向为逆顺时针方向,并将当前按压位置对应的第二数值position赋值给last_coordinate。若第二数值position不位于第三取值区间和第四取值区间内,则进一步对第二数值position是否位于第一取值区间和第二取值区间内进行判断,此处不再赘述。
本实施例,通过微控制单元MCU获取上一次按压位置对应的第一数值,若第一数值为有效值,则获取当前按压位置对应的第二数值;根据第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向。其中,MCU上集成有触摸传感控制器,触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;上一次按压位置和当前按压位置对应于N个触摸按键中的至少一个;其中,N个触摸按键排布成环形结构,N为大于1的整数。本申请中的方法可以准确地识别出用户针对传感器的滑动操作方向,提高触摸传感器的识别精度。
图7为本申请一实施例提供的一种MCU的示意图,MCU上集成有触摸传感控制器,触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,N个触摸按键排布成环形结构,N为大于1的整数;如图7所示,该MCU包括:
采集模块701,用于在上一次按压位置对应的第一数值为有效值时,获取当前按压位置对应的第二数值,其中上一次按压位置和当前按压位置对应于N个触摸按键中的至少一个;
第一确定模块702,用于根据第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向。
在一种可能的设计中,还包括:构建模块703,用于:
按照顺时针顺序,构建N个触摸按键所排布的环形结构上各个区域所对应的数值;其中,不同位置的区域对应的数值不同。
在一种可能的设计中,还包括:判断模块704,用于:
读取上一次按压位置对应的第一数值;
若第一数值为无效标记值,则确定第一数值为无效值;其中,当按压位置所生成的电信号变换量小于预设阈值时,设置第一数值为无效标记值;
若第一数值不是无效标记值,则确定第一数值为有效值。
在一种可能的设计中,还包括:第二确定模块705,用于:
根据上一次按压位置,在环形结构上确定第一滑动窗口和第二滑动窗口;其中,第一滑动窗口位于上一次按压位置的右侧;第二滑动窗口位于上一次按压位置的左侧;
确定第一滑动窗口对应的第一取值区间,以及第二滑动窗口对应的第二取值区间。
在一种可能的设计中,第一确定模块702,具体用于:
若第二数值位于第一取值区间内,则确定滑动信号的方向为顺时针方向;
若第二数值位于第二取值区间内,则确定滑动信号的方向为逆时针方向。
在一种可能的设计中,还包括:处理模块706,用于:
若第二数值不位于第一取值区间和第二取值区间内,则获取第一数值与第二数值之间的差值的绝对值;
若差值的绝对值大于任一触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为无效值;
若差值的绝对值不大于任一触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为有效值。
在一种可能的设计中,采集模块701,具体用于:
采集针对触摸按键的按压操作;
若按压操作对应的电信号变化情况符合预设的参考信号的变化情况,则获取按压操对应的按压位置;
根据N个触摸按键所排布的环形结构上各个区域所对应的数值,将按压位置转换为第二数值。
在一种可能的设计中,第一确定模块702,还用于:
根据上一次按压位置,在环形结构上确定第一越界滑动窗口和第二越界滑动窗口;其中,第一越界滑动窗口位于上一次按压位置的右侧;第二越界滑动窗口位于上一次按压位置的左侧;
确定第一越界滑动窗口对应的第三取值区间,以及第二越界滑动窗口对应的第四取值区间;
若第二数值位于第三取值区间内,则确定滑动信号的方向为逆时针方向;
若第二数值位于第四取值区间内,则确定滑动信号的方向为顺时针方向。
本申请提供的MCU,可以执行上述的滑动信号的识别方法,其内容和效果可参考方法实施例部分,对此不再赘述。
本申请还提供一种触控设备,示例性地,该触控设备包括:微控制单元MCU,MCU上集成有触摸传感控制器,触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,N个触摸按键排布成环形结构,N为大于1的整数。示例性的,如图1所示,圆形式触摸按键相当于由6个触摸按键或单元构成,每个触摸按键或单元通过一个通道与触摸传感控制器连接,例如:按键0、1、2、3、4、5分别通过通道0、1、2、3、4、5与触摸传感控制器连接。上述MCU用于执行上述的滑动信号的识别方法,其内容和效果可参考方法实施例部分,对此不再赘述。
本申请还提供一种可读存储介质,包括程序指令,当该程序指令在计算 机上运行时,使得计算机执行如上述的滑动信号的识别方法,其内容和效果可参考方法实施例部分,对此不再赘述。
本申请还提供一种计算机程序产品,包括程序指令,该程序指令用于试下如上述的滑动信号的识别方法,其内容和效果可参考方法实施例部分,对此不再赘述。

Claims (18)

  1. 一种滑动信号的识别方法,其特征在于,应用于微控制单元MCU,所述MCU上集成有触摸传感控制器,所述触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,所述N个触摸按键排布成环形结构,N为大于1的整数;所述方法包括:
    若上一次按压位置对应的第一数值为有效值,则获取当前按压位置对应的第二数值,其中所述上一次按压位置和当前按压位置对应于所述N个触摸按键中的至少一个;
    根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向。
  2. 根据权利要求1所述的方法,其特征在于,在获取当前按压位置对应的第二数值之前,还包括:
    按照顺时针顺序,构建所述N个触摸按键所排布的环形结构上各个区域所对应的数值;其中,不同位置的区域对应的数值不同。
  3. 根据权利要求1所述的方法,其特征在于,在获取当前按压位置对应的第二数值之前,还包括:
    读取上一次按压位置对应的第一数值;
    若所述第一数值为无效标记值,则确定所述第一数值为无效值;其中,当按压位置所生成的电信号变换量小于预设阈值时,设置所述第一数值为无效标记值;
    若所述第一数值不是无效标记值,则确定所述第一数值为有效值。
  4. 根据权利要求1所述的方法,其特征在于,在根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向之前,还包括:
    根据所述上一次按压位置,在所述环形结构上确定第一滑动窗口和第二滑动窗口;其中,所述第一滑动窗口位于所述上一次按压位置的右侧;所述第二滑动窗口位于所述上一次按压位置的左侧;
    确定所述第一滑动窗口对应的第一取值区间,以及所述第二滑动窗口对应的第二取值区间。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向,包括:
    若所述第二数值位于所述第一取值区间内,则确定所述滑动信号的方向为顺时针方向;
    若所述第二数值位于所述第二取值区间内,则确定所述滑动信号的方向为逆时针方向。
  6. 根据权利要求5所述的方法,其特征在于,还包括:
    若所述第二数值不位于所述第一取值区间和所述第二取值区间内,则获取所述第一数值与所述第二数值之间的差值的绝对值;
    若所述差值的绝对值大于任一所述触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为无效值;
    若所述差值的绝对值不大于任一所述触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为有效值。
  7. 根据权利要求2所述的方法,其特征在于,所述获取当前按压位置对应的第二数值,包括:
    采集针对所述触摸按键的按压操作;
    若所述按压操作对应的电信号变化情况符合预设的参考信号的变化情况,则获取所述按压操对应的按压位置;
    根据所述N个触摸按键所排布的环形结构上各个区域所对应的数值,将所述按压位置转换为所述第二数值。
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向,包括:
    根据所述上一次按压位置,在所述环形结构上确定第一越界滑动窗口和第二越界滑动窗口;其中,所述第一越界滑动窗口位于所述上一次按压位置的右侧;所述第二越界滑动窗口位于所述上一次按压位置的左侧;
    确定所述第一越界滑动窗口对应的第三取值区间,以及所述第二越界滑动窗口对应的第四取值区间;
    若所述第二数值位于所述第三取值区间内,则确定所述滑动信号的方向为逆时针方向;
    若所述第二数值位于所述第四取值区间内,则确定所述滑动信号的方向为顺时针方向。
  9. 一种MCU,其特征在于,所述MCU上集成有触摸传感控制器, 所述触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,所述N个触摸按键排布成环形结构,N为大于1的整数;所述MCU包括:
    采集模块,用于在上一次按压位置对应的第一数值为有效值时,获取当前按压位置对应的第二数值,其中所述上一次按压位置和当前按压位置对应于所述N个触摸按键中的至少一个;
    第一确定模块,用于根据所述第二数值与滑动窗口对应的取值区间之间的关系,确定滑动信号的方向。
  10. 根据权利要求9所述的MCU,其特征在于,还包括:构建模块,用于:
    按照顺时针顺序,构建所述N个触摸按键所排布的环形结构上各个区域所对应的数值;其中,不同位置的区域对应的数值不同。
  11. 根据权利要求9所述的MCU,其特征在于,还包括:判断模块,用于:
    读取上一次按压位置对应的第一数值;
    若所述第一数值为无效标记值,则确定所述第一数值为无效值;其中,当按压位置所生成的电信号变换量小于预设阈值时,设置所述第一数值为无效标记值;
    若所述第一数值不是无效标记值,则确定所述第一数值为有效值。
  12. 根据权利要求9所述的MCU,其特征在于,还包括:第二确定模块,用于:
    根据所述上一次按压位置,在所述环形结构上确定第一滑动窗口和第二滑动窗口;其中,所述第一滑动窗口位于所述上一次按压位置的右侧;所述第二滑动窗口位于所述上一次按压位置的左侧;
    确定所述第一滑动窗口对应的第一取值区间,以及所述第二滑动窗口对应的第二取值区间。
  13. 根据权利要求12所述的MCU,其特征在于,所述第一确定模块,具体用于:
    若所述第二数值位于所述第一取值区间内,则确定所述滑动信号的方向为顺时针方向;
    若所述第二数值位于所述第二取值区间内,则确定所述滑动信号的方 向为逆时针方向。
  14. 根据权利要求13所述的MCU,其特征在于,还包括:处理模块,用于:
    若所述第二数值不位于所述第一取值区间和所述第二取值区间内,则获取所述第一数值与所述第二数值之间的差值的绝对值;
    若所述差值的绝对值大于任一所述触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为无效值;
    若所述差值的绝对值不大于任一所述触摸按键对应的取值区间长度,则确定当前按压位置对应的第二数值为有效值。
  15. 根据权利要求10所述的MCU,其特征在于,所述采集模块,具体用于:
    采集针对所述触摸按键的按压操作;
    若所述按压操作对应的电信号变化情况符合预设的参考信号的变化情况,则获取所述按压操对应的按压位置;
    根据所述N个触摸按键所排布的环形结构上各个区域所对应的数值,将所述按压位置转换为所述第二数值。
  16. 根据权利要求9-15中任一项所述的MCU,其特征在于,所述第一确定模块,还用于:
    根据所述上一次按压位置,在所述环形结构上确定第一越界滑动窗口和第二越界滑动窗口;其中,所述第一越界滑动窗口位于所述上一次按压位置的右侧;所述第二越界滑动窗口位于所述上一次按压位置的左侧;
    确定所述第一越界滑动窗口对应的第三取值区间,以及所述第二越界滑动窗口对应的第四取值区间;
    若所述第二数值位于所述第三取值区间内,则确定所述滑动信号的方向为逆时针方向;
    若所述第二数值位于所述第四取值区间内,则确定所述滑动信号的方向为顺时针方向。
  17. 一种触控设备,其特征在于,包括:微控制单元MCU,所述MCU上集成有触摸传感控制器,所述触摸传感控制器通过N个通道与N个触摸按键连接,用以采集N个触摸按键的触摸信号;其中,所述N个触摸按键排布成环形结构,N为大于1的整数;所述MCU用于执行如权利要求1-8中 任一项所述的滑动信号的识别方法。
  18. 一种计算机可读存储介质,其特征在于,包括:程序指令,当其在计算机上运行时,使得计算机执行所述程序指令,以实现如权利要求1-8中任一项所述的滑动信号的识别方法。
PCT/CN2019/113929 2019-10-29 2019-10-29 滑动信号的识别方法、mcu、触控设备及存储介质 WO2021081738A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980002442.0A CN110945464B (zh) 2019-10-29 2019-10-29 滑动信号的识别方法、mcu、触控设备及存储介质
PCT/CN2019/113929 WO2021081738A1 (zh) 2019-10-29 2019-10-29 滑动信号的识别方法、mcu、触控设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/113929 WO2021081738A1 (zh) 2019-10-29 2019-10-29 滑动信号的识别方法、mcu、触控设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021081738A1 true WO2021081738A1 (zh) 2021-05-06

Family

ID=69913372

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/113929 WO2021081738A1 (zh) 2019-10-29 2019-10-29 滑动信号的识别方法、mcu、触控设备及存储介质

Country Status (2)

Country Link
CN (1) CN110945464B (zh)
WO (1) WO2021081738A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415857A (zh) * 2022-01-19 2022-04-29 惠州Tcl移动通信有限公司 一种终端的操作方法、装置、终端和存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532226A (zh) * 2020-11-05 2021-03-19 广东瑞德智能科技股份有限公司 一种新型触摸人机交互处理方法
CN113437960A (zh) * 2021-08-13 2021-09-24 四川中微芯成科技有限公司 一种电容式触摸按键实现环形触摸的方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007071554A1 (fr) * 2005-12-23 2007-06-28 The Swatch Group Research And Development Ltd Dispositif electronique de commande a touches tactiles destine a remplir une fonction de curseur
CN102612212A (zh) * 2012-02-23 2012-07-25 鸿富锦精密工业(深圳)有限公司 灯具及其开关装置
CN103001625A (zh) * 2012-12-11 2013-03-27 深圳Tcl新技术有限公司 电容式触摸按键面板及其控制方法、电子装置
CN103472948A (zh) * 2013-09-03 2013-12-25 小米科技有限责任公司 一种触摸屏终端的遥控处理方法、装置和终端
CN106301325A (zh) * 2016-08-11 2017-01-04 青岛海信电器股份有限公司 电容式触摸按键的触摸识别方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101259116B1 (ko) * 2006-09-29 2013-04-26 엘지전자 주식회사 콘트롤러 및 콘트롤러에서 키이 코드를 발생하는 방법
AU2007313960B2 (en) * 2007-06-18 2010-09-30 Apple Inc. Sensor configurations in a user input device
WO2009145593A2 (ko) * 2008-05-29 2009-12-03 Oh Eui Jin 데이터 입력장치
KR100990833B1 (ko) * 2010-01-28 2010-11-04 김준 터치 장치 제어방법, 이를 이용하는 터치 장치
CN103472949A (zh) * 2013-09-03 2013-12-25 小米科技有限责任公司 一种触摸屏终端的遥控处理方法、装置和终端
CN106354418B (zh) * 2016-11-16 2019-07-09 腾讯科技(深圳)有限公司 一种基于触摸屏的操控方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007071554A1 (fr) * 2005-12-23 2007-06-28 The Swatch Group Research And Development Ltd Dispositif electronique de commande a touches tactiles destine a remplir une fonction de curseur
CN102612212A (zh) * 2012-02-23 2012-07-25 鸿富锦精密工业(深圳)有限公司 灯具及其开关装置
CN103001625A (zh) * 2012-12-11 2013-03-27 深圳Tcl新技术有限公司 电容式触摸按键面板及其控制方法、电子装置
CN103472948A (zh) * 2013-09-03 2013-12-25 小米科技有限责任公司 一种触摸屏终端的遥控处理方法、装置和终端
CN106301325A (zh) * 2016-08-11 2017-01-04 青岛海信电器股份有限公司 电容式触摸按键的触摸识别方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415857A (zh) * 2022-01-19 2022-04-29 惠州Tcl移动通信有限公司 一种终端的操作方法、装置、终端和存储介质
CN114415857B (zh) * 2022-01-19 2024-02-09 惠州Tcl移动通信有限公司 一种终端的操作方法、装置、终端和存储介质

Also Published As

Publication number Publication date
CN110945464B (zh) 2023-05-02
CN110945464A (zh) 2020-03-31

Similar Documents

Publication Publication Date Title
WO2021081738A1 (zh) 滑动信号的识别方法、mcu、触控设备及存储介质
US9389738B2 (en) Touching apparatus and touching detecting method thereof
CN104915586A (zh) 终端屏幕解锁方法、屏幕解锁装置和终端
KR20070111266A (ko) 다접점 터치 센서를 이용한 손가락의 이동 감지 장치 및방법
CN105739868B (zh) 一种识别终端被误触的方法及装置
US11093083B2 (en) Method for preventing an edge from being unintentionally touched, touch control apparatus and storage medium
CN103218075B (zh) 一种触控屏幕的触控监测方法及终端
TW201432520A (zh) 操作方法以及電子裝置
WO2019062243A1 (zh) 触摸操作的识别方法、装置及电子设备
TWI511012B (zh) 觸摸識別方法
WO2018148902A1 (zh) 一种按键检测方法及装置
US10248231B2 (en) Electronic device with fingerprint detection
US20160054831A1 (en) Capacitive touch device and method identifying touch object on the same
WO2016082251A1 (zh) 触摸信号处理方法及设备
TW201510828A (zh) 觸摸識別方法
US9772699B2 (en) Touch control system and touch control method and computer system of the same
CN105912160A (zh) 一种误触识别装置及方法
US10599257B2 (en) Touch screen device having improved floating mode entry conditions
US9395858B2 (en) Capacitive finger navigation device with hybrid mode and operating method thereof
WO2021081817A1 (zh) 触摸事件侦测方法、mcu、触控设备及存储介质
CN106598364A (zh) 压力侦测方法
WO2015012128A1 (ja) タッチパネルシステム及び電子情報機器
US10678392B2 (en) Pseudo push determination method in touch sensor without force sensor
TW201944207A (zh) 接近識別方法、裝置及終端設備
US20230015735A1 (en) Capacitive sensor, electronic device, and electronic device control method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19950388

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19950388

Country of ref document: EP

Kind code of ref document: A1