Key event enhancement method and device based on Android system tactile feedback

By obtaining the pressing force data of key events in the Android system and classifying them into levels, combined with the key type and device status, differentiated vibration feedback of key events is achieved, solving the problem of single key feedback in the Android system and improving the accuracy of user operations and the tactile experience.

CN120631184APending Publication Date: 2025-09-12CHONGQING RUIJING INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511071321.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The Android system has a single key feedback method and cannot provide differentiated processing based on the user's operation duration, force, and key type. This makes it difficult for users to accurately perceive key events in blind operation or without visual attention scenarios.

Method used

The Android system's sensors are used to obtain the pressure force data of key events, which are then classified after noise filtering. The haptic engine's differentiated vibration interface is used to map different vibration parameters based on the key type, and pulse-type vibration feedback is provided based on the device's operating status.

Benefits of technology

The tactile experience in blind operation and non-visual attention scenarios has been optimized, reducing operation errors and improving the accuracy of key events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631184A_ABST
    Figure CN120631184A_ABST
Patent Text Reader

Abstract

The invention provides a key event enhancement method and device based on tactile feedback of an Android system, and the method comprises the steps: judging a key type of a key event through employing hardware resources and a computing power algorithm of the Android system; in the key event triggering process, pressing force data of the key event are obtained through a registered sensor of the Android system, noise filtering processing is conducted on the pressing force data, and then pressing force grades are divided; the method comprises the following steps: customizing vibration parameters according to a key type and a pressing force level, and determining target feedback duration and strength of pulse type vibration feedback in combination with an equipment running state of a corresponding Android system. Therefore, the key type and the pressing force level are obtained based on the hardware resources and the computing power algorithm of the Android system, pulse type vibration feedback is carried out in combination with the equipment running state, the operation error of a user in the process of using the equipment for a long time is reduced, the touch experience is optimized, and the accuracy of blind operation and the accuracy of a scene without visual attention are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of tactile feedback technology, and in particular to a key event enhancement method based on tactile feedback of an Android system. Background Art

[0002] Currently, the Android system's feedback method for physical and virtual buttons is relatively simple, mostly using fixed-mode vibration feedback. This fails to differentiate based on the duration, force, or type of key pressed by the user. This makes it difficult for users to accurately perceive key press events when operating blindly or in subtle environments. In related technologies, the Android system's feedback on key press events primarily relies on the system's built-in vibration module and a simple key event monitoring mechanism. Developers typically implement feedback after key presses by calling the vibration function provided by the Android system. The duration and intensity of the vibration are often preset fixed values, and this method can meet basic needs in most application scenarios. Summary of the Invention

[0003] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

[0004] To this end, the first purpose of the present invention is to propose a key event enhancement method based on the tactile feedback of the Android system. The key type and pressing force level are obtained based on the hardware resources and computing power algorithm of the Android system, and pulse-type vibration feedback is performed in combination with the device operation status to reduce the user's operational errors during long-term use of the device and optimize the tactile experience, effectively improving the accuracy in blind operation and scenarios without visual attention.

[0005] The second object of the present invention is to provide a key event enhancement device based on tactile feedback of the Android system.

[0006] A third object of the present invention is to provide an electronic device.

[0007] A fourth object of the present invention is to provide a non-transitory computer-readable storage medium storing computer instructions.

[0008] To achieve the above-mentioned purpose, the first embodiment of the present invention proposes a method for enhancing key events based on tactile feedback of an Android system, the method comprising:

[0009] During the Android system startup phase, the haptic engine is initialized and the sensor is registered. The Android system application program interface is called to register the sensor event listener, and the Android system service retrieval method is called to obtain the Android system vibration service instance.

[0010] During the key event triggering process, based on the registered sensor event listener, the length of time the key is pressed and the position information of the key touch when the physical key and virtual key of the Android system corresponding device are operated are obtained, and the key type of the key event is determined, which includes short press, long press or continuous touch;

[0011] The pressure data of key events is obtained by registering sensors, and the pressure data is noise filtered and divided into pressure levels.

[0012] Based on the key type and pressure level, the vibration pattern mapping table corresponding to the vibration service instance is called through the differentiated vibration interface of the haptic engine to map the vibration parameters of different key types and pressure levels;

[0013] In combination with different vibration parameters and the device operating status of the corresponding Android system, the target feedback duration and intensity of the pulse-type vibration feedback are determined, and the pulse-type vibration feedback is performed in response to the target feedback duration and intensity.

[0014] To achieve the above-mentioned purpose, a second embodiment of the present invention provides a key event enhancement device based on tactile feedback of an Android system, the device comprising:

[0015] The initialization and registration module is used to initialize the tactile engine and register sensors during the Android system startup phase, call the Android system application program interface to register the sensor event listener, and call the Android system service call method to obtain the Android system vibration service instance;

[0016] A monitoring and classification module is used to obtain the duration of key presses and key touch position information during key event triggering based on the registered sensor event listener, and to determine the key type of the key event, including short press, long press, or continuous touch.

[0017] The pressure detection and data acquisition module is used to obtain the pressure data of key events through the registered sensor, and to classify the pressure data into pressure levels after performing noise filtering.

[0018] A mapping module is used to call the vibration pattern mapping table corresponding to the vibration service instance through the differentiated vibration interface of the haptic engine according to the key type and the pressing force level, so as to map the vibration parameters of different key types and pressing force levels;

[0019] The feedback trigger module is used to determine the target feedback duration and intensity of pulse-type vibration feedback by combining different vibration parameters and the device operating status of the corresponding Android system, and to perform pulse-type vibration feedback in response to the target feedback duration and intensity.

[0020] To achieve the above-mentioned purpose, the third aspect embodiment of the present invention proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect.

