A gesture operation recognition method and device

By updating the reference value and induction change value of the sensing position in real time, the problem of misjudgment of the stylus when multiple fingers are contacted is solved, achieving higher gesture operation recognition accuracy and lower error-touch rate.

CN118244885BActive Publication Date: 2025-07-25HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211669822.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-25
Publication Date
2025-07-25
Estimated Expiration
2042-12-25

AI Technical Summary

Technical Problem

In the prior art, when multiple fingers are in contact and the distance is close, the gesture operation cannot be accurately recognized, resulting in a high misjudgment rate and difficult to take into account both the recognition rate and the false touch rate.

Method used

By updating the reference value of the sensing position in real time, calculating the sensing change value based on the sensor detection data, distinguishing the pressing and lifting operations of the finger, and determining gesture operations based on the sensing change value within the preset time period, improving recognition accuracy.

Benefits of technology

Effectively distinguish the fingers from moving positions, improve the recognition accuracy of gesture operations, reduce misjudgment, and improve the accuracy of gesture recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118244885B_ABST
    Figure CN118244885B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a gesture operation recognition method and device, which relates to the field of electronic technologies and is used to solve the problem that when multiple fingers touch an electronic device and are relatively close, the electronic device cannot accurately identify finger information and gesture information. The method is used for an electronic device, and the electronic device is provided with a sensing area and a sensor corresponding to the sensing area. The method includes: obtaining detection data reported by the sensor; the detection data is used to reflect the sensing position in the sensing area and the sensing value corresponding to the sensing position; obtaining the sensing change value corresponding to the sensing position in the sensing area according to the detection data and the reference value corresponding to the sensing position in the sensing area; the reference value is obtained according to the latest detection data obtained and is updated in real time, and the sensing change value is the difference between the sensing value corresponding to the sensing position and the reference value corresponding to the sensing position; determining whether the operation of the user in the sensing area conforms to a preset gesture operation according to the sensing change values statistically obtained within a first preset duration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technologies, and in particular, to a gesture operation recognition method and device. Background Art

[0002] With the development trend of technology, in the evolution process of terminals such as mobile phones, tablets, and laptops, a stylus has become a commonly used device. Some styluses are provided with an induction area on the pen body, and a capacitive touch sensor is correspondingly arranged below the induction area. Through this capacitive touch sensor, gesture operations performed by a finger on the induction area of the stylus can be recognized. After the stylus recognizes the user's gesture, it can cooperate with the operating system of the electronic device to complete corresponding operations for the user gesture, such as one-key switching to an eraser, etc., thereby providing convenience for user use.

[0003] In related technologies, a stylus usually uses a fixed value as a reference value. Combining the capacitance data detected by the touch sensor of the stylus during user use to determine the contact information of the user on the induction area of the stylus. Furthermore, the gesture performed by the finger can be recognized. However, when a user uses a stylus, multiple fingers usually touch the induction area on the pen body, and the pen-holding posture and use environment are relatively complex. In this case, using a fixed reference value to recognize gesture operations is likely to cause misjudgment of gesture operation recognition and cannot accurately recognize the user's gesture. Summary of the Invention

[0004] Embodiments of this application provide a gesture operation recognition method and device, which are used to solve the problem that when multiple fingers touch an electronic device and are close to each other, the electronic device cannot accurately recognize finger information and gesture information.

[0005] To achieve the above object, the embodiments of this application adopt the following technical solutions:

[0006] In a first aspect, a gesture operation recognition method is provided. This method is applied to an electronic device, and an induction area is provided on the surface of the electronic device. The electronic device includes a sensor corresponding to the induction area. The method includes:

[0007] Obtain detection data reported by the sensor. This detection data is used to reflect the induction position in the induction area and the induction value corresponding to the induction position. According to the detection data and the reference value corresponding to the induction position in the induction area, obtain the induction change value corresponding to the induction position in the induction area. Among them, the reference value is obtained based on the latest detection data obtained and is updated in real time. The induction change value is the difference between the induction value corresponding to the induction position and the reference value corresponding to the induction position. Determine whether the operation of the user in the induction area conforms to a preset gesture operation according to the induction change value statistically obtained within a first preset duration.

[0008] When a user usually performs a gesture operation with some fingers on an electronic device, only one of the fingers is moving while the other fingers remain stationary. In this solution, according to the detection data reported by the sensor, the sensed values corresponding to each sensing position can be known, and the reference values corresponding to each sensing position are determined based on the detected data obtained in real time, so that the reference values corresponding to each sensing position are updated in real time with the detection data. Then, at each moment, the difference between the sensed value and the reference value corresponding to each sensing position is calculated as the sensed change value corresponding to each sensing position in the sensing area. If the user does not perform any operation on the electronic device, such as keeping a press or not pressing, then the sensed value corresponding to the sensing position will not change, and thus the reference value and the sensed change value will not change either. If the user performs a press or lift operation on the electronic device, then the sensed value, the reference value, and the sensed change value at the corresponding sensing position will change. That is to say, the operation of the user on the electronic device can be determined by the difference between the sensed value and the reference value. Finally, the electronic device can determine whether the operation of the user in the sensing area conforms to the preset operation according to the sensed change value within the first preset duration. In this way, the finger position that is long-pressed on the electronic device and the finger position where the user is performing an operation can be distinguished, so that when identifying the gesture operation performed by the user, the recognition rate and the recognition accuracy can be improved.

[0009] In some possible implementation manners, before obtaining the sensed change value corresponding to the sensing position in the sensing area according to the detection data and the reference value corresponding to the sensing position in the sensing area, the method further includes: obtaining and caching the latest detection data reported by the sensor; where the latest detection data includes: the detection data reported by the sensor within the most recent preset time period, or the detection data corresponding to the latest preset quantity reported by the sensor. Obtaining the reference value corresponding to the sensing position based on the latest detection data. In this way, it is convenient to determine the reference value of the sensing position according to the latest multiple frames of detection data.

[0010] In some possible implementation manners, a buffer is set in the electronic device. The buffer includes multiple sub-areas, and one sub-area is used to cache one frame of detection data, caching the latest detection data reported by the sensor within a period of time, including: caching the detection data into the sub-areas in the order of the reporting time of the detection data; in the case where the last sub-area of the buffer is occupied, caching the obtained latest detection data starting from the first sub-area. In this way, only part of the latest detection data is cached, which can reduce the occupied storage space.

[0011] In some possible embodiments, obtaining a reference value corresponding to the sensing position based on the latest detection data includes: selecting m first detection data from the latest detection data; where m is greater than or equal to 2. Calculating the sensing average value of the m first detection data, and using the sensing average value of the m first detection data as the reference value corresponding to the sensing position. In this solution, using the sensing average value of multiple latest detection data as the initial reference value can reduce the influence on determining the reference value caused by the fluctuation of detection data due to other factors. Moreover, at each moment, the latest m detection data at the current moment are used to determine the reference value, and the change in the sensing value between adjacent moments can be reflected in the sensing change value, which is convenient for distinguishing the sensing positions with no operation and with operation. It is beneficial to improve the recognition accuracy of gesture operations.

[0012] In some possible embodiments, calculating the average value of the m first detection data and using the sensing average value of the latest detection data as the reference value corresponding to the sensing position includes: when the latest detection data reported by the sensor within the preset time period is obtained for the first time, calculating the sensing average value of the m first detection data, and using the sensing average value of the m first detection data as the reference value corresponding to the sensing position at the current moment.

[0013] In some possible embodiments, obtaining a reference value corresponding to the sensing position based on the latest detection data further includes: when the latest detection data reported by the sensor within the preset time period is obtained not for the first time, updating the reference value corresponding to the sensing position at the previous moment based on the latest detection data to obtain the reference value corresponding to the sensing position at the current moment.

[0014] In this solution, the electronic device only uses the sensing average value of the m detection data as the reference value corresponding to the sensing position when the latest detection data reported by the sensor within the preset time period is obtained for the first time. At each subsequent moment, the reference value at the current moment can be obtained by updating the reference value at the previous moment according to the current moment. In this way, the change in the sensing value between two adjacent moments can be reflected in the reference value, and the change in the sensing value between adjacent moments can also be reflected in the sensing change value, which is convenient for distinguishing the sensing positions with no operation and with operation. It is beneficial to improve the recognition accuracy of gesture operations.

