Knock detection method and device, electronic equipment and computer readable storage medium

By fusing multi-sensor data and combining sensor data from motion, wearing, and touch states, effective tapping signals are filtered out, solving the problems of false touches and low accuracy in existing headphone devices and achieving higher accuracy in tapping signal detection and improved user experience.

CN121785459APending Publication Date: 2026-04-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing tap detection technology is easily affected by environmental interference in small smart devices such as headphones, resulting in low accuracy and high false touch rate. It is particularly inaccurate and inconvenient to operate when users are adjusting headphones or exercising.

Method used

A multi-sensor data fusion method is adopted. Candidate tapping signals are detected by the first sensor, and combined with the sensor data of motion state, wearing state and touch state, a detection threshold is set to filter out the effective tapping signals, thereby reducing false recognition and false touch.

Benefits of technology

It improves the accuracy of tap signal detection, reduces false recognition and accidental touches, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121785459A_ABST
    Figure CN121785459A_ABST
Patent Text Reader

Abstract

The invention provides a knock detection method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: carrying out knocking signal detection on the electronic equipment through a first sensor, and determining at least one candidate knocking signal; performing at least one of motion state detection, wearing state detection and touch state detection on the electronic equipment through at least one second sensor, and determining at least one state sensing data; and based on the at least one type of state sensing data, determining whether the at least one candidate tapping signal contains a tapping signal generated by a tapping event or not. According to the application, the accuracy of knocking signal detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a tapping detection method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] Currently, tapping is a common interaction method used in user terminals such as headphones. However, in actual use, some non-tapping actions, such as adjusting headphones, motion vibration, or other interactive actions, generate signal characteristics that are quite similar to those of tapping signals. These signals can easily be misidentified as tapping signals, leading to accidental touches and reducing the accuracy of tapping signal detection. Summary of the Invention

[0003] This application provides a method, apparatus, electronic device, and computer-readable storage medium for tapping detection, which can improve the accuracy of tapping signal detection.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a tapping detection method, the method comprising: The first sensor detects the tapping signal of the electronic device and identifies at least one candidate tapping signal. Using at least one second sensor, the electronic device performs at least one of motion state detection, wearing state detection, and touch state detection to determine at least one state sensing data. Based on the at least one state sensing data, determine whether the at least one candidate tapping signal contains a tapping signal generated by a tapping event.

[0005] This application provides a tapping detection device, including: The first detection module is used to detect the knocking signal of the electronic device through the first sensor and determine at least one candidate knocking signal. The second detection module is used to detect at least one of motion state, wearing state and touch state of the electronic device through at least one second sensor, and determine at least one state sensing data. The determining module is used to determine, based on the at least one state sensing data, whether the at least one candidate tapping signal contains a tapping signal generated by a tapping event.

[0006] This application provides an electronic device, the electronic device comprising: Memory is used to store executable instructions or computer programs. When the processor executes computer-executable instructions or computer programs stored in the memory, it implements the tapping detection method provided in the embodiments of this application.

[0007] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions, which, when executed by a processor, implements the tapping detection method provided in this application.

[0008] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the tapping detection method provided in this application.

[0009] The embodiments of this application have the following beneficial effects: When at least one candidate tap signal is detected from an electronic device via a first sensor, at least one of motion state detection, wearing state detection, and touch state detection can be performed using at least one second sensor to determine at least one state sensing data. Based on this state sensing data, it can be determined whether the at least one candidate tap signal contains a tap signal generated by a tapping event. This allows the use of the electronic device's motion state, wearing state, and touch state to filter the initially detected at least one candidate tap signal, thus determining whether it is a tap signal generated by a tapping event. Consequently, interference from the electronic device's usage state, such as motion state, wearing state, and touch state, on tap signal detection is reduced, false recognition and accidental touches are decreased, and the accuracy of tap signal detection is improved. Attached Figure Description

[0010] Figure 1 This is a schematic flowchart of an optional tapping signal detection method provided in an embodiment of this application; Figure 2 This is a schematic flowchart of an optional tapping signal detection method provided in an embodiment of this application; Figure 3 This is a schematic diagram of an optional process for applying a tapping signal detection method provided in this application to a real-world scenario; Figure 4 This is a schematic diagram of the composition structure of a knock signal detection device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0012] Currently, tap detection functionality can be applied to various smart products. Tapping detection can be achieved through multiple sensors, as shown in the following examples: 1. Piezoelectric Sensor. Utilizing the piezoelectric effect, it generates a change in electrical charge when struck, making it suitable for detecting minute vibrations and impacts. Piezoelectric sensors have high sensitivity, accurately detecting pressing and sliding operations, reducing false triggers. They are suitable for scenarios requiring precise control, such as volume adjustment and playback control.

[0013] 2. Microphone. It captures the sound signals generated by tapping and converts them into electrical signals for processing, making it suitable for scenarios requiring sound analysis.

[0014] 3. Resistive / Capacitive Touch Sensors. These sensors detect touch or tapping by sensing changes in resistance / capacitance. Capacitive touch sensors, in particular, offer high sensitivity and fast response, making them suitable for touch and swipe operations.

[0015] 4. Inertial Measurement Unit (IMU). IMUs detect vibrations and shocks by measuring changes in acceleration and are commonly used in applications requiring high sensitivity. IMUs, such as accelerometers, can detect impacts and movement, making them suitable for basic impact control.

[0016] However, current impact detection technologies have some shortcomings in terms of hardware sensor selection, technical performance, and utilization of multi-sensor information.

[0017] In terms of hardware sensors, some related technologies use sensors that are large in size, require calibration, are susceptible to environmental interference, and are costly, posing challenges for integration into small smart devices such as headphones and limiting their application scenarios.

[0018] In terms of technical performance, some related technologies suffer from low accuracy and high false touch rates, or require users to press or tap specific locations, making operation inconvenient. These drawbacks are particularly pronounced when users are adjusting headphones or exercising, including unresponsive taps, incorrect responses, accidental touches during movement, and general inconvenience. Some headphone products support both tap interaction and long-press functions, which can also interfere with tap detection, increasing the risk of accidental taps.

[0019] This application provides a tapping detection method, apparatus, electronic device, and computer-readable storage medium, which can improve the accuracy of tapping signal detection and enhance user experience by utilizing multi-sensor data fusion. The tapping signal detection method of this application is applied to an electronic device. In some embodiments, the electronic device can be a smartphone, tablet computer, laptop computer, portable music player, portable gaming device, or smart wearable device, such as a smartwatch, smart bracelet, smart glasses, or wearable gaming device. The specific device can be selected according to the actual situation, and this application does not limit the choice.