[0021] In order to achieve the above-mentioned objectives, an embodiment of the fourth aspect of the present invention proposes a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0022] The key event enhancement method, device, electronic device and storage medium based on Android system tactile feedback provided by the embodiment of the present invention utilizes the hardware resources and computing power algorithm of the Android system to determine the key type of the key event; and during the key event triggering process, obtains the pressing force data of the key event through the registered sensor of the Android system, and divides the pressing force data into pressing force levels after performing noise filtering processing; customizes the vibration parameters according to the key type and pressing force level, and then determines the target feedback duration and intensity of the pulse-type vibration feedback in combination with the device operation status of the corresponding Android system. Thus, based on the hardware resources and computing power algorithm of the Android system, the key type and pressing force level are obtained, and in combination with the device operation status, pulse-type vibration feedback is performed, reducing the user's operation error during long-term use of the device and optimizing the tactile experience, effectively improving the accuracy in blind operation and no visual attention scenarios.

[0023] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0025] Figure 1 A flowchart of a method for enhancing key events based on tactile feedback of an Android system provided by an embodiment of the present invention;

[0026] Figure 2 This is an example diagram of the execution flow of a method for enhancing key events based on tactile feedback of an Android system provided by an embodiment of the present invention;

[0027] Figure 3 A structural diagram of a key event enhancement device based on tactile feedback of an Android system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention.

[0029] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of the present invention comply with the relevant provisions of relevant laws and regulations.

[0030] The following describes a method for enhancing key events based on tactile feedback of an Android system according to an embodiment of the present invention with reference to the accompanying drawings.

[0031] Figure 1 A flowchart of a method for enhancing key events based on tactile feedback of an Android system provided by an embodiment of the present invention.

[0032] like Figure 1 As shown, the method includes the following steps:

[0033] Step 101 , during the Android system startup phase, initialize the haptic engine and register the sensor, call the Android system application program interface to register the sensor event listener, and call the Android system service retrieval method to obtain the Android system vibration service instance.

[0034] In some possible implementations, during the Android system startup phase, the tactile engine is initialized and the sensor is registered, the Android system application program interface is called to register a sensor event listener, and the Android system service retrieval method is called to obtain the vibration service instance of the Android system, including: the Android system application program interface includes an application layer interaction interface (Application Programming Interface, API) for managing sensor devices in the Android system and a method for obtaining an Android system service instance; during the Android system startup phase, the application layer interaction interface (SensorManager) for managing sensor devices in the Android system is called, and the sensor management object is obtained by obtaining the method (getSystemService) for obtaining the Android system service instance, and based on the sensor management object, the sensor is registered using the method (registerListener) for registering a sensor listener in the Android system to obtain a registered sensor event listener; the Android system service retrieval method (Context.getSystemService) is called to obtain the vibration service instance of the Android system; wherein, the registered sensor event listener and the vibration service instance are set with different levels of security permissions.

[0035] Specifically, registering sensors includes:

[0036] Call the Android system's SensorManager interface and obtain the sensor management object through getSystemService(Context.SENSOR_SERVICE).

[0037] Use the registerListener(SensorEventListener listener, Sensor sensor, intsamplingPeriodUs) method to register pressure sensors, accelerometers, and other sensors. The sampling period can be set to SENSOR_DELAY_GAME or a custom microsecond sampling time to ensure real-time data. SENSOR_DELAY_GAME is one of the sampling period constants defined in the SensorManager class and is used to set the frequency of acquiring registered sensor data. Multi-source sensor data fusion (such as pressure and acceleration) is used to perform operation discrimination, improving accuracy and dynamically adjusting weighting strategies. This differentiates it from single-dimensional data comparison and enables intelligent sensor fusion judgment.

[0038] The raw data returned by the registered sensor is preprocessed, such as data normalization and noise filtering (a simple low-pass filtering algorithm can be used, for example, through the formula filteredValue = a*currentValue + (1-a)*previousValue, where a is the filter coefficient ranging from 0.1 to 0.3, filteredValue is the output value after the current low-pass filtering, currentValue is the current sampling value, that is, the raw data collected in real time, and previousValue is the output value after the last low-pass filtering, which is used for weighted averaging with the current sampling value) to ensure the smoothness of the raw data.

[0039] Vibrator service instance acquisition includes:

[0040] Call Context.getSystemService(Context.VIBRATOR_SERVICE) to get the vibrator service instance.

[0041] For different Android versions, determine whether VibrationEffect is supported (API 26 and above) and use the VibrationEffect.createWaveform() method to set a custom vibration pattern.

[0042] Among them, VibrationEffect is a class in the Android system used to control device vibration. It supports the vibration effect settings introduced since Android 8.0 (API level 26). The VibrationEffect.createWaveform() method is used to create a custom vibration pattern in the Android system, achieving personalized vibration effects by specifying the vibration duration and amplitude.

[0043] Security permissions include:

[0044] Check the permissions for registering sensor event listeners and vibration service instances, such as android.permission.VIBRATE and android.permission.BODY_SENSORS (depending on the specific sensor requirements), and log or provide feedback if initialization fails.

[0045] Among them, android.permission.VIBRATE is the permission that allows applications to use the device vibration function, which is mainly used to control the working status of the phone's vibrator.

[0046] android.permission.BODY_SENSORS is a dangerous permission used to access user body sensor data (such as heart rate, step count, etc., which requires dynamic user authorization).

[0047] Step 102, during the key event triggering process, based on the registered sensor event listener, obtain the length of time the key is pressed and the position information of the key touch when the physical key and virtual key of the Android system corresponding device are operated, and determine the key type of the key event, which includes short press, long press or continuous touch.