[0015] In some possible embodiments, updating the reference value corresponding to the sensing position at the previous moment based on the latest detection data to obtain the reference value corresponding to the sensing position at the current moment includes: selecting m second detection data from the latest detection data corresponding to the sensing position at the previous moment; when the previous moment is the moment when the latest detection data reported by the sensor within the preset time period is first obtained, the m second detection data are m first detection data; calculating the first sum value of the m second detection data; obtaining the last third detection data in the latest detection data at the current moment; calculating the first difference between any one of the second detection data and the third detection data; calculating the sum value of the reference value corresponding to the sensing position at the previous moment and the first difference as the second sum value corresponding to the sensing position at the current moment; calculating the quotient of the second sum value and m as the reference value corresponding to the sensing position at the current moment.

[0016] In this solution, when updating the reference value at the previous moment based on the sensing value at the current moment, specifically, it is updated by means of the sum value of the m detection data at the previous moment. After obtaining the sum value at the current moment, the average sensing value at the current moment is calculated using the sum value at the current moment as the reference value of the sensing position at the current moment. In this way, the change in the sensing values between two adjacent moments can be reflected in the reference value, and the change in the sensing values between adjacent moments can also be reflected in the sensed change value, which is convenient for distinguishing the sensing positions with no operation and with operation. It is beneficial to improve the recognition accuracy of gesture operations.

[0017] In some possible embodiments, determining whether the operation of the user in the sensing area conforms to the preset gesture operation according to the sensed change value statistically obtained within the first preset duration includes: calculating the second difference between the sensed change values between two adjacent moments within the first preset duration; if the absolute value of the second difference corresponding to the target sensing position is greater than the preset threshold within the second preset duration, it is determined that the user has performed a preset operation at the target sensing position; the preset operation includes pressing or lifting by the user on the electronic device; if the operation of the user in the sensing area within the first preset duration includes continuous pressing, lifting, and pressing, and the distance between the sensing positions corresponding to the two presses is less than the first preset distance threshold, it is determined that the operation of the user in the sensing area conforms to the double-click gesture operation, and the preset gesture operation includes the double-click gesture operation.

[0018] In this solution, by calculating the difference between the induced change values at two adjacent moments, it is determined whether the user has performed a preset operation of pressing or lifting at the sensing position. And if within a first preset duration, the user continuously performs pressing, lifting, and pressing at similar sensing positions, then it can be determined that the user has performed a double-tap gesture operation in the sensing area. Since it is possible to distinguish which sensing positions the user has not performed an operation on and which sensing positions the user has performed an operation on according to the induced change values. Therefore, through this solution, the gesture operations of the user in the sensing area can be quickly and accurately recognized.

[0019] In some possible implementation manners, determining whether the touch operation of the user in the sensing area conforms to a preset gesture operation according to the induced change values statistically obtained within a first preset duration further includes: within the first preset duration, if the absolute values of the second differences corresponding to two sensing positions at the same moment are both greater than a preset threshold, and one of the second differences is greater than 0 and the other second difference is less than 0, and the distance between the sensing positions corresponding to the two second differences is less than a second preset distance threshold, then it is determined that the operation of the user in the sensing area does not conform to the double-tap gesture operation.

[0020] In this solution, to avoid the influence of other actions of the user on gesture recognition. For example, multiple fingers of the user perform operations on the electronic device at the same time, and one finger is lifted on the electronic device while another finger presses on the electronic device. In this case, it may be detected that two consecutive pressing operations are respectively performed by two different fingers, which may cause misjudgment of gesture recognition. Therefore, in this solution, by judging whether there is a condition that the absolute values of two second differences are both greater than a preset threshold at the same time, and one second difference is positive and the other is negative, and the sensing positions corresponding to the two second differences are close. If the above conditions are met, it is very likely that multiple fingers of the user are in the state of operating at the same time. Therefore, at this time, it should be determined that it does not conform to the double-tap gesture operation. In this way, the possibility of gesture recognition errors can be reduced and the recognition accuracy can be improved.

[0021] In some possible implementation manners, the electronic device includes a stylus.

[0022] In a second aspect, an electronic device is provided, including: a processor and a memory; the memory is used to store computer-executable instructions, and when the electronic device runs, the processor executes the computer-executable instructions stored in the memory so that the electronic device executes the gesture operation recognition method according to any one of the above first aspects.

[0023] In a third aspect, a computer-readable storage medium is provided, in which instructions are stored, and when they run on a computer, the computer can execute the gesture operation recognition method according to any one of the above first aspects.

[0024] In a fourth aspect, a computer program product containing instructions is provided. When it runs on an electronic device, the electronic device can execute the gesture operation recognition method according to any one of the above first aspects.

[0025] In a fifth aspect, a device (for example, the device may be a chip system) is provided. The device includes a processor for supporting the electronic device to implement the functions involved in the above first aspect. In a possible design, the device further includes a memory for storing the necessary program instructions and data of the electronic device. When the device is a chip system, it may be composed of chips or may include chips and other discrete devices.

[0026] Among them, for the technical effects brought by any one of the design manners in the fourth aspect to the seventh aspect, reference may be made to the technical effects brought by different design manners in the first aspect, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1A A schematic diagram of a user performing a gesture operation on a stylus provided by an embodiment of the present application;

[0028] Figure 1B A schematic diagram of detection data of a touch sensor provided by an embodiment of the present application;

[0029] Figure 2 A schematic diagram of the hardware interaction between a stylus and a tablet computer provided by an embodiment of the present application;

[0030] Figure 3 A schematic flowchart of a gesture operation recognition method provided by an embodiment of the present application;

[0031] Figure 4 A schematic flowchart of a gesture operation recognition method provided by an embodiment of the present application;

[0032] Figure 5 A schematic flowchart of a gesture operation recognition method provided by an embodiment of the present application;

[0033] Figure 6 A schematic flowchart of a gesture operation recognition method provided by an embodiment of the present application;

[0034] Figure 7 A schematic flowchart of a gesture operation recognition method provided by an embodiment of the present application;

[0035] Figure 8 A schematic structural diagram of a chip system provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0036] Some styluses are provided with a sensing area on the pen body, and a capacitive touch sensor (abbreviated as touch sensor or sensor) is correspondingly arranged in the sensing area. Through the capacitive touch sensor, gesture operations performed by fingers on the stylus can be recognized. After the stylus recognizes the user's gesture, it can cooperate with the system of other electronic devices such as a tablet computer to complete corresponding operations for the user's gesture, such as one-key switching of the eraser, etc., thus providing convenience for the user to use the stylus.

[0037] In the related art, a stylus usually uses a fixed value as a reference value, such as the capacitance data when the user is not in contact as the reference value. In this way, by obtaining the capacitance data of the capacitive touch sensor and then comparing it with the reference value, it can be determined whether there is a user touching the stylus currently and the contact position of the user on the stylus. After that, by combining the user's contact information within a period of time, the gesture performed by the user on the sensing area of the stylus can be recognized.

[0038] However, when the user uses the stylus, usually multiple fingers are in contact with the stylus, and the distance between the fingers is relatively close. And there are many and complex holding postures when different users use the stylus, and the usage environment is also relatively complex. And when the user operates some gestures, there may be only one finger operating while the other fingers remain still, such as double-tap gesture, triple-tap gesture. As Figure 1A shown, when the user's finger performs a double-tap operation on the stylus 1, usually only one of the fingers (index finger) is operating, and the other fingers remain unchanged. Among them, when the finger 2 is in the position shown in 2-1 in the figure (solid line), it means that the finger is pressing on the sensing area on the pen body of the stylus 1. When the finger 2 is in the position shown in 2-2 in the figure (dashed line), it means that the finger has lifted from the sensing area on the pen body of the stylus 1, and at this time the finger 2 is not in contact with the sensing area.

[0039] Since the distance between the fingers is close when the user holds the stylus, the capacitance data with finger contact reflected on the touch sensor is usually connected together. As Figure 1B shown is an example of the capacitance data (or sensing value) of the touch sensor when a user touches the sensing area of the stylus 1. Among them, the capacitance data in the area 3 represents the capacitance data when there is finger contact, and the capacitance data in the area 4 represents the capacitance data when there is no finger contact. It should be understood that the above Figure 1B capacitance data is only an example and does not represent the actual value of the capacitance data of the touch sensor when there is or is not finger contact with the sensing area of the pen body of the stylus 1.