[0020] See Figure 1 , Figure 1 An optional flowchart of a tapping detection method provided in an embodiment of this application includes: S101. The first sensor detects the knocking signal of the electronic device and determines at least one candidate knocking signal.

[0021] In this embodiment, the electronic device is equipped with a first sensor and at least one second sensor. The first sensor is used to detect tapping signals on the electronic device. In some embodiments, the first sensor may include, but is not limited to, a gravity sensor (Gsensor), an acceleration sensor, a piezoelectric vibration sensor, a microphone, an inertial measurement unit (IMU), etc. The gravity sensor may include a triaxial gravity sensor, a single-axis gravity sensor, a dual-axis gravity sensor, etc., and the specific selection is based on the actual situation. This embodiment does not limit the choice.

[0022] In this embodiment of the application, sensing data is collected by a first sensor on an electronic device. Based on the collected sensing data and combined with the characteristics of the striking signal, such as the signal width (amplitude intensity value of the striking signal) and height (duration of the striking signal from rising to falling), at least one candidate striking signal is determined.

[0023] For example, when a user taps the earphone shell, the gravity sensor receives a brief, high-amplitude pulse signal. Thus, an amplitude threshold and a duration range can be preset. When the acceleration of a certain axis of the gravity sensor exceeds the amplitude threshold and the signal duration is within the duration range, it is considered that a tap may have been received, and the corresponding signal is used as a candidate tap signal.

[0024] S102. Using at least one second sensor, perform at least one of motion state detection, wearing state detection, and touch state detection on the electronic device to determine at least one state sensing data.

[0025] In real-world applications, the usage state of electronic devices may also generate signals with characteristics consistent with tapping signals, which can then be detected by the first sensor. For example, when a user runs while wearing headphones, the collision between the headphones and the ear can generate a signal resembling a tapping signal. Similarly, when a user adjusts the position of the headphones by touching them, or intends to use other non-tapping touch controls such as long presses or swipes, similar tapping signals may also be generated. These signals are easily detected as tapping signals and processed according to the tapping event handling logic, causing the headphones to perform actions unintended by the user, resulting in accidental touches. In other words, at least one candidate tapping signal may contain candidate tapping signals generated by non-tapping events.

[0026] This application embodiment uses at least one second sensor on the electronic device to perform at least one of motion state detection, wearing state detection, and touch state detection to determine at least one state sensing data. In some embodiments, the at least one state sensing data includes at least one of motion sensing data, wearing sensing data, and touch sensing data. Based on the at least one state sensing data, the current usage state of the electronic device can be identified, thereby avoiding interference caused by the usage state of the electronic device on the detection of tap signals.

[0027] In some embodiments, at least one second sensor may include at least one of a motion sensor, a proximity sensor, and a touch sensor. The motion sensor is used to detect the motion state of the electronic device and determine motion sensing data; the proximity sensor is used to detect the wearing status of the electronic device and determine wearing sensing data; and the touch sensor is used to detect the touch state of the electronic device and determine touch sensing data. In practical applications, one or more of the at least one second sensor can be configured for detection as needed, and this application embodiment does not impose limitations.

[0028] For example, motion sensors may include, but are not limited to, gravity sensors, accelerometers, and IMUs. It should be noted that motion sensors configured on electronic devices, such as gravity sensors, accelerometers, and IMUs, can function as both a first sensor for detecting tap signals and a second sensor for detecting motion states; that is, the first sensor and the second sensor used for motion state detection can be the same or reused.

[0029] For example, proximity sensors may include, but are not limited to, capacitive sensors, infrared sensors, etc.; touch sensors include, but are not limited to, piezoelectric touch sensors, resistive touch sensors, optical touch sensors, etc.

[0030] S103. Based on at least one state sensing data, determine whether at least one candidate knock signal contains a knock signal generated by a knock event.

[0031] In this embodiment, at least one state sensor data characterizes at least one of the motion state, wearing state, and touch state of the electronic device. Therefore, at least one state sensor data can be used to remove false detection signals caused by at least one of the motion state, wearing state, and touch state from at least one candidate tapping signal. For example, since falsely detected tapping signals caused by the normal usage state of the electronic device differ from valid tapping signals in signal strength or amplitude, the detection threshold for tapping signals can be increased when, based on at least one state sensor data, the electronic device is determined to be in a motion state, and / or in an abnormal wearing state (e.g., not worn or with unstable wearing), and / or receiving other non-tapping touch behaviors. The at least one candidate tapping signal is then filtered according to the increased detection threshold to remove falsely detected candidate tapping signals, thereby determining whether the at least one candidate tapping signal contains a tapping signal generated by a tapping event, i.e., whether the at least one candidate tapping signal contains a valid tapping signal. Alternatively, based on data from at least one state sensor, the electronic device is used to determine accidental touch scenarios. If the electronic device is determined to be in a state that is prone to accidental touch, at least one candidate tap signal is determined to be a tap signal that does not contain a tap signal generated by a tap event. That is, the device does not respond to at least one candidate tap signal detected by the first sensor, thereby achieving the purpose of shielding accidental touch.

[0032] It is understood that the embodiments of this application can utilize the motion state, wearing state, and touch state of the electronic device to filter at least one initially detected candidate tapping signal to determine whether it is a tapping signal generated by a tapping event. This reduces the interference of the electronic device's usage state, such as motion state, wearing state, and touch state, on tapping signal detection, reduces false recognition and accidental touches, and improves the accuracy of tapping signal detection.

[0033] In some embodiments, the first sensor includes a multi-axis gravity sensor; the process described above of detecting a knock signal on an electronic device using the first sensor and determining at least one candidate knock signal includes: Multiple acceleration time-series signals corresponding to multiple axes are collected using a multi-axis gravity sensor; the multiple acceleration time-series signals are differentially aggregated to determine the aggregated signal; the aggregated signal is then subjected to impact signal detection to determine at least one candidate impact signal.

[0034] In this embodiment, a multi-axis gravity sensor (multi-axis G-sensor) can be used as the first sensor for tap signal detection. The multi-axis G-sensor features a high sampling rate and low latency. Because the tap signal duration is short, the sensor's high sampling rate captures more instantaneous signals, making the tap signal characteristics more pronounced and resulting in a better sensitivity experience. The high sampling rate also corresponds to a shorter sampling interval, supporting higher frequency algorithm operation and enabling more timely detection of user interaction actions, leading to a better response time experience. Furthermore, the sensor responds to any touch of the earphone, resulting in a better wide-area tap consistency experience.

