Magnetic axis keyboard calibration method, device, equipment and storage medium

CN122836552APending Publication Date: 2026-09-29XIAN TCL SOFTWARE DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510383541.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]本申请的主要目的在于提供一种磁轴键盘校准方法、装置、磁轴键盘校准设备及存储介质,旨在解决磁轴键盘的器件差异引起的按键曲线误差的技术问题

Benefits of technology

[0044]本申请提供了一种磁轴键盘校准方法,本申请通过首先获取不同键盘的按键数据;根据按键数据确定键程和电压之间的映射关系;对映射关系进行校准,得到目标按键键程-电压曲线,以确定按键的目标键程。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122836552A_ABST
    Figure CN122836552A_ABST
Patent Text Reader

Abstract

The application discloses a magnetic shaft keyboard calibration method and device, equipment and a storage medium. The method comprises the following steps: acquiring key data of different keyboards; determining a mapping relationship between a key stroke and a voltage according to the key data; calibrating the mapping relationship to obtain a target key stroke-voltage curve of a key, so as to determine a target key stroke of the key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data analysis technology, and in particular to magnetic axis keyboard calibration methods, apparatus, devices and storage media. Background Technology

[0002] Magnetic axis keyboards utilize magnetic force to trigger key presses. Compared to traditional mechanical keyboards, they offer faster response times, customizable key travel settings, and a quieter user experience. Magnetic axis keyboards detect key presses through the interaction of a magnetic axis and a Hall sensor, allowing users to adjust the key travel to achieve diverse functions while maintaining smooth keystrokes and moderate rebound force, reducing finger fatigue during prolonged use. However, due to inconsistencies in the magnetic axis and Hall sensor used during manufacturing, differences in key travel and voltage may exist between different keys, leading to key travel curve errors.

[0003] Therefore, how to solve the key curve error caused by the differences in components of magnetic axis keyboards is an urgent problem to be solved.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this application is to provide a magnetic axis keyboard calibration method, apparatus, magnetic axis keyboard calibration device, and storage medium, aiming to solve the technical problem of key curve error caused by differences in the components of magnetic axis keyboards.

[0006] To achieve the above objectives, this application proposes a magnetic axis keyboard calibration method, the method comprising:

[0007] Obtain key data from different keyboards;

[0008] The mapping relationship between key travel and voltage is determined based on key data;

[0009] The mapping relationship is calibrated to obtain the target key travel-voltage curve, so as to determine the target key travel of the key.

[0010] In one embodiment, the step of determining the mapping relationship between key travel and voltage based on key data includes:

[0011] Determine the voltage value of each key on the keyboard at different key travel distances based on key data;

[0012] The key travel-voltage data pair for each key is determined based on the voltage value;

[0013] Plot the voltage curve for each key based on the key travel-voltage data;

[0014] The voltage curve is processed to obtain the mapping relationship between key range and voltage.

[0015] In one embodiment, the step of processing the voltage curve to obtain the mapping relationship between key range and voltage includes:

[0016] The starting point of the voltage curve is shifted to the origin of a two-dimensional coordinate system with the voltage value at the initial time as the origin, to obtain the updated voltage curve, wherein the two-dimensional coordinate system has time as the horizontal axis and voltage value as the vertical axis.

[0017] Extract discrete data points of voltage value changes over time from the updated voltage curve;

[0018] Linear fitting is performed on the discrete data points based on the least squares method to generate a linear function characterizing the mapping relationship between key range and voltage;

[0019] The updated voltage curve is normalized according to the linear function to eliminate systematic errors and obtain the mapping relationship between key distance and voltage.

[0020] In one embodiment, the step of calibrating the mapping relationship to obtain the target key travel-voltage curve includes:

[0021] Obtain the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel of the button;

[0022] The mapping relationship between key travel and voltage is calibrated based on the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel to determine the target key travel-voltage curve.

[0023] In one embodiment, the step of calibrating the mapping relationship between key travel and voltage based on the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel, and determining the target key travel-voltage curve, includes:

[0024] The predicted voltage value corresponding to the first key stroke and the predicted voltage value corresponding to the second key stroke are determined based on the mapping relationship.

[0025] The first voltage difference is determined based on the actual voltage value corresponding to the first key stroke and the predicted voltage value corresponding to the first key stroke.

[0026] The second voltage difference is determined based on the actual voltage value corresponding to the second key stroke and the predicted voltage value corresponding to the second key stroke.