[0048] In some possible implementations, the key event callback interface of the Android system is used to capture physical key and virtual key operations, and the key type of the key event is determined based on the length of time the key is pressed during the physical key and virtual key operations and the position information in the touch event. The key types include short press, long press or continuous touch, including: during the key event triggering process, the key event callback interface of the Android system (such as onKeyDown, onKeyUp and onTouchEvent) is used to capture physical key and virtual key operations. For physical keys, the interface for processing key events in the Android system (onKeyDown(int keyCode,KeyEvent event) and onKeyUp(intkeyCode,KeyEvent event) of Activity or View) is used to record the timestamps of key pressing and releasing. For virtual keys, the method of responding to screen touch operations (onTouchEvent(MotionEvent event)) captures touch events, and determines the touch press, move, and release states through the user touch screen action type judgment method (event.getAction()); based on the registered sensor event listener, obtains the timestamps of key press and release, the touch press, move, and release states, to calculate the length of time the key is pressed during physical and virtual key operations (System.currentTimeMillis()); for multi-touch situations of touch events, combines the multiple touch points and the position information of each touch point obtained by the touch point number acquisition method (MotionEvent.getPointerCount()) to distinguish between false touch points and actual valid touch points; based on the length of time the key is pressed, false touch points, and actual valid touch points, determines the key type of the key event, which includes short press, long press, or continuous touch; among them, the key event adopts event queue technology and references state machine design to perform event diversion to respond to key events in an orderly manner.

[0049] Specifically, onKeyDown and onKeyUp are callback methods for keyboard events (physical keys), and onTouchEvent is a callback method for touch events (virtual keys). Activity represents an independent user interaction interface, equivalent to the "window" of an application, responsible for user interaction and window management. View is the basic element of the user interface, responsible for displaying content (such as text, images) and handling user interaction. int keyCode is the identifier of a key, usually an integer type. KeyEvent event is the encapsulation object of a key event. onTouchEvent (MotionEvent event) is a method of the View class in Android development, used to handle touch events. When a user touches the screen, the Android system generates a MotionEvent object, which contains information such as the touch position, type, and time. event.getAction() is used to determine the type of touch event, and the return value corresponds to different touch actions. System.currentTimeMillis() is a static method used to obtain the timestamp of the current time (in milliseconds). MotionEvent.getPointerCount() is a method used in Android development to obtain the number of touching fingers in the current touch event.

[0050] Optionally, event queue technology is used to pass captured key events to a background thread (through Handler or ExecutorService) to prevent the main thread from blocking and ensure UI responsiveness. Handler and ExecutorService are components used to manage threads and task execution in Android development.

[0051] Introducing state machine design: used to identify the states of continuous key events (such as initial, pressed, confirmed, released, etc.) to ensure more accurate key type classification.

[0052] Step 103: Obtain the pressing force data of the key event through the registered sensor, and perform noise filtering on the pressing force data to divide the pressing force levels.

[0053] In some possible implementations, during the key event triggering process, the pressing force data of the key event is obtained by registering a sensor event listener, and the pressing force data is noise filtered to divide the pressing force levels, including: during the key event triggering process, the real-time pressure value of the registered pressure sensor in the registered sensor is obtained by monitoring the callback method of sensor data changes (onSensorChanged(SensorEvent event)); according to the hardware parameters of the Android system, the real-time pressure value is converted into a standard pressure unit as the pressing force data of the key event; the pressing force data is noise filtered using low-pass filtering technology to obtain target pressing force data, and the pressing force levels of the target pressing force data are divided according to a preset pressure threshold interval (for example, a set pressure value range).

[0054] Specifically, the acquisition of pressure intensity data includes:

[0055] During the key event triggering process, the real-time pressure value is obtained through the callback method of the registered pressure sensor interface monitoring sensor data changes. The data type of the real-time pressure value is usually a float array.

[0056] Depending on the hardware parameters of the Android system, the real-time pressure value may need to be calibrated, for example, by using linear or nonlinear mapping to convert the real-time pressure value into a standard pressure unit as the pressure intensity data of the key event.

[0057] Noise filtering includes:

[0058] Use low-pass filtering technology to eliminate sudden noise. The low-pass filtering algorithm can be implemented using sliding average or exponential smoothing to ensure the accuracy of subsequent judgments.

[0059] Dynamically adjust low-pass filter parameters based on the device characteristics and user operation speed of the Android system to reduce latency while ensuring data stability.

[0060] Pressure threshold interval judgment:

[0061] The pressure threshold range is pre-set, and the pressure level is divided into three levels: light touch, medium touch, and heavy touch. A judgment statement (if / else or switch) is used in the program to make feedback judgments.

[0062] If further optimization is needed, real-time corrections (such as weighted averaging) can be performed in combination with the target pressure intensity data, but complex calculations should be avoided to ensure that the Android system can run efficiently even on low-computing power devices.

[0063] Step 104 : Based on the key type and the pressing force level, the vibration pattern mapping table corresponding to the vibration service instance is called through the differentiated vibration interface of the haptic engine to map vibration parameters of different key types and pressing force levels.

[0064] In some possible implementations, based on the key type and pressure level, a vibration pattern mapping table corresponding to a vibration service instance is called through a differentiated vibration interface of a haptic engine to map vibration parameters for different key types and pressure levels, including: the vibration pattern mapping table is used to map different historical key types and pressure levels in the vibration service instance to specific vibration durations and intensities; based on the key type and pressure level, the vibration pattern mapping table corresponding to the vibration service instance is called through a differentiated vibration interface of the haptic engine to map vibration parameters for different key types and pressure levels, the vibration parameters including target vibration durations and intensities; wherein the target vibration durations and intensities are calculated based on real-time pressure values. A multi-level state judgment strategy chain (vibration pattern mapping table) is defined, such that, for example, a target vibration duration and intensity of "low pressure + short duration" is judged as a light touch, and "high pressure + long duration" is judged as a strong interaction intention. This multi-level state judgment strategy chain replaces a simple threshold judgment to improve error tolerance.

[0065] Specifically, the vibration pattern mapping table design includes:

[0066] The vibration pattern mapping table is used to map different button types (short press, long press) and press intensity levels (light touch, medium touch, heavy touch) to specific vibration parameters.

[0067] For example, a short press and a light touch correspond to vibration mode A (vibration duration 20ms, interval 30ms), and a long press and a heavy touch correspond to vibration mode B (vibration parameters are vibration duration 100ms, interval 50ms). The vibration mode mapping table can be stored as a HashMap (key-value pair collection based on a hash table) structure for quick search.