[0035] In this embodiment of the application, when using a multi-axis gravity sensor as the first sensor for impact signal detection, the acceleration time-series signal corresponding to each axis (such as the x-axis, y-axis, and z-axis) of the multi-axis gravity sensor can be acquired. In some embodiments, the acceleration time-series signal corresponding to each axis may include the original acceleration value sequence corresponding to that axis.

[0036] In actual use, when a user strikes the earphone from different locations (such as the head, middle, or tail of the earphone stem, or the outside of the earphone cavity), the resulting signal waveforms, amplitudes, and frequency characteristics may vary significantly due to differences in mechanical structure, transmission paths, and sensor sensing directions. Alternatively, when a user strikes from different directions (such as frontal, side, or oblique strikes), the signal intensity ratios excited on different axes will differ. This application's embodiments perform differential aggregation on multiple acceleration timing signals to determine an aggregated signal, fusing information from multiple axes into a single signal. This minimizes differences and ensures that the striking signal exhibits consistent behavior across different striking positions and directions.

[0037] In some embodiments, differential operations can be performed on the acceleration time-series signals of each axis in multiple acceleration time-series signals. For example, the difference between two consecutive sampling points is calculated to obtain the differential signal for each axis. Through differential processing, static offsets of acceleration values ​​on that axis (such as the constant component of gravitational acceleration) can be eliminated and dynamic changes (such as impacts caused by knocking) can be highlighted. Through an aggregation process, the differential signals of multiple axes are merged into a single signal as an aggregated signal, thereby completing the differential aggregation of multiple acceleration time-series signals.

[0038] It is understood that the embodiments of this application reduce the variation of the knock signal characteristics caused by factors such as knock position and knock direction through the differential aggregation process, so that the knock signals generated under various conditions have higher consistency, thereby improving the accuracy and robustness of knock detection.

[0039] In some embodiments, based on Figure 1The process in S103 above, which determines whether at least one candidate tapping signal contains a tapping signal generated by a tapping event based on at least one state sensing data, can be as follows: Figure 2 As shown, it includes: S201. Determine at least one detection threshold based on at least one state sensing data.

[0040] S202. Combining at least one detection threshold, determine whether at least one candidate knock signal contains a knock signal generated by a knock event.

[0041] In this embodiment, based on each state sensing data in at least one state sensing data set, a detection threshold corresponding to that state sensing data can be determined, thereby determining at least one detection threshold based on at least one state sensing data set. For example, a first detection threshold is determined based on motion sensing data; a second detection threshold is determined based on wear sensing data; and a third detection threshold is determined based on touch sensing data. Combining the at least one detection threshold, a total detection threshold can be determined. At least one candidate tapping signal is filtered according to the total detection threshold to determine whether the at least one candidate tapping signal contains a candidate tapping signal with a signal strength or signal amplitude greater than or equal to the total detection threshold. If it does, the candidate tapping signal with a signal strength or signal amplitude greater than or equal to the total detection threshold is used as the tapping signal generated by the tapping event, and a tapping event response can be performed on the filtered valid tapping signal. If it does not contain, it is determined that the at least one candidate tapping signal does not contain the tapping signal generated by the tapping event, and no tapping event response is performed.

[0042] It should be noted that, based on each type of state sensor data, different detection thresholds can be determined according to the different usage states of the electronic device represented by that state sensor data. For example, if the motion sensor data indicates that the electronic device is stationary, a lower detection threshold, such as 0, can be determined; if the motion sensor data indicates that the electronic device is in motion, a higher detection threshold can be determined. Therefore, increasing the detection threshold when the electronic device is in motion (such as when a user is running) is equivalent to decreasing the detection sensitivity to reduce false touches; decreasing the detection threshold when stationary is equivalent to increasing the detection sensitivity to more easily trigger taps.

[0043] It should be noted that at least one detection threshold may include a detection threshold of 0, indicating that the usage state determined based on the motion sensing data has minimal interference with the detection of the tapping signal.

[0044] In some embodiments, the detection threshold involved in this application may include a threshold of at least one dimension for setting a parameter threshold for a valid tap signal from at least one dimension.

[0045] For example, the detection threshold may be a combination of one or more of the following thresholds: a striking force threshold, a peak acceleration threshold, a vibration energy threshold, and a pulse width threshold. The peak acceleration threshold, striking force threshold, and vibration energy threshold are used to set thresholds based on the signal amplitude or signal intensity; the pulse width threshold is used to set thresholds based on the duration of the striking signal. Specifically, the peak acceleration threshold is used to determine the peak acceleration of the candidate striking signal; the striking force threshold is used to determine the striking force of the candidate striking signal, which can be obtained by converting the acceleration data corresponding to the candidate striking signal; and the vibration energy threshold is used to determine the vibration energy intensity of the candidate striking signal, which can be obtained by converting the acceleration data corresponding to the candidate striking signal.

[0046] In some embodiments, the detection thresholds involved in this application can be calibrated using empirical values ​​or experimental methods. For example, for the peak acceleration threshold, acceleration data generated by striking at different forces and locations can be collected in advance through a large number of striking tests. The collected acceleration data can be statistically analyzed to analyze the differences in acceleration characteristics between effective striking and invalid interference (such as vibration from walking or talking), thereby determining an acceleration peak threshold that can distinguish between real striking and false triggering to the greatest extent possible, and serving as the peak acceleration threshold.

[0047] It is understandable that by using at least one state sensing data to set a detection threshold for the tapping signal from at least one dimension, and combining at least one detection threshold to determine whether at least one candidate tapping signal contains a tapping signal generated by a tapping event, the detection threshold for the tapping signal is adaptively updated according to at least one usage state of the electronic device, that is, the detection sensitivity of the tapping signal is adaptively updated, thereby improving the accuracy of tapping signal detection.

[0048] In some embodiments, at least one state sensing data includes: motion sensing data; at least one detection threshold includes: a first detection threshold; determining at least one detection threshold based on at least one state sensing data includes: Based on motion sensing data, the motion amplitude of the electronic device is determined; based on the motion amplitude and the conversion relationship between the motion amplitude and the detection threshold, a first detection threshold is determined.

[0049] In this embodiment, at least one second sensor may include a motion sensor, and at least one state sensing data may include motion sensing data collected by the motion sensor. That is, motion sensing data can be used to determine the motion state of the electronic device through motion sensor detection. For example, motion sensing data may include acceleration information collected by a gravity sensor or IMU. Based on the motion sensing data, the motion amplitude of the electronic device can be calculated. The motion amplitude can characterize the intensity of the electronic device's motion. When using an electronic device such as headphones in a motion scenario, the headphones are prone to loosening and colliding with the ear canal, generating a signal with characteristics similar to a knocking signal. This embodiment determines a first detection threshold based on the motion amplitude and the conversion relationship between the motion amplitude and the detection threshold. The first detection threshold can be used to adjust the detection sensitivity of the electronic device in motion.