[0027] The mapping relationship between key travel and voltage is calibrated based on the first voltage difference and the second voltage difference to determine the target key travel-voltage curve.

[0028] In one embodiment, the step of calibrating the mapping relationship between key travel and voltage based on a first voltage difference and a second voltage difference to determine the target key travel-voltage curve includes:

[0029] The first voltage difference and the second voltage difference are compared with a preset error in sequence. When it is determined that the first voltage difference or the second voltage difference is greater than the preset error, the slope parameter of the linear function is increased by a first fixed value by the preset step size, and the intercept parameter of the mapping relationship is decreased by a second fixed value by the preset step size to generate adjustment parameters.

[0030] The corresponding parameters of the mapping relationship are replaced by the adjustment parameters until the voltage difference of all keys is less than or equal to the preset error, at which point the target key travel-voltage curve is determined.

[0031] In one embodiment, the step of determining the target key travel of a key includes:

[0032] A mapping array is generated based on the target key travel-voltage curve;

[0033] Obtain the real-time voltage value measured by the button;

[0034] Traverse the mapping array to determine two adjacent voltage values ​​that correspond to the real-time voltage value;

[0035] The difference between the real-time voltage value and the adjacent voltage value is obtained to determine the relative position of the real-time voltage value between the two adjacent voltage values;

[0036] Linear interpolation is performed on the relative positions to obtain the target keyway corresponding to the real-time voltage value.

[0037] Furthermore, to achieve the above objectives, this application also proposes a magnetic axis keyboard calibration device, which includes:

[0038] The data acquisition module is used to acquire key data from different keyboards;

[0039] The data analysis module is used to determine the mapping relationship between key travel and voltage based on key data;

[0040] The calibration module is used to calibrate the mapping relationship and obtain the target key travel-voltage curve to determine the target key travel of the key.

[0041] In addition, to achieve the above objectives, this application also proposes a magnetic axis keyboard calibration device, the device including: a memory, a processor, and a magnetic axis keyboard calibration program stored in the memory and executable on the processor, the magnetic axis keyboard calibration program being configured to implement the steps of the magnetic axis keyboard calibration method as described above.

[0042] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the magnetic axis keyboard calibration method described above.

[0043] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the magnetic axis keyboard calibration method described above.

[0044] This application provides a magnetic axis keyboard calibration method. The method involves first acquiring key data from different keyboards; determining the mapping relationship between key travel and voltage based on the key data; calibrating the mapping relationship to obtain the target key travel-voltage curve, thereby determining the target key travel of the key.

[0045] In summary, this application can determine the mapping relationship between key travel and voltage by acquiring key data from different keyboards. This step utilizes a data-driven approach, obtaining voltage values ​​at different key travels through experimental measurements, thereby establishing an initial mapping model between key travel and voltage. The initial mapping relationship is then calibrated to obtain the target key travel-voltage curve. The calibration process involves adjusting the parameters of the mapping model to eliminate errors introduced by inconsistencies between the magnetic axis and the Hall sensor. This step is achieved through iterative optimization algorithms, such as gradient descent, adjusting the model parameters by minimizing the error between the actual voltage value and the model's predicted voltage value. Using the calibrated key travel-voltage curve, the target key travel can be determined, thereby achieving precise control of key presses. Attached Figure Description

[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart illustrating an embodiment of the magnetic axis keyboard calibration method of this application.

[0049] Figure 2 This is a flowchart illustrating Embodiment 2 of the magnetic axis keyboard calibration method of this application;

[0050] Figure 3This is a flowchart of the key travel value acquisition algorithm provided in the second embodiment of the magnetic axis keyboard calibration method of this application;

[0051] Figure 4 This is a flowchart illustrating the key travel curve calibration parameter update process provided in the second embodiment of the magnetic axis keyboard calibration method of this application.

[0052] Figure 5 This is a schematic diagram of the module structure of the magnetic axis keyboard calibration device according to an embodiment of this application;

[0053] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the magnetic axis keyboard calibration method of this application.

[0054] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0055] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0056] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0057] The main solution of this application embodiment is: to obtain key data of different keyboards; to determine the mapping relationship between key travel and voltage based on the key data; to calibrate the mapping relationship to obtain the target key travel-voltage curve, so as to determine the target key travel of the key.

[0058] Traditional mechanical keyboards use physical contact switches, where key presses are activated by the contact and separation of metal contacts. Mechanical keyboards require a greater amount of force to press, which can generate more noise during use. For gamers or users seeking efficiency and convenience, mechanical keyboards offer limited functionality and have longer response times, failing to meet their needs.