[0068] The haptic engine's differentiated vibration interfaces include:

[0069] For devices running API 26 and above (i.e., the Android system introduced the "Notification Channels" feature), use VibrationEffect.createWaveform(long[]timings,int[]amplitudes,int repeat) to set a custom vibration pattern. VibrationEffect.createWaveform is the method used in Android to create custom vibration patterns, allowing developers to specify the vibration duration, intensity, and repeat pattern; long[]timings contains an array of vibration durations and intervals, with array elements in milliseconds (negative values ​​indicate intervals); int[]amplitudes corresponds to the vibration intensity for each time period (or vibration duration), ranging from 1 to 255; int repeat is used to specify the starting index of the vibration pattern repetition. -1 indicates only one execution, and other values ​​(such as 2) indicate repetition starting from the specified position.

[0070] For devices with API 26 or lower, the Vibrator.vibrate(long[]pattern,intrepeat) method is called to achieve vibration differences through different pattern arrays. Vibrator.vibrate() is an API method used to control device vibration in Android development. Long[]pattern is used to define the time sequence of the vibration pattern, which contains multiple vibration durations (in milliseconds), alternating between vibration and pause durations. Int repeat is used to specify the starting index of the vibration pattern repetition. -1 means only execute once, and other values ​​(such as 2) indicate repetition starting from the specified position.

[0071] Vibration parameter calculation:

[0072] Dynamically calculate the target vibration duration and intensity based on the real-time pressure value, for example, through the linear mapping function vibrationAmplitude = k*pressureValue + b, where vibrationAmplitude is the vibration amplitude (target vibration duration and intensity), k is the stiffness coefficient, pressureValue is the real-time pressure value, and b is the damping coefficient;

[0073] Test and adjust vibration curves for target vibration duration and intensity to ensure feedback responses intuitively match user actions and minimize response delays.

[0074] Step 105 , determining the target feedback duration and intensity of the pulse-type vibration feedback in combination with different vibration parameters and the device operating status of the corresponding Android system, and performing pulse-type vibration feedback in response to the target feedback duration and intensity.

[0075] In some possible implementations, a target feedback duration and intensity of pulse-type vibration feedback is determined in combination with different vibration parameters and the operating state of a device corresponding to an Android system, and pulse-type vibration feedback is performed in response to the target feedback duration and intensity, including: obtaining the operating state of the Android system, wherein the device operating state includes the device operating environment and the software permission level and software context factors on the device, and the device operating state is determined by the CPU load, battery power, and system temperature of the Android system; determining the target feedback duration and intensity of pulse-type vibration feedback in combination with different vibration parameters and the device operating state, system permission level, software permission level, and software context factors, and responding to the target feedback duration and intensity through an application program interface for controlling vibration of the corresponding device of the Android system or a tactile feedback function called by a tactile engine to perform pulse-type vibration feedback; wherein the pulse-type vibration feedback adopts a feedback mechanism that collaborates with hardware and software. Thus, the feedback intensity and duration are dynamically adjusted according to the operating state of the device, thereby realizing an adaptive tactile feedback mechanism.

[0076] This invention introduces the rhythm dimension (pulse-type vibration feedback), which enables the feedback to evolve from a single "point feedback" to "rhythm feedback". For example, when a long press occurs, a gradually increasing pulse-type vibration (beat, alternating strong and weak, delay, etc.) appears, simulating the resistance or confirmation feeling of real pressing, achieving a breakthrough at the psychological perception level.

[0077] As an example, software contextual factors, such as night mode, voice input status, and gaming scenarios, influence the intensity and pattern of pulse-type vibration feedback. By introducing a mapping strategy for software contextual factors and constructing a multidimensional tactile decision table, feedback is transformed from a single logic into a composite strategy based on the context and device operating environment.

[0078] As an example, the device operating state includes: a first device operating state in which the CPU load is greater than a set load threshold and a second device operating state that is less than or equal to the set load threshold, a third device operating state in which the battery power is less than a set power threshold and a fourth device operating state that is greater than or equal to the set power threshold, a fifth device operating state in which the system temperature is greater than a set temperature threshold and a sixth device operating state that is less than or equal to the set temperature threshold. Among them, the first device operating state can be a high load state, the second device operating state can be a low load state, the third device operating state can be a low power state, the fourth device operating state can be a high power state, the fifth device operating state can be a high power consumption or high temperature state, and the sixth device operating state can be a low power consumption or low temperature state. Intelligently adjust the feedback mode to improve user experience and system stability.

[0079] Optionally, the pulse-type vibration feedback is executed through an asynchronous feedback mechanism, and a resource check mechanism is added before the pulse-type vibration feedback is triggered to confirm the current Android system load and battery power, and determine whether to execute the complete pulse-type vibration feedback logic or switch to the Android system low-power mode; a queue and lock mechanism is used to queue requests for pulse-type vibration feedback of multiple key operations at the same time, and control the orderly execution of requests for pulse-type vibration feedback, wherein the orderly execution of requests for pulse-type vibration feedback is scheduled by comparing the timestamps of the requests and judging the priority.

[0080] Specifically, based on the computing power limitations of the Android system, the processing logic of all pulse-type vibration feedback can adopt a low-complexity algorithm, and use asynchronous threads or Handler mechanisms to ensure the real-time and smoothness of the feedback response.

[0081] Asynchronous feedback mechanisms include:

[0082] To avoid blocking the Android system's main thread, the vibration triggering operation is executed in a child thread, and Handler, Runnable, or AsyncTask (note the limitations of AsyncTask at high concurrency) is used to asynchronously call the device vibration application interface. Handler is used for inter-thread communication, allowing messages to be passed or code to be executed between different threads. Runnable is the basic interface in Android system development, used for background task execution to avoid blocking the main thread. AsyncTask is used to simplify the background task execution process, automatically manage thread creation and destruction, and update results in the UI thread.

[0083] Ensure that pulse-type vibration feedback is stopped promptly at the end of a key event (for example, by calling Vibrator.cancel()) to avoid prolonged vibration affecting user experience and battery life. Vibrator.cancel() is an Android API used to immediately stop the current vibration operation.