[0040] Since it is relatively close, it is easy for the stylus 1 to be unable to completely and accurately distinguish the user's finger information through the detection data. For example, it may occur that the data of two fingers that are relatively close are regarded as the finger information of one finger. In this way, it is easy to cause misjudgment of gesture operation recognition based on finger information, and the user's gesture cannot be accurately recognized.

[0041] When using a fixed numerical value as the reference value, relevant personnel can adjust the recognition sensitivity of the stylus to the user's operation to adjust the accuracy rate of the stylus for gesture recognition. If the recognition sensitivity is increased, then the stylus is more likely to determine the detection data that may be a preset gesture operation as triggering the preset gesture operation. In this way, the recognition rate of the stylus for the user's operation will be higher, but some of the gestures that may be recognized are misrecognized, that is, the user does not perform an operation but is recognized as performing an operation, and it is difficult to ensure the mis-touch recognition rate. If the recognition sensitivity is decreased, then the stylus is more likely to determine the detection data that may be a preset gesture operation as not triggering the preset gesture operation. In this way, the accuracy rate of the user's gesture recognition can be improved and the mis-touch rate can be reduced; however, it is possible that some gestures are not recognized, that is, the user performs an operation but the stylus does not recognize it, and the recognition rate cannot be ensured. Therefore, it is difficult to balance the recognition rate and the mis-touch rate of the stylus for recognizing the user's gesture.

[0042] Based on this, an embodiment of the present application provides a gesture operation recognition method, which can be applied to an electronic device. An induction area is provided on the surface of the electronic device, and the electronic device includes a sensor corresponding to the induction area, for example, an inductor is correspondingly provided under the induction area. Specifically, the reference value of the induction position in the induction area can be determined by obtaining the latest detection data reported by the sensor, and the induction change value is obtained by statistically calculating the induction value and the reference value in the detection data reported by the sensor for a period of time, and it is determined whether the user issues a preset gesture operation based on the induction change value statistically obtained during this period.

[0043] It should be understood that in the embodiment of the present application, the sensor will report the detection data in real time, such as reporting when detected or reporting based on a preset reporting frequency, etc. The latest detection data in the embodiment of the present application can represent the detection data reported by the sensor in the most recent period of time at the current moment, or the detection data corresponding to the preset number reported by the sensor most recently. In this way, the reference value can be quickly refreshed, so that the reference value is updated in real time according to the real-time update of the reported detection data, and the reference value is prevented from remaining fixed.

[0044] Since the reference value is updated as the sensed value in the detection data is updated, if the user keeps pressing or lifting unchanged, the sensed value at the corresponding sensed position will not change, nor will the reference value. Since neither the sensed value nor the reference value changes, the sensed change value should also remain unchanged. On the contrary, if the user is performing a pressing operation or a lifting operation, then the sensed change value should change. Therefore, in the technical solution provided by the embodiments of the present application, by counting the sensed change value within a period of time, it is possible to distinguish whether the user is performing an operation at each sensed position. Moreover, when the user presses and lifts at the sensed position, the change in the sensed value should be opposite. For example, if the sensed value increases when the user presses, then the sensed value should decrease when the user lifts. Thus, the sensed change value within a period of time can also determine whether the user is specifically performing a pressing or a lifting. Finally, by combining the operations continuously performed by the user within the first preset duration, it is possible to determine whether the user has performed a preset gesture operation within the sensing area. In this way, it is possible to accurately distinguish the sensed positions without operations from the sensed positions with operations, which is beneficial to accurately identify gesture operations and improve the accuracy of gesture operation recognition.

[0045] Exemplarily, the electronic device may be a stylus (as shown in Figure 1A ), a true wireless stereo (TWS) earphone, a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), a wearable device, an augmented reality (AR) / virtual reality (VR) device, a media player, a television set, etc. The embodiments of the present application do not impose special restrictions on the specific form of the device.

[0046] Please refer to Figure 2 , which is a hardware interaction diagram of a stylus 1 and other electronic devices provided by the embodiments of the present application. In the embodiments of the present application, take the electronic device interacting with the stylus 1 as a tablet computer as an example. As Figure 2As shown in the figure, the stylus 1 may include: a micro control unit (MCU) 201, a first communication module 202, a coding chip 203, a sensor module 204, a charging module 205, a battery 206, a power management module 207, and a storage module 208. The sensor module 204 may include, but is not limited to, a pressure sensor 214, an acceleration sensor 224, and a capacitance sensor 234. The tablet computer may include a touch panel 209 and a second communication module 210. The touch panel 209 may further include a touch panel sensor (TP sensor) 219 and a touch microelectronic device (Integrated Circuit, IC) chip 229.

[0047] The above-mentioned MCU 201 is responsible for the working logic of each device in the stylus 1, such as the working timing of the sensor module, the communication mechanism with the host, etc.

[0048] The first communication module 202 in the above-mentioned stylus 1 and the second communication module 210 in the tablet computer may be wireless communication modules such as a wireless local area network (such as a Wi-Fi network) module, a Bluetooth module, or a near-field communication NFC module. The embodiments of the present application do not limit this. It should be understood that the stylus 1 and the tablet computer can establish a wireless connection through the first communication module 202 and the second communication module 210. Exemplarily, a Bluetooth connection can be established between the stylus 1 and the tablet computer, and this Bluetooth connection can be used to transmit information between the stylus 1 and the tablet computer, such as transmission configuration parameters, pressure signals, etc. Among them, the configuration parameters are used to instruct the stylus 1 to send a coding signal according to a certain rule. Among them, the coding signal can be used by the tablet computer to determine the position of the tip of the stylus 1 on the touch screen of the tablet computer (which can be simply referred to as the tip position).

[0049] The touch sensor 219 in the above-mentioned tablet computer is composed of an electrode array, and the electrode array includes a plurality of electrodes arranged in rows and columns. The coding chip 203 in the above-mentioned stylus 1 is arranged at the tip of the pen, and the coding chip 203 includes electrodes for sending and receiving signals. Moreover, there is an insulating substance (such as air, cover glass) between the electrodes in the coding chip 203 and the electrodes of the touch sensor 219. Therefore, a capacitance can be formed between the electrodes in the coding chip 203 and the electrodes of the touch sensor 219. That is, a capacitance can be formed between the tip of the stylus 1 and the touch sensor 219 of the tablet computer. Thus, the tip of the stylus 1 and the touch sensor 219 in the tablet computer can establish a circuit connection through the capacitance.

[0050] After establishing the above circuit path, the stylus 1 and the tablet computer can interact signals through the circuit path. Exemplarily, the touch sensor 219 in the tablet computer can send an uplink signal to the stylus 1 through the circuit path. Additionally, the coding chip 203 in the stylus 1 can send a coding signal to the tablet computer through the circuit path. Among them, both the coding signal and the uplink signal are generally square wave signals.