[0059] Magnetic axis keyboards utilize the magnetic properties of magnetic axes and Hall effect sensors to adjust the actuation and release positions and travel length, enabling triggering and disengagement with an extremely short travel distance, thus achieving faster key actuation than mechanical switches. Users can set different key travel distances to achieve different functions as needed, making them highly efficient and convenient. Magnetic axis keyboards offer smooth keystrokes and moderate rebound force, making them suitable for extended use, reducing finger fatigue, and are virtually silent during operation, producing no noise.

[0060] However, the current magnetic axis keyboard solution still has some drawbacks, such as: poor magnetic field variation curves (approximately quadratic curves), with small changes in the first half of the key travel and large changes in the second half; the permanent magnets between adjacent magnetic axes can affect each other's magnetic fields, resulting in certain differences in the magnetic field curves of each key. Therefore, how to solve the key curve errors caused by the differences in the components of magnetic axis keyboards is a problem that urgently needs to be addressed.

[0061] This application collects key travel-voltage data for all keys on a magnetic axis keyboard, preprocesses the data to improve the consistency of curves between keys, fits the voltage-key travel curve of the magnetic axis keys to obtain a reference mapping relationship between key travel and voltage, and acquires key travel-voltage values ​​when the keys are released and pressed to their lowest position during keyboard use to calibrate the key travel-voltage curves and eliminate errors introduced by differences in components such as magnetic axes and Hall sensors.

[0062] Based on this, this application provides a magnetic axis keyboard calibration method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the magnetic axis keyboard calibration method of this application.

[0063] In this embodiment, the magnetic axis keyboard calibration method includes steps S10 to S30:

[0064] Step S10: Obtain key data for different keyboards.

[0065] It should be noted that the execution subject of this embodiment is a magnetic axis keyboard calibration device. The magnetic axis keyboard calibration device can be a standalone device or a module integrated into the keyboard itself. This embodiment does not impose specific limitations on this. This embodiment uses a magnetic axis keyboard calibration device as an example for explanation.

[0066] It should be understood that a magnetic switch keyboard is a keyboard technology that uses magnetic switches and Hall effect sensors to detect the displacement (key travel) of the keys. Compared to traditional mechanical keyboards, magnetic switch keyboards can achieve faster response times and quieter operation. The key data is the voltage value of each key at different key travels (e.g., from 0mm to 4.00mm in 0.1mm increments).

[0067] In the specific implementation, a height gauge tool is used to collect the voltage values ​​of different keys in the key travel range of 0 to 4.00 mm (with a step size of 0.1 mm). The voltage data of each key on multiple keyboards are collected. Due to the inconsistency between the permanent magnet and the Hall sensor, there will be differences in the key travel-voltage curve.

[0068] Step S20: Determine the mapping relationship between key travel and voltage based on the key data.

[0069] In the specific implementation, the collected key data is preprocessed, and the starting point of all key voltage curves is moved to (0, 0) to facilitate fitting the nonlinear trend of the key travel-voltage curve, showing that the voltage change is small in the first half and large in the second half. Then, the mapping relationship between key travel and voltage is obtained through linear calibration method.

[0070] In one feasible implementation, step S20 may include steps A11 to A14:

[0071] Step A11: Determine the voltage value of each key on the keyboard under different key travels based on the key data;

[0072] In the specific implementation, based on the data collected in step S10, the voltage value of each key at each key travel point is recorded to construct the key travel-voltage curve.

[0073] Step A12: Determine the key travel-voltage data pair for each key based on the voltage value;

[0074] In practice, voltage values ​​are paired with corresponding key travel values ​​to form key travel-voltage data pairs.

[0075] Step A13: Plot the voltage curve for each key based on the key travel-voltage data;

[0076] In practice, the key travel-voltage curve for each key is plotted in charting software based on the key travel-voltage data. These curves show the relationship between key travel and voltage.

[0077] Step A14: Process the voltage curve to obtain the mapping relationship between key distance and voltage.

[0078] Furthermore, step A14 may include steps B11 to B12:

[0079] Step B11: Translate the starting point of the voltage curve to the origin of a two-dimensional coordinate system with the voltage value at the initial time as the origin, to obtain the updated voltage curve, wherein the two-dimensional coordinate system has time as the horizontal axis and voltage value as the vertical axis.