[0050] In some embodiments, the conversion relationship between motion amplitude and detection threshold may include a preset correspondence between motion amplitude and detection threshold.

[0051] For example, when the motion amplitude represents the electronic device as being in a stationary state, a preset threshold can be determined as the first detection threshold. For example, when the motion amplitude represents the electronic device as being stationary, the first detection threshold can be 0, or a value close to 0. When the motion amplitude represents the electronic device as being in motion, another preset threshold can be determined as the first detection threshold, wherein the first detection threshold in the motion state is higher than the first detection threshold in the stationary state. For example, taking the striking force as the detection threshold, the value range of the first detection threshold in the motion state can include 3000-8000 millinewtons (mN), for example, 5000 mN. The specific value can be selected according to the actual situation, and this application embodiment does not limit it.

[0052] For example, the motion amplitude may include at least one motion amplitude level, and each motion amplitude level corresponds to a preset detection threshold. That is, the preset correspondence between motion amplitude and detection threshold may include the preset correspondence between motion amplitude level and detection threshold. For each motion amplitude level, a different detection threshold may be preset accordingly, and the detection threshold corresponding to each motion amplitude level is proportional to the intensity of motion represented by that motion amplitude level. In this way, based on the motion amplitude level of the electronic device, the corresponding detection threshold can be determined as the first detection threshold in the preset correspondence between motion amplitude level and detection threshold. For example, at least one motion amplitude level may represent the intensity of motion from low to high, such as including: a first level (representing stillness or slight movement), a second level (representing mild movement, such as walking), a third level (representing moderate movement, such as brisk walking), and a fourth level (representing vigorous movement, such as running). The detection threshold for the first level can be 0, or a value close to 0, such as 3000mN. The detection threshold for the second level can range from 1000mN to 3000mN, for example, 4000mN. The detection threshold for the third level can range from 3000mN to 6000mN, and the detection threshold for the fourth level can range from 6000mN to 8000mN. This allows for adaptively increasing or decreasing the detection threshold of the tapping signal based on the amplitude of the electronic device's movement, i.e., the intensity of the movement.

[0053] In some embodiments, the conversion relationship between motion amplitude and detection threshold may include a conversion relationship between motion amplitude and detection threshold. For example, based on experimental testing, the detection threshold that causes the fewest false touches under different motion amplitudes can be statistically determined. Then, regression analysis or correlation analysis can be performed based on the statistical data to derive the conversion relationship between motion amplitude and detection threshold, such as a calculation formula. Thus, the detection threshold can be calculated based on the motion amplitude of the electronic device using the conversion relationship, and the calculated detection threshold can be used as the first detection threshold.

[0054] Understandably, by determining the motion amplitude of the electronic device based on motion sensing data, and then determining the first detection threshold based on the motion amplitude and the conversion relationship between the motion amplitude and the detection threshold, the detection sensitivity of the tap signal is adaptively adjusted, preventing false touches due to non-tapping behavior during motion and improving the accuracy of tap signal detection.

[0055] In some embodiments, at least one state sensing data includes: wear sensing data; at least one detection threshold includes: a second detection threshold; the process of determining at least one detection threshold based on at least one state sensing data may include: If the wear sensor data determines that the electronic device is not being worn, a first value is determined as the second detection threshold; if the wear sensor data determines that the electronic device is being worn, a second value is determined as the second detection threshold.

[0056] In this embodiment, at least one second sensor may include a proximity sensor, and at least one state sensing data may include wearing sensing data collected by the proximity sensor. That is, wearing sensing data can be used to determine the wearing status of the electronic device by detecting the wearing status using the proximity sensor. For example, the proximity sensor may include a capacitance sensor, which measures the capacitance value (a digital value converted from analog to digital) between the sensing disk (such as a metal area on the earphone shell) and a reference ground. This capacitance value changes with the proximity distance of a human body part (such as skin or fingers). This capacitance value can be used as wearing sensing data. For example, the wearing sensing data may be 150 when there is no skin contact, and 850 when the electronic device, such as an earphone, is worn in the ear. Therefore, the wearing sensing data can be used to determine whether the electronic device is in a wearing state or not. In the case of not wearing, a first value is determined as a second detection threshold; in the case of wearing, a second value is determined as a second detection threshold. The first value is greater than the second value, meaning that when the electronic device is not wearing, the detection threshold for the tap signal is increased to prevent accidental touches. For example, the range of the first value may include 3000mN to 8000mN, and for example, it may be 5000mN; the second value may include 0mN or a value close to 0. The specific selection is made according to the actual situation, and this application embodiment does not limit it.

[0057] Understandably, by identifying the wearing status of electronic devices based on wear sensor data and determining different detection thresholds for different wearing statuses, the detection sensitivity of the tapping signal is adaptively adjusted according to the wearing status of the electronic device, thereby improving the accuracy of tapping signal detection.

[0058] In some embodiments, if it is determined that the electronic device is in a wearing state based on the wearing sensor data, the variance of the wearing sensor data over multiple time windows can be calculated; and a second detection threshold can be determined based on the variance.

[0059] In this embodiment, after determining that the electronic device is in a wearing state based on wearing sensor data, wearing sensor data can be sampled again at multiple time windows to obtain multiple wearing sensor data points. The variance among the multiple wearing sensor data points is calculated. This variance is proportional to the degree of fluctuation in the wearing sensor data. The smaller the variance, the lower the degree of fluctuation in the wearing sensor data, indicating a more stable wearing state. The larger the variance, the greater the degree of fluctuation in the wearing sensor data, indicating a less stable wearing state, such as the user adjusting the wearing position of the headphones. In other words, based on wearing sensor data, not only can the wearing state or non-wearing state of the electronic device be determined, but also the wearing stability of the electronic device can be determined.

[0060] In this embodiment, a preset correspondence between at least one preset variance and at least one detection threshold can be predefined. This allows the detection threshold to be determined as a second detection threshold based on the variance of the electronic device's wearing sensor data within multiple time windows within this preset correspondence. For example, for a variance less than 50, the electronic device is considered to be in a very stable wearing state, with minimal interference to the tap signal detection. The detection threshold in the corresponding preset correspondence can be 0 or a value close to 0. For a variance between 50 and 200, the electronic device is considered to be in a basically stable wearing state. The detection threshold in the corresponding preset correspondence can range from 1000mN to 2000mN. For a variance between 200 and 1000, the electronic device is considered to be in an unstable wearing state. The detection threshold in the corresponding preset correspondence can range from 3000mN to 4000mN. For a variance greater than 1000, the electronic device is considered to be in a severely unstable wearing state. The detection threshold in the corresponding preset correspondence can range from 4000mN to 5000mN. The above values ​​are merely examples, and the embodiments in this application are not specifically limited. It can be seen that the variance is directly proportional to the magnitude of the second detection threshold.