[0051] The touch sensor 219 in the above tablet computer is used to collect touch information, which can include: information on the stylus 1 touching the screen of the tablet computer and information on the user (such as the user's finger or knuckle, etc.) touching the screen. In the embodiments of the present application, the touch information mainly refers to the information on the touch operation of the tip of the stylus 1 on the screen, such as a coding signal. The touch IC chip 229 can determine the touch position based on the touch information collected by the touch sensor 219.

[0052] Exemplarily, when the tip of the stylus 1 approaches the screen of the tablet computer, the coding chip 203 can receive the uplink signal sent by the tablet computer. Then, the signal (such as a coding signal) sent by the coding chip 203 to the touch sensor 219 in the tablet computer through the circuit path will cause a change in the capacitance sampling value of each electrode in the electrode array of the touch sensor 219. Moreover, the closer the tip of the stylus 1 is to an electrode, the greater the change in its capacitance sampling value. The touch IC chip 229 in the screen can determine the touch position based on the change in the capacitance sampling value of each electrode in the electrode array of the touch sensor 219. For example, the touch IC chip 229 can use the position where the change in the capacitance sampling value on the touch sensor 219 is the largest as the position of the stylus 1 on the screen. Regarding the specific implementation of determining the touch position according to the change in the capacitance sampling value in the touch screen, reference can be made to the descriptions in related prior arts, which will not be elaborated herein.

[0053] The pressure sensor 214 in the above stylus 1 can be arranged at the tip of the stylus 1 and is used to collect the pressure signal of the tip. Exemplarily, when the tip of the stylus 1 touches the screen of the tablet computer, the pressure sensor 214 can collect the pressure signal generated by the screen squeezing the tip. The stylus 1 can send the pressure signal to the tablet computer through a wireless path, thereby facilitating the tablet computer to determine the touch pressure.

[0054] The acceleration sensor 224 in the above-mentioned stylus 1 can be used to collect the triaxial acceleration values of the stylus 1. The triaxial acceleration values include: the acceleration value on the X-axis, the acceleration value on the Y-axis, and the acceleration value on the Z-axis. The acceleration sensor 224 can also send the triaxial acceleration values to the MCU 201. In this way, the MCU 201 can obtain information such as the inclination angle and motion state of the stylus 1 based on the triaxial acceleration values. The motion state is used to represent whether the stylus 1 is in a stationary state or a non-stationary state. The MCU 201 can also be used to control the operation of corresponding components in the stylus 1 based on the acceleration values collected by the acceleration sensor 224. Exemplarily, when the MCU 201 determines that the stylus 1 is in a flat state, the MCU 201 can control the coding chip 203, the pressure sensor 214, etc. to stop working. Thereby, the power consumption of the stylus 1 can be reduced.

[0055] The capacitance sensor 234 in the above-mentioned stylus 1 can be used to sense finger information. When no finger presses on the capacitance sensor 234, the capacitance data of the capacitance sensor is fixed. When a finger presses on the capacitance sensor 234, the capacitance data will change compared to when no finger presses. Therefore, the contact information of the user on the stylus 1 can be determined by the change in the capacitance data of the capacitance sensor 234. Multiple capacitance sensors 234 can be arranged on the stylus 1. Combining the setting positions of the capacitance sensors 234 on the stylus 1, the contact position of the user on the stylus 1 can be determined.

[0056] The charging module 205 in the above-mentioned stylus 1 can be used to receive a charging input and charge the battery 206 in the stylus 1. And, while charging the battery 206, the charging module 205 can be used to supply power to components (such as the MCU 201) in the tablet computer. The power management module 207 is responsible for the power management of the stylus 1, including switching between the working mode and the sleep mode of the stylus 1, etc.

[0057] The storage module 208 in the above-mentioned stylus 1 can be used to store relevant information such as code programs and detection data.

[0058] It should be understood that Figure 2 The hardware structure of the shown stylus 1 and the hardware structure of the tablet computer are only one example. In actual implementation, modules can be added or reduced according to requirements, or one or more of the above-mentioned modules can be combined. The embodiments of the present application do not make specific limitations in this regard. The gesture operation recognition methods provided in the following embodiments can all be applied to the stylus 1 with the above-mentioned hardware structure.

[0059] In an embodiment of the present application, a gesture operation recognition method is provided, which can be applied to a scenario where a stylus 1 recognizes a gesture operation performed by a user on the stylus 1. By obtaining the latest detection data in real time to determine the reference value of the sensing position in the sensing area, and by comparing the detected sensing value and the reference value, the static finger and the moving finger can be distinguished, thereby improving the accuracy of gesture recognition. The above gesture operation recognition method will be described in detail below with reference to the accompanying drawings and embodiments.

[0060] As Figure 3 shown in the flowchart of the gesture recognition method provided by an embodiment of the present application. The method includes S301 - S305, where:

[0061] S301. The stylus 1 is started.

[0062] In some embodiments, starting the stylus 1 may refer to turning on the stylus 1. Exemplarily, the stylus 1 can respond to the user's trigger operation on the power button of the stylus 1, and the stylus 1 is turned on. Among them, the power button can be a physical button or a virtual button.

[0063] In other embodiments, starting the stylus 1 can also be that the stylus 1 wakes up from the sleep mode and enters the working mode. Exemplarily, the stylus 1 can respond to the user's trigger operation on the sleep button of the stylus 1, wakes up from the sleep mode, and enters the working mode. Among them, the sleep button can be a physical button or a virtual button.

[0064] S302. The stylus 1 obtains the detection data reported by the sensor.

[0065] In some embodiments, the sensor can be a touch sensor. The touch sensor can be a capacitive touch sensor or a resistive touch sensor. Among them, the capacitive sensor is further divided into a self - capacitive sensor and a mutual - capacitive sensor.

[0066] The self - capacitive sensor detects the change in the static capacitance generated between the detection electrode and the human body (such as the fingertip). The mutual - capacitive sensor uses transmission nodes and receiving nodes to generate an electromagnetic field and detects the change in the electromagnetic field between these nodes. When there is no user pressing on the self - capacitive sensor, the sensing value is small; when there is a user pressing on the self - capacitive sensor, the sensing value of the self - capacitive sensor is large. When there is no user pressing on the mutual - capacitive sensor, the sensing value is large; when there is a user pressing on the mutual - capacitive sensor, the sensing value of the mutual - capacitive sensor is small. Briefly speaking, when the sensing value of the self - capacitive sensor increases or the sensing value of the mutual - capacitive sensor decreases, it may be that the user presses on the stylus 1. When the sensing value of the self - capacitive sensor decreases or the sensing value of the mutual - capacitive sensor increases, it may be that the user lifts the finger from the stylus 1.

[0067] In some embodiments, the sensor may include multiple sensing units, and one sensing unit corresponds to one sensing position or multiple sensing positions in the sensing area, without limitation. Different sensing positions may correspond to different sensed values. In the embodiments of the present application, after the stylus 1 is activated, the sensor can report detection data. Or after the stylus 1 is activated, in response to a user's touch operation, the sensor starts to report detection data.

[0068] In some embodiments, the detection data includes the sensed values reported by the sensor at each sensing position. The detection data can reflect the sensing positions in the sensing area and the sensed values corresponding to the sensing positions. For example, the detection data may include the sensing positions and the sensed values corresponding to the sensing positions. Exemplarily, the detection data reported by the sensor obtained by the stylus 1 at a certain moment includes multiple sets of data, and each set of data corresponds to a sensing position and a sensed value.

[0069] In some embodiments, the sensor may report detection data periodically. Correspondingly, the stylus 1 obtains the detection data periodically, which can ensure that the stylus 1 monitors the detection data at all times to identify the operations of the user on the stylus 1 through the detection data. In some other embodiments, the sensor may report detection data non-periodically, or report detection data according to a preset reporting frequency, without limitation.

[0070] In some embodiments, the detection data reported by the sensor can be recorded as raw data (hereinafter simply referred to as raw).

[0071] S303. The stylus 1 determines a reference value according to the latest obtained detection data.

[0072] In some embodiments, the sensing area includes multiple sensing positions; different sensing positions may correspond to different reference values. In this embodiment, S303 specifically includes the stylus 1 respectively determining the reference values corresponding to each sensing position.

[0073] In some embodiments, the reference value corresponding to the sensing position can be represented by base.

[0074] In some embodiments, the above S303 can be executed periodically. Exemplarily, the stylus 1 can execute the above S303 when obtaining each frame of detection data, that is, for each frame of detection data obtained, the stylus 1 obtains the latest multiple frames of detection data to determine the reference value corresponding to the sensing position.

[0075] Among them, the reference value corresponding to the sensing position is updated in real time. The reference value corresponding to the sensing position can be specifically determined by the latest detection data reported by the sensor at each moment. In some embodiments, as Figure 4 shown, the above S303 includes S401 and S402:

[0076] S401. The stylus 1 acquires and caches the latest detection data reported by the sensor.

[0077] The latest detection data may include the detection data reported by the sensor at the current moment, as well as some of the detection data reported by the sensor before the current moment, such as the detection data whose time difference between the reporting time and the current moment is less than a threshold, that is, some detection data that is relatively close to the detection data reported at the current moment in time. For example, if the current moment is t9, the previous several moments adjacent to the current moment include t5, t6, t7, and t8. The latest detection data may include the detection data reported at the t9 moment, the detection data reported by the sensor at the t8 moment, and the detection data reported by the sensor at the t7 moment, and so on. In some embodiments, the latest detection data includes m detection data, where m is a positive integer greater than 2, that is, the latest detection data may include multiple detection data.

[0078] In some embodiments, the latest detection data may specifically include multiple frames of detection data reported by the sensor within a recent preset time period. Among them, the preset time period can be set according to the actual situation. The stylus 1 caches multiple detection data reported by the sensor recently, which can facilitate determining the reference value based on the latest multiple frames of detection data. In order to ensure that the cached detection data can determine the reference value, the size of the preset time period can be set according to the number of detection data that the sensor can report. For example, if the stylus 1 determines the reference value based on a frames of detection data, and the sensor can report a data within 50 ms, then the preset time period can be set to be greater than or equal to 50 ms.

[0079] In some embodiments, the preset time period can be set according to the frequency of the sensor reporting detection data. Exemplarily, taking the frequency of the sensor reporting detection data as 100 Hertz (Hz) as an example, that is, the sensor reports 100 detection data per 1 second, and the interval between two detection data is 1 / 100 = 10 milliseconds (ms). Then, if it is necessary to obtain a detection data, the stylus 1 needs (10 * a) ms to obtain a detection data. In this example, that is, the preset time period can be set to (10 * a) ms. For example, when a = 2, the preset time period can be set to 20 ms; or, the preset time period can also be set to be greater than 20 ms.

[0080] In some embodiments, the above S303 may specifically be that when the stylus 1 reports detection data at each frame of the sensor, it acquires and caches the detection data reported at the current moment. When the stylus 1 caches the detection data, it only caches the detection data within the latest preset time period. In some embodiments, a buffer is provided in the stylus 1, and the buffer includes multiple sub-regions, and one sub-region is used to cache one frame of detection data. The above S303 may specifically include: caching the detection data into the sub-regions in the order of the reporting time of the detection data. And, when the last sub-region in the buffer is occupied, the latest acquired detection data is cached starting from the first sub-region.

[0081] In this embodiment, a buffer with a fixed length is provided in the stylus 1 to cache the detection data reported by the sensor, and each sub-region of the buffer is used to cache one detection data. In the order of time, the stylus 1 sequentially caches the detection data of each frame received at each moment into the first sub-region, the second sub-region,... of the buffer. After the last sub-region of the buffer is occupied, the stylus 1 sequentially caches each frame of detection data received next into the first sub-region, the second sub-region,... That is to say, if the last sub-region of the buffer is full, then the stylus 1 will start overwriting the stored data in the first sub-region to cache the data.

[0082] Among them, the number of sub-regions of the buffer can be set to be the same as the number of detection data that can be reported within the preset time period. Or, the number of sub-regions of the buffer can also be set to be greater than the number of detection data that can be reported within the preset time period.

[0083] In some embodiments, the buffer may specifically be a queue data storage structure. A queue is a special linear list, and the special thing is that it only allows deletion operations at the front end of the list, and insertion operations at the rear end of the list. Only the element that enters the queue earliest can be deleted from the queue first, so the queue is also called a first-in first-out (FIFO) linear list.

[0084] Taking the example that the stylus 1 acquires and caches the latest detection data reported by the sensor within the preset time period including 8, when the current moment is the 8th frame, the caching of the detection data in the buffer in the above embodiment can be represented as Table 1.

[0085] Table 1

[0086] sub-region 1 2 3 4 5 6 7 8 detection data raw1 raw2 raw3 raw4 raw5 raw6 raw7 raw8

[0087] And when the current moment is the 9th frame, the caching of the detection data in the buffer in the above embodiment can be represented as Table 2. That is, the detection data raw9 obtained in the 9th frame is cached in the 1st sub-region.

[0088] Table 2

[0089] sub-region 1 2 3 4 5 6 7 8 detection data raw9 raw2 raw3 raw4 raw5 raw6 raw7 raw8

[0090] In the above embodiments, the latest detection data is restricted by the time length. In some other embodiments, the number of detection data cached by the stylus 1 can also be directly restricted. In this embodiment, the stylus 1 needs to record the number of detection data that has been acquired and cached since the starting moment. The above latest detection data can also include the detection data corresponding to the latest preset number reported by the sensor. Among them, the preset number is greater than 2.

[0091] Combined with the description of the above embodiments, it can be seen that the reference value in the embodiments of the present application is determined based on the latest multi-frame data and is updated in real time. In the embodiments of the present application, the stylus 1 determines the reference value corresponding to the sensing position based on the latest detection data reported within a preset time period. Such as S402.

[0092] S402. The stylus 1 determines the reference value corresponding to the sensing position based on the latest detection data.

[0093] From the description of the above embodiments, it can be seen that the reference value is determined based on the latest multi-frame detection data. Then the stylus 1 determines the reference value corresponding to the sensing position based on the latest detection data, and determines the reference value based on at least two or more detection data in the latest detection data. In the first preset time period when the stylus 1 is just powered on, it may not have acquired the specified number of detection data. Exemplarily, if the stylus 1 has just acquired one detection data when it is powered on, then it is impossible to determine the reference value corresponding to the sensing position based on two or more detection data. That is to say, in the above embodiments, when the stylus 1 just starts to acquire the detection data reported by the sensor (such as when it is just powered on), it needs to wait for a certain time before it can start to execute S303 to calculate the reference value. During this waiting time, the stylus 1 has not determined the reference value, and the user may perform operations on the stylus 1.

[0094] To avoid this situation, in some embodiments, when the stylus 1 has not acquired the latest detection data reported by the sensor within a preset time period, the stylus 1 can acquire a default reference value as the reference value corresponding to the sensing position. Among them, the default reference value can be set according to the actual situation and is not limited in the embodiments of the present application. In this way, when the current moment has not reached the preset time point, the operations performed by the user can also be recognized.

[0095] Alternatively, by analyzing the user's usage habits, the time interval that usually elapses from when the device is powered on to when an operation is performed on the stylus 1 can be determined. If the above-mentioned preset time period is short, it can also be defaulted that the user will not perform an operation on the stylus 1 within the first preset time period after power-on. At this time, within the first preset time period after power-on, the reference value may not be set. In this way, it is ensured that the reference values used by the stylus 1 are all determined in real time according to the detection data, which is convenient for improving the accuracy of subsequent gesture recognition.

[0096] Further, in some embodiments, as Figure 5 shown, the above S402 may specifically include S501 and S502:

[0097] S501. The stylus 1 selects m first detection data from the latest detection data.

[0098] Wherein, m is a positive integer greater than or equal to 2.

[0099] In some embodiments, m may be set to be equal to the number of all the latest detection data reported within the preset time period; that is, the stylus 1 determines the reference value according to all the latest detection data reported within the preset time period. Exemplarily, the stylus 1 sequentially obtains and caches a total of 8 detection data, raw1 - raw8, reported by the sensor within the preset time period. When determining the reference value, the 8 detection data, raw1 - raw8, can be selected to determine the reference value.

[0100] In other embodiments, m may also be set to be less than the number of all the latest detection data reported within the preset time period; that is, the stylus 1 determines the reference value based on a part of the latest detection data reported within the preset time period. It should be noted that if the stylus 1 is selected to determine the reference value based on a part of the latest detection data, then this part of the latest detection data at least includes the last reported detection data. Or this part of the latest detection data is the last few frames of detection data reported within the preset time period. Exemplarily, the stylus 1 sequentially obtains and caches a total of 8 detection data, raw1 - raw8, reported by the sensor within the preset time period. When determining the reference value, the 4 detection data, raw5 - raw8, can be selected to determine the reference value.

[0101] In other embodiments, m may also be set to other values such as 5, 6, 7, 9, 10, etc.

[0102] S502. The stylus 1 calculates the induction average value of the m first detection data and uses the induction average value of the m first detection data as the reference value corresponding to the induction position.

[0103] As can be seen from the description of the above embodiments, the detection data is used to reflect the sensing position and the sensing value corresponding to the sensing position. In some embodiments, when the stylus 1 determines the reference value based on the detection data, specifically, the reference value corresponding to the sensing position is determined by the sensing value in the detection data. If the sensing area includes multiple sensing positions, the above S402 specifically includes the stylus 1 determining the corresponding reference value according to the sensing value of each sensing position.

[0104] In some embodiments, the stylus 1 records the average value of the sensing values in the m first detection data as the sensing average value. Exemplarily, taking m = 4 and the latest detection data being raw8 (the current time is the 8th frame) as an example, the stylus 1 can obtain raw5, raw6, raw7, and raw8, sum the sensing values in these 4 detection data and calculate the average value, obtaining the sensing average value = (raw5 + raw6 + raw7 + raw8) / 4; that is, the reference value base = (raw5 + raw6 + raw7 + raw8) / 4. If the current time is the 10th frame, the stylus 1 can obtain raw7, raw8, raw9, and raw10, and calculate the reference value = the sensing average value = (raw7 + raw8 = raw9 + raw10) / 4. And so on.

[0105] In the embodiments of the present application, the average value of the sensing values of the m first detection data in the latest detection data is used as the reference value corresponding to the sensing position. Since the reference value is the average value of the latest p detection data at the current time, the change in the detection data can also be reflected in the reference value. Then, when using the detection data and the reference value to calculate the difference to determine whether the user performs an operation, the finger with long-term pressing and the finger performing the operation (pressing or lifting) can be distinguished. It is beneficial for gesture operation recognition.

[0106] In some embodiments, when the stylus 1 first obtains the latest detection data reported within the preset time period, it can directly calculate the average value of the m first detection data in the latest detection data as the reference value at this moment. And at subsequent times, the reference value at the current time can be updated based on the reference value at the previous time.

[0107] In some other embodiments, if the current stylus 1 obtains the latest detection data reported by the sensor within the preset time period for non-first time, the stylus 1 can update the reference value corresponding to the sensing position at the previous time based on the latest detection data to obtain the reference value corresponding to the sensing position at the current time. In some embodiments, in order to update the initial reference value, a parameter is also required, and this parameter can be the sum value of the m first detection data. As Figure 6 shown, before the above S501, the above method further includes S601:

[0108] S601. The stylus 1 determines whether it has obtained the latest detection data reported by the sensor for the first time currently.

[0109] If it is the first time, execute S501 and S502; if not, update based on the reference value at the previous moment. Please continue to refer to Figure 6 The above method further includes S602 - S607:

[0110] S602. The stylus 1 selects m second detection data from the latest detection data corresponding to the induction position at the previous moment.

[0111] Wherein, when the previous moment is the moment when the sensor first obtains the latest detection data reported within a preset time period, the m second detection data are m first detection data.

[0112] S603. The stylus 1 calculates the first sum value of the m second detection data.

[0113] S604. The stylus 1 obtains the last third detection data in the latest detection data at the current moment.

[0114] Exemplarily, taking m = 4 and the current moment being the 9th frame as an example, the last detection data is raw9; the m second detection data at the previous moment include raw5, raw6, raw7, and raw8, and the first sum value = (raw5 + raw6 + raw7 + raw8). Taking the current moment being the 10th frame as an example, when the last detection data is raw10, the first sum value = (raw6 + raw7 + raw8 + raw9). And so on.

[0115] S605. The stylus 1 calculates the first difference value between any one of the second detection data and the third detection data.

[0116] In some embodiments, the earliest one of the second detection data can be selected to calculate the first difference value with the third detection data, that is, raw5 and raw6 in the above example.

[0117] When the current moment is the 9th frame, the first difference value = (any one of raw5, raw6, raw7, and raw8) - raw9 = raw5 - raw9.

[0118] When the current moment is the 10th frame, the first difference value = (any one of raw6, raw7, raw8, and raw9) - raw10 = raw6 - raw10.

[0119] S606. The stylus 1 calculates the sum value of the first sum value and the first difference value as the second sum value corresponding to the induction position at the current moment.

[0120] In order to reflect the change between the detection data at the current moment and the previous detection data in the sum value at the current moment, in the embodiments of the present application, the stylus 1 calculates the difference between any one of the m second detection data at the previous moment and the third detection data, which is denoted as the first difference in the embodiments of the present application. Then, based on the first difference, the first sum value corresponding to the previous moment is updated to obtain the second difference at the current moment.

[0121] When the current moment is the 9th frame, the second sum value sum9 corresponding to the current moment = sum8 + (raw5 - raw9) = (raw5 + raw6 + raw7 + raw8) + (raw5 - raw9).

[0122] When the current moment is the 10th frame, the second sum value sum10 corresponding to the current moment = sum9 + (raw6 - raw10). It should be understood that in the calculation of the above expressions, the sensed values in raw5 to raw10 are used.

[0123] From the examples of the expressions of the second sum value corresponding to the current moment above, it can be seen that the first differences (raw5 - raw9) and (raw6 - raw10) represent the change between the detection data at the previous moment and the second detection data at the current moment. Therefore, in the embodiments of the present application, the change in the detection data at different time points is reflected in the sum value. Subsequently, when using this sum value to calculate the reference value, the change in the detection data at different time points will also be reflected in the reference value. From the description of the above embodiments, it can be seen that if the user keeps the stylus 1 unchanged, such as pressing it for a long time or lifting it for a long time, then the sensed value corresponding to the sensed position should not change significantly. That is to say, the reference value will not change.

[0124] At the same time, since in the embodiments of the present application, when the latest detection data reported by the sensor within the preset time period is first obtained, the average value of the m first detection data is used as the reference value corresponding to the sensed position. If the user performs a press or an operation, the detection data corresponding to the corresponding sensed position will change, and the reference value will change accordingly. Moreover, since in the above embodiments, the first difference is calculated by using any one of the second detection data and the third detection data, then when the duration of pressing or lifting reaches a certain length, any one of the second detection data should also remain relatively stable and unchanged compared with the third detection data, that is, the change in the sensed value is small.

[0125] Exemplarily, taking a self - contained sensor as an example, when the user raises a finger, the sensed value is 10000. Then, if the state of no user pressing contact (i.e., raised) is maintained for a long time, the sensed value at the corresponding sensing position should remain around 10000. During this period, raw5, raw6, raw7, raw8, and raw9 in the above example are all around 10000. The first sum value sum8 = raw5 + raw6 + raw7 + raw8, and the second sum value sum9=(raw5 + raw6 + raw7 + raw8)+(raw5 - raw9). Among them, both raw5 and raw9 are around 10000, and (raw5 - raw9) is approximately 0. The sensed average value at the previous moment and the sensed average value at the current moment should also be equal. That is, when the user maintains the raised state, the second sum value, the first sum value, and the reference value should all remain relatively stable at different time points.

[0126] If the user keeps pressing without moving for a long time, similar to the state where the user keeps raising for a long time, the second sum value, the first sum value, and the reference value should all remain relatively stable at different time points.

[0127] However, when the user switches from the raised state to the pressed state, the second sum value at the corresponding sensing position will change, and the reference value will also change accordingly. For example, when the current moment is the 10th frame and the user also switches from raising to pressing the stylus 1, raw10 will be different from the detection data raw5, raw6,... raw9 when the user keeps raising. In this way, the second sum value sum10 = sum9+(raw6 - raw10) will change compared to sum9. That is to say, the reference value will change.

[0128] S607. Calculate the quotient of the second sum value and m as the reference value corresponding to the sensing position at the current moment.

[0129] Therefore, through this solution, it is possible to distinguish the finger that has been pressing on the stylus 1 for a long time from the sensing position (finger position) where the operation is being performed. When recognizing gesture operations, it is beneficial to distinguish whether the operations are performed by the same finger and whether it is necessary to determine that a preset gesture operation has been detected, thereby improving the accuracy of gesture operation recognition.

[0130] In the technical solution provided in the embodiment of the present application, the stylus 1 updates the sum value based on the sum value at the previous moment and the detection data at the current moment, and the change in the detection data can be reflected in the sum value. Then, by taking the quotient of the sum value at the current moment and m as the reference value, the change in the detection data can also be reflected in the reference value at the current moment. In this way, when the stylus 1 performs gesture recognition, it is convenient to distinguish the finger that remains unchanged for a long time from the position of the finger where the operation is being performed, and the recognition rate of gesture operations can be improved.

[0131] S304. Obtain the induction change value corresponding to the induction position in the induction area according to the detection data and the reference value corresponding to the induction position in the induction area.

[0132] Combined with the description of S303, it can be known that the reference value is determined based on the latest multi-frame detection data obtained. That is to say, when the detection data changes, the reference value will change accordingly; that is, the reference value is updated in real time with the detection data.

[0133] In some embodiments, the induction change value is the difference between the induction value corresponding to the induction position and the reference value corresponding to the induction position. Exemplarily, when the current moment is the 9th frame, the reference value corresponding to the induction position = sum9 / 4. The induction change value = raw9 - reference value = raw9 - (sum9 / 4).

[0134] S305. The stylus 1 determines whether the touch operation of the user in the induction area conforms to the preset gesture operation according to the induction change value statistically obtained within the first preset duration.

[0135] From the description of the above embodiments, it can be known that when the user presses or lifts on the stylus 1, the induction value of the corresponding induction position will change, and the reference value will also change accordingly. And the induction change value is the difference between the current induction value and the reference value. If the user presses the stylus 1 or lifts from the stylus 1, the induction change value will also change accordingly. Therefore, in the embodiments of the present application, it is possible to determine whether the user lifts or presses at the induction position by observing the change of the induction change value within a period of time.

[0136] In some embodiments, the preset gesture operation can be a combination of multiple user operations; among them, the user operation can be pressing or lifting. Exemplarily, the preset gesture operation can include a double-click gesture operation (a combination of pressing, lifting, and pressing), a triple-click gesture operation (a combination of pressing, lifting, pressing, lifting, and pressing), and so on. Or, the preset gesture operation can sequentially include a combination of short pressing, lifting, and long pressing, and so on. It should be understood that the above preset gesture operations are only examples. In other embodiments, the preset gesture operation can also be other gesture operations including multiple pressings or liftings.

[0137] Among them, the first preset duration is used to limit the execution duration corresponding to the preset gesture operation. The first preset duration can be set according to the actual situation. Taking the double-click gesture operation as an example, the stylus 1 usually has to recognize that the user has continuously performed pressing, lifting, and pressing in the induction area, and the time interval between the two pressings is relatively short, then it can be determined that the user has triggered the double-click gesture operation in the induction area.

[0138] In addition to presetting the execution duration of a gesture operation, when determining whether a user's operation in the sensing area conforms to a preset operation based on a single user operation, it is usually also necessary to determine whether the sensing positions corresponding to different operations are close. Still taking the double-tap gesture operation as an example, the two presses of the double-tap gesture operation usually occur at close sensing positions. Therefore, when counting the sensing change value within the first preset duration, it is also necessary to determine whether the distance between the sensing positions corresponding to the two presses is close. Only if it is can it be determined that the double-tap gesture operation is triggered.

[0139] In some other embodiments, the specific durations of pressing and lifting in a preset gesture operation can also be restricted. Taking the double-tap gesture operation as an example, the duration of the first press should not be too long. Therefore, the duration condition of the first press can be set. For example, it can be set that the continuous duration of the first press in the double-tap gesture operation cannot exceed a third preset duration. Among them, the third preset duration can be set according to the actual situation. Exemplarily, the third preset duration can be set to 60 ms, 80 ms, 100 ms, and so on.

[0140] In the technical solution provided by the embodiments of the present application, restricting the pressing duration in a preset gesture operation can reduce the possibility of recognizing other operations of the user as a preset gesture operation and improve the accuracy of recognizing gesture operations.

[0141] In some embodiments, in combination with restricting the continuous duration of the first press in the double-tap gesture operation, in the above S401, when the stylus 1 obtains and caches the latest detection data reported by the sensor within a preset time period, the preset time period can be set to the third preset duration. Such as 80 ms.

[0142] Further, according to the frequency of the sensor reporting detection data, the restriction of the preset time period can be converted into a restriction on the number of detection data. Exemplarily, the frequency of the sensor reporting detection data is 100 Hz, that is, 100 detection data are reported per second. The interval between every two detection data is 1 / 100 = 10 ms. Taking the preset time period = 80 ms as an example, the number of detection data that the sensor can report within the preset time period is 8. Therefore, the above S401 can also be replaced by the stylus 1 obtaining and caching 8 latest detection data reported by the sensor. It should be understood that the above frequency of the sensor reporting detection data is only an example. In other embodiments, the frequency of the sensor reporting detection data can also be other frequencies.

[0143] In the technical solution provided by the embodiments of the present application, according to the duration of a single press in a preset gesture operation, restricting the duration or the number of the detection data cached by the stylus 1 can reduce the storage space on the premise of meeting the requirements of gesture operation judgment for detection data.

[0144] In some embodiments, such asFigure 7 As shown, the above S305 may specifically include S701 - S703:

[0145] S701. Calculate the second difference value between the induction change values at two adjacent moments within the first preset duration.

[0146] Let diff represent the induction change value. The second difference = diff(n) - diff(n - 1). Here, n represents any moment within the first preset duration. As can be known from the description in the above embodiments, when the detection data changes, the reference value changes, and the induction change value also changes. It should be understood that the change of the detection data, the change of the reference value, and the change of the induction change value all represent the change of the current moment compared with the previous moment. That is, raw10 changes compared with raw9, base10 changes compared with base9, and diff10 changes compared with diff9. At this time, the value obtained by the second difference = diff10 - diff9 is not equal to 0. Therefore, in the embodiments of the present application, it is possible to determine whether the user has performed a press or a lift by calculating the difference between the induction change values at two adjacent moments.

[0147] S702. If the absolute value of the second difference corresponding to the target induction position is greater than the preset threshold within the second preset duration, it is determined that the user has performed a preset operation at the target induction position.

[0148] Among them, the preset operation includes the user pressing or lifting on the electronic device. As can be known from the description of the above embodiments, the reference value is determined based on multiple frames of detection data in the latest detection data. Therefore, when the detection data changes, the reference value will change accordingly, but the change of the reference value is not as fast as the change of the detection data. Thus, the absolute value of the induction change value should be greater than the preset threshold, and the induction change value being greater than the preset threshold will last for a short period of time. Among them, the preset threshold can be set according to the actual situation.

[0149] Therefore, in the embodiments of the present application, the stylus 1 will determine that the user has performed a press operation or a lift operation at the target induction position only when it detects that the absolute value of the second difference is greater than the preset threshold and the absolute value of the second difference remains greater than the preset threshold for a continuous period of time (the second preset duration). Since the second preset duration is the single - operation time of the press or lift operation performed by the user in the preset gesture operation, the second preset duration is less than the first preset duration. The size of the second preset duration can be set according to the actual situation and is not limited in the embodiments of the present application.

[0150] S703. If the operations of the user in the sensing area within the first preset duration include combinations of pressing, lifting, and pressing, and the distance between the sensing positions corresponding to the two presses is less than the first preset distance threshold, it is determined that the operation of the user in the sensing area conforms to the double-tap gesture operation.

[0151] Among them, the preset gesture operations include double-tap gesture operations.

[0152] Taking the double-tap gesture operation as an example, the two pressing operations of the user may not fall on the same sensing position, but usually fall on sensing positions that are not far apart. If it is detected that the sensing positions corresponding to the two pressing operations are far apart, then there may be a possibility that multiple fingers of the user are simultaneously performing operations on the stylus 1. Therefore, in the embodiments of the present application, when determining the double-tap gesture operation of the user in the sensing area, in addition to determining whether there is a combination of pressing, lifting, and pressing within the first preset duration, it is also necessary to determine whether the sensing positions corresponding to the two presses appear in close positions. If so, this combination of pressing, lifting, and pressing can be determined as the double-tap gesture operation performed by the user in the sensing area. If the distance between the sensing positions corresponding to the two presses is greater than the first preset distance threshold, it is determined that the operation of the user in the sensing area does not conform to the double-tap gesture operation.

[0153] In the technical solution provided by the embodiments of the present application, by determining whether the user has sequentially performed a combination of pressing, lifting, and pressing at close positions in the sensing area within a certain duration, it is determined whether the user has triggered the double-tap gesture operation. Since when determining the pressing or lifting operation, the latest reference value is determined in real time according to the latest detection data, that is, the reference is quickly refreshed, it can effectively distinguish the sensing position corresponding to the finger that is held down for a long time and the sensing position that is performing the operation. In this way, when judging the gesture operation, the influence of the finger information of the non-operating finger on the recognition of the gesture operation is avoided, and thus the accuracy can be improved. And the false touch rate and recognition rate can be ensured at the same time.

[0154] When judging the double-tap gesture operation, it is possible that the sensing value when the user is performing other operations is similar to the sensing value when the user is performing the double-tap gesture operation, that is, it is possible to recognize other operations of the user as the double-tap gesture operation. To reduce the possibility of this misjudgment, in the above S703, the second differences of multiple sensing positions at the same moment can be judged first to determine whether there are simultaneously two second differences whose absolute values are greater than the preset threshold, and one of them is positive and the other is negative, and the distance is less than the second preset distance threshold.

[0155] If one of the second differences is positive and the other is negative, and the absolute values of both second differences are greater than a preset threshold, it indicates that at the sensing positions corresponding to the two second differences, multiple fingers of the user are respectively performing a pressing operation and a lifting operation. In such a case, it should not be recognized as a double-tap gesture operation. Exemplarily, when multiple fingers of the user move back and forth on the sensing area of the body of the stylus 1, or when the user rotates the stylus 1 with a finger, it is possible that the second differences corresponding to two sensing positions satisfy the above conditions at the same time.

[0156] In some embodiments, the above S703 may specifically include: within a first preset duration, if at the same time, the absolute values of the second differences corresponding to two sensing positions are both greater than a preset threshold, and one of the second differences is greater than 0, the other second difference is less than 0, and the distance between the sensing positions corresponding to the two second differences is less than a second preset distance threshold, it is determined that the user's operation in the sensing area does not conform to the double-tap gesture operation.

[0157] It should be understood that if within the first preset duration, there is no situation where a positive second difference with an absolute value greater than the preset threshold and a negative second difference with an absolute value greater than the preset threshold appear simultaneously, and the distance between the sensing positions corresponding to the positive second difference and the negative second difference is less than the second preset distance threshold, it can be considered a normal situation. At this time, if the stylus 1 detects that there is a second difference in the sensing area that satisfies the conditions of the above S703, it can be determined that the user has performed a double-tap gesture operation in the sensing area.

[0158] In the technical solution provided by the embodiments of the present application, by setting the abnormal situation determination conditions, the possibility that other operations of the user are misrecognized as double-tap gesture operations can be reduced. Thereby improving the accuracy of gesture operation recognition.

[0159] The embodiments of the present application also provide a chip system, as Figure 8 shown, the chip system 80 includes at least one processor 801 and at least one interface circuit 802. The processor 801 and the interface circuit 802 can be interconnected through a line. For example, the interface circuit 802 can be used to receive signals from other devices (such as the memory of a computer device). Again, for example, the interface circuit 802 can be used to send signals to other devices (such as the processor 801). Exemplarily, the interface circuit 802 can read the instructions stored in the memory and send the instructions to the processor 801. When the instructions are executed by the processor 801, the computer device can execute the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, and the embodiments of the present application do not make specific limitations on this.

[0160] The embodiments of the present application also provide a computer-readable storage medium, which includes computer instructions. When the computer instructions run on the above-mentioned electronic device (such as the stylus 1), the electronic device is enabled to execute each function or step performed by the stylus 1 in the above method embodiments.

[0161] The embodiments of the present application also provide a computer program product. When the computer program product runs on a computer, the computer is enabled to execute each function or step performed by the stylus 1 in the above method embodiments. Wherein, the computer may be an electronic device, such as the stylus 1.

[0162] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0163] In the several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0164] The unit described as a separated component may or may not be physically separated. The component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0165] In addition, each functional unit in the embodiments of the present application can be integrated in a processing unit, or each unit exists physically alone, or two or more units are integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0166] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0167] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A gesture operation recognition method, characterized in that The method is applied to an electronic device. An induction area is provided on the surface of the electronic device. The electronic device includes a sensor corresponding to the induction area. The method includes: Obtaining detection data reported by the sensor; the detection data is used to reflect the induction position in the induction area and the induction value corresponding to the induction position; the induction area includes one or more induction positions; the detection data includes the induction values corresponding to each induction position; According to the detection data and the reference value corresponding to the induction position in the induction area, obtaining the induction change value corresponding to the induction position in the induction area; the reference value is obtained based on the latest detection data reported by the sensor and is updated in real time. The induction change value is the difference between the induction value corresponding to the induction position and the reference value corresponding to the induction position; different induction positions correspond to different reference values; According to the induction change values corresponding to each induction position statistically obtained within a first preset time period, differentiating the induction positions without operations and the induction positions with operations, and determining whether the operations of the user in the induction area conform to the preset gesture operations according to the induction change values of the induction positions with operations.

