Force level state evaluation-based pressure keyboard calibration state identification method and system
Patent Information
- Application Number
- CN202611310393.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-10-23
AI Technical Summary
[0006]发明目的:针对上述不足,本发明提出一种基于ForceLevel状态评估的压力键盘校准状态识别方法及系统,用于解决现有零点校准过度依赖人工判断、异常按键与正常按键相互阻塞、校准阶段不可识别、命令发送与设备完成状态混淆、校准后缺少配置回读和效果验证以及异常会话下结果不可追溯的问题
[0055]有益效果:本发明将物理无按压环境与单键零点偏移区分,使ForceLevel偏高但处于稳定无按压状态的异常按键仍可作为校准对象,同时将存在动态按压、剧烈波动或数据缺失的按键暂缓处理;通过阶段状态、连接会话、操作令牌、配置回读和校准后复测构成可核验闭环,避免将通信成功或单一状态消息误认为校准成功。
Smart Images

Figure CN122964431A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pressure sensing technology, and in particular to a method and system for identifying the pressure keyboard calibration status based on ForceLevel status assessment. Background Technology
[0002] The pressure-sensitive keyboard outputs a ForceLevel range of 0 to 100 based on the key pressure sensing signal. ForceLevel refers to the relative pressure level of the keyboard applied to the target key within the range of 0 to 100. Due to sensor zero-point drift, temperature changes, assembly tolerances, long-term use, or differences between individual keys, the ForceLevel in the unpressed state may deviate from the preset range, resulting in pressure display not returning to zero, misjudgment of light pressure, or reduced consistency between different keys.
[0003] Current practices typically involve the user manually clicking on zero-point calibration, followed by the device resampling the baseline from one or more sensors. Simply confirming that the host computer has successfully sent the calibration request only indicates that the communication link has accepted the request; it does not prove that the device has completed stable sampling, parameter writing, and result persistence. Furthermore, if the user presses a button, the data frame is interrupted, the device disconnects, the connection session changes, or there are inconsistencies in the readback after writing, invalid calibration may still occur.
[0004] The abstract of the publicly disclosed application CN121580682A involves determining the calibration window, collecting the ambient magnetic field and operating parameters, and generating calibration parameters axis by axis. This application suggests that automatic calibration requires a complete closed loop, but the conventional formation or normalization of the ForceLevel range is not equivalent to automatic calibration. For pressure-sensitive keyboards, a verifiable state chain needs to be established around "whether the no-press condition is met, whether the device has truly completed calibration, and whether the ForceLevel meets the standard after calibration."
[0005] Therefore, a pressure keyboard calibration status identification scheme is needed that combines non-press environment recognition, ForceLevel stability assessment, abnormal key diversion, calibration stage status, connection session protection, device configuration readback, and post-calibration retesting to avoid misjudging command dispatch or successful communication as device completion and to reduce erroneous calibration caused by key press interference, data discontinuity, timeout, disconnection, or old session writeback. Summary of the Invention
[0006] Purpose of the invention: To address the above-mentioned shortcomings, this invention proposes a pressure keyboard calibration status identification method and system based on ForceLevel status assessment, which solves the problems of excessive reliance on manual judgment in existing zero-point calibration, mutual blocking between abnormal and normal keys, unidentifiable calibration phase, confusion between command sending and device completion status, lack of configuration readback and effect verification after calibration, and untraceable results under abnormal sessions.
[0007] Technical solution: This invention provides a method for identifying the pressure keyboard calibration status based on ForceLevel status assessment, comprising:
[0008] S1. Obtain the working status information of the target pressure keyboard and initiate calibration when it is connected and available.
[0009] S2. Obtain the target button set and the pre-calibration configuration of each target button;
[0010] S3. Continuously collect data frames of the target buttons. After confirming that the current environment is physically unpressed, filter the calibrable buttons among the target buttons based on the stability of the ForceLevel of each target button and the continuity of the data frames.
[0011] S4. Perform calibration on the calibrable button and obtain the calibration status; the calibration status includes at least in progress, completed, failed, and interrupted.
[0012] If the calibration fails or is interrupted, discard the result and repeat the process.
[0013] If calibration is complete, proceed to S5;
[0014] S5. Write the calibration configuration, retest the calibrable buttons within the set time, and determine the retest results based on the zero-point deviation, fluctuation range, and effective sample ratio.
[0015] If all calibrable buttons pass the retest, the system will output a status indicating that all calibrations are complete.
[0016] Otherwise, return to S3 and calibrate the corresponding button a preset number of times until the corresponding button passes the retest;
[0017] If the preset number of retests is reached and a button fails the retest, it will be isolated or its pre-calibration configuration will be restored, and a partial calibration completion status will be output.
[0018] Specifically, in step S1, before initiating calibration, it is also necessary to determine whether calibration is required;
[0019] Determine whether calibration is needed by identifying abnormal ForceLevel characteristics, and determine the target button based on the abnormal ForceLevel characteristics;
[0020] The ForceLevel anomaly characteristics include at least one of the following characteristics:
[0021] When a button is not pressed, the ForceLevel duration relative to its historical baseline or the same group of buttons is longer than the set value.
[0022] The difference between the ForceLevel of a button when it is not pressed and its zero point (i.e., the zero point deviation) exceeds the zero point threshold; the range or standard deviation of the ForceLevel of continuously sampled buttons continues to increase in the sampling window.
[0023] An event was triggered without physical pressure.
[0024] After calibration, compared to before calibration, the zero-point deviation of the button when there is no physical pressure increases, or the range or standard deviation of the ForceLevel of the continuously sampled button exceeds the fluctuation threshold.
[0025] Specifically, in step S1, the calibration context is obtained while initiating calibration. The calibration context includes at least the device identifier, the running instance identifier, the connection session identifier, and the current operation token.
[0026] Among them, the device identifier is the identifier of the pressure keyboard, the running instance identifier is the running instance created for the current pressure keyboard, the connection session identifier is generated each time a connection is established, and the operation token is generated each time a calibration is initiated;
[0027] When obtaining the calibration status in S4, the current calibration context is obtained and compared with the calibration context when the calibration was initiated. The obtained calibration status is only updated if the device identifier, running instance identifier, connection session identifier and operation token in the compared calibration context are consistent.
[0028] Specifically, in S2, the target key set includes one key, multiple keys, or a full keyboard of keys.
[0029] Specifically, in S3, the physical no-press environment is determined based on one or more of the following: the user confirms that the button has been released, no button is triggered, the reference button or most buttons do not show that they are being pressed, and the duration is continuously set.
[0030] Specifically, in S3, if the stability and data frame continuity of the target button both meet the requirements, it is classified as a calibrable button; otherwise, it is classified as a pause button.
[0031] Calculate the range, standard deviation, and slope of the ForceLevel of the continuously acquired target key. If the range of the ForceLevel of the target key is not greater than the range threshold, the standard deviation is not greater than the standard deviation threshold, or the slope is not greater than the slope threshold, then the stability of the target key is considered to meet the requirements.
[0032] If at least a set number of consecutive valid data frames are collected from the target button within a set time period, the time interval between adjacent valid data frames does not exceed the maximum allowable interval, and the number of missing frames does not exceed the allowable value, then the data frame continuity of the target button is considered to meet the requirements.
[0033] Specifically, the stability of the target button is determined based on whether there is a jump in the ForceLevel of the target button, specifically:
[0034] By calculating the difference in ForceLevel between adjacent data frames of the same target key, if the difference is greater than the set abrupt change threshold, it is considered that the ForceLevel of the target key has a jump and its stability does not meet the requirements.
[0035] Specifically, in S4, the calibration status is generated based on the calibration stage, pressure keyboard feedback information, and the aforementioned calibration context;
[0036] The calibration stage information includes the current stage and start time. The current stage includes the response of the pressure keyboard, target key acquisition, key data frame sampling, key stability judgment, calibration parameter generation, calibration configuration writing, calibration configuration readback, and calibration retest.
[0037] Among them, the calibration is determined to be in progress when it is in each stage;
[0038] If the calibration configuration writing fails, the calibration configuration readback fails, the calibration configuration readback and writing are inconsistent, the calibration retest result fails or returns an error or failure result, the calibration is deemed to have failed in the pressure keyboard feedback information.
[0039] The calibration context is used to determine the device identifier, running instance identifier, connection session identifier, and current operation token. If any of these do not match, the calibration is interrupted and an interruption status is generated.
[0040] Specifically, in S5, after the calibration in S4 is completed, the calibration configuration is written to the storage terminal of the pressure keyboard;
[0041] During the retest, the written calibration configuration is read back and compared with the written calibration configuration to determine whether the calibration configuration was written successfully. The calibration retest is only performed if the writing is determined to be successful.
[0042] If the calibration configuration fails to be written, it needs to be rewritten. If the writing fails after a set number of attempts, the corresponding button will be isolated, the calibration configuration before calibration will be restored, or an alarm will be triggered.
[0043] The present invention also provides a pressure keyboard calibration status recognition system applying the aforementioned pressure keyboard calibration status recognition method based on ForceLevel status assessment, comprising:
[0044] The calibration initiation module is used to obtain the working status information of the target pressure keyboard and initiate calibration when it is connected and available.
[0045] The button acquisition module is used to acquire the target button set and the pre-calibration configuration of each target button;
[0046] The calibration button recognition module is used to continuously collect data frames of the target buttons. After confirming that the current environment is physically unpressed, the target buttons are divided into calibrable buttons and paused buttons based on the stability of the ForceLevel of each target button and the continuity of the data frames.
[0047] The calibration status identification module is used to perform calibration on calibrable buttons and obtain the calibration status; the calibration status includes at least in progress, completed, failed, and interrupted.
[0048] If the calibration fails or is interrupted, discard the result and repeat the calibration.
[0049] If the calibration is confirmed to be complete, then a retest is performed via the calibration retest module.
[0050] The calibration retest module is used to write calibration configuration, retest calibrable buttons within a set time, and determine the retest results based on zero-point deviation, fluctuation range, and effective sample ratio.
[0051] The result determination module determines whether the calibration was successful based on the retest results from the calibration and retest module.
[0052] If all calibrable buttons pass the retest, the system will output a status indicating that all calibrations are complete.
[0053] Otherwise, calibrate the corresponding button a preset number of times until the corresponding button passes the retest;
[0054] If the preset number of retests is reached and a button fails the retest, it will be isolated or its pre-calibration configuration will be restored, and a partial calibration completion status will be output.
[0055] Beneficial effects: This invention distinguishes between a physically unpressed environment and a single-key zero-point offset, allowing abnormal keys with a high ForceLevel but in a stable unpressed state to still be used for calibration. At the same time, keys with dynamic pressing, violent fluctuations, or missing data are temporarily deferred. A verifiable closed loop is formed by stage status, connection session, operation token, configuration readback, and post-calibration retest, avoiding the misinterpretation of successful communication or a single status message as successful calibration. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in this invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 This is a flowchart of the pressure keyboard calibration status identification method based on ForceLevel status assessment according to the present invention.
[0058] Figure 2 This is an architecture diagram of the pressure keyboard calibration status recognition system based on ForceLevel status assessment according to the present invention. Detailed Implementation
[0059] To make the objectives, technical solutions and advantages of the present invention clearer, the present application will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0060] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of the present invention should have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0061] The flowchart of the pressure keyboard calibration status identification method based on ForceLevel status assessment of the present invention is as follows: Figure 1 As shown, it includes:
[0062] S1. Obtain the working status information of the target pressure keyboard and initiate calibration when it is connected and available.
[0063] S2. Obtain the target button set and the pre-calibration configuration of each target button;
[0064] S3. Continuously collect data frames of the target buttons. After confirming that the current environment is physically unpressed, divide the target buttons into calibrable buttons and paused buttons based on the stability of the ForceLevel of each target button and the continuity of the data frames.
[0065] S4. Perform calibration on the calibrable button and obtain the calibration status; the calibration status includes at least in progress, completed, failed, and interrupted.
[0066] If the calibration fails or is interrupted, discard the result and repeat the process.
[0067] If calibration is complete, proceed to S5;
[0068] S5. Write the calibration configuration, retest the calibrable buttons within the set time, and determine the retest results based on the zero-point deviation, fluctuation range, and effective sample ratio.
[0069] If all calibrable buttons pass the retest, the system will output a status indicating that all calibrations are complete.
[0070] Otherwise, return to S3 and calibrate the corresponding button a preset number of times until the corresponding button passes the retest;
[0071] If the preset number of retests is reached and a button fails the retest, it will be isolated or its pre-calibration configuration will be restored, and a partial calibration completion status will be output.
[0072] In this invention, in step S1, before initiating calibration, it further includes determining whether calibration is needed. Specifically, the need for calibration can be determined by ForceLevel anomaly characteristics, and the target key can be identified based on the ForceLevel anomaly characteristics. Calibration can then be initiated by user commands, device maintenance strategies, or by setting an idle period. The ForceLevel anomaly characteristics include at least one of the following: the ForceLevel of the key in the unpressed state relative to its historical benchmark or the same group of keys remains set for a longer period than a set value; zero-point drift, i.e., the difference between the ForceLevel of the key in the unpressed state and its previous zero point exceeds the zero-point threshold; the range or standard deviation continuously increases within the sampling window of consecutive ForceLevels; a trigger event occurs where there is no physical press; or the zero-point and fluctuation indicators of the key degrade after calibration. Specifically, the degradation of the zero-point and fluctuation indicators of the key after calibration means that, compared to before calibration, the zero-point deviation of the key in the unpressed state increases, or the range or standard deviation of the key's ForceLevel exceeds the fluctuation threshold.
[0073] In this embodiment, the aforementioned set time T can be taken as 2-3 ForceLevel sampling windows.
[0074] In this embodiment, the aforementioned setting value can be 3-5 ForceLevels.
[0075] In this invention, in step S1, if the target pressure keyboard is in a state where pressure operation is prohibited, then entering the waiting calibration state is refused.
[0076] In this invention, in S1, the calibration context is obtained at the same time as the calibration is initiated. When the calibration status is obtained in a subsequent step, the current calibration context is obtained and compared with the aforementioned calibration context. The obtained calibration status is only allowed to be updated if the device identifier, running instance identifier, connection session identifier, and operation token in the compared calibration context are all consistent. The calibration context includes at least the device identifier, running instance identifier, connection session identifier, and current operation token.
[0077] Specifically, the device identifier is the identifier of the pressure keyboard, used to distinguish each pressure keyboard; the running instance identifier is the running instance created for the current pressure keyboard, including the connected communication channel, cache state, and operation information, used to distinguish multiple running instances created for the current pressure keyboard; the connection session identifier is generated each time a connection is established, used to distinguish messages before and after disconnection and reconnection; the operation token is generated each time calibration is initiated, used to distinguish calibration operations occurring sequentially within the same connection session. The result is allowed to change the calibration state only if the running instance identifier, connection session identifier, and operation token in the returned result are all consistent with the current calibration context. In this invention, in S2, the target key set can include one key, multiple keys, or a full keyboard of keys.
[0078] In this invention, in S2, the pre-calibration configuration of each target key is a set of configurations read and saved from the storage terminal of the pressure keyboard before calibration, which can be used to generate calibration data or rollback. This set includes at least the mapping between each target key and the sensor, the current calibration table or equivalent baseline parameters, the configuration version or summary, and existing parameters related to pressure conversion. The equivalent baseline parameters are other parameters that can still determine the zero-point conversion relationship without pressure when the pressure keyboard does not expose data in the form of a complete calibration table, such as a single-sensor zero-point ADC, a reference value, zero-point offset, or an equivalent compensation coefficient.
[0079] In this invention, before obtaining the pre-calibration configuration of each target button, evaluation indicators for each target button before calibration can also be obtained. Specifically, these indicators can be calculated based on continuous sampling of the buttons before calibration, and include at least the average ForceLevel, median, range, standard deviation, number of valid frames, number of missing frames, and sampling time range of the sampled samples. These indicators characterize zero-point offset, fluctuation degree, and data quality. The average and median are used to evaluate the zero-point offset of the button, the range and standard deviation are used to evaluate the fluctuation degree of the button, and the number of valid frames and number of missing frames are used to evaluate data quality. A valid frame refers to a data frame collected and reported by the target button within the sampling time range, containing a resolvable button identifier, sampling timestamp, and ForceLevel value, and free from data loss, communication errors, parsing errors, or timestamp anomalies.
[0080] In this invention, in S3, the determination of a physically unpressed environment is separate from the determination of the zero point of a single key, and the determination is performed on the pressure keyboard as a whole. Specifically, a physically unpressed environment can be determined based on one or more of the following: user release confirmation, key trigger state, state of reference key or most keys, and pressure change trend. That is, if the user confirms that the key has been released, there is no key trigger, or the reference key or most keys do not show that they have been pressed, and the duration needs to be set, then it can be determined as a physically unpressed environment.
[0081] In this invention, in step S3, if physical pressing is detected, the timing for determining the environment without physical pressing needs to be restarted.
[0082] In this invention, in step S3, if the stability and data frame continuity of the target button both meet the requirements, it is classified as a calibrable button; otherwise, it is classified as a paused button. This invention only calibrates calibrable buttons, thereby avoiding the blocking of calibration of other buttons by the presence of some abnormal buttons.
[0083] In this invention, the stability of the target button can be judged based on at least one of three evaluation indicators: the range, standard deviation, and slope of the ForceLevel in each frame of continuously acquired data frames of the target button. If the range of the ForceLevel of the target button is not greater than the range threshold, the standard deviation is not greater than the standard deviation threshold, or the slope is not greater than the slope threshold, the pressure signal of the target button is considered stable, that is, the fluctuation of the target button is stable, and its stability meets the requirements. In this invention, the design of a physical no-press environment is used to exclude active force applied by the user; stability judgment is used to exclude sensor noise, drift, or continuous movement. The two have different functions and cannot replace stability judgment with only the momentary no-press state.
[0084] In this embodiment, in order to ensure the stability of the target button, during the stability evaluation process of the target button, the pressure signal of the target button is considered stable only when the range of the ForceLevel of the target button is not greater than the range threshold, the standard deviation is not greater than the standard deviation threshold, and the slope of change is not greater than the slope threshold.
[0085] In this invention, the stability of the target button can also be determined based on whether there is a jump in the ForceLevel of the target button. Specifically, by calculating the difference in ForceLevel between adjacent data frames of the same button, if the difference is greater than a set abrupt change threshold, it is considered that the ForceLevel of the button has a jump, exhibiting abnormal fluctuations, and its stability does not meet the requirements. Through this design, instantaneous force application, communication anomalies, or noise spikes can be identified.
[0086] In this invention, the requirement for data frame continuity is specifically: no less than a set number of consecutive valid frames of the target button are collected within a set time period, the time interval between adjacent valid frames does not exceed the maximum allowable interval, and the number of missing frames does not exceed the allowable value.
[0087] In this embodiment, the sampling period of the data frame can be 8-12 milliseconds, the set time can be 1-2 seconds, the set number of frames can be 25-35 frames, and the allowable value can be 4-6 frames.
[0088] In this invention, for a button that has been identified as having zero-point offset, even if its ForceLevel when not pressed is higher than the zero-point threshold, that is, in the aforementioned physical no-press environment determination process, if there are some buttons that are pressed, if the button is a button that has been identified as having zero-point offset and its ForceLevel meets the stability condition, it can still be classified as a calibrable button.
[0089] In this invention, in step S4, the calibration status can be generated based on the calibration stage, pressure keyboard feedback information, and the aforementioned calibration context. Specifically, the calibration stage information includes the current stage and start time. The current stage includes pressure keyboard response, target key acquisition, key data frame sampling, key stability judgment, calibration parameter generation, calibration configuration writing, calibration configuration readback, and retesting. Calibration is considered to be in progress at each stage. In the pressure keyboard feedback information, if calibration configuration writing fails, calibration configuration readback fails, calibration configuration readback and writing are inconsistent, or calibration retest results fail or return an error or failure result, then calibration is considered to have failed. The device identifier, running instance identifier, connection session identifier, and current operation token are determined through the calibration context. If any of these are inconsistent, the calibration is interrupted, and an interruption status is generated.
[0090] In this invention, if the user cancels the calibration or the calibration exceeds the set time limit during the calibration process, the calibration is also interrupted and an interruption status is generated.
[0091] In this embodiment, the feedback information from the pressure keyboard may include errors or failures such as unsupported instruction, invalid parameters or table structure, pressure keyboard busy, pressure keyboard processing failure, or pressure keyboard refusing to execute.
[0092] In this invention, in step S4, if a data frame acquisition interruption occurs, the aforementioned connection session identifier changes, or the calibrable button is set to 0, the calibration process is exited and an interrupt status is generated.
[0093] In this invention, in step S4, after calibration is completed, the evaluation indicators of each target button after calibration can be collected and compared with the previously collected evaluation indicators before calibration to determine whether the zero-point offset, fluctuation degree and data quality of each target button meet the calibration requirements, so as to further ensure the accuracy of calibration.
[0094] In this invention, in step S5, after calibration in step S4 is completed, the calibration configuration is written to the storage terminal of the pressure keyboard. During retesting, the written calibration configuration can be read back and compared with the original calibration configuration to determine whether the calibration configuration writing was successful. Retesting is only performed if the writing is determined to be successful. If the calibration configuration writing fails, it needs to be rewritten. If the writing fails after a set number of times, the corresponding key can be isolated, the pre-calibration configuration restored, or an alarm can be triggered.
[0095] In this invention, in step S5, the average, median, range, and standard deviation of the calibrable button's ForceLevel after calibration can be calculated. When the average or median is not greater than the zero-point threshold (i.e., its zero-point deviation meets the requirements), the range and standard deviation are not greater than the corresponding fluctuation thresholds (i.e., its fluctuation range meets the requirements), the proportion of valid samples reaches a set proportion, and the calibration configuration readback and write are consistent, the calibrable button is determined to have passed the retest. Valid samples are those from the current running instance, current connection session, and current operation token, with timestamps within the retest time window, meeting the continuous data frame requirement, and without detected physical pressing or abnormal fluctuations. This retest is used to identify situations where calibration appears to be complete but has not actually returned to zero, has excessive fluctuations, or the device has not saved calibration data.
[0096] In this invention, in step S5, if a pause button is present after successful calibration, the calibration completion status is output, along with the pause button and its reason.
[0097] In this invention, in step S5, if a preset number of times is reached and a button fails the retest, it is isolated, its pre-calibration configuration is restored, or an alarm is triggered. At this time, a partial calibration completion status is also output, along with the isolated button and its reason. The full calibration completion status is output only when there are no pause or isolation buttons.
[0098] In this invention, the process is considered complete only when the device configuration is successfully written, the subsequently read device configuration is consistent with the configuration to be written this time, and the retest is passed. When communication is successful, the single heartbeat is normal, the calibration request is accepted, or the command is dispatched, it is only recorded as "request accepted" or "entering the in-process stage", and is not recorded as calibration completed.
[0099] In this invention, in step S5, if only a certain button is to be calibrated, only that button and its adjacent buttons can be retested to avoid local operation causing unexpected effects on the state of other buttons.
[0100] The present invention also provides a pressure keyboard calibration status recognition system applying the aforementioned pressure keyboard calibration status recognition method based on ForceLevel status assessment, comprising:
[0101] The calibration initiation module is used to obtain the working status information of the target pressure keyboard and initiate calibration when it is connected and available.
[0102] The button acquisition module is used to acquire the target button set and the pre-calibration configuration of each target button;
[0103] The calibration button recognition module is used to continuously collect data frames of the target buttons. After confirming that the current environment is physically unpressed, the target buttons are divided into calibrable buttons and paused buttons based on the stability of the ForceLevel of each target button and the continuity of the data frames.
[0104] The calibration status identification module is used to perform calibration on calibrable buttons and obtain the calibration status; the calibration status includes at least in progress, completed, failed, and interrupted.
[0105] If the calibration fails or is interrupted, discard the result and repeat the calibration.
[0106] If the calibration is confirmed to be complete, then a retest is performed via the calibration retest module.
[0107] The calibration retest module is used to write calibration configuration, retest calibrable buttons within a set time, and determine the retest results based on zero-point deviation, fluctuation range, and effective sample ratio.
[0108] The result determination module determines whether the calibration was successful based on the retest results from the calibration and retest module.
[0109] If all calibrable buttons pass the retest, the system will output a status indicating that all calibrations are complete.
[0110] Otherwise, calibrate the corresponding button a preset number of times until the corresponding button passes the retest;
[0111] If the preset number of retests is reached and a button fails the retest, it will be isolated or its pre-calibration configuration will be restored, and a partial calibration completion status will be output.
[0112] In this invention, if a preset number of tests are reached and a button fails the retest, it is isolated, its pre-calibration configuration is restored, or an alarm is triggered. A partial calibration completion status is output. If a pause button is also present, the pause button, the isolation button, and the reason for their absence are also included. A complete calibration completion status is output only when neither a pause button nor an isolation button is present.
[0113] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to run the computer program to enable the electronic device to perform the aforementioned pressure keyboard calibration state recognition method based on ForceLevel state assessment.
[0114] The present invention also provides a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned pressure keyboard calibration state recognition method based on ForceLevel state assessment.
[0115] This invention distinguishes between physical non-pressed environments and single-key zero-point offset, enabling stable but abnormal keys to enter calibration, while temporarily suspending dynamic pressing, abnormal fluctuations, or discontinuous data processing. By jointly confirming the final state through stage status, configuration write-after-readback, and ForceLevel retest after calibration, it can avoid mistaking successful communication for successful calibration, and can detect calibration results where the device has not saved the configuration, appears to be completed but has not actually returned to zero, or has insufficient stability.
[0116] This invention prevents old session results from overwriting new device states by binding the running instance identifier, connection session identifier, and operation token, and terminating the current process upon timeout, disconnection, session change, user cancellation, or detection of physical pressing. By saving the pre-calibration configuration snapshot, stage status, paused button presses, readback comparison results, and retest indicators, the traceability of calibration results can be improved.
[0117] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention is limited to these examples; within the framework of the invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity.
[0118] The embodiments of this invention are intended to cover all such substitutions, modifications, and variations falling within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this invention should be included within the protection scope of this invention.
Claims
1. A method for identifying the calibration status of a pressure-sensitive keyboard based on ForceLevel status assessment, characterized in that, include: S1. Obtain the working status information of the target pressure keyboard and initiate calibration when it is connected and available. S2. Obtain the target button set and the pre-calibration configuration of each target button; S3. Continuously collect data frames of the target buttons. After confirming that the current environment is physically unpressed, divide the target buttons into calibrable buttons and paused buttons based on the stability of the ForceLevel of each target button and the continuity of the data frames. S4. Perform calibration on the calibrable button and obtain the calibration status; the calibration status includes at least in progress, completed, failed, and interrupted. If the calibration fails or is interrupted, discard the result and repeat the process. If calibration is complete, proceed to S5; S5. Write the calibration configuration, retest the calibrable buttons within the set time, and determine the retest results based on the zero-point deviation, fluctuation range, and effective sample ratio. If all calibrable buttons pass the retest, the system will output a status indicating that all calibrations are complete. Otherwise, return to S3 and calibrate the corresponding button a preset number of times until the corresponding button passes the retest; If the preset number of retests is reached and a button fails the retest, it will be isolated or its pre-calibration configuration will be restored, and a partial calibration completion status will be output.
2. The pressure keyboard calibration status identification method according to claim 1, characterized in that, In step S1, before initiating calibration, it also includes determining whether calibration is required; Determine whether calibration is needed by identifying abnormal ForceLevel characteristics, and determine the target button based on the abnormal ForceLevel characteristics; The ForceLevel anomaly characteristics include at least one of the following characteristics: When a button is not pressed, the ForceLevel duration relative to its historical baseline or the same group of buttons is longer than the set value. The difference between the ForceLevel of a button when it is not pressed and its zero point (i.e., the zero point deviation) exceeds the zero point threshold; the range or standard deviation of the ForceLevel of continuously sampled buttons continues to increase in the sampling window. An event was triggered without physical pressure. After calibration, compared to before calibration, the zero-point deviation of the button when there is no physical pressure increases, or the range or standard deviation of the ForceLevel of the continuously sampled button exceeds the fluctuation threshold.
3. The pressure keyboard calibration status identification method according to claim 1, characterized in that, In step S1, the calibration context is obtained while initiating calibration. The calibration context includes at least the device identifier, the running instance identifier, the connection session identifier, and the current operation token. Among them, the device identifier is the identifier of the pressure keyboard, the running instance identifier is the running instance created for the current pressure keyboard, the connection session identifier is generated each time a connection is established, and the operation token is generated each time a calibration is initiated; When obtaining the calibration status in S4, the current calibration context is obtained and compared with the calibration context when the calibration was initiated. The obtained calibration status is only updated if the device identifier, running instance identifier, connection session identifier and operation token in the compared calibration context are consistent.
4. The pressure keyboard calibration status identification method according to claim 1, characterized in that, In S2, the target key set includes one key, multiple keys, or a full keyboard of keys.
5. The pressure keyboard calibration status identification method according to claim 1, characterized in that, In S3, the physical no-press environment is determined based on one or more of the following: the user confirms that the button has been released, no button is triggered, the reference button or most buttons do not show that they are being pressed, and the duration is continuously set.
6. The pressure keyboard calibration status identification method according to claim 1, characterized in that, In step S3, if the stability and data frame continuity of the target button both meet the requirements, it is classified as a calibrable button; otherwise, it is classified as a paused button. Calculate the range, standard deviation, and slope of the ForceLevel of the continuously acquired target key. If the range of the ForceLevel of the target key is not greater than the range threshold, the standard deviation is not greater than the standard deviation threshold, or the slope is not greater than the slope threshold, then the stability of the target key is considered to meet the requirements. If at least a set number of consecutive valid data frames are collected from the target button within a set time period, the time interval between adjacent valid data frames does not exceed the maximum allowable interval, and the number of missing frames does not exceed the allowable value, then the data frame continuity of the target button is considered to meet the requirements.
7. The pressure keyboard calibration status identification method according to claim 1, characterized in that, The stability of the target button is determined based on whether there is a jump in the target button's ForceLevel, specifically: By calculating the difference in ForceLevel between adjacent data frames of the same target key, if the difference is greater than the set abrupt change threshold, it is considered that the ForceLevel of the target key has a jump and its stability does not meet the requirements.
8. The pressure keyboard calibration status identification method according to claim 1, characterized in that, In step S4, the calibration status is generated based on the calibration stage, pressure keyboard feedback information, and the aforementioned calibration context. The calibration stage information includes the current stage and start time. The current stage includes the response of the pressure keyboard, target key acquisition, key data frame sampling, key stability judgment, calibration parameter generation, calibration configuration writing, calibration configuration readback and retesting. Among them, the calibration is determined to be in progress when it is in each stage; If the calibration configuration writing fails, the calibration configuration readback fails, the calibration configuration readback and writing are inconsistent, the calibration retest result fails or returns an error or failure result, the calibration is deemed to have failed in the pressure keyboard feedback information. The calibration context is used to determine the device identifier, running instance identifier, connection session identifier, and current operation token. If any of these do not match, the calibration is interrupted and an interruption status is generated.
9. The pressure keyboard calibration status identification method according to claim 1, characterized in that, In step S5, after the calibration in step S4 is completed, the calibration configuration is written to the storage terminal of the pressure keyboard. During the retest, the written calibration configuration is read back and compared with the written calibration configuration to determine whether the calibration configuration was written successfully. The retest is only performed if the writing is determined to be successful. If the calibration configuration fails to be written, it needs to be rewritten. If the configuration fails to be written after a set number of attempts, the corresponding button should be isolated, the pre-calibration configuration restored, or an alarm should be triggered.
10. A pressure keyboard calibration state recognition system applying the pressure keyboard calibration state recognition method based on ForceLevel state assessment as described in any one of claims 1-9, characterized in that, include: The calibration initiation module is used to obtain the working status information of the target pressure keyboard and initiate calibration when it is connected and available. The button acquisition module is used to acquire the target button set and the pre-calibration configuration of each target button; The calibration button recognition module is used to continuously collect data frames of the target buttons. After confirming that the current environment is physically unpressed, the target buttons are divided into calibrable buttons and paused buttons based on the stability of the ForceLevel of each target button and the continuity of the data frames. The calibration status identification module is used to perform calibration on calibrable buttons and obtain the calibration status; the calibration status includes at least in progress, completed, failed, and interrupted. If the calibration fails or is interrupted, discard the result and repeat the calibration. If the calibration is confirmed to be complete, then a retest is performed via the calibration retest module. The calibration retest module is used to write calibration configuration, retest calibrable buttons within a set time, and determine the retest results based on zero-point deviation, fluctuation range, and effective sample ratio. The result determination module determines whether the calibration was successful based on the retest results from the calibration and retest module. If all calibrable buttons pass the retest, the system will output a status indicating that all calibrations are complete. Otherwise, calibrate the corresponding button a preset number of times until the corresponding button passes the retest; If the preset number of retests is reached and a button fails the retest, it will be isolated or its pre-calibration configuration will be restored, and a partial calibration completion status will be output.
Citation Information
Patent Citations
Magnetic axis keyboard shaft body automatic calibration method and device, program product and storage medium
CN121580682A