[0080] It should be noted that the starting point of the voltage curve is aligned with the origin of the coordinate system to facilitate subsequent mathematical processing and analysis.

[0081] In a two-dimensional coordinate system, the voltage curve can be translated so that the starting point (the voltage value at the initial moment) is located at the origin (0,0). This can be achieved by performing corresponding displacement operations on the time axis and voltage axis of the voltage curve.

[0082] Step B12: Extract discrete data points of voltage value change over time from the updated voltage curve.

[0083] It should be noted that a series of representative data points are obtained from the continuous voltage curve for subsequent fitting calculations. Multiple points are selected on the updated voltage curve at certain time intervals or according to the changing characteristics of the curve.

[0084] Step B13: Perform linear fitting on the discrete data points based on the least squares method to generate a linear function characterizing the mapping relationship between key range and voltage.

[0085] In the specific implementation, the least squares method is used to perform linear fitting on the extracted discrete data points. The least squares method determines the best-fit line by minimizing the sum of the squares of the vertical distances between the data points and the fitted line. The calculated line can be represented by the linear function V = aK + b, where V is the voltage value, K is the key distance value, a is the slope, and b is the intercept.

[0086] Step B14: Normalize the updated voltage curve according to the linear function to eliminate system errors and obtain the mapping relationship between key distance and voltage.

[0087] It should be noted that, in order to eliminate systematic errors and make the mapping relationship between key distance and voltage more accurate and stable, this strategy normalizes the updated voltage curve based on the generated linear function. Transforming the voltage value according to the linear function ensures that the new voltage value more accurately reflects changes in key distance, thereby eliminating systematic errors caused by inaccuracies in the measuring equipment or environmental factors.

[0088] In practice, the adjusted voltage curve is linearly calibrated to establish a mapping relationship between key range and voltage.

[0089] Step S30: The mapping relationship is calibrated to obtain the target key travel-voltage curve, so as to determine the target key travel of the key.

[0090] In practice, the keyboard acquires the voltage values ​​of the maximum key travel (key not pressed) and the minimum key travel (key pressed to the bottom) during actual use, further adjusts some parameters of the key travel-voltage curve relationship, completes the calibration of the key travel-voltage curve, and obtains the target key travel-voltage curve.

[0091] Furthermore, the steps for determining the target key travel include:

[0092] A mapping array is generated based on the target key travel-voltage curve;

[0093] Obtain the real-time voltage value measured by the button;

[0094] Traverse the mapping array to determine two adjacent voltage values ​​that correspond to the real-time voltage value;

[0095] The difference between the real-time voltage value and the adjacent voltage value is obtained to determine the relative position of the real-time voltage value between the two adjacent voltage values;

[0096] Linear interpolation is performed on the relative positions to obtain the target keyway corresponding to the real-time voltage value.

[0097] It should be noted that the mapping array is formed by extracting multiple key travel points and their corresponding voltage values ​​based on the target key travel-voltage curve, creating key travel-voltage data pairs. These data pairs are arranged in order of key travel values ​​to form a mapping array, where each element contains a key travel value and its corresponding voltage value.

[0098] Real-time voltage value is obtained by measuring devices or sensors, which acquire the actual voltage value of the button at the current moment. This voltage value reflects the electrical characteristics of the button in the current state.

[0099] The adjacent voltage value is specified by traversing the mapping array, comparing the real-time voltage value with the size of each voltage value in the array, and finding the first voltage value that is greater than the real-time voltage value and the voltage value before it.

[0100] Relative position is determined by calculating the difference between the real-time voltage value and the adjacent voltage value, and by comparing the magnitude of these two differences, it is determined which adjacent voltage value the real-time voltage value is closer to, thus determining its relative position.

[0101] In the specific implementation, based on the calibrated key curve relationship, the mapping array of key travel and voltage value is calculated and obtained respectively. The corresponding key travel can be obtained based on the real-time voltage value of the key, thereby reducing the key response delay time while ensuring the accuracy of the key travel value.

[0102] This embodiment provides a magnetic axis keyboard calibration method. First, it acquires key data from different keyboards; then, it determines the mapping relationship between key travel and voltage based on the key data; finally, it calibrates the mapping relationship to obtain the target key travel-voltage curve, thereby determining the target key travel. Addressing the shortcomings of mechanical keyboards and magnetic axis keyboards, this method utilizes a linear calibration scheme based on the maximum and minimum key travel voltage values ​​of a single key on a magnetic axis keyboard to improve key travel estimation accuracy, achieving adaptive calibration for each key with a key travel accuracy of 0.1mm. The calibration of the key travel-voltage curve can resolve errors caused by differences in components. Users can set different key travels to achieve different functions, increasing keyboard functionality and improving the user experience.

