Tapping interaction method and apparatus, electronic device, and medium
Patent Information
- Application Number
- CN202611043672.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]现有技术中,通常靠惯性测量单元(Inertial Measurement Unit,IMU)传感器检测冲击信号,存在大量误触的情景
[0011] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
Smart Images

Figure CN122924635A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic technology, specifically relating to a tapping interaction method, device, electronic device, and medium. Background Technology
[0002] With the development of electronic information technology, the interaction methods of smart terminals such as mobile phones are becoming increasingly diversified. Among them, tap interaction is an important supplementary method to touch operation in terminal operation. Its function is implemented by detecting the impact signal of the terminal, judging the tapping behavior, and then activating the pre-set screenshot and other related functions.
[0003] In existing technologies, impact signals are typically detected using inertial measurement unit (IMU) sensors, which leads to a large number of false triggers. To reduce false triggers, the trigger threshold of the tapping algorithm is usually increased, which in turn causes a significant decrease in sensitivity under normal usage scenarios.
[0004] It is evident that existing tapping solutions generally suffer from a contradiction between false triggers and sensitivity, resulting in a poor interactive experience. Summary of the Invention
[0005] The purpose of this application is to provide a tapping interaction method, device, electronic device, and medium to improve the tapping interaction experience.
[0006] In a first aspect, embodiments of this application provide a tapping interaction method, including: When the tapping function of the electronic device is enabled, acquire the first input received by the electronic device; If the first input is identified as a tapping input, a response threshold adapted to the usage scenario information is determined based on the usage scenario information of the electronic device. Based on the response threshold, it is determined whether to respond to the first input, wherein responding to the first input includes performing a target operation corresponding to the first input.
[0007] Secondly, embodiments of this application provide a tapping interaction device, including: Get module, used for When the tapping function of the electronic device is enabled, acquire the first input received by the electronic device; The first determining module is used to determine a response threshold that is adapted to the usage scenario information based on the usage scenario information of the electronic device when the first input is identified as a tapping input. The second determining module is used to determine whether to respond to the first input based on the response threshold, wherein responding to the first input includes performing a target operation corresponding to the first input.
[0008] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions, when executed by the processor, implementing the steps of the method described in the first aspect.
[0009] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0010] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0011] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0012] In this embodiment, when the tapping function of the electronic device is enabled, a first input received by the electronic device is acquired. If the first input is identified as a tapping input, a response threshold adapted to the usage scenario information is determined based on the usage scenario information of the electronic device. Based on the response threshold, it is determined whether to respond to the first input, wherein responding to the first input includes performing a target operation corresponding to the first input. Thus, this embodiment identifies the user's tapping input and adaptively adjusts the response threshold based on usage scenario information. Based on the response threshold in the current usage scenario, it determines whether to trigger the tapping function to perform a target operation. In this embodiment, since the response threshold is adaptively adjusted according to the usage scenario, it effectively balances both accidental touch prevention and sensitivity performance, significantly improving interaction sensitivity while ensuring a low accidental touch rate, thereby effectively improving the tapping interaction experience of the electronic device. Attached Figure Description
[0013] Figure 1 This is a flowchart of the tapping interaction method provided in the embodiments of this application; Figure 2 This is a schematic diagram of the back tapping gesture and operation interface provided in the embodiments of this application; Figure 3 These are schematic diagrams of the original striking waveform and the striking waveform after high-frequency filtering provided in the embodiments of this application; Figure 4 This is a logic diagram of the back tapping recognition algorithm provided in the embodiments of this application; Figure 5 This is a schematic diagram of a back-tapping algorithm structure provided in an embodiment of this application; Figure 6 This is a schematic diagram of another back-tapping algorithm structure provided in an embodiment of this application; Figure 7 This is a schematic diagram of the algorithm iterative training scheme provided in the embodiments of this application; Figure 8 This is a schematic diagram of the adaptive adjustment scheme for the response threshold provided in the embodiments of this application; Figure 9 This is an example diagram illustrating the adaptive adjustment of the response threshold provided in the embodiments of this application; Figure 10 This is a structural diagram of the tapping interaction device provided in the embodiments of this application; Figure 11 This is a structural diagram of the electronic device provided in the embodiments of this application; Figure 12 This is a hardware structure diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0015] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0016] To make the embodiments of this application clearer, the relevant technical knowledge involved in the embodiments of this application will be introduced as follows: With the evolution of smart terminal interaction technology, back tap detection based on inertial measurement units (IMUs) has become an important supplement to touch interaction. However, existing back tap solutions generally suffer from a contradiction between false triggers and sensitivity: their core algorithms typically rely on a single impact signal threshold for judgment. If the trigger threshold is increased to reduce the false touch rate, it will directly lead to a significant decrease in the user's response sensitivity during normal interaction, and it cannot achieve dynamic scene adaptation for complex and changing physical environments. Therefore, improving sensitivity when the algorithm is in use and reducing the possibility of false touches when the user does not use it or uses it with low probability is an important direction for improving the interactive experience of back tap functionality.
[0017] To overcome the inherent trade-off between "accidental touch interception" and "sensitive wake-up" in existing technologies, this application proposes a multi-dimensional back-tap enhancement recognition method. Through synergistic improvements in algorithmic wake-up admission mechanisms, multi-level decision logic, and functional interaction strategies, this solution can adaptively adjust thresholds based on user behavior characteristics and terminal environment conditions. This significantly improves interaction sensitivity while ensuring a low accidental touch rate, thereby achieving a more intelligent and perceptive terminal interaction experience.
[0018] The tapping interaction method for electronic devices provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0019] Please see Figure 1 , Figure 1 A flowchart of the tapping interaction method for an electronic device provided in the embodiments of this application is shown below. Figure 1 As shown, the method includes the following steps: Step 101: With the tapping function of the electronic device enabled, acquire the first input received by the electronic device.
[0020] In this embodiment, the tapping function can be a tapping interaction function that taps the back, screen, side frame, etc. of an electronic device. That is, it triggers the electronic device to quickly execute a target operation by tapping the device. For example, it can be a back tapping function, a screen tapping function, or a frame tapping function (such as side tapping, bottom / top tapping), etc. The target operation can be an operation associated with the tapping function, such as screenshotting, taking a picture, or recording audio. For instance, a back tapping operation can trigger the electronic device to automatically take a screenshot. For ease of understanding, this embodiment mainly uses the back tapping function as an example for explanation.
[0021] The tapping function can be turned on or off, which can be set by the user. It can also be in sleep mode by default and triggered by detecting the status of the electronic device.
[0022] The first input mentioned above can be a touch input actually performed by the user, or a touch input generated by accidental touch in a pocket scenario or a collision scenario. In this embodiment of the application, in order to take into account both the prevention of accidental touch and sensitivity, the received first input needs to be identified. Specifically, it can be the identification of input parameter features such as the number of taps, the tapping force, the impact signal features, etc. Based on the identification result, it is determined whether the current first input is a tapping input.
[0023] It is understandable that when a user performs a tapping input on an electronic device, the device can detect the corresponding impact signal. For example, tapping the back of the device detects a Z-axis impact signal, while tapping the side frame detects an X-axis impact signal. Furthermore, similar impact signals are detected when the electronic device is subjected to vibration, collision, or drop. Therefore, in some implementations, the impact signals detected by the electronic device can be used to determine whether a genuine tapping input has occurred. Here, the impact signal can refer to the signal detected by the electronic device through sensors such as an IMU or accelerometer. Specifically, it is a vibration signal generated by the electronic device being subjected to user tapping or other interactive operations or mechanical collisions. This signal can consist of motion acceleration data in various directions such as X, Y, and Z.
[0024] In some embodiments of this application, when the tapping function is enabled, the first input received by the electronic device can be acquired, and the input parameter features corresponding to the first input can be identified. This includes identifying the impact signal features generated corresponding to the first input. Specifically, the impact signal can be detected by sensors such as IMU and accelerometer, and the impact signal received by the electronic device can be obtained by acquiring sensor data. The impact signal features can then be identified to determine whether they match the impact signal features corresponding to the tapping input, thereby identifying whether the current first input is a tapping input.
[0025] Optionally, before step 101, the method further includes: When the electronic device's status is detected to meet preset conditions, the tapping function is activated. The status of the electronic device includes at least one of the screen display status and the usage status.
[0026] In some embodiments, the status monitoring of the electronic device can be used to determine whether to activate the tap function, such as the back tap function. This allows the back tap function to be deactivated when not needed, reducing accidental touches. Here, activating the tap function can be understood as enabling the tap function.
[0027] Specifically, the back tap function can be activated only when one or more of the screen display status and usage status of the electronic device are detected, in order to detect and respond to user interaction. For example, the back tap function can be activated only when the screen display status of the electronic device is on, otherwise it will not be activated; the back tap function can be activated only when the usage status of the electronic device is not touched, otherwise it will not be activated; the back tap function can be activated only when the usage status of the electronic device is being held, otherwise it will not be activated; the back tap function can be activated only when the usage status of the electronic device is not touched and it is being held, otherwise it will not be activated, and so on.
[0028] The preset conditions include at least one of the following: the electronic device is in a screen-on state, the electronic device is in a non-touch state, and the electronic device is in a holding state.
[0029] In a specific application example, the tapping function is the back tapping function, which can be used to wake up the back tapping function. By monitoring the screen display status, touch status, holding status, etc. of the electronic device, it is determined whether each status is a preset state that can enable the back tapping function. If so, the back tapping function is enabled.
[0030] In some embodiments, a strict accidental triggering mechanism can be employed to minimize the possibility of accidental touches. For example, the wake-up back tap function can only be triggered when the electronic device is in a screen-on state, a touchless state, and a holding state, that is, when all three states are met.
[0031] It can monitor the screen status, touch status, and holding status of electronic devices, and activate the back tap function if all status settings are met.
[0032] In practical implementation, a multi-dimensional function activation prediction mechanism can be constructed by integrating multiple types of sensors within the electronic device. The system monitors the screen status, touch status, and grip status of the electronic device in real time. Specifically, this includes acquiring display status parameters of the display layer, such as on or off parameters, calling the touch chip to scan touch data, and using specific absorption rate sensors (SAR sensors) and accelerometers to identify physical postures such as "handheld" or "tablet-based." Among them, the SAR sensor is a near-field sensing device specifically used in mobile device terminals, such as smartphones and tablets; its core function is to detect the distance between the human body and the device, which can help detect whether the electronic device is being held. Only when all status indicators meet the preset trigger enable conditions, i.e., the aforementioned preset conditions, will the system officially activate the back tap function and activate the back tap algorithm, thereby avoiding power redundancy in non-interactive states and reducing the possibility of accidental touches at the source.
[0033] For example, the implementation process of a solution for monitoring the status of an electronic device terminal and enabling the back tap function includes the following steps: S201, Monitor the screen status and touch status of the terminal, and detect the holding status based on the SAR sensor.
[0034] In terms of specific implementation, firstly, logical filtering based on the screen power management state is executed. The system obtains the state parameters of the display driver layer or power management framework (Power Manager Service) in real time to monitor the screen state of the electronic device. The screen state includes at least a screen-off state and a screen-on state; the screen-off state further includes a deep sleep state and a low-power standby state; only when the system reports that the screen state is on is the basic environmental conditions for the wake-up algorithm determined to be met. This measure aims to avoid invalid wake-up of the algorithm due to accidental touch or mechanical collision when the electronic device is in static storage or pocket-carrying mode, thereby reducing standby power consumption from the top level of the system.
[0035] Secondly, conflict suppression logic is introduced in the touch sensing layer. The system acquires touch state data in real time by calling the scanning register of the touch chip. The touch state is mainly determined by the capacitive sensing matrix to determine whether there is a valid touch operation on the current screen surface, including but not limited to single-point touch, multi-point gestures, or large-area coverage. This application sets a mutually exclusive interaction logic: the wake-up algorithm is only determined to be satisfied when the touch chip feedback is "no touch state". The technical necessity of this design is that when the user is performing screen swiping, typing, or long-press operations, the intense interaction between the finger and the screen will generate complex physical vibrations, which can easily interfere with the feature extraction of the IMU sensor. Limiting the touch state can significantly improve the purity of back tap recognition.
[0036] Finally, a SAR sensor is used to accurately identify the physical holding state. This application employs a SAR sensor embedded in the frame or near the antenna bracket of the electronic device to acquire the holding state of the electronic device. The SAR sensor detects the offset of the near-field capacitance value and analyzes the change in the dielectric constant around the electronic device, thereby accurately identifying whether the electronic device is being held by a human hand. The wake-up algorithm is only triggered when the sensing value reported by the SAR sensor exceeds a preset near-field trigger threshold and is determined to be in a "human holding state".
[0037] S202. Monitor the screen status as on, off, or held.
[0038] This application uses logic gate circuits or software algorithm logic to simultaneously perform "AND" logic verification on the screen's on state, no-touch state, and SAR holding state.
[0039] S203. When the electronic device's status meets the conditions, the back tapping function is activated, and the algorithm begins to respond to and monitor the electronic device's status.
[0040] Only when all three access conditions are met simultaneously can the system send an enable command to the Sensor Hub to activate the back tap detection algorithm. This three-pronged access mechanism not only ensures that the algorithm runs only in scenarios where the user has a clear intention to interact, but also completely eliminates false triggers caused by most environmental stray signals at the underlying architecture level.
[0041] Step 102: If the first input is identified as a tapping input, determine a response threshold that is compatible with the usage scenario information of the electronic device.
[0042] The above-mentioned identification of the first input as a striking input can be specifically achieved by identifying the input parameter features corresponding to the first input, such as the number of strikes, the striking force, and the impact signal features, to determine that the input parameter features of the first input conform to the striking input features, and thus identify it as a striking input.
[0043] If the first input is identified as a tap input, the usage scenario information of the electronic device can be further acquired or identified. Based on this usage scenario information, an appropriate response threshold can be adaptively determined; that is, the current response threshold can be set or adjusted to match the usage scenario information of the electronic device. In other words, different usage scenario information can correspond to different response thresholds. Specifically, an appropriate response threshold can be assigned based on the characteristics of the usage scenario to achieve a balance between accidental touch rate and sensitivity. Here, the response threshold can be understood as the threshold for responding to tap input; the response threshold can also be called the sensitivity threshold of the tapping function.
[0044] For example, in gaming or camera shooting scenarios, the response threshold can be adjusted to a higher level to reduce accidental touches. In high-frequency interaction scenarios such as stable holding, the response threshold can be adjusted to a higher level to improve sensitivity.
[0045] The usage scenario information of the electronic device can be identified by calling the system activity management component. For example, the application information currently running on the electronic device can be obtained to determine whether it is a game scenario or a shooting scenario, or the physical state of the electronic device can be detected to determine whether the electronic device is in a stable holding state or a static interaction scenario.
[0046] Step 103: Determine whether to respond to the first input based on the response threshold, wherein responding to the first input includes performing the target operation corresponding to the first input.
[0047] The target operation can be an operation that is bound to or associated with the tapping function. For example, if the preset is that an automatic screenshot operation is triggered when a back tapping operation is detected, then the target operation bound to the back tapping function is the screenshot operation.
[0048] In this step, based on a response threshold set for the current usage scenario, it can be determined whether the relevant input parameter features of the first input can pass the trigger threshold of the tapping function. For example, in one implementation, the response threshold is a tapping force threshold. Whether to respond to the first input, i.e., whether to trigger the tapping function to execute the target operation, can be determined based on whether the tapping force of the detected input exceeds this threshold. In another implementation, the response threshold is a confidence threshold. Whether to respond to the first input, i.e., whether to trigger the tapping function to execute the target operation, can be determined based on whether the confidence level of the detected tapping input exceeds this threshold. If the first input passes the response threshold, it can be responded to, triggering the tapping function of the electronic device to execute the target operation, such as calling the back tap function to perform a screenshot operation. If it fails, the first input cannot be responded to, the tapping function of the electronic device cannot be triggered, i.e., the target operation cannot be executed, thus preventing accidental touches.
[0049] Optionally, after step 101, the method further includes: Determine the confidence parameter corresponding to the first input, wherein the confidence parameter is used to characterize the probability that the first input is a tapping input; Step 103 includes: Based on the response threshold and the confidence parameter, determine whether to respond to the first input.
[0050] In some embodiments, after the first input is detected, the confidence parameter corresponding to the first input can be determined by identifying and analyzing the relevant features of the first input. Specifically, during the process of identifying the first input, the matching degree or similarity between the features of the first input and the features of the tapping input can be calculated, and the confidence parameter corresponding to the first input can be determined based on the matching degree or similarity. Based on the confidence parameter, it can be preliminarily determined whether the first input is a tapping input, and then further combined with the response threshold under the current usage scenario to determine whether to respond to the first input.
[0051] In a specific implementation, the input features of the first input, such as input parameters or impact signal features, can be identified and processed to obtain an identification and processing result. The identification and processing result can indicate the confidence parameter of the first input, which is used to characterize the credibility or probability that the first input is a knocking input. Furthermore, the confidence parameter can be used to indicate whether the first input is a knocking input.
[0052] For example, the impact signal detected by the electronic device when it receives the first input can be identified and processed. Specifically, the waveform characteristics, frequency domain characteristics, and time domain distribution characteristics of the impact signal can be identified. Based on these identified characteristics, it can be determined whether the current impact signal matches the characteristics of the knocking signal corresponding to the knocking function, or the impact signal can be matched with the preset knocking signal. Through the impact signal identification and processing process, it can be determined whether the current first input is a knocking input. For example, if the characteristics of the identified impact signal are basically consistent with the characteristics of the preset knocking signal, it can be determined that the first input may be a knocking input; otherwise, it can be directly determined that the first input is not a knocking input.
[0053] Furthermore, if it is determined that the first input may be a striking input, the confidence parameter for detecting the striking input can be precisely calculated and analyzed based on the identification result of the impact signal. This can be understood as determining the credibility of the judgment that a striking input has been detected. Specifically, the confidence parameter for detecting the striking input can be comprehensively evaluated based on the analysis of various features of the current impact signal, the feature similarity between signal segments, and the feature similarity between the current impact signal and a preset striking signal. Here, the confidence parameter can be a global confidence level or a confidence level including multiple feature dimensions.
[0054] Then, by combining the response threshold adapted to the current usage scenario and the confidence parameter of the first input, it can be determined whether to respond to the first input, that is, whether to trigger the tap function of the electronic device to perform the target operation. In this embodiment, the response threshold is the confidence threshold.
[0055] Specifically, based on the response threshold set in the current usage scenario, it can be determined whether the confidence parameter of the first input can pass the trigger threshold, that is, whether the confidence parameter is higher than the current response threshold. If it passes, the first input can be responded to, and the tapping function can be triggered to execute the target operation, such as calling the back tapping function to perform a screenshot operation. If it fails, no response can be made, the tapping function cannot be triggered, and the target operation cannot be executed, thereby achieving the prevention of accidental touch.
[0056] This implementation method enables a more comprehensive response determination of the tapping function, achieving a better balance between the anti-accidental touch performance and sensitivity of the tapping function.
[0057] Optionally, determining the confidence parameter corresponding to the first input includes: The first stage of identification processing is performed on the impact signal, which is the signal detected by the electronic device when it receives the first input; If the result of the first stage identification process indicates that the first input is a knocking input, the impact signal is subjected to a second stage identification process, and the confidence parameter is output according to the result of the second stage identification process. Specifically, if the first stage identification processing result indicates that the first input is not a knocking input, the second stage identification processing is not performed on the impact signal, and it is determined that no knocking input was detected.
[0058] In some embodiments, the impact signal received by the electronic device can be used to identify whether a tapping gesture or signal is detected through a first-stage coarse judgment and a second-stage fine judgment. For example, for the back tapping function, the user's back tapping gesture can be identified through a two-stage judgment, and the corresponding probability can be calculated as the confidence parameter of the first input.
[0059] Specifically, after the tapping function is activated, the corresponding tapping input signal recognition algorithm, such as the back tapping algorithm, enters a hierarchical progressive recognition stage. The first stage can be a coarse-grained filtering process, such as filtering the raw signal collected by the inertial measurement unit (IMU), i.e., the impact signal corresponding to the first input. By calculating the feature information of instantaneous impact signal segments, impact signals from scenarios such as low-frequency walking vibrations or high-frequency environmental noise are quickly eliminated. High-frequency environmental noise can be impact interference signals generated by collisions or impacts. Thus, through the first stage of recognition processing, the signal portion that may be a tapping signal can be retained. The second stage is a fine-grained matching process. For the signal segments that pass the initial selection, the features of the signal segments or the features between each impact signal segment can be calculated in depth, or the similarity of features between adjacent impact signal segments can be calculated. Finally, based on the calculation results, the confidence parameter of the first input is output comprehensively. In this way, through two-stage recognition, behaviors such as back tapping can be accurately identified and the corresponding confidence probability can be calculated.
[0060] It should be noted that if the impact signal is determined not to be a knocking signal during the first stage of identification and processing, the result feedback that the first input is not a knocking input can be directly output, without having to send the impact signal to the second stage of identification and processing. This saves unnecessary identification and processing steps, reduces algorithm power consumption, and saves system computing resources.
[0061] Optionally, the impact signal is a signal acquired by the inertial measurement unit (IMU) of the electronic device; Before performing the first-stage identification processing on the impact signal, the method further includes: The acceleration data signal in the first direction is extracted from the impact signal, where the first direction is the direction of the signal impact generated by the tapping input on the electronic device; The acceleration data signal in the first direction is filtered. Peak detection is performed on the filtered acceleration data signal in the first direction; The first stage of identification processing for the impact signal includes: If the peak value of the filtered acceleration data signal in the first direction exceeds a preset threshold, the impact signal is subjected to a first-stage identification process.
[0062] In some embodiments, before performing two-stage identification processing on the impact signal, the original impact signal acquired by the IMU can be preliminarily filtered based on the vibration direction characteristics of the preset impact signal, and the peak value of the filtered signal can be used to determine whether to perform further two-stage identification processing.
[0063] Taking a back-tapping operation as an example, when a back-tapping is detected, the impact signal is obtained through IMU detection, the Z-direction acceleration data is extracted from it and filtered, and the signal after filtering is used to determine whether to further enter the back-tapping algorithm detection.
[0064] like Figure 2 The diagram illustrates a back-tapping gesture. The back-tapping function and corresponding detection algorithm of this application can adapt to back-tapping gestures, such as tapping with one hand or tapping with both hands. Subsequent processing is performed after an impact signal is detected.
[0065] Figure 3 This is a schematic diagram of high-frequency filtering of the original Z-axis accelerometer data provided in this application embodiment. In this application, since the target is a back-tapping action, the back-tapping algorithm is triggered by the Z-axis acceleration data for further calculation. This involves processing the Z-axis acceleration data with a high-frequency wave (i.e., filtering out low-frequency signals and retaining high-frequency signals), performing peak detection on the filtered data, and triggering back-tapping recognition when the peak value exceeds a detection threshold, thus entering the first stage of recognition processing. Here, high-frequency filtering can be calculated using the following first-order Butterworth filter formula:
[0066] in, and These are the filtered values from the current time and the previous time. and These are the original values from the current and previous moments; a and b It is the filter gain parameter.
[0067] In this way, by introducing acceleration data in a specific direction for filtering and peak detection, the algorithm's processing efficiency can be further optimized, which can help save unnecessary system resource overhead and improve recognition efficiency and accuracy.
[0068] After passing the peak detection, the impact signal data is further fed into the back-tapping algorithm implementation logic, where the probability value of whether it is a tap is obtained through identification analysis and calculation.
[0069] For example, Figure 4The logic diagram of the back-tapping recognition algorithm provided in this application is shown. The algorithm adopts a two-stage progressive architecture, achieving high-precision recognition of tapping behavior through the collaboration of a first-stage recognition process (coarse judgment) and a second-stage recognition process (fine judgment). In the detection initiation stage, the signal stream after high-pass filtering is monitored in real time. When the signal peak exceeds the preset initiation detection threshold, the system immediately triggers data truncating logic: a sample of a specific duration is cut from the original signal stream, for example, acquiring 20 consecutive frames (i.e., 40ms long) of instantaneous impact signal segments at a 500Hz sampling rate. The original data vector formed by this segment includes the original IMU multi-axis features, the resultant acceleration vector, and high-frequency components processed by a first-order Butterworth filter. The first-stage recognition process performs feature mining on the aforementioned single signal segment. Lightweight feature operators can be used to extract the signal's energy envelope, zero-crossing rate, etc., or it can be input into a lightweight neural network model for binary classification. If the segment passes the first-stage judgment, the system determines that it has the potential for tapping and enters the dynamic caching mechanism. Next, logical judgment is performed based on the time interval between adjacent impact signals: if the interval is within a preset impact time window, the data sequence is continuously buffered; if the interval exceeds the limit, buffering is interrupted and the state machine is reset. After buffering, the system acquires a complete time-series data stream composed of multiple impact signal pulses and initiates the second-stage recognition process. This stage focuses on analyzing the temporal correlation and frequency distribution characteristics between multiple pulse sequences, performing modal matching on the overall waveform using a deep learning model or Pearson correlation coefficient operator, and outputting the final recognition confidence level. Finally, the system obtains the corresponding adaptive admission response threshold based on the physical scenario of the current electronic device (such as gaming, holding, etc.). Only when the confidence level output by the second-stage recognition process is greater than the adaptive response threshold for that scenario, the algorithm determines that the recognition is successful and issues the corresponding interaction command.
[0070] Optionally, the first-stage identification processing of the impact signal includes: The impact signal is cut into M impact signal segments of a first duration, where M is an integer greater than 1; Feature extraction is performed on each of the M impact signal segments using a lightweight neural network. Based on the signal features extracted from each impact signal segment, it is determined whether the first input may be a knocking input; The second-stage identification process for the impact signal includes: The temporal correlation between adjacent impact signal segments in the M impact signal segments is analyzed by a first deep neural network, and the frequency domain distribution features of each impact signal segment are extracted. The scale of the first deep neural network is larger than that of the lightweight neural network. Calculate the similarity between the adjacent impact signal segments; The results of the second stage of identification processing include the temporal correlation between adjacent impact signal segments, the frequency domain distribution characteristics of each impact signal segment, and the similarity between adjacent impact signal segments.
[0071] In some embodiments, the algorithm structure including two-stage recognition processing can be: a first stage of small neural network recognition, followed by a second stage of large neural network and similarity calculation for further recognition, as shown in the following algorithm structure. Figure 5 As shown. Based on the set response threshold, the final result of the two-stage judgment is obtained. If the result is yes, the corresponding target operation function is activated.
[0072] That is, the first method of algorithm structure implementation can adopt Figure 5 The diagram illustrates the back-tapping algorithm structure. This architecture achieves a balance between detection sensitivity and recognition accuracy through the cascading of heterogeneous neural networks. In the first stage (candidate frame recognition layer), the system uses a small, lightweight neural network to initially identify the captured instantaneous impact signal segments. For example, 20 consecutive frames (40ms in length) of instantaneous impact signal segments can be acquired at a sampling rate of 500Hz. The raw data vector formed by these segments includes the original IMU multi-axis features, the resultant acceleration vector, and high-frequency components processed by a first-order Butterworth filter. The first stage mainly focuses on feature mining of the aforementioned single signal segments. Lightweight feature operators can be used to extract the signal's energy envelope, zero-crossing rate, etc., or the signal can be input into a lightweight neural network model for binary classification. The training objective function in this stage has a clear bias: prioritizing maximizing the positive sample recall rate while ensuring basic filtering capabilities. By reducing the probability of intercepting positive examples, it ensures that all potentially valid tapping signals can enter subsequent processing stages, thus laying the foundation for the high sensitivity of the overall algorithm. In the second stage (deep decision recognition layer), the algorithm introduces a multi-dimensional joint judgment mechanism. First, the system performs signal similarity calculation, measuring the correlation between real-time adjacent signal sequences. Second, the data stream is input into a larger-scale deep neural network model. This stage focuses on analyzing the temporal correlation and frequency distribution characteristics between multi-pulse sequences. Compared to the first-stage neural network model, the second-stage model has stronger feature extraction and classification boundary definition capabilities. Its training logic aims to balance positive example recognition rate and negative example suppression rate (i.e., precision). It should be noted that the large-scale deep neural network model recognition and similarity calculation steps in the second stage can be executed in parallel.
[0073] The formula for calculating the principle of a neural network is as follows:
[0074] in,x For input data, y For the predicted results; W This is the weight matrix. b It is the bias vector; f This represents a neural network model.
[0075] Similarity can be calculated using the Pearson correlation coefficient, which can be used to calculate the similarity between different impact signal segments, or the similarity of feature vectors between signal segments. The calculation formula is as follows:
[0076] in, ρ It is the Pearson correlation coefficient; cov(X,Y) yes X and Y covariance, σ X and σ Y yes X and Y The overall standard deviation; x i , y i It is the first of two variables i One observation value; , It is the mean of two variables; n This represents the total number of samples.
[0077] The algorithm architecture in this implementation is suitable for recognizing a fixed number of taps, such as double taps and triple taps, because the data length processed in the second stage can be fixed, making it convenient to feed into the neural network.
[0078] Optionally, the first-stage identification processing of the impact signal includes: The impact signal is cut into N impact signal segments of a second duration, where the second duration is longer than the first duration, and N is an integer greater than 1; Feature extraction of the first impact signal segment is performed by a second deep neural network analysis. The first impact signal segment is the impact signal segment with the earliest reception time among the N impact signal segments. Based on the signal features extracted from the first impact signal segment, it is determined whether the first input may be a knocking input; The second-stage identification process for the impact signal includes: Calculate the similarity between each of the other impact signal segments in the N impact signal segments and the first impact signal segment, wherein the other impact signal segments are impact signal segments other than the first impact signal segment.
[0079] In other embodiments, the algorithm structure including two-stage recognition processing may be: a first stage of large-scale neural network recognition, followed by a second stage of further similarity recognition, such as... Figure 6 As shown. Based on the set response threshold, the final result of the two-stage judgment is obtained. If the result is yes, the corresponding target operation function is activated.
[0080] That is, the second method of algorithm structure implementation can adopt Figure 6 The diagram illustrates the back-tapping algorithm structure. In the first stage (enhanced feature recognition layer), the algorithm increases the number of sampling frames for a single impact signal from the basic 20 frames to 50 frames by expanding the coverage of the data window. By increasing the temporal observation width, the system can capture more complete signal initiation, attenuation, and aftershock characteristics. Subsequently, long data segments containing multi-dimensional sensor components are input into a large-scale deep neural network. Due to the expansion of the input feature space and the enhancement of the model's expressive power, this stage can achieve high-dimensional differentiation between positive and negative samples in the early stages. In terms of training strategy, the model maintains a moderate bias towards positive example recall to ensure the completeness of key interaction signals. In the second stage (temporal correlation determination layer), the algorithm introduces similarity analysis logic for consecutively triggered events. After initially identifying the first valid knocking event, for subsequent non-fixed number of impact signals, the system no longer repeatedly calls the full deep learning model for inference. Instead, it calculates the waveform similarity score and confidence level between the subsequent signal segments and the first signal segment that matches the knocking behavior; it can also calculate the similarity between the feature vectors of the signal segments and make a joint judgment through multiple similarities.
[0081] The algorithm architecture in this implementation is suitable for custom multi-tap gesture scenarios. Through the joint strategy of "first recognition + subsequent similarity matching", it not only simplifies the computation link of non-fixed number of taps recognition and reduces the processor load, but also greatly improves the recognition accuracy and response speed under complex interactions by utilizing the physical consistency of the signal sequence.
[0082] Optionally, the target neural network includes the neural networks used in the first-stage recognition processing and the second-stage recognition processing, and the training process of the target neural network includes: Obtain an initial dataset, which includes a positive sample set and a negative sample set. The positive sample set includes impact signals that match a preset knocking signal, and the negative sample set includes interference signals of the preset knocking signal. The target neural network is trained using samples from the initial dataset to determine the basic model parameters and initial response threshold of the target neural network.
[0083] In some embodiments, appropriate parameters and thresholds in the algorithm architecture can be determined by iteratively collecting data and cyclically training, thereby obtaining the final algorithm structure.
[0084] First, an initial benchmark dataset can be constructed to establish the algorithm's prototype capability. Taking the back-tapping algorithm as an example, the positive sample set covers standardized back-tapping data under various grip postures; the negative sample set is finely divided into tapping signals from non-specified areas (such as the frame and screen), and typical collision signals from electronic devices in daily use, such as drops and desktop placement. Supervised learning based on this initial dataset can determine the algorithm's basic model parameters and initial response thresholds.
[0085] Furthermore, the training process of the target neural network also includes: During the testing phase of the electronic device's tapping function based on the target neural network, a dataset of accidental touches is obtained. The target neural network is fused and trained using the accidental touch dataset and the initial dataset to calibrate the basic model parameters and optimize the initial response threshold to obtain the basic response threshold. Based on the basic response threshold, multiple response threshold schemes are determined to adapt to different usage scenarios according to various usage scenarios of the electronic device.
[0086] In some embodiments, the basic model parameters and initial response thresholds obtained from the initial training can be further optimized and adjusted by combining the accidental touch dataset to obtain the global basic response threshold.
[0087] For example, it can be used Figure 7This diagram illustrates an iterative training scheme for the algorithm. This scheme achieves continuous optimization of algorithm performance and scenario adaptation by constructing a closed-loop data-driven mechanism. After supervised learning based on the initial dataset to determine the algorithm's basic model parameters and initial response threshold, it enters the incremental expansion phase of the false touch dataset. During functional trial operation or gray-scale testing, the system continuously monitors and extracts unexpected interference signals that trigger high-energy characteristics but do not meet the interaction logic, thereby constructing a more comprehensive false touch dataset. By further fusing the false touch dataset with the initial dataset for fusion training, the algorithm can selectively extract subtle feature differences in interference signals, thereby calibrating the model weights and achieving non-linear optimization of the response threshold. Finally, after obtaining a robust global basic response threshold, scenario-specific adaptive response thresholds can be further developed; specifically, based on the global basic response threshold, multiple sets of adaptive sensitivity parameters can be dynamically derived for the differences in interference intensity in subdivided scenarios such as games, thus determining multiple response threshold schemes adapted to different usage scenarios. This iterative training path, from "baseline parameters" to "mis-touch correction" and then to "scene adaptation," ensures that the algorithm maintains high recognition accuracy and user comfort throughout its entire lifecycle.
[0088] It is understandable that the training process of the aforementioned target neural network can actually refer to the training process of the algorithm that implements the target operation function, such as the training process of the back-tapping algorithm.
[0089] Optionally, step 102 includes at least one of the following: If the usage scenario information of the electronic device is identified as a preset first type of usage scenario, the response threshold is increased so that the adjusted response threshold is adapted to the first type of usage scenario. If the usage scenario information of the electronic device is identified as a preset second type of usage scenario, the response threshold is lowered so that the adjusted response threshold is adapted to the second type of usage scenario. If the usage scenario information of the electronic device is not identified as a preset usage scenario category, a preset basic response threshold is used.
[0090] The first and second categories of usage scenarios mentioned above can each include one or more usage scenarios. Specifically, based on the characteristics of the vibration and impact waveforms detected in each usage scenario, the usage scenarios can be classified into at least two categories, one suitable for high response thresholds and the other for low response thresholds. The first category of usage scenarios can be those prone to accidental touches, such as high-interference scenarios like large-scale games or camera shooting, which can correspond to a higher response threshold. The second category of usage scenarios can be those where users can operate and interact stably, are less prone to accidental touches, and require high sensitivity and fast response, such as high-frequency interaction scenarios like holding the phone stably, which can correspond to a lower response threshold.
[0091] In practice, the response threshold triggered by the algorithm can be adaptively adjusted according to the usage scenario of the electronic device. Once the response threshold is met, the tapping function will respond to the set tapping input.
[0092] For example, before executing a functional response, the system introduces scene-aware logic to adaptively adjust the back tap response threshold. The algorithm calls the system activity management component in real time to identify the current application scenario. In high-interference scenarios such as large-scale games or camera shooting, the algorithm automatically increases the trigger threshold, i.e., increases the response threshold, and introduces conflict suppression logic to filter mechanical vibrations caused by intense operation collisions. In high-frequency interaction scenarios such as holding the phone stably, the trigger threshold is lowered to improve sensitivity. Finally, when the recognition probability passes the dynamic response threshold verification in the scenario, the system maps and executes corresponding preset target operations such as taking a screenshot or launching the settings application based on the identified tap type, such as double tap or triple tap, completing the entire interactive feedback loop.
[0093] It should be noted that if the usage scenario information of the electronic device is identified as a normal usage scenario, that is, a non-preset usage scenario category, there is no need to adjust the response threshold; instead, the preset basic response threshold can be used directly.
[0094] For example, the back tapping function response threshold adaptive adjustment interaction process provided in this application includes the following steps: S301. Identification of usage scenario information of electronic devices, specifically scenario identification or identification of the usage status of electronic devices.
[0095] S302, Adaptively adjust the response threshold of the back-tapping algorithm.
[0096] S303. Based on the current response threshold, determine whether to ultimately identify the device through back tapping.
[0097] This solution dynamically reshapes the algorithm's response threshold by introducing scene awareness, achieving classification optimization for differentiated application environments. At the system logic level, this part automatically maps and distributes an adaptive threshold parameter matrix by identifying the software operating environment and physical interaction state of electronic devices in real time.
[0098] Optionally, the first type of use case includes at least one of the following: game scenario, shooting scenario, operation and interaction scenario, and shaking scenario; The second category of use cases includes at least one of the following: stable holding scenario, static interaction scenario.
[0099] In some embodiments, the first type of use case may include gaming scenarios, shooting scenarios, operation interaction scenarios, shaking scenarios, etc. The probability of accidental touches is relatively high in these scenarios. Therefore, the response threshold of the trigger function can be increased to reduce the occurrence of accidental touches. The second type of use case may include stable holding scenarios, static interaction scenarios, etc. The probability of users performing target function operations is relatively high in these scenarios, and the probability of accidental touches is relatively low. It is necessary to increase the sensitivity of the response. Therefore, the response threshold of the trigger function can be decreased to improve the sensitivity of the algorithm.
[0100] In specific implementations, some embodiments of this application can divide the response threshold into multiple levels. By finely adjusting the discrimination probability threshold, i.e., the response threshold, and the signal feature tolerance, the following hierarchical response logic can be defined (more levels can be set): Low Sensitivity Level (High Robustness Mode): This level corresponds to a higher trigger threshold, imposing strict constraints on the signal mode and physical posture of back taps. The response threshold is only passed when the real-time signal closely matches the standard tap characteristics with extremely high confidence. This level is suitable for high-frequency shaking or intense interaction scenarios, aiming to suppress accidental touches to the greatest extent possible.
[0101] Medium Sensitivity Level (General Balanced Mode): This level serves as the default configuration for unrestricted, routine scenarios, balancing response speed and interference resistance. Its response threshold settings cover typical user habits and meet most daily interaction needs.
[0102] High Sensitivity Level (Ultimate Response Mode): This level is suitable for electronic devices in a relatively stable physical state or specific static interaction scenarios. By lowering the trigger threshold, the algorithm can capture even slighter tapping movements, significantly improving the responsiveness and lightness of user interaction.
[0103] Shutdown mode (function suppression mode): In specific system constraints, such as extreme power saving mode, call privacy mode, or high power consumption warning scenarios, the system completely suspends the algorithm monitoring process through a logical switch to achieve optimal power consumption configuration and avoid potential functional conflicts.
[0104] Optionally, the confidence parameter includes confidence levels for multiple feature dimensions, and the response threshold includes confidence thresholds for the multiple feature dimensions; Step 102 includes: Determine the target feature dimensions related to the usage scenario information of the electronic device; Based on the usage scenario information, the confidence threshold of the target feature dimension is adjusted, wherein the adjusted confidence threshold of the target feature dimension is adapted to the usage scenario information.
[0105] In some embodiments, the output confidence parameter can be a parameter matrix, including confidence scores for multiple feature dimensions. The corresponding response thresholds include confidence thresholds for the corresponding multiple feature dimensions. Therefore, during the judgment process, the confidence score of a certain feature dimension can be compared with its corresponding confidence threshold to determine whether that feature dimension has passed recognition. Furthermore, for specific use cases, the confidence thresholds for the corresponding feature dimensions can be specifically optimized to achieve finer response threshold control and ensure the accuracy of the final judgment result. That is, the second-stage judgment process supports parallel output of multiple features, meaning the system can simultaneously calculate and output recognition confidence scores for multiple dimensions and multiple sets of similarity scores. This facilitates targeted optimization for different use cases.
[0106] For example, Figure 8 This is a schematic diagram of an adaptive adjustment scheme for the response threshold provided in this application. The core of this scheme lies in coupling the multidimensional calculation results of the second-stage fine judgment output with dynamic environmental variables to achieve precise control of the identification response threshold.
[0107] Specifically, the response threshold parameter matrix is composed of multiple judgment criteria across different algorithm architectures. For example, its parameters may include: a neural network confidence threshold (optional, used to evaluate the global probability of deep feature matching), a similarity judgment threshold (mandatory, used to measure the linear correlation between real-time waveforms, or the correlation of features between waveforms), and a physical feature statistical threshold (optional, used to constrain specific physical quantities such as the energy and duration of the impact signal). These response threshold parameters can be configured in parallel or weighted fused according to different recognition dimensions. In terms of execution logic, the system pre-sets multiple threshold schemes matching the hierarchical response logic, each scheme corresponding to a specific combination of response threshold parameters. By establishing a mapping model between usage scenarios and response threshold schemes, the system can perceive changes in the recognition environment in real time, such as switching from a static state to a moving state, and dynamically load the corresponding response threshold matrix, thereby achieving adaptive adjustment of the response threshold and ensuring that the interactive response is always within the optimal confidence interval.
[0108] Figure 9 This is an example diagram illustrating an adaptive adjustment of the response threshold provided in this application. Exemplarily, the scheme includes two scenarios.
[0109] In scenario A, such as the stable interaction mode, the system uses a gaze perception module (which uses the front-facing camera to monitor the user's visual focus) and a stabilization detection unit (which uses an IMU to monitor changes in the spatial displacement vector of the electronic device) to perform multi-dimensional collaborative judgment. When it is confirmed that the user is stably holding the device and has a clear intention to interact, the algorithm automatically increases the sensitivity gain and correspondingly lowers the response threshold parameter. This strategy effectively lowers the recognition threshold for users to perform back tapping actions, making the interaction response lighter and more sensitive.
[0110] In scenario B, such as competitive gaming mode, electronic devices operate in a complex environment of high-frequency touch input and intense physical collisions. The system identifies the attributes of the foreground application and high-frequency touch characteristics, determining a very high risk of accidental touches. In this case, the algorithm performs adaptive response threshold reshaping, adjusting the sensitivity to a low-sensitivity mode by increasing the threshold or adding constraints on signal characteristics. This mechanism ensures that intense player actions are not disturbed while maintaining the accuracy of the back-tap function under heavy load interference.
[0111] Optionally, if the first input is not identified as a tapping input, the tapping function of the electronic device is not triggered, and the target operation is not performed.
[0112] In some embodiments, if the first input is not identified as a tapping input, it can be determined that no user-triggered tapping interaction has been detected, which is likely an ambient noise signal. Therefore, the tapping function is not triggered to perform the target operation, thereby reducing the occurrence of false triggering.
[0113] In summary, the process of implementing a back tapping function includes the following steps: S401. Monitor the screen status, touch status, and holding status of the terminal. If all status settings are met, enable the back tap function.
[0114] S402: The algorithm monitors the impact signal received by the terminal, and through the first stage of coarse judgment and the second stage of fine judgment, it identifies the back-tapping gesture and calculates the corresponding probability.
[0115] S403. Determine the terminal usage scenario, adaptively adjust the algorithm threshold, and if the threshold is met, the function will respond with the corresponding operation set.
[0116] The tapping interaction method for an electronic device in this embodiment of the application acquires a first input received by the electronic device when the tapping function of the electronic device is enabled; if the first input is identified as a tapping input, a response threshold adapted to the usage scenario information is determined based on the usage scenario information of the electronic device; and based on the response threshold, it is determined whether to respond to the first input, wherein responding to the first input includes performing a target operation corresponding to the first input. Thus, this embodiment of the application identifies the user's tapping input and adaptively adjusts the response threshold in conjunction with usage scenario information, thereby determining whether to trigger the tapping function to perform a target operation based on the response threshold under the current usage scenario. In this embodiment of the application, since the response threshold is adaptively adjusted according to the usage scenario, it can effectively balance both anti-mistouch and sensitivity performance, that is, it can significantly improve interaction sensitivity while ensuring a low mistouch rate, thereby effectively improving the tapping interaction experience of the electronic device.
[0117] In summary, this application has made improvements in algorithm wake-up threshold, algorithm logic, and functional interaction, enhancing the interaction effect and facilitating the promotion of back-tapping interaction. The main improvements include the following core points: The system monitors the terminal's screen status, touch status, and holding status. If all status settings are met, the back tap function is enabled. After the function is enabled, the algorithm monitors the impact signals received by the terminal and identifies the back tap gesture through a first-stage coarse judgment and a second-stage fine judgment, and calculates the corresponding probability. Before responding to the function, the system determines the terminal's usage scenario, such as a gaming scenario, and adaptively adjusts the algorithm threshold. If the threshold is met, the algorithm responds. Based on the type of tap, the system responds to the corresponding set operation.
[0118] The monitoring terminal's screen status mainly includes screen-off and screen-on states, with the screen-off state including the sleep state. The wake-up algorithm is only satisfied when the screen is on. The touch state mainly includes whether there is a finger on the screen; the wake-up algorithm is only satisfied when there is no touch. The holding state is realized through the SAR sensor, which can detect whether the terminal device is being held; the wake-up algorithm is only satisfied when it is being held. The back tap function can only be activated when all three conditions are met.
[0119] One of the key aspects of the back tapping function is the back tapping algorithm. The algorithm monitors IMU sensor data, performs high-frequency filtering on the Z-axis accelerometer data, and triggers the algorithm when the peak value after filtering exceeds a set threshold. The algorithm recognition logic consists of two stages: a coarse judgment and a fine judgment. The algorithm structure can be such that the first stage uses a small neural network for recognition, and the second stage uses a large neural network (relative to the small one) for further recognition based on similarity; or, the first stage uses a large neural network for recognition, and the second stage uses further similarity recognition. Based on the set threshold, the final result of the two stages is obtained. If the result is positive, the corresponding function is activated.
[0120] The adaptive adjustment algorithm threshold is achieved by recognizing the scene or the device usage status to adaptively adjust the response threshold of the back tapping algorithm, thereby improving the interaction effect. If a game mode is detected, the algorithm threshold is increased to reduce the algorithm sensitivity and reduce the possibility of accidental touches. When the gaze perception module and IMU detect stable use of the terminal device, the algorithm sensitivity is increased to make back tapping interaction easier.
[0121] In summary, the embodiments of this application effectively solve the core technical pain points commonly found in the back-tap interaction of smart terminals, such as "balance between recognition accuracy and power consumption" and "contradiction between accidental touch suppression and sensitivity", by constructing a deep fusion mechanism of multi-dimensional state admission and hierarchical adaptive recognition and a scene-based adaptive adjustment scheme for response threshold.
[0122] Furthermore, the embodiments of this application achieve extremely high scene adaptability: by introducing a scene perception layer and a multi-level sensitivity adjustment matrix, such as high, medium, low, and off levels, the system can dynamically reshape the judgment threshold in real time according to the terminal's operating environment, such as gaming or stable phone operation. Algorithm evolution and iterative attributes: based on a closed-loop iterative scheme of "initial positive examples + continuous negative examples," the algorithm can self-correct and calibrate its weights through a continuously improving dataset of accidental touches. This data-driven iterative path, combined with the heterogeneous cascading of similarity calculation and neural networks, enables the recognition model to adapt to differences in tapping habits and phone case materials among different users.
[0123] The tapping interaction method for electronic devices provided in this application can be executed by a tapping interaction device applied to the electronic device. This application uses a tapping interaction device executing the tapping interaction method as an example to illustrate the tapping interaction device provided in this application.
[0124] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of the tapping interaction device provided in the embodiments of this application, as shown below. Figure 10 As shown, the tapping interaction device 1000 includes: The acquisition module 1001 is used to acquire the first input received by the electronic device when the tapping function of the electronic device is enabled; The first determining module 1002 is used to determine a response threshold that is adapted to the usage scenario information based on the usage scenario information of the electronic device when the first input is identified as a tapping input. The second determining module 1003 is used to determine whether to respond to the first input based on the response threshold, wherein responding to the first input includes performing a target operation corresponding to the first input.
[0125] Optionally, the tapping interaction device 1000 also includes: The wake-up module is used to activate the tapping function when the electronic device's state meets preset conditions. The state of the electronic device includes at least one of screen display state and usage state. The preset conditions include at least one of the following: the electronic device is in a screen-on state, the electronic device is in a non-touch state, and the electronic device is in a holding state.
[0126] Optionally, the tapping interaction device 1000 also includes: The third determining module is used to determine the confidence parameter corresponding to the first input, wherein the confidence parameter is used to characterize the probability that the first input is a tapping input; The second determining module 1003 is used to determine whether to respond to the first input based on the response threshold and the confidence parameter.
[0127] Optionally, the third determining module includes: The first identification submodule is used to perform a first-stage identification process on the impact signal, wherein the impact signal is a signal detected by the electronic device when it receives the first input. The second identification submodule is used to perform a second-stage identification process on the impact signal when the result of the first-stage identification process indicates that the first input is a knocking input, and output the confidence parameter of the target operation signal according to the result of the second-stage identification process. Specifically, if the first stage identification processing result indicates that the first input is not a knocking input, the second stage identification processing is not performed on the impact signal, and it is determined that no knocking input was detected.
[0128] Optionally, the impact signal is a signal acquired by the inertial measurement unit (IMU) of the electronic device; The tap interaction device 1000 also includes a preprocessing submodule for: The acceleration data signal in the first direction is extracted from the impact signal, where the first direction is the direction of the signal impact generated by the tapping input on the electronic device; The acceleration data signal in the first direction is filtered. Peak detection is performed on the filtered acceleration data signal in the first direction; The first identification submodule is used to perform a first-stage identification process on the impact signal when the peak value of the filtered acceleration data signal in the first direction exceeds a preset threshold.
[0129] Optionally, the first identification submodule is specifically used for: The impact signal is cut into M impact signal segments of a first duration, where M is an integer greater than 1; Feature extraction is performed on each of the M impact signal segments using a lightweight neural network. Based on the signal features extracted from each impact signal segment, it is determined whether the first input may be a knocking input; The second identification submodule is specifically used for: The temporal correlation between adjacent impact signal segments in the M impact signal segments is analyzed by a first deep neural network, and the frequency domain distribution features of each impact signal segment are extracted. The scale of the first deep neural network is larger than that of the lightweight neural network. Calculate the similarity between the adjacent impact signal segments; The results of the second stage of identification processing include the temporal correlation between adjacent impact signal segments, the frequency domain distribution characteristics of each impact signal segment, and the similarity between adjacent impact signal segments.
[0130] Optionally, the first identification submodule is specifically used for: The impact signal is cut into N impact signal segments of a second duration, where the second duration is longer than the first duration, and N is an integer greater than 1; Feature extraction of the first impact signal segment is performed by a second deep neural network analysis. The first impact signal segment is the impact signal segment with the earliest reception time among the N impact signal segments. Based on the signal features extracted from the first impact signal segment, it is determined whether the first input may be a knocking input; The second identification submodule is specifically used to calculate the similarity between each of the other impact signal segments in the N impact signal segments and the first impact signal segment, wherein the other impact signal segments are impact signal segments other than the first impact signal segment.
[0131] Optionally, the target neural network includes the neural networks used in the first-stage recognition processing and the second-stage recognition processing, and the training process of the target neural network includes the following: Obtain an initial dataset, which includes a positive sample set and a negative sample set. The positive sample set includes an impact signal that matches the preset impact signal, and the negative sample set includes an interference signal of the preset impact signal. The target neural network is trained using samples from the initial dataset to determine the basic model parameters and initial response threshold of the target neural network.
[0132] Optionally, the training process of the target neural network further includes: During the testing phase of the electronic device's tapping function based on the target neural network, a dataset of accidental touches is obtained. The target neural network is fused and trained using the accidental touch dataset and the initial dataset to calibrate the basic model parameters and optimize the initial response threshold to obtain the basic response threshold. Based on the basic response threshold, multiple response threshold schemes are determined to adapt to different usage scenarios according to various usage scenarios of the electronic device.
[0133] Optionally, the first determining module 1002 includes at least one of the following: The first adjustment unit is used to increase the response threshold when the electronic device is identified as a preset first type of use scenario, so that the adjusted response threshold is adapted to the first type of use scenario. The second adjustment unit is used to lower the response threshold when the electronic device is identified as a preset second type of use scenario, so that the adjusted response threshold is adapted to the second type of use scenario. The third adjustment unit is used to use a preset basic response threshold when the usage scenario information of the electronic device is not a preset usage scenario category.
[0134] Optionally, the first type of use case includes at least one of the following: game scenario, shooting scenario, operation and interaction scenario, and shaking scenario; The second category of use cases includes at least one of the following: stable holding scenario, static interaction scenario.
[0135] Optionally, the confidence parameter includes confidence levels for multiple feature dimensions, and the response threshold includes confidence thresholds for the multiple feature dimensions; The second determining module 1003 includes: A determining unit is used to determine the target feature dimensions related to the usage scenario information of the electronic device; An adjustment unit is configured to adjust the confidence threshold of the target feature dimension according to the usage scenario information, wherein the adjusted confidence threshold of the target feature dimension is adapted to the usage scenario information.
[0136] Optionally, if the recognition processing result indicates that the first input is not a tapping input, the tapping function of the electronic device is not triggered to perform the target operation.
[0137] The tapping interaction device 1000 in this embodiment acquires a first input received by the electronic device when the tapping function of the electronic device is enabled. If the first input is identified as a tapping input, a response threshold adapted to the usage scenario information of the electronic device is determined. Based on the response threshold, it is determined whether to respond to the first input, wherein responding to the first input includes performing a target operation corresponding to the first input. Thus, this embodiment identifies the user's tapping input and adaptively adjusts the response threshold based on usage scenario information. Based on the response threshold in the current usage scenario, it determines whether to trigger the tapping function to perform a target operation. In this embodiment, because the response threshold is adaptively adjusted according to the usage scenario, it effectively balances both accidental touch prevention and sensitivity performance, significantly improving interaction sensitivity while ensuring a low accidental touch rate, thereby effectively improving the tapping interaction experience of the electronic device.
[0138] The tapping interaction device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0139] The tapping interaction device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0140] The tapping interaction device provided in this application embodiment can achieve... Figures 1 to 9 The various processes implemented in the method embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.
[0141] Optionally, such as Figure 11 As shown, this application embodiment also provides an electronic device 1100, including a processor 1101 and a memory 1102. The memory 1102 stores a program or instructions that can run on the processor 1101. When the program or instructions are executed by the processor 1101, they implement the various steps of the above-mentioned electronic device tapping interaction method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0142] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0143] Figure 12 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0144] The electronic device 1200 includes, but is not limited to, components such as: radio frequency unit 1201, network module 1202, audio output unit 1203, input unit 1204, sensor 1205, display unit 1206, user input unit 1207, interface unit 1208, memory 1209, and processor 1210.
[0145] Those skilled in the art will understand that the electronic device 1200 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1210 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 12 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0146] The processor 1210 is used for: When the tapping function of the electronic device is enabled, acquire the first input received by the electronic device; If the first input is identified as a tapping input, a response threshold adapted to the usage scenario information is determined based on the usage scenario information of the electronic device. Based on the response threshold, it is determined whether to respond to the first input, wherein responding to the first input includes performing a target operation corresponding to the first input.
[0147] Optionally, the processor 1210 is also used for: When the electronic device's status is detected to meet preset conditions, the tapping function is activated. The electronic device's status includes at least one of screen display status and usage status. The preset conditions include at least one of the following: the electronic device is in a screen-on state, the electronic device is in a non-touch state, and the electronic device is in a holding state.
[0148] Optionally, the processor 1210 is also used for: Determine the confidence parameter corresponding to the first input, wherein the confidence parameter is used to characterize the probability that the first input is a tapping input; Based on the response threshold and the confidence parameter, determine whether to respond to the first input.
[0149] Optionally, the processor 1210 is also used for: The impact signal is a signal detected by the electronic device when it receives the first input; If the result of the first stage identification process indicates that the first input is a knocking input, the impact signal is subjected to a second stage identification process, and the confidence parameter is output according to the result of the second stage identification process. Specifically, if the first stage identification processing result indicates that the first input is not a knocking input, the second stage identification processing is not performed on the impact signal, and it is determined that no knocking input was detected.
[0150] Optionally, the impact signal is a signal acquired by the inertial measurement unit (IMU) of the electronic device; Processor 1210 is also used for: The acceleration data signal in the first direction is extracted from the impact signal, where the first direction is the direction of the signal impact generated by the tapping input on the electronic device; The acceleration data signal in the first direction is filtered. Peak detection is performed on the filtered acceleration data signal in the first direction; If the peak value of the filtered acceleration data signal in the first direction exceeds a preset threshold, the impact signal is subjected to a first-stage identification process.
[0151] Optionally, the processor 1210 is also used for: The impact signal is cut into M impact signal segments of a first duration, where M is an integer greater than 1; Feature extraction is performed on each of the M impact signal segments using a lightweight neural network. Based on the signal features extracted from each impact signal segment, it is determined whether the first input may be a knocking input; The temporal correlation between adjacent impact signal segments in the M impact signal segments is analyzed by a first deep neural network, and the frequency domain distribution features of each impact signal segment are extracted. The scale of the first deep neural network is larger than that of the lightweight neural network. Calculate the similarity between the adjacent impact signal segments; The results of the second stage of identification processing include the temporal correlation between adjacent impact signal segments, the frequency domain distribution characteristics of each impact signal segment, and the similarity between adjacent impact signal segments.
[0152] Optionally, the processor 1210 is also used for: The impact signal is cut into N impact signal segments of a second duration, where the second duration is longer than the first duration, and N is an integer greater than 1; Feature extraction of the first impact signal segment is performed by a second deep neural network analysis. The first impact signal segment is the impact signal segment with the earliest reception time among the N impact signal segments. Based on the signal features extracted from the first impact signal segment, it is determined whether the first input may be a knocking input; Calculate the similarity between each of the other impact signal segments in the N impact signal segments and the first impact signal segment, wherein the other impact signal segments are impact signal segments other than the first impact signal segment.
[0153] Optionally, the target neural network includes the neural networks used in the first-stage recognition processing and the second-stage recognition processing, and the training process of the target neural network includes: Obtain an initial dataset, which includes a positive sample set and a negative sample set. The positive sample set includes an impact signal that matches the preset impact signal, and the negative sample set includes an interference signal of the preset impact signal. The target neural network is trained using samples from the initial dataset to determine the basic model parameters and initial response threshold of the target neural network.
[0154] Optionally, the training process of the target neural network further includes: During the testing phase of the electronic device's tapping function based on the target neural network, a dataset of accidental touches is obtained. The target neural network is fused and trained using the accidental touch dataset and the initial dataset to calibrate the basic model parameters and optimize the initial response threshold to obtain the basic response threshold. Based on the basic response threshold, multiple response threshold schemes are determined to adapt to different usage scenarios according to various usage scenarios of the electronic device.
[0155] Optionally, the processor 1210 is also used for at least one of the following: If the usage scenario information of the electronic device is identified as a preset first type of usage scenario, the response threshold is increased so that the adjusted response threshold is adapted to the first type of usage scenario. If the usage scenario information of the electronic device is identified as a preset second type of usage scenario, the response threshold is lowered so that the adjusted response threshold is adapted to the second type of usage scenario. If the usage scenario information of the electronic device is not identified as a preset usage scenario category, a preset basic response threshold is used.
[0156] Optionally, the first type of use case includes at least one of the following: game scenario, shooting scenario, operation and interaction scenario, and shaking scenario; The second category of use cases includes at least one of the following: stable holding scenario, static interaction scenario.
[0157] Optionally, the confidence parameter includes confidence levels for multiple feature dimensions, and the response threshold includes confidence thresholds for the multiple feature dimensions; Processor 1210 is also used for: Determine the target feature dimensions related to the usage scenario information of the electronic device; Based on the usage scenario information, the confidence threshold of the target feature dimension is adjusted, wherein the adjusted confidence threshold of the target feature dimension is adapted to the usage scenario information.
[0158] Optionally, if the recognition processing result indicates that the first input is not a tapping input, the tapping function of the electronic device is not triggered to perform the target operation.
[0159] It should be understood that, in this embodiment, the input unit 1204 may include a graphics processing unit (GPU) 12041 and a microphone 12042. The GPU 12041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1206 may include a display panel 12061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1207 includes a touch panel 12071 and at least one of other input devices 12072. The touch panel 12071 is also called a touch screen. The touch panel 12071 may include a touch detection device and a touch controller. Other input devices 12072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.
[0160] The memory 1209 can be used to store software programs and various data. The memory 1209 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1209 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1209 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0161] Processor 1210 may include one or more processing units; optionally, processor 1210 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 1210.
[0162] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described electronic device tapping interaction method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0163] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0164] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described electronic device tapping interaction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0165] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0166] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described electronic device tapping interaction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0167] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0168] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0169] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A tapping interaction method, characterized in that, include: When the tapping function of the electronic device is enabled, acquire the first input received by the electronic device; If the first input is identified as a tapping input, a response threshold adapted to the usage scenario information is determined based on the usage scenario information of the electronic device. Based on the response threshold, it is determined whether to respond to the first input, wherein responding to the first input includes performing a target operation corresponding to the first input.
2. The method according to claim 1, characterized in that, Before acquiring the first input received by the electronic device when the tapping function of the electronic device is enabled, the method further includes: The tapping function is activated when the electronic device's status meets preset conditions. The preset conditions include at least one of the following: the electronic device is in a screen-on state, the electronic device is in a non-touch state, and the electronic device is in a holding state.
3. The method according to claim 1 or 2, characterized in that, When the tapping function of the electronic device is enabled, after acquiring the first input received by the electronic device, the method further includes: Determine the confidence parameter corresponding to the first input, wherein the confidence parameter is used to characterize the probability that the first input is a tapping input; The step of determining whether to respond to the first input based on the response threshold includes: Based on the response threshold and the confidence parameter, determine whether to respond to the first input.
4. The method according to claim 3, characterized in that, Determining the confidence parameter corresponding to the first input includes: The first stage of identification processing is performed on the impact signal, which is the signal detected by the electronic device when it receives the first input; If the result of the first stage identification process indicates that the first input is a knocking input, the impact signal is subjected to a second stage identification process, and the confidence parameter is output based on the result of the second stage identification process.
5. The method according to claim 3 or 4, characterized in that, The confidence parameter includes confidence levels for multiple feature dimensions, and the response threshold includes confidence thresholds for the multiple feature dimensions. The step of determining a response threshold adapted to the usage scenario information based on the usage scenario information of the electronic device includes: Determine the target feature dimensions related to the usage scenario information of the electronic device; Based on the usage scenario information, the confidence threshold of the target feature dimension is adjusted, wherein the adjusted confidence threshold of the target feature dimension is adapted to the usage scenario information.
6. A tapping interaction device, applied to an electronic device, characterized in that, include: The acquisition module is used to acquire the first input received by the electronic device when the tapping function of the electronic device is enabled; The first determining module is used to determine a response threshold that is adapted to the usage scenario information based on the usage scenario information of the electronic device when the first input is identified as a tapping input. The second determining module is used to determine whether to respond to the first input based on the response threshold, wherein responding to the first input includes performing a target operation corresponding to the first input.
7. The tapping interaction device according to claim 6, characterized in that, The tapping interaction device also includes: The wake-up module is used to activate the tapping function when the electronic device's status is detected to meet preset conditions. The preset conditions include at least one of the following: the electronic device is in a screen-on state, the electronic device is in a non-touch state, and the electronic device is in a holding state.
8. The tapping interaction device according to claim 6 or 7, characterized in that, The tapping interaction device also includes: The third determining module is used to determine the confidence parameter corresponding to the first input, wherein the confidence parameter is used to characterize the probability that the first input is a tapping input; The second determining module is used to determine whether to respond to the first input based on the response threshold and the confidence parameter.
9. The tapping interaction device according to claim 8, characterized in that, The third determining module includes: The first identification submodule is used to perform a first-stage identification process on the impact signal, wherein the impact signal is a signal detected by the electronic device when it receives the first input. The second identification submodule is used to perform a second-stage identification process on the impact signal when the result of the first-stage identification process indicates that the first input is a knocking input, and output the confidence parameter according to the result of the second-stage identification process.
10. The method according to claim 8 or 9, characterized in that, The confidence parameter includes confidence levels for multiple feature dimensions, and the response threshold includes confidence thresholds for the multiple feature dimensions. The first determining module includes: A determining unit is used to determine the target feature dimensions related to the usage scenario information of the electronic device; An adjustment unit is used to adjust the confidence threshold of the target feature dimension according to the usage scenario information, wherein the adjusted confidence threshold of the target feature dimension is adapted to the usage scenario information.
11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the tapping interaction method of the electronic device as described in any one of claims 1 to 5.
12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the tapping interaction method of the electronic device as described in any one of claims 1 to 5.