[0061] It is understood that, in the embodiments of this application, when the electronic device is in a wearing state, the wearing stability of the electronic device can be further identified, and then a second detection threshold under different wearing stability can be determined accordingly, so that the detection threshold of the tapping signal can be adaptively adjusted according to the wearing stability of the electronic device, thereby further improving the accuracy of tapping signal detection.

[0062] In some embodiments, at least one state sensing data includes: touch sensing data; at least one detection threshold includes: a third detection threshold; the process of determining at least one detection threshold based on at least one state sensing data includes: If, based on touch sensing data, it is determined that the user has not touched the target touch area, a third value is determined as the third detection threshold; if, based on touch sensing data, it is determined that the user has touched the target touch area, a fourth value is determined as the third detection threshold.

[0063] In this embodiment, at least one second sensor may include a touch sensor, and at least one state sensing data may include touch sensing data collected by the touch sensor. That is, touch sensing data can be obtained by detecting the touch state of the electronic device using the touch sensor. For example, the touch sensor may include a capacitive touch sensor. At least one capacitive touch sensor may be deployed at at least one location on an electronic device, such as headphones, so that the user's touch area on the headphones can be determined using the touch sensing data from at least one capacitive touch sensor.

[0064] In this embodiment, the target touch area includes a specific area on the electronic device used for touch operation. For example, the target touch area includes a specific area for sensing user actions such as long press, short press, and swipe. If it is determined that the user has touched the target touch area, it indicates that the user may intend to interact with the electronic device through touch operation rather than tapping. Since the contact time of a user's touch operation, such as a short press, or long press and swipe, is insufficient, the resulting signal is very similar to a tapping signal and can easily be misidentified as a tapping signal by the first sensor. In this case, the detection threshold can be adjusted by increasing or decreasing it according to whether the user has touched the target touch area, thereby adjusting the detection sensitivity of the tapping signal.

[0065] In other words, when the user does not touch the target touch area, a third value is determined as the third detection threshold; when the user touches the target touch area, a fourth value is determined as the third detection threshold; the fourth value is greater than the third value. For example, the third value can be 0, or a value close to 0; the range of the fourth value can include 3000mN to 8000mN, and the specific value can be selected according to the actual situation, which is not limited in this embodiment. In this way, when the user touches the target touch area, the detection threshold can be increased to reduce the impact of signal interference from non-tapping operations on the detection of tapping signals.

[0066] It is understood that the embodiments of this application realize the recognition of the touch state of electronic devices, and adaptively adjust the detection threshold of the tap signal according to whether the user's touch position falls into the target touch area for sensing touch operation, thereby improving the accuracy of tap signal detection.

[0067] In some embodiments, at least one state sensing data includes: touch sensing data; at least one detection threshold includes: a third detection threshold; determining at least one detection threshold based on at least one state sensing data includes: Based on touch sensor data, if the user touches the target touch area, determine the touch duration on the target touch area; and based on the touch duration, determine the third detection threshold.

[0068] In this embodiment, after determining the target touch area based on touch sensing data, the duration of touch on the target touch area can be further determined. The touch duration represents the continuous time the user touches the target touch area. In actual use of electronic devices such as headphones, users may intend to control the headphones through short presses, long presses, or swipes; or, in certain body postures, such as lying on their side, tilting their head, or wearing a hat or helmet, the user's body may make continuous or intermittent contact with the headphones, resulting in interference signals similar to tapping signals. Since tapping signals are usually brief pulse signals, their touch duration differs from signals generated by touch operations or specific body postures. Therefore, the detection threshold for tapping signals can be adjusted based on the touch duration to reduce interference from touch operations on tapping signal detection.

[0069] In this embodiment of the application, for example, when the touch duration is greater than or equal to a preset duration threshold (such as 200ms or 300ms), a third detection threshold can be determined within the range of 3000mN to 8000mN; when the touch duration is less than the preset duration threshold, the third detection threshold can be 0 or a value close to 0. The specific selection is made according to the actual situation, and this embodiment of the application does not limit it.

[0070] It is understood that the embodiments of this application can not only determine whether the target touch area has been touched based on touch sensing data, but also identify the touch duration when the target touch area has been touched, adjust the detection threshold of the tap signal based on the touch duration, and filter out interference signals, thereby improving the accuracy of tap signal detection.

[0071] In some embodiments, the process of determining whether at least one candidate knock signal contains a knock signal generated by a knock event, in conjunction with at least one detection threshold, may include: A total detection threshold is determined by combining a preset fourth detection threshold with at least one detection threshold; based on the total detection threshold, it is determined whether at least one candidate knock signal contains a knock signal generated by a knock event.

[0072] In this embodiment, the preset fourth detection threshold is a predefined basic threshold used to distinguish between valid knocking and interference signals. The fourth detection threshold can be determined based on empirical values ​​or experimental calibration. In some embodiments, the fourth detection threshold can be flexibly set according to the user's sensitivity preference. For example, the fourth detection threshold may include 3000 millinewtons (mN). At least one detection threshold includes at least one of the first detection threshold, the second detection threshold, and the third detection threshold determined through the above process. The total detection threshold is determined by combining at least one of the first detection threshold, the second detection threshold, and the third detection threshold with the fourth detection threshold.

[0073] For example, the total detection threshold can be determined by formula (1) as follows: Formula (1) In formula (1), The fourth detection threshold, The first detection threshold is... The second detection threshold, The third detection threshold, The total detection threshold is given by formula (1). The total detection threshold can be obtained by summing the first detection threshold, the second detection threshold, the third detection threshold, and the fourth detection threshold.

[0074] In some embodiments, a weight can be set for each of the fourth detection threshold and at least one detection threshold, and a weighted summation can be performed on the fourth detection threshold and at least one detection threshold, followed by normalization of the summation result, to determine the total detection threshold. The specific selection depends on the actual situation, and this application embodiment does not limit the choice.

[0075] It is understandable that by combining at least one of the first detection threshold, the second detection threshold, and the third detection threshold with the fourth detection threshold, the total detection threshold for detecting the tapping signal is adaptively adjusted using at least one state sensing data provided by at least one second sensor. This reduces the interference of the electronic device's operating environment on the tapping signal detection, improves the accuracy of the tapping signal detection, and reduces the risk of accidental touches.