[0084] Android system low power modes include:

[0085] All calculations for pulse-type vibration feedback use low-complexity algorithms to avoid high-frequency floating-point operations and complex loops, ensuring compatibility with low-computing-power devices.

[0086] A resource check mechanism is added before the pulse vibration feedback is triggered to confirm the current Android system load and battery level, and decide whether to execute the full pulse vibration feedback logic or switch to the Android system low power mode.

[0087] The ordered execution of a request for multi-pulse vibration feedback includes:

[0088] Use queues and lock mechanisms to queue requests for pulse-type vibration feedback from multiple simultaneous key presses to ensure orderly execution when resources compete.

[0089] Concurrent requests can be scheduled through timestamp comparison and priority judgment (for example, long press feedback is processed first) to prevent overlapping pulse-type vibration feedback requests from confusing users.

[0090] The key event enhancement method based on tactile feedback of the Android system of the embodiment of the present invention utilizes the hardware resources and computing power algorithm of the Android system to determine the key type of the key event; and during the key event triggering process, the pressing force data of the key event is obtained through the registered sensor of the Android system, and the pressing force data is divided into pressing force levels after noise filtering; according to the key type and pressing force level, the vibration parameters are customized, and then combined with the device operating status of the corresponding Android system, the target feedback duration and intensity of the pulse-type vibration feedback are determined. Thus, based on the hardware resources and computing power algorithm of the Android system, the key type and pressing force level are obtained, and combined with the device operating status, pulse-type vibration feedback is performed, reducing the user's operating errors during long-term use of the device and optimizing the tactile experience, effectively improving the accuracy in blind operation and no visual attention scenarios.

[0091] In addition, when the registered sensor's pressing force data is abnormal or the pulse-type vibration feedback fails to respond, compensation feedback is performed through the preset basic vibration mode and recorded in the abnormality log; when the software permission level is higher than the set permission threshold or the software is privacy software, compensation feedback is performed through the preset exclusive vibration feedback mode. Therefore, the Android system's tactile feedback is bound to the software permission level. Software operations with high permission (such as payment confirmation) call the exclusive vibration feedback mode, while low software permissions limit its feedback intensity. A security policy matching table is provided to perform directional tactile feedback confirmation for sensitive events (privacy events). Among them, the triggering of key events has access rights corresponding to the Android system, and when the triggering of key events is sensitive data access, data permission application is required.

[0092] Specifically, the exception capture mechanism includes:

[0093] You can add a try-catch structure in the Android system to catch API call exceptions, such as abnormal pressure data when registering a sensor or failure to call a vibration function for pulse-type vibration feedback. Try-catch is a common structure used for exception handling in programming. It is used to catch errors or exceptions that occur during program execution to prevent program crashes.