2. The method according to claim 1, characterized in that, Before obtaining the induction change value corresponding to the induction position in the induction area according to the detection data and the reference value corresponding to the induction position in the induction area, the method further includes: Obtaining and caching the latest detection data reported by the sensor; the latest detection data includes the detection data reported by the sensor within the most recent preset time period, or the latest preset number of detection data reported by the sensor; Obtaining the reference value corresponding to the induction position based on the latest detection data.

3. The method according to claim 2, wherein A buffer area is provided in the electronic device. The buffer area includes a plurality of sub-areas. One sub-area is used to cache one frame of detection data. Caching the latest detection data reported by the sensor includes: Caching the latest detection data into the sub-area in the reporting time order of the detection data; In the case where the last sub-area in the buffer area is occupied, caching the obtained latest detection data starting from the first sub-area.

4. The method according to claim 2 or 3, characterized in that, Obtaining the reference value corresponding to the induction position based on the latest detection data includes: Selecting m first detection data from the latest detection data; where m is a positive integer greater than or equal to 2; Calculating the induction average value of the m first detection data and using the induction average value of the m first detection data as the reference value corresponding to the induction position.

5. The method according to claim 4, wherein Calculating the induction average value of the m first detection data and using the induction average value of the latest detection data as the reference value corresponding to the induction position includes: When the latest detection data reported by the sensor within the preset time period is obtained for the first time, calculating the induction average value of the m first detection data and using the induction average value of the m first detection data as the reference value corresponding to the induction position at the current moment.