[0076] In some embodiments, at least one state sensing data includes at least one of motion sensing data, wear sensing data, and touch sensing data; based on at least one state sensing data, determining whether at least one candidate tap signal includes a tap signal generated by a tap event includes: At least one candidate knock signal is determined to be a knock signal that does not contain a knock signal generated by a knock event if at least one of the following conditions is met: Based on motion sensor data, it is determined that the motion amplitude of the electronic device is greater than or equal to a preset amplitude threshold. Based on wear sensor data, it is determined that the electronic device is not being worn or the wear stability is below a preset stability threshold; wear stability is determined by calculating the variance of wear sensor data over multiple time windows. Based on touch sensor data, determine the target touch area of ​​the user.

[0077] In this embodiment, if the first sensor detects at least one candidate tap signal, it can also determine whether the usage scenario of the electronic device meets at least one condition for characterizing a mis-touch scenario based on at least one state sensing data. If the condition is met, it can be determined that the at least one candidate tap signal does not contain a tap signal generated by a tapping event. In other words, if the electronic device is detected to be in a scenario prone to mis-touch, the possibility of mis-touch is relatively high, and at least one tap signal detected by the first sensor can be blocked to avoid mis-touch.

[0078] In this embodiment, if motion sensing data indicates that the electronic device's motion amplitude is greater than or equal to a preset amplitude threshold, it indicates that the electronic device is in a state of vigorous motion and is prone to accidental touches. If wear sensing data indicates that the electronic device is not being worn or its wear stability is lower than a preset stability threshold, it indicates that the electronic device is in an abnormal wearing posture and is prone to accidental touches. Here, the method for determining wear stability is consistent with that described in the previous embodiments, determined by calculating the variance of wear sensing data over multiple time windows, and will not be repeated here. If touch sensing data indicates that the user is touching a target touch area, it indicates that the user intends to perform a non-tapping operation through the target touch area, which is easily misdetected as a tapping signal, causing accidental touches. Therefore, if at least one of the above conditions is met, it is determined that at least one candidate tapping signal does not contain a tapping signal generated by a tapping event, and no tapping event response is given to at least one candidate tapping signal detected by the first sensor.

[0079] It is understandable that by using at least one second sensor to determine the accidental touch scenario when the first sensor detects at least one candidate tap signal, the purpose of shielding the accidental touch result can be achieved. This can reduce the false detection and accidental touch of tap signals in usage environments where accidental touch is likely, and improve detection accuracy.

[0080] In some embodiments, when multiple candidate tapping signals are detected by a first sensor and it is determined, based on data from at least one state sensor, that the multiple candidate tapping signals include multiple tapping signals generated by multiple tapping events, a consistency detection can also be performed on the multiple tapping signals to remove abnormal tapping signals from the tapping signals.

[0081] In this embodiment of the application, if it is determined that multiple candidate tapping signals include multiple tapping signals generated by multiple tapping events through the method in S201-S202, or through the screening of at least one condition used to characterize the accidental touch scenario, further consistency detection processing can be performed on the multiple tapping signals to finally determine the tapping signal used as the tapping event processing and response.

[0082] In some embodiments, multiple tapping signals can be compared, and abnormal tapping signals with abnormal width, and / or abnormal height, and / or abnormal interval can be removed from the multiple tapping signals. The tapping signals obtained after one-time detection and screening can be responded to according to the tapping event processing logic.

[0083] It is understood that, based on the sensor information screening, the embodiments of this application can further remove abnormal signals by using the consistency detection between signals, thereby further improving the accuracy of the tapping signal detection.

[0084] For example, such as Figure 3 As shown, when the tap signal detection method in this embodiment is applied to a real-world scenario such as tap signal detection in headphones, it can be implemented through processes including S301-S308. The headphones are equipped with a multi-axis gravity sensor (Gsensor), a capacitive sensor (Capsensor), and a touch sensor (Touchsensor). The tap signal detection process is as follows: S301, Data Preprocessing.

[0085] In S301, a multi-axis G-sensor (equivalent to the first sensor) is used to acquire signals, obtaining multiple acceleration time-series signals corresponding to multiple axes. The acquired multiple acceleration time-series signals are then differentially aggregated to obtain an aggregated signal, thereby reducing the data dimensionality for subsequent processing and improving the consistency of wide-area tapping signals.

[0086] S302, Knock signal detection.

[0087] In S302, the aggregated signal is subjected to knock signal detection. Knock signal features are detected from the aggregated signal, including peak position, width, height, etc., to determine whether at least one candidate knock signal is detected.

[0088] S303, Determine whether at least one candidate knock signal is detected.

[0089] In step S303, if at least one candidate tap signal is detected, steps S304-1, S304-2, and S304-3 are executed. S304-1, S304-2, and S304-3 can be executed in any order or simultaneously. If no candidate tap signal is detected, no further processing of the data acquired by the multi-axis G-sensor in this session is required. The next data acquisition can then proceed, and data processing for the next acquisition from the multi-axis G-sensor can begin from step S301.

[0090] S304-1 Wearing status detection.

[0091] In S304-1, the wearing status is detected by at least one candidate tapping signal through the Capsensor (equivalent to a second sensor) to determine the wearing sensing data.

[0092] S304-2, Touch status detection.

[0093] In S304-2, a Touchsensor (equivalent to a second sensor) is used to detect the touch state of at least one candidate tap signal and determine the touch sensing data.

[0094] S304-3, Motion Status Detection.

[0095] In S304-3, the multi-axis G-sensor is multiplexed as a second sensor. The motion state of at least one candidate tapping signal is detected by the multi-axis G-sensor to determine the motion sensing data.

[0096] S305, Adaptive sensitivity adjustment.

[0097] In S305, a first detection threshold is determined using motion sensing data, which corresponds to the sensitivity adjustment caused by user movement. A second detection threshold is determined using wear sensing data, which corresponds to the sensitivity adjustment caused by unstable wear. A third detection threshold is determined using touch sensing data, which corresponds to the sensitivity adjustment caused by touching the target touch area. A preset fourth detection threshold is used as the initial sensitivity value. Combined with the first, second, third, and fourth detection thresholds, a total detection threshold is determined. Using the total detection threshold, at least one tap signal generated by a tapping event is identified from at least one candidate tapping signal, thereby achieving adaptive sensitivity adjustment through the fusion of multi-sensor data.

[0098] S306, Consistency Detection.

[0099] In S306, if multiple knocking events generate knocking signals, a consistency check is performed on the multiple knocking signals, and abnormal knocking signals with abnormal width, abnormal height, or abnormal interval are removed from the multiple knocking signals.

[0100] S307, Tapping event classification.