[0094] For abnormal situations, the default vibration mode is preset for compensation feedback and the abnormality log is recorded (Android's log tool (Logcat) or a third-party log library such as Timber can be used).

[0095] Security permission checks include:

[0096] Before calling the Android system's hardware interface, ensure that the application has the necessary permissions; for applications accessing sensitive data on the Android system, dynamically apply for permissions to ensure compliance with Android security specifications.

[0097] Optionally, data redundancy checks, timeout detection mechanisms, and data fault-tolerance algorithms are introduced during the sensor data collection and key event triggering process of registered sensors to control pulse-type vibration feedback in real time. A backup mode is triggered when the data redundancy checks, timeout detection mechanisms, and data fault-tolerance algorithms repeatedly produce abnormal data. The backup mode uses a circuit breaker mode to manage Android system hardware interface calls and switches to the Android system's default basic vibration mode. For example, an under-screen vibrator can be combined with local screen brightness changes to provide composite sensory confirmation, achieving multimodal fusion of visual and tactile feedback.

[0098] Specifically, data verification and redundancy processing include:

[0099] Introducing data redundancy checks, setting timeout detection mechanisms, and data fault-tolerance algorithms (e.g., triggering a backup mode when multiple consecutive abnormal data are detected) during sensor data collection and key event triggering.

[0100] Use the Circuit Breaker mode to manage the Android system's hardware interface calls, automatically switching to a simplified mode (basic vibration mode) when continuous exceptions occur to prevent the system from crashing.

[0101] Optionally, a debugging mode is constructed through the recorded log information to debug the key event enhancement method based on the tactile feedback of the Android system, wherein the log information includes the timestamp of the pulse vibration feedback, the key type, the pressing force data, the vibration parameters, the target feedback duration and intensity.

[0102] Specifically, logging and debugging support includes:

[0103] Detailed log information is recorded for each key press (including the timestamp of the pulse vibration feedback, key type, press force data, vibration parameters, target feedback duration and intensity), facilitating subsequent debugging and performance optimization.

[0104] Provides a debug mode that allows developers to output more debugging information during the testing phase to verify the accuracy of data processing and feedback logic at each stage of key events.

[0105] In some possible implementations, the user's habitual area is identified through the virtual keyboard block code, and the pulse-type vibration feedback is personalized and optimized based on the user's behavior in the habitual area. In this way, the accuracy of blind operation is improved by introducing a user behavior analysis model.

[0106] In order to clearly illustrate the above embodiment, Figure 2 An example diagram of the execution flow of a key event enhancement method based on tactile feedback of an Android system provided in an embodiment of the present invention includes: the Android system startup phase; hardware detection and initialization (initializing the tactile engine and registering sensors), obtaining the application layer interaction interface for managing sensor devices in the Android system to register a sensor event listener; obtaining the vibration service instance of the Android system; security permissions; capturing physical key events, capturing virtual key events; recording the time length and position information in the touch event and key type judgment (short press / long press / continuous touch); obtaining the pressing force data of the key event; low-pass filtering (normalization, sliding average); pressure threshold interval judgment and pressing force level classification (light touch, medium touch, heavy touch); vibration pattern mapping table design; differentiated vibration interface of the tactile engine; vibration parameter calculation (linear mapping function); determining the target feedback duration and intensity; asynchronous feedback mechanism (using asynchronous thread or Handeler); starting pulse vibration feedback; exception capture mechanism; security permission check; data verification and redundancy processing (circuit breaker mode); logging and debugging support; ending / waiting for the next key event.

[0107] In addition, firstly, the low-level vibration control module can be directly called based on the Android system hardware interrupt method. By directly reading the analog signal of the registered sensor and amplifying and filtering the signal through a simple analog circuit, a dedicated control chip is used to drive the pulse-type vibration feedback. This solution has a faster response speed and requires less computing power from the Android system, but the cost is slightly increased.

[0108] Secondly, a pulse-type vibration feedback mapping solution based on a rule engine is adopted. By embedding a set of preset rules in the Android system, different button types are mapped to the vibration parameters of the pulse-type vibration feedback, realizing hard-coding of logical judgment, thereby completely bypassing the complex dynamic calculation process and ensuring the immediacy and stability of the pulse-type vibration feedback.

[0109] Third, lightweight signal processing algorithms can be used, such as methods based on threshold comparison and weighted average to achieve smoothing of real-time pressure values ​​and calculation of pulse-type vibration feedback strength. This method has the advantages of simple implementation and small amount of computation. At the same time, the vibration pattern of the pulse-type vibration feedback can be further refined by comparing historical data of different key operations.

[0110] Finally, consider introducing a user-defined pulse-type vibration feedback adjustment function. By providing a simple settings interface, users can adjust the intensity and duration of the pulse-type vibration feedback according to their personal usage habits. This allows the Android system to meet personalized needs while meeting standard operating logic. All of the above alternatives can achieve differentiated tactile feedback for key events without relying on machine learning or large-scale model analysis. Each has its own applicable scenarios and advantages and disadvantages. The selection and optimization can be based on device performance, user needs, and implementation costs.

[0111] In order to implement the above embodiment, the present invention also proposes a key event enhancement device based on tactile feedback of the Android system.

[0112] Figure 3 A structural diagram of a key event enhancement device based on tactile feedback of an Android system provided by an embodiment of the present invention.

[0113] like Figure 3 As shown, the key event enhancement device 30 based on Android system tactile feedback includes: an initialization and registration module 31, a monitoring and classification module 32, a pressure detection and data acquisition module 33, a mapping module 34, and a feedback triggering module 35.

[0114] Initialization and registration module 31, used to initialize the tactile engine and register the sensor during the Android system startup phase, call the Android system application program interface to register the sensor event listener, and call the Android system service call method to obtain the Android system vibration service instance;

[0115] The monitoring and classification module 32 is used to obtain the duration of key presses and key touch position information when operating physical and virtual keys of the Android device based on the registered sensor event listener during the key event triggering process, and determine the key type of the key event, which includes short press, long press, or continuous touch;

[0116] The pressure detection and data acquisition module 33 is used to obtain the pressing force data of the key event through the registered sensor, and to classify the pressing force data into pressing force levels after performing noise filtering processing;

[0117] A mapping module 34 is configured to call a vibration pattern mapping table corresponding to a vibration service instance through a differentiated vibration interface of a haptic engine according to the key type and the pressing force level, so as to map vibration parameters corresponding to different key types and pressing force levels;

[0118] The feedback trigger module 35 is used to determine the target feedback duration and intensity of the pulse-type vibration feedback in combination with different vibration parameters and the device operating status of the corresponding Android system, and to perform pulse-type vibration feedback in response to the target feedback duration and intensity.

[0119] Furthermore, in a possible implementation of the embodiment of the present invention, the initialization and registration module 31 is specifically configured to:

[0120] The Android system application program interface includes an application layer interaction interface for managing sensor devices in the Android system and a method for obtaining an Android system service instance;

[0121] During the startup phase of the Android system, the application layer interaction interface for managing sensor devices in the Android system is called, and the sensor management object is obtained by obtaining the Android system service instance method. Based on the sensor management object, the sensor is registered using the method for registering sensor listeners in the Android system to obtain a registered sensor event listener.

[0122] Furthermore, in a possible implementation of the embodiment of the present invention, the monitoring and classification module 32 is specifically configured to:

[0123] During the key event triggering process, the Android system's key event callback interface is used to capture physical and virtual key operations. For physical keys, the Android system's interface for processing key events is used to record the timestamps of key presses and releases. For virtual keys, the screen touch operation response method is used to capture touch events. The touch press, move, and release states are determined by the user's touch action type determination method.

[0124] Based on the registered sensor event listener, obtain the timestamps of key presses and releases, and the press, move, and release states of the touch to calculate the duration of key presses for physical and virtual key operations;

[0125] For multi-touch situations of touch events, multiple touch points obtained by the touch point number acquisition method and the position information of each touch point are combined to distinguish between false touch points and actual valid touch points;

[0126] Based on the duration of the key press, the false touch point, and the actual valid touch point, the key type of the key event is determined, including short press, long press, or continuous touch;

[0127] The key events adopt event queue technology and refer to state machine design to perform event diversion so as to respond to key events in an orderly manner.

[0128] Furthermore, in a possible implementation of the embodiment of the present invention, the pressure detection and data acquisition module 33 is specifically configured to:

[0129] During the key event triggering process, the real-time pressure value of the registered pressure sensor in the registered sensors is obtained through the callback method of monitoring the sensor data changes;

[0130] According to the hardware parameters of the Android system, the real-time pressure value is converted into a standard pressure unit as the pressing intensity data of the key event;

[0131] The pressing force data is subjected to noise filtering using a low-pass filtering technique to obtain target pressing force data, and the pressing force levels of the target pressing force data are divided according to a preset pressure threshold interval.

[0132] Furthermore, in a possible implementation of the embodiment of the present invention, the mapping module 34 is specifically configured to:

[0133] The vibration pattern mapping table is used to map different key types and pressure levels in the history of the vibration service instance to specific vibration duration and intensity;

[0134] Based on the key type and pressure level, the haptic engine's differentiated vibration interface calls the vibration pattern mapping table corresponding to the vibration service instance to map the vibration parameters for different key types and pressure levels. The vibration parameters include the target vibration duration and intensity.

[0135] The target vibration duration and intensity are calculated based on the real-time pressure value.

[0136] Furthermore, in a possible implementation of the embodiment of the present invention, the feedback triggering module 35 is specifically configured to:

[0137] Get the device operating status of the Android system, where the device operating status includes the device operating environment, the software permission level on the device, and the software context factor. The device operating status is determined by the Android system's CPU load, battery level, and system temperature.

[0138] Determine the target duration and intensity of pulse-type vibration feedback based on different vibration parameters, device operating status, system permission level, software permission level, and software context factors, and respond to the target duration and intensity through an application program interface for controlling vibration on the corresponding Android device or a haptic feedback function called by the haptic engine to provide pulse-type vibration feedback;

[0139] Among them, pulse-type vibration feedback adopts a feedback mechanism that combines hardware and software.

[0140] Furthermore, in a possible implementation of the embodiment of the present invention, the device operating status includes:

[0141] The first device operating state in which the CPU load is greater than the set load threshold and the second device operating state in which the CPU load is less than or equal to the set load threshold, the third device operating state in which the battery power is less than the set power threshold and the fourth device operating state in which the battery power is greater than or equal to the set power threshold, the fifth device operating state in which the system temperature is greater than the set temperature threshold and the sixth device operating state in which the system temperature is less than or equal to the set temperature threshold.

[0142] Furthermore, in a possible implementation of the embodiment of the present invention, the apparatus further includes:

[0143] A first compensation feedback module is configured to provide compensation feedback using a preset basic vibration pattern when the registered sensor's pressing force data is abnormal or the pulse-type vibration feedback fails to respond, and record the result in an abnormality log;

[0144] The second compensation feedback module is used to provide compensation feedback through a preset exclusive vibration feedback mode when the software permission level is higher than a set permission threshold or the software is privacy software.

[0145] Furthermore, in a possible implementation of the embodiment of the present invention, the apparatus further includes:

[0146] The control module is used to introduce data redundancy check, set timeout detection mechanism and data fault tolerance algorithm in the process of sensor data collection and key event triggering of registered sensors;

[0147] The trigger module is used to trigger the backup mode when the data redundancy check, the timeout detection mechanism and the data fault tolerance algorithm encounter abnormal data multiple times in a row. The backup mode uses the circuit breaker mode to manage the hardware interface call of the Android system and switches to the basic vibration mode that is the default of the Android system.

[0148] Furthermore, in a possible implementation of the embodiment of the present invention, the apparatus further includes:

[0149] The debugging module is used to build a debugging mode based on the recorded log information to debug the key event enhancement method based on the Android system's tactile feedback. The log information includes the timestamp of the pulse vibration feedback, the key type, the pressing force data, the vibration parameters, and the target feedback duration and intensity.

[0150] The key event enhancement device based on tactile feedback of the Android system in the embodiment of the present invention utilizes the hardware resources and computing power algorithms of the Android system to determine the key type of the key event; and during the key event triggering process, the device obtains the pressing force data of the key event through the registered sensor of the Android system, and divides the pressing force data into pressing force levels after performing noise filtering processing; according to the key type and pressing force level, the device determines the target feedback duration and intensity of the pulse-type vibration feedback based on the device operating status of the corresponding Android system. Thus, based on the hardware resources and computing power algorithms of the Android system, the key type and pressing force level are obtained, and combined with the device operating status, pulse-type vibration feedback is performed, thereby reducing the user's operating errors during long-term use of the device and optimizing the tactile experience, effectively improving the accuracy in blind operation and non-visual attention scenarios.

[0151] In order to implement the above embodiment, the present invention further provides an electronic device, including:

[0152] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the aforementioned method.

[0153] In order to implement the above embodiment, the present invention further proposes a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable the computer to execute the above method.

[0154] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0155] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0156] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0157] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.

