A keycap personalization feedback control method and system based on human-computer interaction
Patent Information
- Application Number
- CN202611041156.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]为了解决现有技术的不足,本申请提供一种基于人机交互的键帽个性化反馈控制方法及系统,能够解决因压力传感弹性复位结构疲劳导致的基线漂移被云端错误学习为用户偏好,进而引发反馈手感突变的技术问题
[0015]本申请通过对压力响应序列进行精细化的区间划分与特征提取,能够准确识别出由弹性复位结构疲劳引起的持续性硬件退化,并将其与短时的操作波动区分开来。通过将原始压力数据分解为有效压力值与漂移压力值,能够实时校正硬件退化带来的基线偏移,确保本地反馈控制的准确性。同时,通过根据漂移程度生成差异化的云端更新控制指令,实现了对异常样本的降权或隔离,有效阻断了硬件退化数据被错误学习为用户偏好的传导链路,从而彻底解决了因硬件退化导致的个性化映射曲线偏移及反馈手感突变问题。
Smart Images

Figure CN123011016A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of digital creative device control technology, and more specifically, to a method and system for personalized feedback control of keycaps based on human-computer interaction. Background Technology
[0002] In the field of digital creative devices, professional users often use haptic feedback systems composed of micro-motor arrays and pressure sensing modules for precise operation. In this system, pressure sensors collect the pressure applied in real time, the local controller converts the force value into vibration frequency based on a personalized mapping curve sent from the cloud, and the cloud-based image system continuously collects pressure data to adaptively correct the mapping curve. However, in scenarios where professional illustrators use drawing keyboards intensively for extended periods, the elastic reset structure of the pressure sensor for certain high-frequency key combinations undergoes slight plastic deformation due to accumulated pressure. This causes the sensor to fail to return to zero perfectly when not pressed, resulting in a continuous positive bias signal. Existing cloud-based adaptive mechanisms struggle to distinguish between changes in the user's actual pressure and the physical degradation of the underlying hardware. They incorrectly interpret this data with positive bias as a new user preference for applying greater pressure, thus gradually correcting the overall mapping curve of that key towards higher pressure.
[0003] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this application provides a keycap personalized feedback control method and system based on human-computer interaction, which can solve the technical problem that baseline drift caused by fatigue of the pressure-sensing elastic reset structure is incorrectly learned by the cloud as user preference, thus causing sudden changes in feedback feel.
[0005] Firstly, this application provides a method for personalized feedback control of keycaps based on human-computer interaction, including: Obtain the pressure response sequence of the target key in the current operation cycle, and divide the current operation cycle into the no-press state interval, the light touch preparation state interval, the normal press state interval, and the release state interval based on the pressure response sequence. Extract the static baseline pressure value within the non-pressing state interval, and calculate the static baseline pressure offset between adjacent operation cycles based on the static baseline pressure value and historical static baseline pressure values. Extract the zero-return slope within the state interval after release. Based on the static baseline pressure value, zero-return slope, and static baseline pressure offset, determine whether the current baseline drift type of the target key is persistent hardware degradation or operational fluctuation. When the baseline drift type is persistent hardware degradation, the pressure response sequence is decomposed into effective pressure value and drift pressure value, and the personalized feedback curve is updated based on the effective pressure value and drift pressure value. When the baseline drift type is operational fluctuation, the personalized feedback curve is updated based on the pressure value in the pressure response sequence. Feedback control is applied to the next operation cycle based on the updated personalized feedback curve.
[0006] Furthermore, the steps of dividing the current operation cycle into a no-press state interval, a light-touch preparation state interval, a normal-press state interval, and a post-release state interval based on the pressure response sequence include: When the pressure values of multiple consecutive sampling points are less than or equal to the first pressure threshold, and the absolute value of the pressure change rate between the multiple consecutive sampling points is less than or equal to the first change rate threshold, the starting sampling point of the multiple consecutive sampling points is taken as the starting boundary of the no-pressure state interval, and the ending sampling point of the multiple consecutive sampling points is taken as the ending boundary of the no-pressure state interval. When the pressure values of multiple consecutive sampling points are greater than the first pressure threshold and less than the trigger preparation threshold, and the pressure change rate between the multiple consecutive sampling points is continuously greater than zero, the starting sampling point of the multiple consecutive sampling points is taken as the starting boundary of the light touch preparation state interval, and the sampling point corresponding to the pressure value reaching the trigger preparation threshold is taken as the ending boundary of the light touch preparation state interval, wherein the first pressure threshold is less than the trigger preparation threshold. When the pressure values of multiple consecutive sampling points are greater than or equal to the second pressure threshold, and the pressure change rate between these multiple consecutive sampling points changes from positive to negative and passes through zero, the sampling point where the pressure change rate changes from positive to negative and passes through zero is taken as the starting boundary of the normal pressing state interval, and the first sampling point where the pressure change rate is negative and its absolute value is continuously greater than the second change rate threshold is taken as the ending boundary of the normal pressing state interval; wherein, the second pressure threshold is greater than the trigger preparation threshold, and the second change rate threshold is greater than the first change rate threshold; When the pressure values of multiple consecutive sampling points drop to less than or equal to the first pressure threshold, and the pressure change rate among these multiple consecutive sampling points is negative and its absolute value is greater than the second change rate threshold, the first sampling point with a negative pressure change rate and its absolute value continuously greater than the second change rate threshold is taken as the starting boundary of the post-release state interval, and the first sampling point after the pressure value drops to less than or equal to the first pressure threshold is taken as the ending boundary of the post-release state interval.
[0007] Furthermore, the steps of extracting the static baseline pressure value within the no-pressure state interval and calculating the static baseline pressure offset between adjacent operating cycles based on the static baseline pressure value and historical static baseline pressure values include: Calculate the arithmetic mean of the pressure values at the sampling points within the no-pressure interval, and use it as the static baseline pressure value; The static baseline pressure value of the previous operating cycle is extracted from the locally maintained historical cycle circular queue and used as the historical static baseline pressure value. The static baseline pressure offset is obtained by subtracting the historical static baseline pressure value from the static baseline pressure value.
[0008] Furthermore, the steps for extracting the zero-return slope within the post-release state interval, and determining whether the current baseline drift type of the target key is persistent hardware degradation or operational fluctuation based on the static baseline pressure value, the zero-return slope, and the static baseline pressure offset, include: Calculate the average pressure slope from the sampling point corresponding to the highest pressure value to the termination boundary of the post-release state interval within the release state interval, and use it as the zero-return slope; If the static baseline pressure value is greater than the preset absolute zero value and the difference between the static baseline pressure value and the preset absolute zero value exceeds the first tolerance threshold, and the absolute value of the zero return slope decreases by more than a preset ratio compared with the historical benchmark zero return slope, and the static baseline pressure offset is greater than zero, then the baseline drift type is determined to be continuous hardware degradation; otherwise, the baseline drift type is determined to be operational fluctuation.
[0009] Furthermore, when the baseline drift type is persistent hardware degradation, the steps of decomposing the pressure response sequence into effective pressure values and drift pressure values include: The drift bias of the previous operation cycle is extracted from the locally maintained historical cycle circular queue and used as the drift bias at the current moment. Subtract the drift bias from the pressure value at the current moment in the pressure response sequence to obtain the initial correction value; When the initial correction value is less than zero, the effective pressure value is forcibly set to zero, and the drift bias is prohibited from being updated in the current operating cycle. The drift bias is directly used as the drift pressure value. When the initial correction value is greater than or equal to zero, the initial correction value is used as the effective pressure value, and the drift bias is smoothly updated based on the static baseline pressure value. The updated drift bias is then used as the drift pressure value.
[0010] Furthermore, the steps for updating the personalized feedback curve based on the effective pressure value and the drift pressure value include: When the drift pressure value is greater than zero and less than or equal to the preset slight drift threshold, the effective pressure value is taken as an effective sample and included in the update process of the personalized feedback curve. The updated personalized feedback curve is then sent to the local machine. The preset slight drift threshold is greater than zero. When the drift pressure value is greater than the preset mild drift threshold and less than or equal to the preset moderate drift threshold, the effective pressure value is downweighted and the downweighted effective pressure value is included in the personalized feedback curve update process. The updated personalized feedback curve is then sent to the local machine. The preset mild drift threshold is less than the preset moderate drift threshold. When the drift pressure value exceeds the preset moderate drift threshold, the effective pressure value is prohibited from being included in the update process of the personalized feedback curve. Instead, the effective pressure value is redirected to the hardware degradation log database, and the maximum output peak value of the micro motor vibration frequency of the target key is locked.
[0011] Furthermore, when the drift pressure value is greater than a preset mild drift threshold and less than or equal to a preset moderate drift threshold, the effective pressure value is downweighted. The downweighted effective pressure value is then incorporated into the personalized feedback curve update process, and the updated personalized feedback curve is sent to the local system. The steps include: Calculate the ratio of the drift pressure value to the preset moderate drift threshold; A data credibility score is generated based on the ratio, where a higher drift pressure value results in a lower data credibility score. The weighting ratio for downgrading is dynamically adjusted based on the data credibility score, with a higher weighting ratio for lower data credibility scores.
[0012] Furthermore, after the step of generating a data credibility score based on the ratio, the process includes: When the data credibility score is lower than the preset minimum credibility threshold, the effective stress value is prohibited from being included in the update process of the personalized feedback curve, and the effective stress value is redirected to the hardware degradation log database.
[0013] Furthermore, the step of locking the maximum output peak value of the micromotor vibration frequency of the target key position includes: Start the interrupt cooling timer; When the interrupted cooling timer has not reached the preset cooling cycle, pause the step of re-executing the maximum output peak value of the micro motor vibration frequency of the target key; If the step of locking the maximum output peak value of the micro motor vibration frequency of the target key is executed again when the interrupted cooling timer reaches the preset cooling cycle, a hardware maintenance prompt signal will be sent to the cloud again, and the interrupted cooling timer will be reset.
[0014] Secondly, this application also discloses a keycap personalization feedback control system based on human-computer interaction, used to execute the above-mentioned keycap personalization feedback control method based on human-computer interaction, the system comprising: The interval division module is used to obtain the pressure response sequence of the target key in the current operation cycle, and divide the current operation cycle into the no-press state interval, the light touch preparation state interval, the normal press state interval, and the release state interval based on the pressure response sequence. The offset calculation module is used to extract the static baseline pressure value in the non-pressing state interval, and calculate the static baseline pressure offset between adjacent operating cycles based on the static baseline pressure value and the historical static baseline pressure value. The drift type determination module is used to extract the zero-return slope within the state interval after release. Based on the static baseline pressure value, the zero-return slope, and the static baseline pressure offset, it determines whether the current baseline drift type of the target key is persistent hardware degradation or operational fluctuation. The curve update module is used to decompose the pressure response sequence into effective pressure value and drift pressure value when the baseline drift type is persistent hardware degradation, and to update the personalized feedback curve based on the effective pressure value and drift pressure value. When the baseline drift type is operational fluctuation, the personalized feedback curve is updated based on the pressure value in the pressure response sequence. The feedback control module is used to perform feedback control for the next operation cycle based on the updated personalized feedback curve.
[0015] This application, through refined interval division and feature extraction of the pressure response sequence, can accurately identify persistent hardware degradation caused by fatigue of the elastic reset structure and distinguish it from short-term operational fluctuations. By decomposing the raw pressure data into effective pressure values and drift pressure values, it can correct the baseline offset caused by hardware degradation in real time, ensuring the accuracy of local feedback control. Simultaneously, by generating differentiated cloud-updated control commands based on the degree of drift, it achieves deweighting or isolation of abnormal samples, effectively blocking the transmission link where hardware degradation data is incorrectly learned as user preferences, thus completely solving the problems of personalized mapping curve offset and abrupt changes in feedback feel caused by hardware degradation. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a keycap personalized feedback control method based on human-computer interaction, provided in an embodiment of this application.
[0017] Figure 2 This is a schematic diagram of a keycap personalized feedback control system based on human-computer interaction, provided in an embodiment of this application.
[0018] Labeling Explanation: 210, Interval Division Module; 220, Offset Calculation Module; 230, Drift Type Judgment Module; 240, Curve Update Module; 250, Feedback Control Module. Detailed Implementation
[0019] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0020] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0021] In the field of digital creative devices, to meet the needs of professional users for precise parameter control of physical buttons, haptic feedback systems based on micro-motor arrays and pressure sensing modules are typically used. In a typical application scenario, professional illustrators need to use drawing keyboards intensively for extended periods. The elastic reset structure of the pressure sensing module for specific high-frequency key combinations (such as brush size adjustment keys and undo keys) is the source of data acquisition. As the number of presses increases, this elastic reset structure inevitably undergoes slight plastic deformation, causing the sensor to not perfectly return to zero in the unpressed state, thus outputting a continuous positive bias signal. When the illustrator applies normal pressure, the value collected by the sensor is superimposed with this systemic bias, and the artificially inflated data is uploaded to the cloud. Existing cloud adaptive mechanisms struggle to distinguish between changes in the user's actual pressure and the physical degradation of the underlying hardware. They incorrectly interpret this data with positive bias as a new user preference for applying greater pressure, thus gradually correcting the overall mapping curve of the button towards higher pressure. This causes an unexpected and strong dull feedback when the user presses the key lightly later. The familiar tactile damping sensation changes abruptly, seriously interfering with the fine control of force in professional drawing operations.
[0022] Firstly, see [the following] Figure 1 This application provides a method for personalized feedback control of keycaps based on human-computer interaction, including: S1. Obtain the pressure response sequence of the target key in the current operation cycle, and divide the current operation cycle into the no-press state interval, the light-touch preparation state interval, the normal press state interval, and the release state interval based on the pressure response sequence. S2. Extract the static baseline pressure value in the non-pressing state interval, and calculate the static baseline pressure offset between adjacent operation cycles based on the static baseline pressure value and the historical static baseline pressure value. S3. Extract the zero-return slope within the state interval after release. Based on the static baseline pressure value, zero-return slope, and static baseline pressure offset, determine whether the current baseline drift type of the target key is persistent hardware degradation or operational fluctuation. S4. When the baseline drift type is persistent hardware degradation, the pressure response sequence is decomposed into effective pressure value and drift pressure value, and the personalized feedback curve is updated based on the effective pressure value and drift pressure value. When the baseline drift type is operational fluctuation, the personalized feedback curve is updated based on the pressure value in the pressure response sequence. S5. Perform feedback control for the next operation cycle based on the updated personalized feedback curve.
[0023] The target key refers to the specific key that the user presses, such as a letter key on the keyboard, a function key, or a shortcut key on a drawing board.
[0024] A pressure response sequence refers to the set of pressure value data continuously collected by the target key pressure sensor within a certain time period, which reflects the complete operation process of the user from pressing to releasing.
[0025] The operation cycle refers to the complete process from when the user starts pressing the target key to when it is fully released and returns to the initial state.
[0026] Personalized feedback curves refer to function curves that map pressure intensity to tactile feedback intensity (such as the vibration frequency of a micro-motor) based on the user's operating habits and preferences. These curves are dynamically adjusted to adapt to the user's personalized needs.
[0027] The static baseline pressure value refers to the reference pressure value output by the pressure sensor when the target key is not pressed; ideally, it should be zero.
[0028] The zero-return slope refers to the rate at which the pressure decreases as the pressure value recovers to the static baseline pressure value after the target key is released from the pressed state.
[0029] This application first obtains the pressure response sequence of the target key during the current operating cycle. The pressure response sequence can be obtained in various ways, for example, in real-time acquisition using a piezoelectric sensor or resistive pressure sensor integrated under the keycap. These sensors convert physical pressure into an electrical signal, which is then converted into a digital pressure value sequence via an analog-to-digital converter (ADC). Another approach is to indirectly measure pressure using an optical pressure sensor, utilizing the displacement or intensity change of a light beam as the keycap deforms to generate a corresponding pressure response sequence.
[0030] Based on the acquired pressure response sequence, the current operating cycle is divided into four intervals: no-press interval, light-touch preparation interval, normal-press interval, and post-release interval. This division is achieved by analyzing characteristics such as pressure value, pressure change rate, and duration in the pressure response sequence. For example, these intervals can be identified by setting different pressure thresholds and change rate thresholds. When the pressure value remains at a low level for an extended period with minimal change, it can be identified as the no-press interval; when the pressure value begins to rise but has not yet reached the trigger threshold, it can be identified as the light-touch preparation interval; when the pressure value reaches or exceeds the trigger threshold and remains there for a period of time, it can be identified as the normal-press interval; and when the pressure value drops from a high point and quickly recovers, it can be identified as the post-release interval.
[0031] Within the no-press interval, extract the static baseline pressure value. The static baseline pressure value can be obtained through statistical analysis of the pressure values within this interval, for example, by calculating the average or median of the pressure values at all sampling points within this interval. Based on the static baseline pressure value of the current operating cycle and historical static baseline pressure values, calculate the static baseline pressure offset for adjacent operating cycles. Historical static baseline pressure values can be obtained from locally stored historical data, for example, stored in a circular queue or database. The static baseline pressure offset can be obtained by subtracting the historical static baseline pressure value from the current static baseline pressure value.
[0032] Within the released state interval, the zero-return slope is extracted. The zero-return slope can be obtained by calculating the average rate of pressure decrease within this interval, for example, by selecting the ratio of pressure change to time change during the period from the highest pressure value to the recovery to the static baseline pressure value. Based on the static baseline pressure value, the zero-return slope, and the static baseline pressure offset, the current baseline drift type of the target key is determined to be either persistent hardware degradation or operational fluctuation. This determination can be achieved through preset rules or machine learning models. For example, a persistently high static baseline pressure value, a significantly decreasing zero-return slope, and a positive static baseline pressure offset may indicate persistent hardware degradation; otherwise, it may indicate operational fluctuation.
[0033] When the baseline drift type is determined to be persistent hardware degradation, the stress response sequence is decomposed into effective stress values and drift stress values. This decomposition can be achieved using various algorithms, such as adaptive filtering or baseline correction algorithms, to separate the drift component from the stress response sequence. The effective stress value represents the actual stress applied by the user, while the drift stress value represents the bias caused by hardware degradation. Personalized feedback curve updates are then performed based on the effective and drift stress values. The update process can weight the effective stress value according to the magnitude of the drift stress value to reduce the impact of hardware degradation on the feedback curve.
[0034] When the baseline drift type is determined to be operational fluctuation, a personalized feedback curve is updated based on the pressure values in the pressure response sequence. In this case, since the drift is caused by short-term changes in user operating habits, the original pressure values can be used directly for updating to better adapt to the user's latest operating habits.
[0035] Finally, feedback control is applied to the next operating cycle based on the updated personalized feedback curve. Feedback control can be achieved by sending the updated personalized feedback curve to the local controller. The local controller then converts the pressure applied by the user into a corresponding tactile feedback intensity based on this curve, for example, adjusting the vibration frequency or amplitude of the micromotor to provide the user with a personalized tactile feedback experience.
[0036] In a preferred embodiment, the pressure response sequence of the key position within the current operating cycle is first acquired using a sensor. Then, based on preset pressure thresholds and pressure change rate thresholds, the operating cycle is divided into four state intervals: No-pressure state interval: When the pressure values of 10 consecutive sampling points are all less than or equal to 5 units of pressure, and the absolute value of the pressure change rate between these sampling points is all less than or equal to 0.1 units of pressure / millisecond, it is determined to be a no-pressure state.
[0037] Light touch ready state interval: When the pressure value of 5 consecutive sampling points is greater than 5 units of pressure but less than 15 units of pressure (trigger ready threshold), and the pressure change rate is continuously greater than zero, it is determined to be in light touch ready state.
[0038] Normal pressing state range: When the pressure value is greater than or equal to 20 units of pressure, and the pressure change rate changes from positive to negative and passes through zero, it is judged as the normal pressing state.
[0039] Post-release state range: When the pressure value drops to less than or equal to 5 units of pressure, and the rate of pressure change is negative and its absolute value is greater than 0.5 units of pressure / millisecond, it is determined to be in the post-release state.
[0040] Within the no-pressure zone, the arithmetic mean of the pressure values at all sampling points within that zone is calculated to obtain the current static baseline pressure value, for example, 3 units of pressure. Simultaneously, the static baseline pressure value from the previous operating cycle is extracted from the local historical cycle queue, for example, 2 units of pressure. The current static baseline pressure value is subtracted from the historical static baseline pressure value to calculate the static baseline pressure offset, which is 1 unit of pressure.
[0041] Within the released state interval, calculate the average pressure slope from the sampling point corresponding to the highest pressure value to the termination boundary of the released state interval to obtain the zero-return slope, for example, -0.8 unit pressure / millisecond.
[0042] Subsequently, the baseline drift type is determined based on the static baseline pressure value (3 units of pressure), the zero-return slope (-0.8 units of pressure / millisecond), and the static baseline pressure offset (1 unit of pressure). Assuming the preset absolute zero value is 0 units of pressure, the first tolerance threshold is 0.5 units of pressure, the historical baseline zero-return slope is -1.0 units of pressure / millisecond, and the preset ratio is 10%. Since the static baseline pressure value (3) is greater than the preset absolute zero value (0) and the difference (3) exceeds the first tolerance threshold (0.5), the absolute value of the zero-return slope (0.8) is 20% lower than the historical baseline zero-return slope (1.0) (exceeding the preset ratio of 10%), and the static baseline pressure offset (1) is greater than zero, the baseline drift type is determined to be persistent hardware degradation.
[0043] Because the baseline drift is a persistent hardware degradation, the pressure response sequence is decomposed into effective pressure and drift pressure values. The drift bias from the previous operating cycle is extracted from the local historical queue, for example, 2.5 units of pressure. The current pressure value is subtracted from this drift bias to obtain the initial correction value. If the initial correction value is less than zero, the effective pressure value is set to zero, the drift bias is not updated, and it is directly used as the drift pressure value. If the initial correction value is greater than or equal to zero, the initial correction value is used as the effective pressure value, and the drift bias is smoothly updated based on the static baseline pressure value. The updated drift bias is used as the drift pressure value. A personalized feedback curve is updated based on the effective pressure and drift pressure values. The update process can weight the effective pressure value according to the magnitude of the drift pressure value.
[0044] Furthermore, the steps of dividing the current operation cycle into a no-press state interval, a light-touch preparation state interval, a normal-press state interval, and a post-release state interval based on the pressure response sequence include: When the pressure values of multiple consecutive sampling points are less than or equal to the first pressure threshold, and the absolute value of the pressure change rate between the multiple consecutive sampling points is less than or equal to the first change rate threshold, the starting sampling point of the multiple consecutive sampling points is taken as the starting boundary of the no-pressure state interval, and the ending sampling point of the multiple consecutive sampling points is taken as the ending boundary of the no-pressure state interval. When the pressure values of multiple consecutive sampling points are greater than the first pressure threshold and less than the trigger preparation threshold, and the pressure change rate between the multiple consecutive sampling points is continuously greater than zero, the starting sampling point of the multiple consecutive sampling points is taken as the starting boundary of the light touch preparation state interval, and the sampling point corresponding to the pressure value reaching the trigger preparation threshold is taken as the ending boundary of the light touch preparation state interval, wherein the first pressure threshold is less than the trigger preparation threshold. When the pressure values of multiple consecutive sampling points are greater than or equal to the second pressure threshold, and the pressure change rate between these multiple consecutive sampling points changes from positive to negative and passes through zero, the sampling point where the pressure change rate changes from positive to negative and passes through zero is taken as the starting boundary of the normal pressing state interval, and the first sampling point where the pressure change rate is negative and its absolute value is continuously greater than the second change rate threshold is taken as the ending boundary of the normal pressing state interval; wherein, the second pressure threshold is greater than the trigger preparation threshold, and the second change rate threshold is greater than the first change rate threshold; When the pressure values of multiple consecutive sampling points drop to less than or equal to the first pressure threshold, and the pressure change rate among these multiple consecutive sampling points is negative and its absolute value is greater than the second change rate threshold, the first sampling point with a negative pressure change rate and its absolute value continuously greater than the second change rate threshold is taken as the starting boundary of the post-release state interval, and the first sampling point after the pressure value drops to less than or equal to the first pressure threshold is taken as the ending boundary of the post-release state interval.
[0045] The "no-press state" refers to the stage where the keycap is stationary and unpressed. This can be achieved by determining whether the pressure values at multiple consecutive sampling points are less than or equal to a first pressure threshold, and whether the absolute value of the pressure change rate between these sampling points is less than or equal to a first rate of change threshold. The first pressure threshold can be set according to the characteristics of the keycap sensor and the actual application scenario. For example, it can be set as the average output value of the sensor in the no-press state plus a small tolerance value. The first rate of change threshold can be set to a small value that can filter out minor fluctuations in the sensor and environmental noise; for example, it can be set to 0.01 units / millisecond.
[0046] The light-touch preparation state refers to the initial stage when a user begins to lightly press the keycap. This can be achieved by determining whether the pressure values at multiple consecutive sampling points are greater than a first pressure threshold but less than a trigger preparation threshold, and whether the rate of pressure change remains consistently greater than zero. The trigger preparation threshold can be set as the critical pressure value at which the user perceives a light press; for example, it could be set to 1.5 times the first pressure threshold. A consistently greater than zero rate of pressure change indicates that the pressure value is continuously increasing, which corresponds to the user's initial pressing action.
[0047] The normal pressing state range refers to the state where the keycap is effectively pressed and reaches its maximum or near-maximum pressing depth. Specifically, this can be achieved by judging whether the pressure values of multiple consecutive sampling points are greater than or equal to a second pressure threshold, and by observing whether the pressure change rate transitions from positive to negative and passes through zero. The second pressure threshold can be set as the minimum pressure value required for effective pressing by the user; for example, it can be set to twice the trigger preparation threshold. The transition of the pressure change rate from positive to negative and passing through zero precisely indicates the peak point or turning point during the pressing process. The second rate of change threshold can be set as the critical rate of change representing a significant decrease in pressing force; for example, it can be set to 0.1 units / millisecond.
[0048] The post-release state range refers to the process of the keycap rapidly rebounding from a pressed state and eventually returning to a non-pressed state. This can be achieved by determining when the pressure values at multiple consecutive sampling points decrease to less than or equal to a first pressure threshold, and the rate of pressure change is negative with an absolute value greater than a second rate of change threshold. The first sampling point where the rate of pressure change is negative and its absolute value is consistently greater than the second rate of change threshold accurately captures the instant the keycap rapidly rebounds.
[0049] As a preferred embodiment, assume that a keycap pressure sensor collects a series of pressure response data during the current operating cycle, with a sampling frequency of 1000Hz.
[0050] The first pressure threshold is set to 5 units, and the first rate of change threshold is set to 0.05 units / millisecond.
[0051] Set the trigger preparation threshold to 10 units.
[0052] The second pressure threshold is set to 20 units, and the second rate of change threshold is set to 0.2 units / millisecond.
[0053] When the pressure values at 10 consecutive sampling points are all less than or equal to 5 units, and the absolute value of the pressure change rate among these 10 sampling points is less than or equal to 0.05 units / millisecond, for example, from sampling point t=0ms to t=9ms, the pressure value stabilizes between 3 and 4 units, and the rate of change is between -0.02 and 0.03 units / millisecond, then t=0ms is taken as the starting boundary of the no-pressure state interval, and t=9ms is taken as the ending boundary of the no-pressure state interval.
[0054] After the no-press state interval ends, when five consecutive sampling points show pressure values greater than 5 units and less than 10 units, and the rate of pressure change remains positive (e.g., starting from sampling point t=10ms, the pressure value gradually increases from 5.2 units to 9.8 units, with the rate of change remaining positive (e.g., 0.1 units / ms), the pressure value reaches 10 units at t=15ms. At this point, t=10ms is designated as the starting boundary of the touch-ready state interval, and t=15ms as the ending boundary.
[0055] After the initial preparation phase ends, when multiple consecutive sampling points show pressure values greater than or equal to 20 units, and the rate of pressure change changes from positive to negative and passes zero (e.g., at t=20ms, the pressure value reaches 25 units, and the rate of pressure change changes from positive (e.g., 0.5 units / ms) to negative (e.g., -0.1 units / ms), passing zero), t=20ms is taken as the starting boundary of the normal press phase. Subsequently, the rate of pressure change continues to be monitored. When the first sampling point shows a negative rate of pressure change with an absolute value consistently greater than 0.2 units / ms (e.g., at t=30ms, the pressure value drops to 22 units, and the absolute value of the rate of pressure change consistently exceeds 0.2 units / ms (e.g., -0.3 units / ms), t=30ms is taken as the ending boundary of the normal press phase.
[0056] After the normal compression period ends, when multiple consecutive sampling points are detected to have pressure values less than or equal to 5 units, and the rate of pressure change is negative with an absolute value greater than 0.2 units / millisecond—for example, starting at t=30ms, the pressure value drops rapidly, reaching 4 units at t=35ms, with a negative rate of pressure change (e.g., -0.4 units / millisecond) and an absolute value greater than 0.2 units / millisecond—then t=30ms is designated as the starting boundary of the post-release state interval, and t=35ms as the ending boundary.
[0057] Furthermore, the steps of extracting the static baseline pressure value within the no-pressure state interval and calculating the static baseline pressure offset between adjacent operating cycles based on the static baseline pressure value and historical static baseline pressure values include: Calculate the arithmetic mean of the pressure values at the sampling points within the no-pressure interval, and use it as the static baseline pressure value; The static baseline pressure value of the previous operating cycle is extracted from the locally maintained historical cycle circular queue and used as the historical static baseline pressure value. The static baseline pressure offset is obtained by subtracting the historical static baseline pressure value from the static baseline pressure value.
[0058] The arithmetic mean of the pressure values at the sampling points within the no-pressure zone is calculated as the static baseline pressure value. This can be achieved as follows: After identifying the no-pressure zone, sampling data from all pressure sensors within that zone are collected. This sampling data may contain minor transient noise or fluctuations. To obtain a stable and representative baseline pressure value, the pressure values at these sampling points are calculated using an arithmetic mean. For example, if there are N sampling points within the no-pressure zone, with pressure values P1, P2, ..., PN, then the static baseline pressure value SBL = (P1 + P2 + ... + PN) / N.
[0059] Specifically, the static baseline pressure value of the previous operation cycle, extracted from the locally maintained historical cycle circular queue, is used as the historical static baseline pressure value. This can be implemented as follows: Maintain a circular queue to store the static baseline pressure values of the most recent N operation cycles. When a new operation cycle begins and the current static baseline pressure value is calculated, this value is added to the queue, while the oldest value is removed. When calculating the static baseline pressure offset for the current operation cycle, the static baseline pressure value of the cycle immediately preceding the current cycle is extracted from this circular queue as the historical static baseline pressure value. For example, if the current operation cycle is k-th, the static baseline pressure value of the (k-1)-th operation cycle will be extracted as the historical static baseline pressure value.
[0060] The static baseline pressure offset is obtained by subtracting the historical static baseline pressure value from the static baseline pressure value. This can be achieved as follows: After obtaining the static baseline pressure value (SBL_current) of the current operating cycle and the historical static baseline pressure value (SBL_history) of the previous operating cycle, the static baseline pressure offset (SBL_offset = SBL_current - SBL_history) is calculated through a simple subtraction operation. This offset directly quantifies the degree of change in keycap baseline pressure between two adjacent operating cycles. A positive offset indicates an increase in baseline pressure; a negative offset indicates a decrease in baseline pressure; and an offset close to zero indicates that the baseline is relatively stable.
[0061] In a preferred embodiment, when the user stops pressing a key, the system enters a no-press state interval. Assume that within this interval, the pressure sensor performs 100 samples within 100 milliseconds, acquiring 100 pressure values. To calculate the static baseline pressure value, these 100 pressure values are arithmetically averaged. For example, if the sum of these pressure values is 500 units, then the static baseline pressure value SBL_current = 500 / 100 = 5 units. Simultaneously, the static baseline pressure value from the previous operating cycle is retrieved from the locally maintained historical cycle queue. Assume the static baseline pressure value SBL_history from the previous operating cycle is 4.5 units. Then, the current static baseline pressure value SBL_current is subtracted from the historical static baseline pressure value SBL_history to obtain the static baseline pressure offset SBL_offset = 5 - 4.5 = 0.5 units.
[0062] Furthermore, the steps for extracting the zero-return slope within the post-release state interval, and determining whether the current baseline drift type of the target key is persistent hardware degradation or operational fluctuation based on the static baseline pressure value, the zero-return slope, and the static baseline pressure offset, include: Calculate the average pressure slope from the sampling point corresponding to the highest pressure value to the termination boundary of the post-release state interval within the release state interval, and use it as the zero-return slope; If the static baseline pressure value is greater than the preset absolute zero value and the difference between the static baseline pressure value and the preset absolute zero value exceeds the first tolerance threshold, and the absolute value of the zero return slope decreases by more than a preset ratio compared with the historical benchmark zero return slope, and the static baseline pressure offset is greater than zero, then the baseline drift type is determined to be continuous hardware degradation; otherwise, the baseline drift type is determined to be operational fluctuation.
[0063] The zero-return slope refers to the average pressure slope from the sampling point corresponding to the highest pressure value to the termination boundary of the post-release state interval. Specifically, it can be calculated as follows: First, determine the highest pressure value within the post-release state interval and its corresponding sampling point; second, determine the termination boundary of the post-release state interval; finally, obtain the average pressure slope by calculating the ratio of the pressure change between these two points to the change in the time interval between sampling points. For example, if the sampling point for the highest pressure value is P_max, and the time is T_max, and the pressure value at the termination boundary is P_end, and the time is T_end, then the zero-return slope can be calculated as (P_end - P_max) / (T_end - T_max).
[0064] The preset absolute zero value refers to the theoretical zero-point pressure value that the pressure sensor should output under ideal, unpressed conditions. This can be determined by calibration performed at the factory or by self-calibration during prolonged periods of inactivity. For example, on a production line, each key is calibrated using precision pressure calibration equipment, and its pressure output under unpressed conditions is recorded as the preset absolute zero value.
[0065] The first tolerance threshold is used to determine whether the static baseline pressure value deviates significantly from the preset absolute zero value. This threshold can be set based on the physical characteristics of the keycap, sensor accuracy, and the actual usage scenario. For example, it can be set to 0.5 units of pressure, meaning that when the difference between the static baseline pressure value and the preset absolute zero value exceeds 0.5, a significant positive pressure bias is considered to exist.
[0066] The historical baseline zero-return slope refers to the average or typical value of the keycap's zero-return slope under normal operating conditions. This can be obtained by testing at the factory or by collecting data and performing statistical analysis during the initial stages of normal use. For example, during the initial use of the device, a large amount of zero-return slope data from normal operating cycles can be collected, and its average value can be calculated as the historical baseline zero-return slope.
[0067] The preset ratio refers to the percentage used to determine whether the decrease in the zero-return slope reaches the standard for sustained hardware degradation. This ratio can be set based on the actual performance of the hardware degradation and user experience. For example, it can be set to 10%, meaning that when the absolute value of the zero-return slope decreases by more than 10% compared to the historical baseline zero-return slope, hardware performance degradation is considered to have occurred.
[0068] As a preferred embodiment, suppose a key on a drawing keyboard has an ideal output (preset absolute zero value) of 0 units of pressure from its pressure sensor when not pressed. The first tolerance threshold is set to 0.2 units of pressure, and the preset percentage is set to 15%. The historical baseline zero-return slope is obtained by calculating the average of the zero-return slopes after 1000 press tests on the key during the initial stage of normal use, assumed to be -50 units of pressure / millisecond.
[0069] In one operation cycle, the pressure response sequence of the key is acquired. Within the post-release state interval, the sampling point corresponding to the highest detected pressure value is 10 units of pressure, at time T1; the termination boundary pressure value of the post-release state interval is 1 unit of pressure, at time T2. Therefore, the zero-return slope is calculated to be (1-10) / (T2-T1) = -9 / (T2-T1). Assuming T2-T1 is 100 milliseconds, the zero-return slope is -0.09 units of pressure / millisecond.
[0070] Meanwhile, the static baseline pressure value extracted during the no-pressing state interval was 0.3 units of pressure. The static baseline pressure value of the previous operating cycle was 0.2 units of pressure, so the static baseline pressure offset was calculated to be 0.3 - 0.2 = 0.1 units of pressure.
[0071] The static baseline pressure value (0.3) is greater than the preset absolute zero value (0), and the difference between the static baseline pressure value and the preset absolute zero value (0.3-0=0.3) exceeds the first tolerance threshold (0.2). The absolute value of the zero-return slope (0.09) is lower than the absolute value of the historical baseline zero-return slope (50), with a decrease ratio of (50-0.09) / 50*100%≈99.82%, which far exceeds the preset ratio (15%). The static baseline pressure offset (0.1) is greater than zero. Since all three conditions are met, the current baseline drift type of the target key is determined to be persistent hardware degradation.
[0072] Furthermore, when the baseline drift type is persistent hardware degradation, the steps of decomposing the pressure response sequence into effective pressure values and drift pressure values include: The drift bias of the previous operation cycle is extracted from the locally maintained historical cycle circular queue and used as the drift bias at the current moment. Subtract the drift bias from the pressure value at the current moment in the pressure response sequence to obtain the initial correction value; When the initial correction value is less than zero, the effective pressure value is forcibly set to zero, and the drift bias is prohibited from being updated in the current operating cycle. The drift bias is directly used as the drift pressure value. When the initial correction value is greater than or equal to zero, the initial correction value is used as the effective pressure value, and the drift bias is smoothly updated based on the static baseline pressure value. The updated drift bias is then used as the drift pressure value.
[0073] The use of the drift offset from the previous operating cycle, extracted from a locally maintained historical cycle circular queue, as the current drift offset refers to using historical data to predict the current hardware drift. This can be implemented as follows: A circular queue is maintained on the local device, storing the drift offsets from the past N operating cycles. When the current drift offset is needed, the drift offset calculated and stored for the most recent operating cycle (i.e., the previous operating cycle) is read from this queue (when the queue is empty, such as when the keyboard is first used, the drift offset for the previous operating cycle is zero by default). For example, if the queue stores historical drift offsets such as [0.5, 0.6, 0.55, 0.62], the current drift offset will be set to 0.62.
[0074] The initial correction value is obtained by subtracting the drift offset from the current pressure value in the pressure response sequence. This means that by subtracting the estimated drift offset, the impact of hardware degradation on the actual pressure value is initially eliminated. Specifically, this can be implemented as follows: Assuming the raw pressure value read from the pressure sensor at the current moment is P_raw, and the drift offset extracted from the historical cycle queue is D_offset, then the initial correction value P_corrected will be calculated as P_raw - D_offset. For example, if the current raw pressure value is 100 and the drift offset is 5, then the initial correction value is 95.
[0075] Specifically, when the initial correction value is less than zero, the effective pressure value is forcibly set to zero, and updating the drift bias is prohibited within the current operating cycle. The drift bias is directly used as the drift pressure value. This refers to handling cases where a negative value appears after correction. Specifically, this can be implemented as follows: If the calculated P_corrected < 0, the effective pressure value P_effective is forcibly set to 0. Simultaneously, the algorithm used to update the drift bias is disabled within the current operating cycle; that is, D_offset is not modified. In this case, the drift pressure value P_drift will be directly set to D_offset. For example, if the initial correction value is -2, the effective pressure value is set to 0, the drift bias remains unchanged (i.e., equal to the drift bias of the previous operating cycle), and the drift pressure value is this unchanged drift bias.
[0076] Specifically, when the initial correction value is greater than or equal to zero, it is taken as the effective pressure value. The drift offset is then smoothly updated based on the static baseline pressure value, and the updated drift offset is used as the drift pressure value. This means that when the corrected pressure value is reasonable, it is considered the true effective pressure, and the drift offset is adjusted accordingly. Specifically, this can be implemented as follows: if the calculated P_corrected ≥ 0, the effective pressure value P_effective is set to P_corrected. Simultaneously, the drift offset D_offset is smoothly updated based on the static baseline pressure value P_baseline. For example, an exponentially weighted moving average (EWMA) smoothing algorithm can be used for updating: D_offset_new = α * P_baseline + (1-α) * D_offset_old, where α is the smoothing factor. The updated D_offset_new will be used as the current drift pressure value P_drift. For example, if the initial correction value is 95, the static baseline pressure value is 2, the old drift bias is 5, and the smoothing factor is 0.1, then the new drift bias may be updated to 0.1*2+0.9*5=0.2+4.5=4.7.
[0077] As a preferred embodiment, the drift bias of the previous operating cycle is extracted from the locally maintained historical cycle circular queue. Assuming the drift bias calculated and stored in the previous operating cycle is D_prev = 30 units, this value is used as the drift bias of the current moment, D_current = 30 units.
[0078] Next, obtain the pressure value at the current moment in the pressure response sequence. Assume the raw pressure value read by the sensor at the current moment is P_raw = 120 units. Subtract D_current from P_raw to obtain the initial correction value P_corrected = P_raw - D_current = 120 - 30 = 90 units.
[0079] Next, the value of P_corrected is determined. Since P_corrected = 90 units, which is greater than or equal to zero, P_corrected is used as the effective pressure value P_effective = 90 units. Simultaneously, the drift bias is smoothly updated based on the static baseline pressure value. Assuming the static baseline pressure value extracted during the non-pressing state interval of the current operating cycle is P_baseline = 25 units, and a smoothing factor α = 0.1 is used for updating, then the updated drift bias D_updated = α * P_baseline + (1-α) * D_current = 0.1 * 25 + 0.9 * 30 = 2.5 + 27 = 29.5 units. Finally, the updated drift bias D_updated is used as the drift pressure value P_drift = 29.5 units.
[0080] Through the above steps, the original pressure value of 120 units in the pressure response sequence was successfully decomposed into an effective pressure value of 90 units and a drift pressure value of 29.5 units, providing an accurate data basis for subsequent feedback control.
[0081] Furthermore, the steps for updating the personalized feedback curve based on the effective pressure value and the drift pressure value include: When the drift pressure value is greater than zero and less than or equal to the preset slight drift threshold, the effective pressure value is taken as an effective sample and included in the update process of the personalized feedback curve. The updated personalized feedback curve is then sent to the local machine. The preset slight drift threshold is greater than zero. When the drift pressure value is greater than the preset mild drift threshold and less than or equal to the preset moderate drift threshold, the effective pressure value is downweighted and the downweighted effective pressure value is included in the personalized feedback curve update process. The updated personalized feedback curve is then sent to the local machine. The preset mild drift threshold is less than the preset moderate drift threshold. When the drift pressure value exceeds the preset moderate drift threshold, the effective pressure value is prohibited from being included in the update process of the personalized feedback curve. Instead, the effective pressure value is redirected to the hardware degradation log database, and the maximum output peak value of the micro motor vibration frequency of the target key is locked.
[0082] The preset mild drift threshold is a pressure threshold used to distinguish between mild abnormalities and normal ranges. It can be set through experiments or experience based on the actual drift characteristics of the hardware and user experience requirements, for example, it can be set to 5 units of pressure.
[0083] The personalized feedback curve refers to the mapping relationship stored in the local device that converts the effective pressure value into the target feedback control parameter. Specifically, it can be represented by a polynomial function, a piecewise linear function, or a lookup table.
[0084] Among them, the maximum output peak value of the micro motor vibration frequency of the locked target key position refers to limiting the maximum vibration frequency of the micro motor of the specific key position to a preset low value to avoid hardware failure leading to feedback loss or causing discomfort to the user. Specifically, this can be achieved by setting a maximum frequency limit register in the local controller and setting its value to a fixed low value.
[0085] Specifically, valid samples refer to stress data deemed reliable and suitable for updating personalized feedback curves. Deweighting refers to weighting valid stress values to reduce their influence on the update algorithm; this can be achieved, for example, by multiplying by a weighting coefficient less than 1. The hardware degradation log database is a database used to store and record information related to keycap hardware degradation, including but not limited to drift stress values, occurrence time, and key identifiers.
[0086] In some preferred embodiments, it is assumed that the pressure response sequence of a target key within one operation cycle is decomposed to obtain a drift pressure value. Specifically, if this drift pressure value is calculated to be 0.3N, and the preset mild drift threshold is 0.5N, and the preset moderate drift threshold is 2N, then since 0.3N is greater than zero and less than or equal to 0.5N, the drift is determined to be mild. In this case, the effective pressure value extracted within this operation cycle will be directly used as a valid sample and incorporated into the personalized feedback curve update algorithm, for example, by adjusting the feedback curve using algorithms such as least squares or Kalman filtering. The updated personalized feedback curve is then sent to the local device to guide the feedback control in the next operation cycle.
[0087] Furthermore, if in another operating cycle, the drift pressure value of the target key is calculated to be 1.2N, since 1.2N is greater than 0.5N and less than or equal to 2N, the drift is judged to be moderate. In this case, to reduce potential inaccuracies, the effective pressure value in that operating cycle is downweighted. For example, if the weight of the effective pressure value is normally 1, it might be adjusted to 0.7 or 0.8, and then the downweighted effective pressure value is incorporated into the update process of the personalized feedback curve. The updated feedback curve is also sent locally.
[0088] Furthermore, if the drift pressure value of the target key is calculated to be 2.5N in a certain operation, and since 2.5N is greater than 2N, the drift is judged to be severe. In this case, more stringent measures are taken: First, the effective pressure value within that operation cycle will not be used to update the personalized feedback curve to avoid introducing serious errors. Instead, the effective pressure value and related drift information will be redirected and recorded in the hardware degradation log database as a basis for hardware fault diagnosis. Simultaneously, to protect the hardware and alert the user, the maximum output peak value of the micromotor vibration frequency corresponding to the target key will be locked, for example, limiting its maximum output intensity to below 50% of the normal level, or even completely disabling vibration feedback, until the hardware problem is resolved.
[0089] Furthermore, when the drift pressure value is greater than a preset mild drift threshold and less than or equal to a preset moderate drift threshold, the effective pressure value is downweighted. The downweighted effective pressure value is then incorporated into the personalized feedback curve update process, and the updated personalized feedback curve is sent to the local system. The steps include: Calculate the ratio of the drift pressure value to the preset moderate drift threshold; A data credibility score is generated based on the ratio, where a higher drift pressure value results in a lower data credibility score. The weighting ratio for downgrading is dynamically adjusted based on the data credibility score, with a higher weighting ratio for lower data credibility scores.
[0090] Specifically, the ratio of the drift pressure value to a preset moderate drift threshold is calculated to quantify the relative position of the current drift pressure value within the entire moderate drift range. For example, this ratio can be obtained by dividing the current drift pressure value by the preset moderate drift threshold.
[0091] Furthermore, generating a data credibility score based on the ratio aims to transform the degree of drift into a quantifiable credibility indicator. In practical applications, an inverse proportional function or piecewise function can be designed such that a larger drift pressure value indicates a greater impact of drift on the data, resulting in a lower credibility score. For example, when the ratio is close to 1 (i.e., the drift pressure value is close to the moderate drift threshold), the data credibility score is low; when the ratio is close to the ratio of a preset mild drift threshold to a moderate drift threshold, the data credibility score is high.
[0092] In some preferred embodiments, it is assumed that the preset mild drift threshold is 5 units and the preset moderate drift threshold is 10 units.
[0093] When a drift pressure value of 6 units is detected, it is greater than the mild drift threshold of 5 units but less than the moderate drift threshold of 10 units. In this case, the ratio of the drift pressure value to the preset moderate drift threshold is calculated as 6 / 10 = 0.6. Based on this ratio, a function (e.g., a linear or exponential function) can be designed to generate a data reliability score, such as 0.8. Based on this score, the weighting ratio is dynamically adjusted, for example, set to 0.2 (i.e., the effective pressure value multiplied by 0.8).
[0094] When a drift pressure value of 9 units is detected, it is greater than the mild drift threshold of 5 units but less than the moderate drift threshold of 10 units. In this case, the ratio of the drift pressure value to the preset moderate drift threshold is 9 / 10 = 0.9. Because the drift pressure value is larger, a lower data confidence score, such as 0.4, is generated based on this ratio. Based on this score, the weighting ratio is dynamically adjusted, for example, set to 0.6 (i.e., the effective pressure value multiplied by 0.4).
[0095] Furthermore, after the step of generating a data credibility score based on the ratio, the process includes: When the data credibility score is lower than the preset minimum credibility threshold, the effective stress value is prohibited from being included in the update process of the personalized feedback curve, and the effective stress value is redirected to the hardware degradation log database.
[0096] Specifically, the data credibility score can be understood as a quantitative assessment of the reliability of the current effective pressure value. The lower the value, the greater the drift impact on the effective pressure value, and the worse the reliability. The preset minimum credibility threshold is a pre-set benchmark value used to determine whether the effective pressure value has sufficient reliability to participate in the update of the personalized feedback curve. It can be set empirically or dynamically optimized through machine learning models based on the actual application scenario, keycap type, user habits, and the system's requirements for feedback accuracy and robustness. For example, this threshold can be a floating-point number between 0 and 1; when the score is below this value, the data is considered unreliable.
[0097] When the data confidence score falls below the preset minimum confidence threshold, strict measures are taken: the effective stress value is prohibited from being included in the update process of the personalized feedback curve. This means that the effective stress value will not be used to calculate or adjust any parameters of the feedback curve, thus avoiding potential errors introduced by low-quality data. Simultaneously, to avoid wasting this data containing potential diagnostic information, the effective stress value is redirected to the hardware degradation log database. The hardware degradation log database is a dedicated storage area for storing abnormal or low-confidence data, aiming to collect and accumulate information related to changes in hardware status. By recording this data, system or maintenance personnel can subsequently analyze, diagnose, and issue warnings about the keycap's hardware status, such as identifying whether a key has a persistent hardware degradation trend or whether there are components that need calibration or replacement.
[0098] Further steps to pinpoint the maximum output peak value of the micromotor vibration frequency of the target key position include: Start the interrupt cooling timer; When the interrupted cooling timer has not reached the preset cooling cycle, pause the step of re-executing the maximum output peak value of the micro motor vibration frequency of the target key; If the step of locking the maximum output peak value of the micro motor vibration frequency of the target key is executed again when the interrupted cooling timer reaches the preset cooling cycle, a hardware maintenance prompt signal will be sent to the cloud again, and the interrupted cooling timer will be reset.
[0099] The interrupt-cooled timer is a counter used to measure time intervals, which can be implemented using either software or hardware timers. Software timers can be implemented using APIs provided by the operating system or custom timing functions, such as using a system clock interrupt to update the counter. Hardware timers, on the other hand, can directly utilize the microcontroller's internal timer module, achieving precise time measurement by configuring its operating mode and prescaler.
[0100] The preset cooldown period refers to the time after a locking operation is performed to avoid frequent re-locking. A fixed time value can be set, such as 5 minutes, 10 minutes, or longer. This time value can be adjusted according to the actual application scenario and the rate of hardware degradation. The cooldown period setting needs to balance system response speed and resource consumption; too short a period may lead to frequent locking, while too long a period may delay problem feedback.
[0101] The step of pausing the maximum output peak of the micromotor vibration frequency that triggers the locking of the target key means that even if the condition requiring locking is detected again during the cooling cycle, the locking operation will not be performed immediately. This can be implemented using a Boolean flag. When the locking operation is performed, this flag is set to true and remains true until the end of the cooling cycle. Before performing the locking operation, this flag is checked; if it is true, the locking operation is skipped.
[0102] Resending a hardware maintenance alert signal to the cloud refers to reporting a potential persistent hardware problem to the cloud if a locking operation is required again after the cooling-off period. This can be achieved using HTTP requests, MQTT messages, or custom network protocols, sending a maintenance alert data packet containing key identifiers, exception types, and timestamps to the cloud server.
[0103] Resetting the interrupt cooldown timer means restoring the timer to its initial state in preparation for the next possible locking operation and maintenance prompt. This can be achieved by clearing the timer value to zero or restarting the timer.
[0104] Secondly, see Figure 2 This application also proposes a keycap personalized feedback control system based on human-computer interaction, the system comprising: The interval division module 210 is used to obtain the pressure response sequence of the target key in the current operation cycle, and divide the current operation cycle into an unpressed state interval, a light touch preparation state interval, a normal press state interval, and a release state interval based on the pressure response sequence. The offset calculation module 220 is used to extract the static baseline pressure value in the non-pressing state interval, and calculate the static baseline pressure offset between adjacent operating cycles based on the static baseline pressure value and the historical static baseline pressure value. The drift type determination module 230 is used to extract the zero-return slope within the state interval after release, and determine whether the current baseline drift type of the target key is continuous hardware degradation or operational fluctuation based on the static baseline pressure value, the zero-return slope and the static baseline pressure offset. The curve update module 240 is used to decompose the pressure response sequence into effective pressure value and drift pressure value when the baseline drift type is persistent hardware degradation, and to update the personalized feedback curve based on the effective pressure value and drift pressure value. When the baseline drift type is operational fluctuation, the personalized feedback curve is updated based on the pressure value in the pressure response sequence. The feedback control module 250 is used to perform feedback control for the next operation cycle based on the updated personalized feedback curve.
[0105] The above technical solution can accurately remove distorted data introduced by the physical degradation of the underlying hardware, ensuring that the local micro-motor array always provides feedback based on real additional force. The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for personalized feedback control of keycaps based on human-computer interaction, characterized in that, include: Obtain the pressure response sequence of the target key in the current operation cycle, and divide the current operation cycle into a no-press state interval, a light-touch preparation state interval, a normal press state interval, and a release state interval based on the pressure response sequence. Extract the static baseline pressure value within the no-press state interval, and calculate the static baseline pressure offset between adjacent operation cycles based on the static baseline pressure value and the historical static baseline pressure value. Extract the zero-return slope within the released state interval, and determine whether the current baseline drift type of the target key is persistent hardware degradation or operational fluctuation based on the static baseline pressure value, the zero-return slope, and the static baseline pressure offset. When the baseline drift type is persistent hardware degradation, the pressure response sequence is decomposed into effective pressure value and drift pressure value, and a personalized feedback curve is updated based on the effective pressure value and the drift pressure value. When the baseline drift type is the operational fluctuation, the personalized feedback curve is updated based on the pressure value in the pressure response sequence. Feedback control is applied to the next operation cycle based on the updated personalized feedback curve.
2. The method for personalized feedback control of keycaps based on human-computer interaction according to claim 1, characterized in that, The step of dividing the current operation cycle into a no-press state interval, a light-touch preparation state interval, a normal-press state interval, and a release state interval based on the pressure response sequence includes: When the pressure values of multiple consecutive sampling points are less than or equal to the first pressure threshold, and the absolute value of the pressure change rate between the multiple consecutive sampling points is less than or equal to the first change rate threshold, the starting sampling point of the multiple consecutive sampling points is taken as the starting boundary of the no-pressure state interval, and the ending sampling point of the multiple consecutive sampling points is taken as the ending boundary of the no-pressure state interval. When the pressure values of multiple consecutive sampling points are greater than the first pressure threshold and less than the trigger preparation threshold, and the pressure change rate between the multiple consecutive sampling points is continuously greater than zero, the starting sampling point of the multiple consecutive sampling points is taken as the starting boundary of the light touch preparation state interval, and the sampling point corresponding to when the pressure value reaches the trigger preparation threshold is taken as the ending boundary of the light touch preparation state interval, wherein the first pressure threshold is less than the trigger preparation threshold. When the pressure values of multiple consecutive sampling points are greater than or equal to the second pressure threshold, and the rate of change of pressure between these multiple consecutive sampling points changes from positive to negative and passes through zero, the sampling point where the rate of change of pressure changes changes from positive to negative and passes through zero is taken as the starting boundary of the normal pressing state interval, and the first sampling point where the rate of change of pressure is negative and its absolute value is continuously greater than the second rate of change threshold is taken as the ending boundary of the normal pressing state interval; wherein, the second pressure threshold is greater than the trigger preparation threshold, and the second rate of change threshold is greater than the first rate of change threshold; When the pressure values of multiple consecutive sampling points drop to less than or equal to the first pressure threshold, and the pressure change rate among these multiple consecutive sampling points is negative and its absolute value is greater than the second change rate threshold, the first sampling point where the pressure change rate is negative and its absolute value is continuously greater than the second change rate threshold is taken as the starting boundary of the post-release state interval, and the first sampling point after the pressure value drops to less than or equal to the first pressure threshold is taken as the ending boundary of the post-release state interval.
3. The method for personalized feedback control of keycaps based on human-computer interaction according to claim 1, characterized in that, The step of extracting the static baseline pressure value within the no-pressure state interval, and calculating the static baseline pressure offset between adjacent operating cycles based on the static baseline pressure value and historical static baseline pressure values, includes: Calculate the arithmetic mean of the pressure values at the sampling points within the no-pressure state interval, and use it as the static baseline pressure value; The static baseline pressure value of the previous operating cycle is extracted from the locally maintained historical cycle circular queue and used as the historical static baseline pressure value. The static baseline pressure offset is obtained by subtracting the historical static baseline pressure value from the static baseline pressure value.
4. The method for personalized feedback control of keycaps based on human-computer interaction according to claim 3, characterized in that, The step of extracting the zero-return slope within the released state interval and determining whether the current baseline drift type of the target key is persistent hardware degradation or operational fluctuation based on the static baseline pressure value, the zero-return slope, and the static baseline pressure offset includes: Calculate the average pressure slope from the sampling point corresponding to the highest pressure value to the termination boundary of the post-release state interval within the post-release state interval, and use it as the zero-return slope; If the static baseline pressure value is greater than the preset absolute zero value and the difference between the static baseline pressure value and the preset absolute zero value exceeds the first tolerance threshold, and the absolute value of the zero-return slope decreases by more than a preset proportion compared to the historical baseline zero-return slope, and the static baseline pressure offset is greater than zero, then the baseline drift type is determined to be the persistent hardware degradation; otherwise, the baseline drift type is determined to be the operational fluctuation.
5. The method for personalized feedback control of keycaps based on human-computer interaction according to claim 4, characterized in that, The step of decomposing the pressure response sequence into effective pressure values and drift pressure values when the baseline drift type is persistent hardware degradation includes: The drift bias of the previous operation cycle is extracted from the locally maintained historical cycle circular queue and used as the drift bias at the current moment. Subtract the drift bias from the pressure value at the current moment in the pressure response sequence to obtain the initial correction value; When the initial correction value is less than zero, the effective pressure value is forcibly set to zero, and the drift bias is prohibited from being updated in the current operating cycle. The drift bias is directly used as the drift pressure value. When the initial correction value is greater than or equal to zero, the initial correction value is used as the effective pressure value, and the drift bias is smoothly updated based on the static baseline pressure value. The updated drift bias is then used as the drift pressure value.
6. The method for personalized feedback control of keycaps based on human-computer interaction according to claim 1, characterized in that, The step of updating the personalized feedback curve based on the effective pressure value and the drift pressure value includes: When the drift pressure value is greater than zero and less than or equal to the preset slight drift threshold, the effective pressure value is taken as an effective sample and included in the update process of the personalized feedback curve, and the updated personalized feedback curve is sent to the local machine, wherein the preset slight drift threshold is greater than zero. When the drift pressure value is greater than the preset mild drift threshold and less than or equal to the preset moderate drift threshold, the effective pressure value is downweighted, the downweighted effective pressure value is included in the personalized feedback curve update process, and the updated personalized feedback curve is sent to the local machine. The preset mild drift threshold is less than the preset moderate drift threshold. When the drift pressure value is greater than the preset moderate drift threshold, the effective pressure value is prohibited from being included in the update process of the personalized feedback curve. Instead, the effective pressure value is redirected to the hardware degradation log database, and the maximum output peak value of the micro motor vibration frequency of the target key is locked.
7. The method for personalized feedback control of keycaps based on human-computer interaction according to claim 6, characterized in that, The step of downweighting the effective pressure value when the drift pressure value is greater than the preset mild drift threshold and less than or equal to the preset moderate drift threshold, incorporating the downweighted effective pressure value into the personalized feedback curve update process, and sending the updated personalized feedback curve to the local machine includes: Calculate the ratio of the drift pressure value to the preset moderate drift threshold; A data credibility score is generated based on the ratio, wherein the larger the drift pressure value, the lower the data credibility score. The weight reduction ratio of the weight reduction process is dynamically adjusted based on the data credibility score, wherein the lower the data credibility score, the greater the weight reduction ratio.
8. The method for personalized feedback control of keycaps based on human-computer interaction according to claim 7, characterized in that, After the step of generating a data credibility score based on the ratio, the following steps are included: When the data credibility score is lower than the preset minimum credibility threshold, the effective stress value is prohibited from being included in the update process of the personalized feedback curve, and the effective stress value is redirected to the hardware degradation log database.
9. The method for personalized feedback control of keycaps based on human-computer interaction according to claim 6, characterized in that, The step of locking the maximum output peak value of the micromotor vibration frequency of the target key position includes: Start the interrupt cooling timer; When the interrupted cooling timer has not reached the preset cooling cycle, the step of locking the maximum output peak value of the micro motor vibration frequency of the target key is paused. When the interrupted cooling timer reaches the preset cooling cycle, if the step of locking the maximum output peak value of the micro motor vibration frequency of the target key is executed again, a hardware maintenance prompt signal is sent to the cloud again, and the interrupted cooling timer is reset.
10. A keycap personalization feedback control system based on human-computer interaction, used to execute the keycap personalization feedback control method based on human-computer interaction as described in any one of claims 1 to 9, characterized in that, The system includes: The interval division module is used to obtain the pressure response sequence of the target key in the current operation cycle, and divide the current operation cycle into an unpressed state interval, a light touch preparation state interval, a normal press state interval, and a release state interval based on the pressure response sequence. The offset calculation module is used to extract the static baseline pressure value within the non-pressing state interval, and calculate the static baseline pressure offset between adjacent operating cycles based on the static baseline pressure value and historical static baseline pressure values. The drift type determination module is used to extract the zero-return slope within the state interval after release, and determine whether the current baseline drift type of the target key is persistent hardware degradation or operational fluctuation based on the static baseline pressure value, the zero-return slope and the static baseline pressure offset. The curve update module is used to decompose the pressure response sequence into effective pressure value and drift pressure value when the baseline drift type is the persistent hardware degradation, and to update the personalized feedback curve based on the effective pressure value and drift pressure value. When the baseline drift type is the operational fluctuation, a personalized feedback curve is updated based on the pressure value in the pressure response sequence; the feedback control module is used to perform feedback control on the next operation cycle based on the updated personalized feedback curve.