[0103] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S30 also includes steps S301-S302:

[0104] Step S301: Obtain the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel of the button.

[0105] It should be noted that this step collects the necessary data for calibrating the key travel-voltage mapping. The accuracy of the current mapping can be assessed by measuring the actual voltage values ​​at two different key travels (the first key travel and the second key travel).

[0106] It should be understood that the first key travel is the initial position of the key. The second key travel is the position where the key is fully pressed down.

[0107] In the specific implementation, two representative key travel points are selected, such as the starting position of the key (small key travel) and the fully pressed position (large key travel); a high-precision voltage measurement device is used to measure the voltage value output by the Hall sensor at the selected key travel points.

[0108] Step S302: The mapping relationship between key travel and voltage is calibrated based on the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel to determine the target key travel-voltage curve.

[0109] It should be noted that by comparing the difference between the actual voltage value and the predicted voltage value, adjusting the parameters of the key travel-voltage mapping relationship can improve the accuracy of key triggering.

[0110] like Figure 3 As shown, Figure 3 The flowchart for the key travel value acquisition algorithm is as follows: First, the maximum and minimum key travel voltage values ​​are obtained. Then, the estimated curve equation parameters are updated based on the maximum and minimum key travel voltage values. The key travel-voltage mapping array is calculated based on the updated curve equation parameters to obtain the actual voltage value. Finally, the estimated key travel value of the actual voltage value is calculated.

[0111] In one feasible implementation, step S302 may include steps A21 to A24:

[0112] Step A21: Determine the predicted voltage value corresponding to the first key stroke and the predicted voltage value corresponding to the second key stroke based on the mapping relationship;

[0113] In the specific implementation, the predicted voltage values ​​under the first key stroke and the second key stroke are calculated based on the current key stroke-voltage mapping relationship.

[0114] Step A22: Determine the first voltage difference based on the actual voltage value corresponding to the first key stroke and the predicted voltage value corresponding to the first key stroke;

[0115] In the specific implementation, the actual voltage value under the first key stroke is compared with the predicted voltage value, and the difference between the two (the first voltage difference) is calculated.

[0116] Step A23: Determine the second voltage difference based on the actual voltage value corresponding to the second key stroke and the predicted voltage value corresponding to the second key stroke;

[0117] In the specific implementation, the actual voltage value under the second key stroke is compared with the predicted voltage value, and the difference between the two (the second voltage difference) is calculated.

[0118] Step A24: calibrate the mapping relationship between key travel and voltage based on the first voltage difference and the second voltage difference to determine the target key travel-voltage curve.

[0119] In the specific implementation, the parameters of the keyway-voltage mapping relationship are adjusted according to the first voltage difference and the second voltage difference.

[0120] Furthermore, step A24 may include steps B21 to B22:

[0121] Step B21: Compare the first voltage difference and the second voltage difference with the preset error in sequence. When it is determined that the first voltage difference or the second voltage difference is greater than the preset error, increase the slope parameter of the linear function by a first fixed value by the preset step size, and decrease the intercept parameter of the mapping relationship by a second fixed value by the preset step size to generate adjustment parameters.

[0122] It should be noted that the voltage difference comparison involves comparing the first voltage difference and the second voltage difference with the preset error in sequence. The first voltage difference and the second voltage difference represent the voltage deviation of the button in different states, respectively.

[0123] If the first voltage difference or the second voltage difference is greater than the preset error, the parameters are adjusted. The preset error is a set threshold used to determine whether the voltage difference is within an acceptable range.

[0124] Parameter adjustment: The slope parameter of the linear function is increased by a first fixed value by a preset step size, and the intercept parameter of the mapping relationship is decreased by a second fixed value by a preset step size, generating the adjustment parameters. The preset step size is a fixed increment or decrement of the parameter change during each adjustment.

[0125] In the specific implementation, the first voltage difference and the second voltage difference are compared with a preset error in sequence. If either difference is greater than the preset error, the parameters of the mapping relationship are adjusted based on a preset step size to obtain the adjustment parameters.

[0126] Step B22: Replace the corresponding parameters of the mapping relationship with the adjustment parameters until the voltage difference of all keys is less than or equal to the preset error, and then determine the target key travel-voltage curve.