[0158] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0159] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0160] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.

[0161] The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and are not to be construed as limiting the present invention. Persons skilled in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for enhancing key events based on tactile feedback of an Android system, characterized in that: The method comprises: During the Android system startup phase, the haptic engine is initialized and the sensor is registered. The Android system application program interface is called to register the sensor event listener, and the Android system service retrieval method is called to obtain the Android system vibration service instance. During the key event triggering process, based on the registered sensor event listener, the length of time the key is pressed and the position information of the key touch when the physical key and virtual key of the Android system corresponding device are operated are obtained, and the key type of the key event is determined, which includes short press, long press or continuous touch; The pressure data of key events is obtained by registering sensors, and the pressure data is noise filtered and divided into pressure levels. Based on the key type and pressure level, the vibration pattern mapping table corresponding to the vibration service instance is called through the differentiated vibration interface of the haptic engine to map the vibration parameters of different key types and pressure levels; In combination with different vibration parameters and the device operating status of the corresponding Android system, the target feedback duration and intensity of the pulse-type vibration feedback are determined, and the pulse-type vibration feedback is performed in response to the target feedback duration and intensity.

2. The method according to claim 1, characterized in that The calling of the Android system application program interface to register the sensor event listener includes: The Android system application program interface includes an application layer interaction interface for managing sensor devices in the Android system and a method for obtaining an Android system service instance; During the startup phase of the Android system, the application layer interaction interface for managing sensor devices in the Android system is called, and the sensor management object is obtained by obtaining the Android system service instance method. Based on the sensor management object, the sensor is registered using the method for registering sensor listeners in the Android system to obtain a registered sensor event listener.