[0101] In S307, the tapping signals that have undergone consistency detection are classified into tapping events to determine the type of tapping event. For example, the number of taps per unit time can be determined based on the tapping signal, thereby determining whether the tapping event type is a double tap or a triple tap, etc. In this way, the behavior of double taps and triple taps on the headphones can be accurately identified.

[0102] S308, Output the impact detection results.

[0103] In S308, the tap event type is output as the tap detection result, and the tap event behavior response logic is used for further processing to realize interactive functions such as audio playback / switching, call answering / hanging up, and photo control.

[0104] It is understood that this application embodiment uses a G-sensor as the main sensor to implement tap detection for detecting tap events, providing wide-area tap support capabilities, and possessing superior sensitivity and response time. Capsensors and Touchsensors serve as auxiliary sensors to determine whether the headphones are worn stably and whether the user has touched specific interactive areas on the headphone shell, avoiding accidental touches caused by adjusting the headphones, vigorous exercise, or other interactive actions. Thus, without adding new sensors or significantly increasing computational load, the existing Capsensor and Touchsensor on the headphone platform are utilized, fully leveraging the advantages of different sensors. Through adaptive fusion of multi-sensor information, anti-accidental touch optimization is achieved for key user scenarios, exhibiting characteristics of fast response, high recognition rate, and low accidental touch rate. This improves the user experience for wide-area tapping in multiple scenarios, enhancing overall performance and experience in terms of sensitivity, response time, recognition rate, and accidental touch rate. This application embodiment can be deployed on wireless headphone terminals to provide users with reliable and easy-to-use tap detection functionality, improving the headphone interaction experience.

[0105] To implement the method of the embodiments of this application, based on the same inventive concept, the embodiments of this application also provide a tapping signal detection device, such as... Figure 4 As shown, the impact signal detection device 1 includes: The first detection module 11 is used to detect the knocking signal of the electronic device through the first sensor and determine at least one candidate knocking signal. The second detection module 12 is used to detect at least one of motion state, wearing state and touch state of the electronic device through at least one second sensor, and determine at least one state sensing data. The determining module 13 is used to determine, based on the at least one state sensing data, whether the at least one candidate knock signal contains a knock signal generated by a knock event.

[0106] In some embodiments, the determining module 13 is further configured to determine at least one detection threshold based on the at least one state sensing data; and, in conjunction with the at least one detection threshold, determine whether the at least one candidate knocking signal contains a knocking signal generated by a knocking event.

[0107] In some embodiments, the at least one state sensing data includes motion sensing data; the at least one detection threshold includes a first detection threshold; the determining module 13 is further configured to determine the motion amplitude of the electronic device based on the motion sensing data; and to determine the first detection threshold based on the motion amplitude and the conversion relationship between the motion amplitude and the detection threshold.

[0108] In some embodiments, the at least one state sensing data includes: wear sensing data; the at least one detection threshold includes: a second detection threshold; the determining module 13 is further configured to determine a first value as the second detection threshold when it is determined that the electronic device is in an unworn state based on the wear sensing data; and to determine a second value as the second detection threshold when it is determined that the electronic device is in a worn state based on the wear sensing data; the first value is greater than the second value.

[0109] In some embodiments, the at least one state sensing data includes: wear sensing data; the at least one detection threshold includes: a second detection threshold; the determining module 13 is further configured to, when determining that the electronic device is in a wearing state based on the wear sensing data, calculate the variance of the wear sensing data over multiple time windows; and determine the second detection threshold based on the variance.

[0110] In some embodiments, the at least one state sensing data includes: touch sensing data; the at least one detection threshold includes: a third detection threshold; the determining module 13 is further configured to determine a third value as the third detection threshold when it is determined, based on the touch sensing data, that the user has not touched the target touch area; and to determine a fourth value as the third detection threshold when it is determined, based on the touch sensing data, that the user has touched the target touch area; wherein the fourth value is greater than the third value.

[0111] In some embodiments, the at least one state sensing data includes: touch sensing data; the at least one detection threshold includes: a third detection threshold; the determining module 13 is further configured to determine the touch duration on the target touch area when it is determined that the user touches the target touch area based on the touch sensing data; and to determine the third detection threshold based on the touch duration.

[0112] In some embodiments, the determining module 13 is further configured to combine a preset fourth detection threshold and the at least one detection threshold to determine a total detection threshold; and to determine, based on the total detection threshold, whether the at least one candidate knocking signal contains a knocking signal generated by a knocking event.

[0113] In some embodiments, the at least one state sensing data includes at least one of motion sensing data, wear sensing data, and touch sensing data; the determining module 13 is further configured to determine that the at least one candidate tapping signal does not contain a tapping signal generated by a tapping event if at least one of the following conditions is met: Based on the motion sensing data, it is determined that the motion amplitude of the electronic device is greater than or equal to a preset amplitude threshold. Based on the wear sensing data, it is determined that the electronic device is not being worn or the wear stability is below a preset stability threshold; the wear stability is determined by calculating the variance of the wear sensing data over multiple time windows. Based on the touch sensing data, the target touch area touched by the user is determined.

[0114] In some embodiments, the second detection module 12 is further configured to perform consistency detection on the plurality of knocking signals and remove abnormal knocking signals from the plurality of knocking signals when a plurality of knocking signals are determined from the plurality of candidate knocking signals.

[0115] In some embodiments, the first sensor includes a multi-axis gravity sensor; the first detection module 11 is further configured to acquire multiple acceleration time-series signals corresponding to multiple axes through the multi-axis gravity sensor; perform differential aggregation on the multiple acceleration time-series signals to determine an aggregated signal; and perform impact signal detection on the aggregated signal to determine at least one candidate impact signal.

[0116] It should be noted that the description of the above device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects. For technical details not disclosed in the device embodiments of the present invention, please refer to the description of the method embodiments of the present invention for understanding.

[0117] Based on the hardware implementation of each unit in the aforementioned tapping signal detection device, this application embodiment also provides an electronic device, such as... Figure 5 As shown, the electronic device 90 includes: a processor 901, a memory 902 configured to store computer programs capable of running on the processor, and a bus system 903; The processor 901 is configured to execute the method steps in the foregoing embodiments when running a computer program.

[0118] Of course, in practical applications, such as Figure 5 As shown, the various components in the electronic device 90 are coupled together via a bus system 903. It is understood that the bus system 903 is used to enable communication between these components. In addition to a data bus, the bus system 903 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 903 in the figure.

[0119] In practical applications, the aforementioned processor can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), controller, microcontroller, and microprocessor. It is understood that, for different devices, the electronic device used to implement the above processor function can also be other types, and the embodiments of this application do not specifically limit it.

[0120] The aforementioned memory can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provides instructions and data to the processor.