[0127] It should be noted that the corresponding parameters in the mapping relationship are replaced by adjusting the parameters. This involves applying new slope and intercept parameters to the existing mapping relationship to update it. After replacing the parameters, it is checked whether the voltage difference of all keys is less than or equal to the preset error. This requires re-measuring and comparing all keys. When the voltage difference of all keys is less than or equal to the preset error, the current mapping relationship is determined to be the target key travel-voltage curve. This means that the adjusted mapping relationship meets the accuracy requirements and can be used for accurate key control and monitoring.

[0128] In the actual implementation, the key travel-voltage mapping relationship is calibrated according to the adjustment parameters. The comparison and adjustment process is repeated until the voltage difference of all keys is less than the preset error, and finally the key travel-voltage curve of the target key is determined.

[0129] like Figure 4 As shown, Figure 4 The flowchart for updating key travel curve calibration parameters begins by inputting the actual 4.00mm key travel voltage value: This data is actually measured from the keyboard's Hall sensor, representing the voltage value when the key is fully pressed (4.00mm key travel). Next, the fitted curve 4.00mm key travel voltage value is input: This is the predicted voltage value at 4.00mm key travel, derived from the curve fitted to the previous key travel-voltage data. The actual measured voltage value is compared with the predicted voltage value from the fitted curve, and the difference between the two is calculated. This difference represents the deviation between the predicted and actual values. Finally, it is checked whether the voltage difference calculated in the previous step is less than a preset error threshold. This error threshold represents the maximum acceptable deviation for the system. If the difference is less than the given error (Yes), the prediction of the fitted curve is accurate enough, and the process continues to the next step. If the difference is greater than the given error (No), the parameters of the fitted equation need to be adjusted to reduce the prediction error. If the difference is greater than the given error, the parameters of the fitted equation are adjusted according to a certain step size. This involves changing the shape or position of the curve to better match the actual measured data. After adjustment, the voltage value of the fitted curve at a key travel of 4.00 mm is recalculated, and the steps are repeated until the difference is less than the given error. Then, the value 'a' is output, representing the parameters required for the actual key curve. The optimal value 'a' is obtained through iteration.

[0130] It should be noted that step size refers to a step size, which is the step from the baseline fitted curve to the actual curve of the button.

[0131] In this embodiment, this application ensures that each key on the magnetic axis keyboard can be accurately triggered at the user's desired key travel, improving the overall performance of the keyboard and the user experience. Furthermore, this calibration method can adapt to differences between different keys, achieving adaptive calibration, thereby improving the keyboard's reliability and durability.

[0132] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the magnetic axis keyboard calibration method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0133] This application also provides a magnetic axis keyboard calibration device; please refer to... Figure 5 The magnetic axis keyboard calibration device includes:

[0134] The data acquisition module 10 is used to acquire key data from different keyboards;

[0135] Data analysis module 20 is used to determine the mapping relationship between key travel and voltage based on key data;

[0136] The calibration module 30 is used to calibrate the mapping relationship to obtain the target key travel-voltage curve, so as to determine the target key travel of the key.

[0137] This embodiment provides a magnetic axis keyboard calibration device. This embodiment acquires key data of different keyboards; determines the mapping relationship between key travel and voltage based on the key data; calibrates the mapping relationship to obtain the target key travel-voltage curve, so as to determine the target key travel of the key; and calibrates the key travel-voltage curve of the key to eliminate errors introduced by the differences in devices such as magnetic axes and Hall sensors.

[0138] Optionally, the data analysis module 20 is also used to determine the voltage value of each key on the keyboard at different key travels based on the key data;

[0139] The key travel-voltage data pair for each key is determined based on the voltage value;

[0140] Plot the voltage curve for each key based on the key travel-voltage data;

[0141] The voltage curve is processed to obtain the mapping relationship between key range and voltage.

[0142] Optionally, the data analysis module 20 is further configured to translate the starting point of the voltage curve to the origin of a two-dimensional coordinate system with the voltage value at the initial time as the origin, to obtain an updated voltage curve, wherein the two-dimensional coordinate system has time as the horizontal axis and voltage value as the vertical axis.

[0143] Extract discrete data points of voltage value changes over time from the updated voltage curve;

[0144] Linear fitting is performed on the discrete data points based on the least squares method to generate a linear function characterizing the mapping relationship between key range and voltage;

[0145] The updated voltage curve is normalized according to the linear function to eliminate systematic errors and obtain the mapping relationship between key distance and voltage.