6. The method according to claim 5, wherein Obtaining the reference value corresponding to the induction position based on the latest detection data further includes: When the latest detection data reported by the sensor within the preset time period is not obtained for the first time, update the reference value corresponding to the induction position at the previous moment based on the latest detection data to obtain the reference value corresponding to the induction position at the current moment.

7. The method according to claim 6, wherein The updating the reference value corresponding to the induction position at the previous moment based on the latest detection data to obtain the reference value corresponding to the induction position at the current moment includes: Select m second detection data from the latest detection data corresponding to the induction position at the previous moment; when the previous moment is the moment when the latest detection data reported by the sensor within the preset time period is obtained for the first time, the m second detection data are the m first detection data; Calculate the first sum value of the m second detection data; Obtain the last third detection data in the latest detection data at the current moment; Calculate the first difference between any one of the second detection data and the third detection data; Calculate the sum value of the first sum value and the first difference as the second sum value corresponding to the induction position at the current moment; Calculate the quotient value of the second sum value and m as the reference value corresponding to the induction position at the current moment.

8. The method according to any one of claims 1 - 3 or 5 - 7, characterized in that, The determining whether the operation of the user in the induction area conforms to the preset gesture operation according to the induction change value statistically obtained within the first preset time period includes: Calculate the second difference between the induction change values between two adjacent moments within the first preset time period; If the absolute values of the second differences corresponding to the target induction position are all greater than the preset threshold within the second preset time period, it is determined that the user has performed a preset operation at the target induction position; the preset operation includes pressing or lifting by the user on the electronic device; If the operation of the user in the induction area within the first preset time period includes a combination of pressing, lifting and pressing, and the distance between the induction positions corresponding to the two presses is less than the first preset distance threshold, it is determined that the operation of the user in the induction area conforms to the double-click gesture operation, and the preset gesture operation includes the double-click gesture operation.

9. The method according to claim 8, characterized in that, The determining whether the touch operation of the user in the induction area conforms to the preset gesture operation according to the induction change value statistically obtained within the first preset time period further includes: Within the first preset time period, if at the same moment, the absolute values of the second differences corresponding to two induction positions are both greater than the preset threshold, and one of the second differences is greater than 0 and the other second difference is less than 0, and the distance between the induction positions corresponding to the two second differences is less than the second preset distance threshold, it is determined that the operation of the user in the induction area does not conform to the double-click gesture operation.

10. The method according to any one of claims 1-3 or 5-7 or 9, characterized in that, The electronic device includes a stylus; the preset gesture operation includes a double-click gesture operation or a triple-click gesture operation.

11. An electronic device, characterized in that, The electronic device includes: a processor and a memory; the memory stores computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the method according to any one of claims 1-10.

12. A computer-readable storage medium, characterized in that, Comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Touch control method and electronic equipment

    CN110618763A