[0121] Optionally, the electronic device 90 can be a chip, which may further include an input interface. The processor can control the input interface to communicate with other devices or chips; specifically, it can acquire information or data sent by other devices or chips.

[0122] Optionally, the chip may also include an output interface. The processor can control this output interface to communicate with other devices or chips; specifically, it can output information or data to other devices or chips.

[0123] In an exemplary embodiment, this application also provides a computer-readable storage medium, such as a memory including a computer program, which can be executed by a processor of an electronic device to perform the steps of the aforementioned method.

[0124] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any one of the embodiments of this application.

[0125] Optionally, the computer program product can be applied to the electronic device in the embodiments of this application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of this application. For the sake of brevity, they will not be described in detail here.

[0126] This application also provides a computer program. Optionally, the computer program can be applied to the electronic device in the embodiments of this application. When the computer program is run on a computer, it causes the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.

[0127] It should be understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0128] It should be understood that the terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items. The expressions “having,” “may have,” “comprising,” and “including,” or “may include” and “may contain” used herein may be used to indicate the presence of a corresponding feature (e.g., an element such as a number, function, operation, or component), but do not exclude the presence of additional features.

[0129] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another, and are not necessarily used to describe a specific order or sequence. For example, without departing from the scope of this invention, first information may also be referred to as second information, and similarly, second information may also be referred to as first information.

[0130] The technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.

[0131] In the several embodiments provided in this application, it should be understood that the disclosed methods, apparatus, and devices can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical, or other forms.

[0132] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0133] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0134] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A tapping detection method, characterized in that, include: The first sensor detects the tapping signal of the electronic device and identifies at least one candidate tapping signal. Using at least one second sensor, the electronic device performs at least one of motion state detection, wearing state detection, and touch state detection to determine at least one state sensing data. Based on the at least one state sensing data, determine whether the at least one candidate tapping signal contains a tapping signal generated by a tapping event.

2. The method according to claim 1, characterized in that, The step of determining whether the at least one candidate tapping signal contains a tapping signal generated by a tapping event based on the at least one state sensing data includes: Based on the at least one state sensing data, determine at least one detection threshold; Based on the at least one detection threshold, determine whether the at least one candidate knock signal contains a knock signal generated by a knock event.

3. The method according to claim 2, characterized in that, The at least one state sensing data includes: motion sensing data; the at least one detection threshold includes: a first detection threshold; determining the at least one detection threshold based on the at least one state sensing data includes: The motion amplitude of the electronic device is determined based on the motion sensing data. The first detection threshold is determined based on the motion amplitude and the conversion relationship between the motion amplitude and the detection threshold.

4. The method according to claim 2, characterized in that, The at least one state sensing data includes: wear sensing data; the at least one detection threshold includes: a second detection threshold; determining the at least one detection threshold based on the at least one state sensing data includes: If it is determined that the electronic device is not being worn based on the wear sensing data, a first value is determined as the second detection threshold. If the wear sensor data determines that the electronic device is in a wearing state, a second value is determined as the second detection threshold; the first value is greater than the second value.

5. The method according to claim 2, characterized in that, The at least one state sensing data includes: wear sensing data; the at least one detection threshold includes: a second detection threshold; determining the at least one detection threshold based on the at least one state sensing data includes: If it is determined that the electronic device is in a wearing state based on the wearing sensor data, the variance of the wearing sensor data in multiple time windows is calculated; The second detection threshold is determined based on the variance.

6. The method according to claim 2, characterized in that, The at least one state sensing data includes: touch sensing data; the at least one detection threshold includes: a third detection threshold; determining the at least one detection threshold based on the at least one state sensing data includes: If, based on the touch sensing data, it is determined that the user has not touched the target touch area, a third value is determined as the third detection threshold. If, based on the touch sensing data, it is determined that the user has touched the target touch area, a fourth value is determined as the third detection threshold; the fourth value is greater than the third value.

7. The method according to claim 2, characterized in that, The at least one state sensing data includes: touch sensing data; the at least one detection threshold includes: a third detection threshold; determining the at least one detection threshold based on the at least one state sensing data includes: Based on the touch sensing data, if it is determined that the user is touching a target touch area, the duration of the touch on the target touch area is determined; The third detection threshold is determined based on the touch duration.

8. The method according to any one of claims 2-7, characterized in that, The step of determining whether the at least one candidate knock signal contains a knock signal generated by a knock event, in conjunction with the at least one detection threshold, includes: The total detection threshold is determined by combining the preset fourth detection threshold and the at least one detection threshold. Based on the total detection threshold, determine whether the at least one candidate knock signal contains a knock signal generated by a knock event.

9. The method according to claim 1, characterized in that, The at least one state sensing data includes at least one of motion sensing data, wear sensing data, and touch sensing data; determining whether the at least one candidate tapping signal contains a tapping signal generated by a tapping event based on the at least one state sensing data includes: The at least one candidate tap signal is determined not to contain a tap signal generated by a tapping event if at least one of the following conditions is met: Based on the motion sensing data, it is determined that the motion amplitude of the electronic device is greater than or equal to a preset amplitude threshold. Based on the wear sensing data, it is determined that the electronic device is not being worn or the wear stability is below a preset stability threshold; the wear stability is determined by calculating the variance of the wear sensing data over multiple time windows. Based on the touch sensing data, the target touch area touched by the user is determined.

10. The method according to claim 2 or 9, characterized in that, The method further includes: When multiple knocking signals are identified from multiple candidate knocking signals, a consistency detection is performed on the multiple knocking signals to remove abnormal knocking signals from the multiple knocking signals.

11. The method according to any one of claims 1-7, or the method according to claim 9, characterized in that, The first sensor includes a multi-axis gravity sensor; the step of detecting a knock signal on the electronic device using the first sensor and determining at least one candidate knock signal includes: The multi-axis gravity sensor collects multiple acceleration time-series signals corresponding to multiple axes. Differential aggregation is performed on the multiple acceleration time-series signals to determine the aggregated signal; The aggregated signal is subjected to tap signal detection to determine the at least one candidate tap signal.

12. A tapping detection device, characterized in that, The device includes: The first detection module is used to detect the knocking signal of the electronic device through the first sensor and determine at least one candidate knocking signal. The second detection module is used to detect at least one of motion state, wearing state and touch state of the electronic device through at least one second sensor, and determine at least one state sensing data. The determining module is used to determine, based on the at least one state sensing data, whether the at least one candidate tapping signal contains a tapping signal generated by a tapping event.

13. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, It stores executable instructions for causing the processor to execute, thereby implementing the method as described in any one of claims 1-11.

15. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement the method as described in any one of claims 1-11.