3. The method according to claim 1, characterized in that In the process of triggering a key event, based on the registered sensor event listener, the duration of the key press and the position information of the key touch during the operation of the physical key and virtual key of the Android system corresponding device are obtained, and the key type of the key event is determined. The key type includes short press, long press or continuous touch, including: During the key event triggering process, the Android system's key event callback interface is used to capture physical and virtual key operations. For physical keys, the Android system's interface for processing key events is used to record the timestamps of key presses and releases. For virtual keys, the screen touch operation response method is used to capture touch events. The touch press, move, and release states are determined by the user's touch action type determination method. Based on the registered sensor event listener, obtain the timestamps of key presses and releases, and the press, move, and release states of the touch to calculate the duration of key presses for physical and virtual key operations; For multi-touch situations of touch events, multiple touch points obtained by the touch point number acquisition method and the position information of each touch point are combined to distinguish between false touch points and actual valid touch points; Based on the duration of the key press, the false touch point, and the actual valid touch point, the key type of the key event is determined, including short press, long press, or continuous touch; The key events adopt event queue technology and refer to state machine design to perform event diversion so as to respond to key events in an orderly manner.

4. The method according to claim 1, wherein During the key event triggering process, the pressing force data of the key event is obtained by registering the sensor, and the pressing force data is subjected to noise filtering to be classified into pressing force levels, including: During the key event triggering process, the real-time pressure value of the registered pressure sensor in the registered sensors is obtained through the callback method of monitoring the sensor data changes; According to the hardware parameters of the Android system, the real-time pressure value is converted into a standard pressure unit as the pressing intensity data of the key event; The pressing force data is subjected to noise filtering using a low-pass filtering technique to obtain target pressing force data, and the pressing force levels of the target pressing force data are divided according to a preset pressure threshold interval.

5. The method according to claim 4, characterized in that The method of calling the vibration mode mapping table corresponding to the vibration service instance through the differentiated vibration interface of the haptic engine according to the key type and the pressing force level to map the vibration parameters of different key types and pressing force levels includes: The vibration pattern mapping table is used to map different key types and pressure levels in the history of the vibration service instance to specific vibration duration and intensity; Based on the key type and pressure level, the haptic engine's differentiated vibration interface calls the vibration pattern mapping table corresponding to the vibration service instance to map the vibration parameters for different key types and pressure levels. The vibration parameters include the target vibration duration and intensity. The target vibration duration and intensity are calculated based on the real-time pressure value.

6. The method according to claim 1, characterized in that The method of determining a target feedback duration and intensity of the pulse-type vibration feedback by combining different vibration parameters and the operating status of the device corresponding to the Android system, and performing the pulse-type vibration feedback in response to the target feedback duration and intensity, includes: Get the device operating status of the Android system, where the device operating status includes the device operating environment, the software permission level on the device, and the software context factor. The device operating status is determined by the Android system's CPU load, battery level, and system temperature. Determine the target duration and intensity of pulse-type vibration feedback based on different vibration parameters, device operating status, system permission level, software permission level, and software context factors, and respond to the target duration and intensity through an application program interface for controlling vibration on the corresponding Android device or a haptic feedback function called by the haptic engine to provide pulse-type vibration feedback; Among them, pulse-type vibration feedback adopts a feedback mechanism that combines hardware and software.

7. The method according to claim 6, characterized in that The device operating status includes: The first device operating state in which the CPU load is greater than the set load threshold and the second device operating state in which the CPU load is less than or equal to the set load threshold, the third device operating state in which the battery power is less than the set power threshold and the fourth device operating state in which the battery power is greater than or equal to the set power threshold, the fifth device operating state in which the system temperature is greater than the set temperature threshold and the sixth device operating state in which the system temperature is less than or equal to the set temperature threshold.

8. The method according to claim 6, characterized in that The method further comprises: If the registered sensor's pressure data is abnormal or the pulse-type vibration feedback fails to respond, compensation feedback is performed using the preset basic vibration pattern and recorded in the abnormality log; When the software permission level is higher than the set permission threshold or the software is privacy software, compensation feedback is provided through a preset exclusive vibration feedback mode.

9. The method according to claim 8, characterized in that The method further comprises: Introducing data redundancy check, setting timeout detection mechanism and data fault tolerance algorithm in the process of sensor data collection and key event triggering of registered sensors; The backup mode is triggered when abnormal data is detected multiple times in a row during data redundancy verification, setting a timeout detection mechanism, and data fault tolerance algorithm. The backup mode uses the circuit breaker mode to manage the hardware interface calls of the Android system and switches to the Android system's default basic vibration mode.

10. The method according to claim 8, characterized in that The method further comprises: By recording log information, a debugging mode is constructed to debug the key event enhancement method based on Android system tactile feedback. The log information includes the timestamp of pulse vibration feedback, key type, pressing force data, vibration parameters, target feedback duration and intensity.

11. A key event enhancement device based on tactile feedback of Android system, characterized in that: The device comprises: The initialization and registration module is used to initialize the tactile engine and register sensors during the Android system startup phase, call the Android system application program interface to register the sensor event listener, and call the Android system service call method to obtain the Android system vibration service instance; A monitoring and classification module is used to obtain the duration of key presses and key touch position information during key event triggering based on the registered sensor event listener, and to determine the key type of the key event, including short press, long press, or continuous touch. The pressure detection and data acquisition module is used to obtain the pressure data of key events through the registered sensor, and to classify the pressure data into pressure levels after performing noise filtering. A mapping module is used to call the vibration pattern mapping table corresponding to the vibration service instance through the differentiated vibration interface of the haptic engine according to the key type and the pressing force level, so as to map the vibration parameters of different key types and pressing force levels; The feedback trigger module is used to determine the target feedback duration and intensity of pulse-type vibration feedback by combining different vibration parameters and the device operating status of the corresponding Android system, and to perform pulse-type vibration feedback in response to the target feedback duration and intensity.

12. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Event processing method, device and equipment based on Android system

    CN104035714A

  • Method for simulating touch pressure to enhance touch experience

    CN105786389A

  • Haptic vibration feedback circuit, control method and device

    CN111158461A

  • Virtual key tactile feedback method and device, equipment and storage medium

    CN117850582A

  • Virtual key interaction method based on three-dimensional motion gesture

    CN120295480A