[0146] Optionally, the calibration module 30 is also used to obtain the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel of the key.

[0147] The mapping relationship between key travel and voltage is calibrated based on the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel to determine the target key travel-voltage curve.

[0148] Optionally, the calibration module 30 is also used to determine the predicted voltage value corresponding to the first key stroke and the predicted voltage value corresponding to the second key stroke according to the mapping relationship;

[0149] The first voltage difference is determined based on the actual voltage value corresponding to the first key stroke and the predicted voltage value corresponding to the first key stroke.

[0150] The second voltage difference is determined based on the actual voltage value corresponding to the second key stroke and the predicted voltage value corresponding to the second key stroke.

[0151] The mapping relationship between key travel and voltage is calibrated based on the first voltage difference and the second voltage difference to determine the target key travel-voltage curve.

[0152] Optionally, the calibration module 30 is further configured to sequentially compare the first voltage difference and the second voltage difference with a preset error, and when it is determined that the first voltage difference or the second voltage difference is greater than the preset error, increase the slope parameter of the linear function by a first fixed value with the preset step size, and decrease the intercept parameter of the mapping relationship by a second fixed value with the preset step size, thereby generating adjustment parameters;

[0153] The corresponding parameters of the mapping relationship are replaced by the adjustment parameters until the voltage difference of all keys is less than or equal to the preset error, at which point the target key travel-voltage curve is determined.

[0154] Optionally, the calibration module 30 is further configured to generate a mapping array based on the target key travel-voltage curve;

[0155] Obtain the real-time voltage value measured by the button;

[0156] Traverse the mapping array to determine two adjacent voltage values ​​that correspond to the real-time voltage value;

[0157] The difference between the real-time voltage value and the adjacent voltage value is obtained to determine the relative position of the real-time voltage value between the two adjacent voltage values;

[0158] Linear interpolation is performed on the relative positions to obtain the target keyway corresponding to the real-time voltage value.

[0159] The magnetic axis keyboard calibration device provided in this application, employing the magnetic axis keyboard calibration method described in the above embodiments, can solve the technical problem of key curve errors caused by differences in the components of magnetic axis keyboards. Compared with the prior art, the beneficial effects of the magnetic axis keyboard calibration device provided in this application are the same as those of the magnetic axis keyboard calibration method provided in the above embodiments, and other technical features in the magnetic axis keyboard calibration device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0160] This application provides a magnetic axis keyboard calibration device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the magnetic axis keyboard calibration method in Embodiment 1 above.

[0161] The following is for reference. Figure 6 The diagram illustrates a structural schematic suitable for implementing the magnetic axis keyboard calibration device of the embodiments of this application. The magnetic axis keyboard calibration device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The magnetic axis keyboard calibration device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0162] like Figure 6As shown, the magnetic axis keyboard calibration device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the magnetic axis keyboard calibration device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the magnetic axis keyboard calibration device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show magnetic axis keyboard calibration devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0163] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0164] The magnetic axis keyboard calibration device provided in this application, employing the magnetic axis keyboard calibration method described in the above embodiments, can solve the technical problem of key curve errors caused by differences in the components of magnetic axis keyboards. Compared with the prior art, the beneficial effects of the magnetic axis keyboard calibration device provided in this application are the same as those of the magnetic axis keyboard calibration method provided in the above embodiments, and other technical features of this magnetic axis keyboard calibration device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0165] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0166] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0167] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the magnetic axis keyboard calibration method in the above embodiments.

[0168] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0169] The aforementioned computer-readable storage medium may be included in the magnetic axis keyboard calibration device; or it may exist independently and not assembled into the magnetic axis keyboard calibration device.

[0170] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the magnetic axis keyboard calibration device, cause the magnetic axis keyboard calibration device to: acquire key data of different keyboards; determine the mapping relationship between key travel and voltage based on the key data; calibrate the mapping relationship to obtain a target key travel-voltage curve, thereby determining the target key travel of the key.

[0171] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0172] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0173] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0174] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described magnetic axis keyboard calibration method, which can solve the technical problem of key curve error caused by differences in the components of the magnetic axis keyboard. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the magnetic axis keyboard calibration method provided in the above embodiments, and will not be repeated here.

[0175] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the magnetic axis keyboard calibration method described above.

[0176] The computer program product provided in this application can solve the technical problem of key curve error caused by component differences in magnetic axis keyboards. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the magnetic axis keyboard calibration method provided in the above embodiments, and will not be repeated here.

[0177] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for calibrating a magnetic axis keyboard, characterized in that, The method includes: Obtain key data from different keyboards; The mapping relationship between key travel and voltage is determined based on the key data; The mapping relationship is calibrated to obtain the target key travel-voltage curve, so as to determine the target key travel of the key.

2. The method as described in claim 1, characterized in that, The step of determining the mapping relationship between key travel and voltage based on the key data includes: The voltage value of each key on the keyboard at different key travels is determined based on the key data. The key travel-voltage data pair for each key is determined based on the voltage value; Based on the key travel-voltage data, a voltage curve for each key is plotted. The voltage curve is processed to obtain the mapping relationship between key distance and voltage.

3. The method as described in claim 2, characterized in that, The step of processing the voltage curve to obtain the mapping relationship between key range and voltage includes: The starting point of the voltage curve is shifted to the origin of a two-dimensional coordinate system with the voltage value at the initial time as the origin, to obtain the updated voltage curve, wherein the two-dimensional coordinate system has time as the horizontal axis and voltage value as the vertical axis. Extract discrete data points of voltage value changes over time from the updated voltage curve; Linear fitting is performed on the discrete data points based on the least squares method to generate a linear function characterizing the mapping relationship between key range and voltage; The updated voltage curve is normalized according to the linear function to eliminate systematic errors and obtain the mapping relationship between key distance and voltage.

4. The method as described in claim 1, characterized in that, The step of calibrating the mapping relationship to obtain the target key travel-voltage curve includes: Obtain the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel of the button; The mapping relationship between key travel and voltage is calibrated based on the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel to determine the target key travel-voltage curve.

5. The method as described in claim 4, characterized in that, The step of calibrating the mapping relationship between key travel and voltage based on the actual voltage value corresponding to the first key travel and the actual voltage value corresponding to the second key travel, and determining the target key travel-voltage curve, includes: The predicted voltage value corresponding to the first keyway and the predicted voltage value corresponding to the second keyway are determined according to the mapping relationship. The first voltage difference is determined based on the actual voltage value corresponding to the first key stroke and the predicted voltage value corresponding to the first key stroke. The second voltage difference is determined based on the actual voltage value corresponding to the second key stroke and the predicted voltage value corresponding to the second key stroke. The mapping relationship between the key travel and voltage is calibrated based on the first voltage difference and the second voltage difference to determine the target key travel-voltage curve.

6. The method as described in claim 5, characterized in that, The step of calibrating the mapping relationship between the key travel and voltage based on the first voltage difference and the second voltage difference to determine the target key travel-voltage curve includes: The first voltage difference and the second voltage difference are compared with a preset error in sequence. When it is determined that the first voltage difference or the second voltage difference is greater than the preset error, the slope parameter of the linear function is increased by a first fixed value by the preset step size, and the intercept parameter of the mapping relationship is decreased by a second fixed value by the preset step size to generate adjustment parameters. The corresponding parameters of the mapping relationship are replaced by the adjustment parameters until the voltage difference of all keys is less than or equal to the preset error, at which point the target key travel-voltage curve is determined.

7. The method according to any one of claims 1 to 6, characterized in that, The step of determining the target key travel of the key includes: A mapping array is generated based on the target key travel-voltage curve; Obtain the real-time voltage value measured by the button; Traverse the mapping array to determine two adjacent voltage values ​​that correspond to the real-time voltage value; The difference between the real-time voltage value and the adjacent voltage value is obtained to determine the relative position of the real-time voltage value between the two adjacent voltage values; Linear interpolation is performed on the relative positions to obtain the target keyway corresponding to the real-time voltage value.

8. A magnetic axis keyboard calibration device, characterized in that, The magnetic axis keyboard calibration device includes: The data acquisition module is used to acquire key data from different keyboards; The data analysis module is used to determine the mapping relationship between key travel and voltage based on the key data; The calibration module is used to calibrate the mapping relationship to obtain the target key travel-voltage curve, so as to determine the target key travel of the key.

9. A magnetic axis keyboard calibration device, characterized in that, The device includes: a memory, a processor, and a magnetic axis keyboard calibration program stored in the memory and executable on the processor, the magnetic axis keyboard calibration program being configured to implement the magnetic axis keyboard calibration method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores a magnetic axis keyboard calibration program, which, when executed by a processor, implements the magnetic axis keyboard calibration method as described in any one of claims 1 to 7.