A keyboard key pressure recognition method and device based on deep learning
Through a deep learning-based method, combined with pressure sensors and keyboard structure data, the accurate analysis of the three-dimensional pressure distribution of keyboard keys and user pressing behavior is achieved, solving the problems of low pressure recognition accuracy and large error interference in the prior art, and improving the keyboard's response accuracy and user experience.
Patent Information
- Application Number
- CN202510145285.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-02-10
AI Technical Summary
The prior art is difficult to accurately reflect the three-dimensional pressure distribution of keyboard keys, and is easily affected by false touch and external interference, resulting in low pressure recognition accuracy and error interference.
Using a deep learning-based method, the initial press stroke data of the button is measured through the pressure sensor, the effective press stroke is selected, and the three-dimensional press depth recognition and press area analysis are carried out in combination with the keyboard button structure data, and the pressure distribution gradient model is constructed to optimize the contact distribution to improve the pressure recognition accuracy.
It improves the accuracy and error interference of keyboard key pressure recognition, can more accurately analyze the three-dimensional pressure distribution of keys and user pressing behavior, and improves the keyboard's response sensitivity and user experience.
Smart Images

Figure CN119598353B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning technology, and in particular to a keyboard key pressure recognition method and device based on deep learning. Background Art
[0002] Initially, pressure recognition relied on simple hardware sensors, such as resistive and piezoelectric sensors, which can detect changes in the pressure of keys, but have low accuracy and are easily affected by external interference. With the advancement of computer hardware and algorithms, sensor technology has gradually developed towards more sophisticated optical sensors, thin film sensors, etc., which can provide higher pressure resolution. At the same time, the successful application of deep learning technology in image recognition, speech recognition and other fields has promoted the transformation of pressure recognition technology. Researchers began to introduce deep learning models into the field of key pressure recognition, especially the advantages of models such as convolutional neural networks (CNN) and recurrent neural networks (RNN) in processing time series data and sensor signals, which have become key technologies. In recent years, with the accumulation of higher-performance processors and big data, the application of deep learning in keyboard key pressure recognition has become more mature. However, the current traditional methods can usually only process two-dimensional pressure data, which is difficult to accurately reflect the three-dimensional pressure distribution of keyboard keys. At the same time, keyboard keys may be accidentally touched, which leads to low accuracy and error interference in keyboard key pressure recognition. Summary of the invention
[0003] Based on this, it is necessary to provide a keyboard key pressure recognition method and device based on deep learning to solve at least one of the above technical problems.
[0004] To achieve the above object, a keyboard key pressure recognition method based on deep learning is provided, the method comprising the following steps:
[0005] Step S1: obtaining initial pressing stroke data of a single key of the keyboard; using a pressure sensor to measure the pressure of a single key corresponding to the initial pressing stroke data to obtain keyboard key pressure measurement data; using the keyboard key pressure measurement data to screen the initial pressing stroke data of a single key of the keyboard for effective keyboard pressing stroke data to obtain keyboard key pressure measurement data;
[0006] Step S2: Acquire keyboard key structure data; perform three-dimensional pressing depth recognition on keyboard key pressure measurement data according to keyboard pressing effective stroke data to generate keyboard three-dimensional pressing pressure recognition data; perform pressing area analysis on keyboard three-dimensional pressing pressure recognition data according to keyboard key structure data to generate key pressing three-dimensional area data; perform user pressing behavior analysis on key pressing three-dimensional area data to generate user pressing behavior data;
[0007] Step S3: Based on the user pressing behavior data, the three-dimensional key pressing area data is corrected for the key mis-touch pressing area to generate a valid three-dimensional pressing area; a key pressure distribution gradient model is constructed for the valid three-dimensional pressing area to generate a key pressure distribution gradient model; the valid three-dimensional pressing area is imported into the key pressure distribution gradient model to perform key pressure distribution recognition to generate key pressure distribution recognition data;
[0008] Step S4: Perform pressure point cluster analysis on the key pressure distribution recognition data to generate key three-dimensional pressure point cluster data; optimize the key contact distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data to generate key contact distribution optimization data; optimize the key pressure measurement accuracy of the keyboard key pressure measurement data based on the key contact distribution optimization data to perform the keyboard key pressure recognition operation.
[0009] The present invention measures the pressing stroke of each key by using a pressure sensor, and by screening out the effective pressing stroke, the accuracy of the measurement data can be improved, and the interference of invalid data on subsequent processing can be avoided, thereby providing a more accurate input for subsequent pressure recognition. By combining key structure data and three-dimensional pressing depth recognition, not only more comprehensive pressing data is provided, but also the pressing area and user behavior of the key can be accurately analyzed. By analyzing the pressing behavior, the pressing characteristics of different users can be identified, and support can be provided for the personalized pressure recognition model, thereby improving the recognition accuracy and adaptability. By correcting the mis-touch area, the influence of mis-pressing and unnecessary pressing is avoided, and the accuracy of key recognition is improved. The constructed pressure distribution gradient model can more accurately analyze the key pressure distribution, further enhance the recognition effect of the pressing area, and especially perform well in complex pressing modes. Through the concentrated cluster analysis of pressure points, different pressure distribution characteristics are effectively identified, and the contacts are optimized, thereby optimizing the contact distribution of the key. By improving the contact distribution, the accuracy of pressure measurement is improved, so that the final keyboard key pressure recognition operation can be more accurate and stable, avoiding the recognition error caused by uneven contacts in the traditional method. Therefore, the present invention improves the accuracy and error interference of keyboard key pressure recognition through multi-step technologies such as precise pressing stroke screening, three-dimensional pressure distribution recognition, false touch correction and contact point optimization.
[0010] Preferably, step S1 comprises the following steps:
[0011] Step S11: obtaining initial pressing stroke data of a single key on the keyboard;
[0012] Step S12: using a pressure sensor to measure the pressure of a single key corresponding to the initial pressing stroke data to obtain keyboard key pressure measurement data;
[0013] Step S13: performing data preprocessing on the keyboard key pressure measurement data to generate standard keyboard key pressure measurement data, wherein the data preprocessing includes data cleaning, data denoising, missing value filling and data standardization;
[0014] Step S14: Screening the effective keyboard pressing stroke data of the initial pressing stroke data of a single keyboard key using the standard keyboard key pressure measurement data to obtain the effective keyboard pressing stroke data.
[0015] The present invention measures the pressing of each key by a pressure sensor, and can obtain more accurate pressure data, which helps to understand the pressure distribution and changes of the keyboard under different key strokes and improve the accuracy of key response. The preprocessing work such as data cleaning, denoising, missing value filling and data standardization performed in step S13 can effectively remove noise and interference, improve the reliability and consistency of data, which is crucial for subsequent analysis, model training or parameter optimization, and can ensure the accuracy of the final result. Through the effective stroke screening in step S14, invalid or irrelevant key pressing data can be removed, and the effective stroke data that truly reflects the user's operation behavior can be retained, which not only simplifies the data set, but also helps to improve the efficiency of analysis and modeling. Through the accurate measurement of the stroke and pressure of a single key, the feedback mechanism of the key can be optimized when designing the keyboard, thereby improving the user's input comfort and responsiveness, which is of great significance to the improvement of user experience. Combined with the key stroke and pressure data, the physical characteristics of each key can be better understood, promoting the improvement of future keyboard design. Through the effective stroke screening and data analysis of different keys, personalized optimization schemes can be designed for different keys.
[0016] Preferably, step S14 includes the following steps:
[0017] Step S141: aligning the initial pressing stroke data of a single keyboard key with the pressing position timestamp using the standard keyboard key pressure measurement data to generate a keyboard pressing pressure-stroke data pair; constructing a curve based on the keyboard pressing pressure-stroke data pair to obtain a keyboard pressure-stroke curve;
[0018] Step S142: using the keyboard pressure-stroke curve to perform keyboard trigger feedback judgment on the key, when the keyboard trigger feedback judgment result is empty, the corresponding keyboard pressure-stroke curve is segmented into invalid pressing curve segments to generate a keyboard effective pressure-stroke curve;
[0019] Step S143: performing data matching on the initial pressing stroke data of a single key of the keyboard based on the keyboard effective pressure-stroke curve, thereby generating keyboard pressing effective stroke data.
[0020] The present invention ensures the synchronization of pressure data and stroke data by aligning the pressing position timestamp of the standard keyboard key pressure measurement data with the initial pressing stroke data, and forms an accurate keyboard pressing pressure-stroke data pair. This process can accurately reflect the pressing process of each key, thereby constructing a fine keyboard pressure-stroke curve, and providing a more scientific and real pressing feedback model. On the basis of key trigger feedback discrimination, invalid pressing data is screened out by judging whether the keyboard trigger feedback is effective. If it is detected that the key does not trigger effective feedback, the invalid pressing curve segment will be automatically identified and segmented. This step not only improves the quality of the data, but also removes irrelevant or false pressing information, avoiding the interference of invalid data on the analysis results. The effective pressure-stroke curve is matched with the initial pressing stroke data to generate the final keyboard pressing effective stroke data. This process ensures that the data finally obtained only reflects the truly effective pressing stroke, avoiding excessive or invalid pressing data interference, which makes the analysis of keyboard pressing behavior more accurate and further improves the sensitivity and feedback effect of the input device. Through accurate processing of pressure and travel data, it is possible to identify and feedback each keystroke of the user in real time, reduce misoperation or unnecessary triggering, and thus improve the user experience. Especially in high-precision input scenarios, this optimization can significantly improve the response speed and accuracy of the device, especially in games, design or professional work, the accuracy of user input is crucial, and the generated keyboard effective pressure-travel curve provides an important basis for subsequent product design optimization. Through in-depth analysis of the data, engineers can understand the actual performance of each key and further improve the keyboard structure, key feedback mechanical characteristics and trigger response.
[0021] Preferably, step S2 comprises the following steps:
[0022] Step S21: Obtain keyboard key structure data;
[0023] Step S22: performing two-dimensional pressing pressure recognition on the keyboard key pressure measurement data according to the keyboard pressing effective stroke data to generate keyboard two-dimensional pressing pressure recognition data;
[0024] Step S23: performing three-dimensional pressing depth recognition on the two-dimensional keyboard pressing pressure recognition data through the keyboard key structure data to generate the three-dimensional keyboard pressing pressure recognition data;
[0025] Step S24: performing a pressing area analysis on the keyboard three-dimensional pressing pressure recognition data to generate key pressing three-dimensional area data; performing a user pressing behavior analysis on the key pressing three-dimensional area data to generate user pressing behavior data.
[0026] The present invention provides a basis for subsequent pressure identification and analysis by acquiring the structural data of keyboard keys. Understanding the structural characteristics of each key (such as shape, size, material, etc.) is the key to ensuring the accuracy of pressure identification and behavior analysis, which provides structural information for subsequent analysis and helps to generate three-dimensional identification data that conforms to the actual situation. The keyboard key pressure is two-dimensionally identified by using the keyboard pressing effective stroke data, and the keyboard two-dimensional pressing pressure identification data is generated. In this way, the pressure change of the key under different pressing strokes can be captured more accurately, which not only helps to identify the user's pressing intensity, but also can distinguish different degrees of pressing actions in practical applications, such as light touch and heavy press, thereby improving the meticulousness of keyboard feedback. The keyboard key structure data is further used to perform three-dimensional pressing depth identification to generate keyboard three-dimensional pressing pressure identification data. The introduction of three-dimensional identification makes the capture of the pressing process more three-dimensional and comprehensive. Through three-dimensional data, the pressure distribution of the key at different depths can be better understood, especially for some keys with high pressure sensitivity (such as mechanical keyboards). This step can more accurately simulate and feedback the user's actual input behavior. Performing a pressing area analysis on the three-dimensional pressing pressure recognition data to generate three-dimensional key pressing area data, this step can analyze the pressure changes in different areas of the key surface during the pressing process, identify in which areas the user presses and the distribution of force, this regional pressure analysis can further optimize the key design and improve the user's comfort, especially during long-term input, it can reduce excessive pressure in certain areas and avoid fatigue. By analyzing the user's pressing behavior based on the three-dimensional pressing area data, step S24 finally generates the user's pressing behavior data, which can not only help engineers understand the user's input habits, but also provide data support for the personalized adjustment and optimization of the keyboard. For example, according to the frequency, intensity and regional characteristics of the user's pressing, the feedback strength, key response distance, etc. of the keyboard are adjusted to provide an input experience that better meets user needs.
[0027] Preferably, step S23 includes the following steps:
[0028] Step S231: extracting key geometric parameters of the keys from the keyboard key structure data, obtaining key geometric parameters of the keys, and performing key deformation relationship mapping based on the key geometric parameters to generate a key deformation mathematical model, wherein the formula for key deformation relationship mapping is as follows:
[0029] ;
[0030] In the formula, Expressed as the key shape variable, Expressed as pressure, Expressed as the spring stiffness coefficient;
[0031] Step S232: calibrating the key center pressure value of the keyboard two-dimensional pressing pressure recognition data to generate the key center pressure value; calculating the pressing depth of the key center pressure value using the key deformation mathematical model to obtain the key pressing depth data;
[0032] Step S233: converting the key pressing depth data and the keyboard two-dimensional pressing pressure recognition data into three-dimensional data points to generate the keyboard three-dimensional pressing pressure recognition data.
[0033] The present invention obtains geometric characteristics such as the shape and size of the key by extracting key geometric parameters from the keyboard key structure data, and performs key deformation relationship mapping based on these characteristics. This mapping can accurately reflect the deformation of the key under different pressures, thereby constructing a key deformation mathematical model. The formula d=F / k (where d is the key deformation, F is the pressure, and kkk is the spring stiffness coefficient) further reveals the elastic response of the key and can accurately describe the degree of deformation of the key when it is subjected to external force. This process ensures that the subsequent calculation of the pressing depth and its response to the user input are more real and reliable. Based on the key deformation mathematical model, the pressing depth is calculated using the key center pressure value to generate the key pressing depth data. Through this method, the actual pressing depth of the key can be accurately calculated based on the pressure value of each press and the geometric characteristics of the key, avoiding the traditional simple calculation method that can only rely on the key position. The pressing depth data will better reflect the actual movement of the key when it is subjected to pressure, which is helpful to further analyze the user's input behavior. The three-dimensional data points are converted by key pressing depth data and two-dimensional pressing pressure recognition data, and finally the three-dimensional keyboard pressing pressure recognition data is generated. This step combines the two-dimensional pressure data with the pressing depth, expands the dimension of the data, and provides richer and more three-dimensional information for each press. This three-dimensional data can not only more accurately describe the pressure response of the key, but also provide more detailed feedback for user input, which is especially important when simulating the real feedback of the key. By accurately calculating the deformation and pressing depth of the key, more delicate key feedback can be obtained. This improvement in accuracy makes the response of the key when pressed with different forces more in line with the user's expectations, especially in high-precision input scenarios (such as typing, games, design and other applications). It can provide instant feedback based on the strength and depth of each press, thereby improving the user's operation perception and experience.
[0034] Preferably, performing user pressing behavior analysis on the key pressing three-dimensional area data includes:
[0035] Extracting the key pressing feature from the key pressing three-dimensional area data to obtain the basic pressing feature, wherein the basic pressing feature includes the average key pressing pressure and the average pressing depth;
[0036] Extract spatial distribution features of the key pressing three-dimensional area data to obtain pressing center offset data; extract pressing dynamic features of the key pressing three-dimensional area data to obtain pressing rate data;
[0037] The user behavior characteristics are quantified for the average key pressure, the average pressing depth, the pressing center offset data, and the pressing rate data to generate a user behavior characteristic quantification value, wherein the formula for the user behavior characteristic quantification is as follows:
[0038] ;
[0039] In the formula, It is expressed as the quantitative value of user behavior characteristics. Expressed as key pressure feature weight, Expressed as the pressed depth feature weight, Expressed as the pressing center offset feature weight, Expressed as the pressing rate feature weight, Expressed as the average key pressure, Expressed as the maximum value of the key pressure, It is expressed as the minimum value of the key pressure. Expressed as the mean compression depth, It is expressed as the minimum value of compression depth. Expressed as the maximum value of compression depth, Expressed as the pressing center offset value, It is expressed as the minimum value of the pressing center offset. Expressed as the maximum value of the pressing center offset, Expressed as compression rate, Expressed as the minimum value of the compression rate, Expressed as the maximum value of compression rate;
[0040] The user behavior feature quantification value is compared with the preset standard behavior feature threshold range. When the user behavior feature quantification value is less than the preset standard behavior feature threshold range, the user's gentle pressing behavior label data is generated; when the user behavior feature quantification value is within the preset standard behavior feature threshold range, the user's robust pressing behavior label data is generated; when the user behavior feature quantification value is greater than the preset standard behavior feature threshold range, the user's dynamic pressing behavior label data is generated;
[0041] The user pressing behavior data is generated by performing a user pressing behavior analysis on the key pressing three-dimensional area data through the user's soft pressing behavior label data, the user's steady pressing behavior label data and the user's dynamic pressing behavior label data.
[0042] The present invention can fully understand all aspects of the user's pressing behavior by extracting pressing features, spatial distribution features and dynamic features from the three-dimensional area data of key pressing. Specifically, the extraction of pressing features (such as average key pressure and average pressing depth) provides a basic quantification of pressing force and pressing depth, reflecting the user's input intensity and depth preference. By analyzing the changes in the pressing position, it is possible to identify whether the user is accustomed to pressing a specific area, thereby further understanding the regularity and preference of their input behavior. Dynamic feature extraction (such as pressing rate data) reveals the speed and rhythm of the user's pressing, and can identify the difference between fast input or slower and gentle input, providing data support for optimizing keyboard response. The user's pressing behavior in multiple dimensions such as basic features, spatial features, and dynamic features is quantified through formulas to obtain a comprehensive user behavior feature quantification value. , the core advantage of this quantification method is that it not only considers the pressing force and depth, but also includes the pressing rate and spatial distribution, which can accurately capture the user's input habits in different scenarios, especially suitable for scenarios with high precision or personalized needs. By standardizing each feature value, the pressing behavior of different users can be compared under the same standard, ensuring the uniformity and fairness of the feature quantification value, and avoiding the deviation caused by behavioral differences between different individuals. According to the comparison between the user's behavior feature quantification value and the preset standard behavior feature threshold range, the step can generate a corresponding pressing behavior label (gentle, robust or dynamic) for each user. By comprehensively analyzing the user's pressing behavior, rich data support can be provided for subsequent keyboard design optimization. The generation of pressing behavior labels can help discover some potential hardware problems early. For example, if a user's pressing behavior suddenly changes from robust to soft, it indicates that the response sensitivity of a certain part of the keyboard has changed. By tracking these changes, potential problems of the device can be identified more quickly and repaired in time, thereby extending the service life of the product.
[0043] Preferably, step S3 comprises the following steps:
[0044] Step S31: performing key mis-touch detection on the key pressing three-dimensional area data based on the user pressing behavior data to generate key mis-touch detection data; performing effective pressing area correction on the key pressing three-dimensional area data based on the key mis-touch detection data to generate an effective three-dimensional pressing area;
[0045] Step S32: extracting effective pressing pressure features from the effective three-dimensional pressing area to obtain effective pressing pressure feature data; dividing the effective pressing pressure feature data into data sets to generate a model training set and a model test set;
[0046] Step S33: training the model training set by a convolutional neural network algorithm to generate a key pressure distribution gradient pre-model; optimizing and iterating the key pressure distribution gradient pre-model by using the model test set to generate a key pressure distribution gradient model;
[0047] Step S34: importing the effective three-dimensional pressing area into the key pressure distribution gradient model to perform key pressure distribution recognition and generate key pressure distribution recognition data.
[0048] The present invention can identify and remove invalid or mis-touched pressing areas by performing mis-touch detection on user pressing behavior data, reduce data interference caused by misoperation, which makes the response of keyboard input more accurate and helps to avoid the influence of invalid pressing areas on key functions. After mis-touch detection, the correction of the effective pressing area is performed, and the effective area of the key can be accurately defined. The correction of the effective pressing area can ensure that the response is triggered only in the actual pressing area, reduce the overflow of the key area or unnecessary misoperation, and improve the reliability of user input. By extracting the pressure feature of the effective three-dimensional pressing area, the force, depth and distribution characteristics of the key pressing can be captured in detail. These data not only provide the basic situation of pressing, but also further describe the distribution of key pressure in different areas, which helps to fully understand the complexity of user input behavior. The division of the effective pressing pressure feature data into training sets and test sets ensures the scientific nature of model training and evaluation. This process enables the subsequent machine learning model to fully learn the diversity of data, and avoid overfitting during testing, thereby improving the generalization ability of the model. The model training set is trained through a convolutional neural network (CNN), which uses its powerful feature extraction and spatial correlation learning capabilities to automatically capture the complex patterns of key pressure distribution. CNN can effectively process two-dimensional or three-dimensional pressure distribution images, thereby accurately identifying the changes in pressure gradients under different pressing conditions. The model is optimized and iterated through the model test set, so that the key pressure distribution gradient model gradually approaches the optimal solution, providing more accurate key pressure distribution recognition. The optimization process can continuously adjust the weights and biases during training and testing, ultimately ensuring that the model has high prediction accuracy and robustness. Importing the effective three-dimensional pressing area into the key pressure distribution gradient model for identification can accurately predict the pressure distribution of each key, which is particularly important for refined input and high-precision operation, especially in professional application scenarios (such as games, design, programming, etc.), it can accurately capture the pressure pattern of the user's pressing to ensure that each press can produce ideal feedback.
[0049] Preferably, performing button false touch detection on button pressing three-dimensional area data based on user pressing behavior data includes:
[0050] Based on the user's pressing behavior data, the three-dimensional area data of the key pressing is collected to obtain the key pressure timing data; the threshold value is set for the key pressure timing data to generate the key pressure threshold data; the rising time mode analysis is performed on the key pressure timing data to generate the pressure rising time data; the peak duration analysis is performed on the key pressure timing data to generate the pressure peak duration data;
[0051] The pressure time pattern analysis rules are defined for the pressure rise time data and the pressure peak duration data through the key pressure threshold data to generate standard data for false touch detection; the key pressure timing data is used to perform adjacent key false touch detection to generate key false touch detection data.
[0052] The present invention can record the pressure changes at each time point in the pressing process in detail and generate high-precision key pressure timing data by collecting the key pressing three-dimensional area data, which provides more detailed data support for subsequent analysis and helps to better understand the user's pressing behavior. The time and pressure change information captured by the pressing timing data can reveal the key time points in the pressing process (such as the start of pressing, reaching maximum pressure, relaxation, etc.). Through this data collection method, the key response and behavior can be analyzed and optimized more comprehensively. By setting the threshold of the key pressure timing data and generating the key pressure threshold data, normal pressing and false touching can be effectively distinguished. Setting a reasonable threshold can help distinguish between small false touching pressure changes and real key responses, so as to accurately identify false touching events. When the pressing does not reach the effective threshold, it can be timely determined as a false touch, avoiding the wrong input or response caused by invalid pressing, thereby reducing the impact of false touching and optimizing the input experience of the keyboard. The pressure rise time pattern analysis in the step can reveal the time difference between the start of pressing and the peak pressure, and generate pressure rise time data. This information plays an important role in analyzing the speed and strength of the user's pressing behavior, and helps to determine whether the user has the possibility of misoperation or mistouch. Pressure rise time data helps to further understand the way the user presses. For example, a longer rise time means that the user's pressing force is light, or the user does not fully press the key; while a shorter rise time means a more rapid or strong press. Through this analysis, the user's pressing behavior can be accurately modeled and the key response strategy can be optimized. Pressure peak duration analysis helps to identify the time the key maintains this state after reaching maximum pressure, and generates pressure peak duration data. A longer peak duration indicates that the user continues to press the key, while a short peak duration means a mistouch or a light press. Through this analysis, the false touch detection criteria can be further refined to ensure accurate identification of false touches.
[0053] Preferably, step S4 comprises the following steps:
[0054] Step S41: Visualizing the key pressure distribution recognition data to generate a three-dimensional key pressure distribution map; performing pressure point cluster analysis on the key three-dimensional pressure distribution map to generate key three-dimensional pressure point cluster data;
[0055] Step S42: Optimize the key contact distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data, so as to generate key contact distribution optimization data; optimize the key pressure measurement accuracy of the keyboard key pressure measurement data based on the key contact distribution optimization data, so as to perform the keyboard key pressure recognition operation.
[0056] The present invention generates a three-dimensional pressure distribution map of the key by visualizing the distribution of key pressure distribution recognition data. This visualized image provides an intuitive key pressure situation, allowing users to intuitively see the pressure distribution state of each key, helping to perform accurate analysis and optimization. The three-dimensional pressure distribution map can accurately identify the area with higher pressure on the key (pressure point concentration area), and this information is very valuable for further analysis of key design, usage frequency and optimization design. The three-dimensional pressure distribution map of the key is subjected to pressure point concentration cluster analysis to generate three-dimensional pressure point cluster data of the key. This analysis result can reveal which areas have uneven pressure distribution and which areas are under too much or too little pressure, thereby providing data support for subsequent key design and helping to accurately locate the pressure concentration area. Through cluster analysis, the problem areas in the pressure distribution can be identified and optimized, and the problems of false touch or system response errors caused by excessive concentrated pressure can be reduced, ensuring that each key area can work normally within the appropriate pressure range. Based on the key three-dimensional pressure point cluster data, the contact point distribution of the keyboard key structure is optimized, which can effectively improve the touch and response effect of the key, make the key design more ergonomic, and enhance the user input experience. Optimizing the contact point distribution helps ensure that the keys respond quickly and accurately under different pressures, avoiding input delays or unstable responses caused by excessive or uneven pressure, thereby improving overall input performance. By optimizing the keyboard key pressure measurement data, the accuracy of key pressure recognition can be significantly improved, which ensures that the key pressure recognition process is more accurate, avoids misoperation or erroneous feedback caused by measurement errors, and improves the stability and accuracy of the entire input system.
[0057] In this specification, a keyboard key pressure recognition device based on deep learning is provided, which is used to execute the above-mentioned keyboard key pressure recognition method based on deep learning. The keyboard key pressure recognition device based on deep learning includes:
[0058] The pressing stroke analysis module is used to obtain the initial pressing stroke data of a single key on the keyboard; use the pressure sensor to measure the pressure of the single key corresponding to the initial pressing stroke data to obtain the keyboard key pressure measurement data; use the keyboard key pressure measurement data to screen the initial pressing stroke data of a single key on the keyboard for the effective keyboard pressing stroke to obtain the keyboard effective pressing stroke data;
[0059] The three-dimensional pressing modeling module is used to obtain keyboard key structure data; perform three-dimensional pressing depth recognition on keyboard key pressure measurement data according to keyboard pressing effective stroke data to generate keyboard three-dimensional pressing pressure recognition data; perform pressing area analysis on keyboard three-dimensional pressing pressure recognition data through keyboard key structure data to generate key pressing three-dimensional area data; perform user pressing behavior analysis on key pressing three-dimensional area data to generate user pressing behavior data;
[0060] A pressure distribution recognition module is used to correct the key mis-touch pressing area of the key pressing three-dimensional area data based on the user's pressing behavior data to generate a valid three-dimensional pressing area; construct a key pressure distribution gradient model for the valid three-dimensional pressing area to generate a key pressure distribution gradient model; import the valid three-dimensional pressing area into the key pressure distribution gradient model to perform key pressure distribution recognition and generate key pressure distribution recognition data;
[0061] The contact point optimization module is used to perform pressure point cluster analysis on the key pressure distribution recognition data to generate key three-dimensional pressure point cluster data; optimize the key contact point distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data to generate key contact point distribution optimization data; optimize the key pressure measurement accuracy of the keyboard key pressure measurement data based on the key contact point distribution optimization data to perform keyboard key pressure recognition operations.
[0062] The beneficial effect of the present invention is that by combining the pressure sensor to measure the pressure of the key, the pressing stroke of each key can be analyzed with high precision, and effective pressing stroke data can be screened out. This process helps to accurately identify the user's key operation and provide accurate data for subsequent user behavior analysis and keyboard performance optimization. Through three-dimensional pressing depth recognition and pressing area analysis, the system can describe the pressing mode and regional distribution of each key in detail, thereby laying the foundation for further contact optimization and pressure distribution analysis. This process ensures a comprehensive understanding of the key structure and user pressing behavior. Through the analysis of the three-dimensional regional data of key pressing, the user's pressing behavior data can be extracted to help identify the usage habits and needs of different users, which provides a scientific basis for personalized key feedback, comfort optimization and user experience improvement. Based on the user's pressing behavior data and the correction of the pressing area, the system can create an accurate key pressure distribution gradient model and identify the pressure distribution characteristics of the key. This process helps to better understand the distribution changes of key pressure during the pressing process and provide data support for subsequent contact optimization and design improvements. By analyzing the pressure point cluster data, it is possible to accurately identify the concentrated area of pressure distribution on the key, and then optimize the contact distribution of the keyboard key. This optimization can significantly improve the response sensitivity and accuracy of the key, and reduce the situation of false touch and non-triggering. Based on the optimized key contact distribution, the system can optimize the keyboard key pressure measurement accuracy, significantly improve the accuracy and consistency of key pressure recognition, which provides better support for high-precision input and complex operations (such as games, programming, etc.) of the keyboard. By analyzing the user's pressing behavior and identifying the pressure distribution, the system can provide personalized key feedback and operation modes for different users, optimize the user experience, and improve comfort and response speed. Therefore, the present invention improves the accuracy and error interference of keyboard key pressure recognition through multi-step technologies such as precise pressing stroke screening, three-dimensional pressure distribution recognition, false touch correction and contact optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A schematic diagram of the steps of a keyboard key pressure recognition method based on deep learning;
[0064] Figure 2 for Figure 1 Detailed implementation steps of step S2 in the flowchart;
[0065] Figure 3 for Figure 1 Detailed implementation steps of step S3 in FIG.
[0066] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0067] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0068] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.
[0069] It should be understood that although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, and the term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0070] To achieve this, please refer to Figures 1 to 3 , a keyboard key pressure recognition method based on deep learning, the method comprising the following steps:
[0071] Step S1: obtaining initial pressing stroke data of a single key of the keyboard; using a pressure sensor to measure the pressure of a single key corresponding to the initial pressing stroke data to obtain keyboard key pressure measurement data; using the keyboard key pressure measurement data to screen the initial pressing stroke data of a single key of the keyboard for effective keyboard pressing stroke data to obtain keyboard key pressure measurement data;
[0072] Step S2: Acquire keyboard key structure data; perform three-dimensional pressing depth recognition on keyboard key pressure measurement data according to keyboard pressing effective stroke data to generate keyboard three-dimensional pressing pressure recognition data; perform pressing area analysis on keyboard three-dimensional pressing pressure recognition data according to keyboard key structure data to generate key pressing three-dimensional area data; perform user pressing behavior analysis on key pressing three-dimensional area data to generate user pressing behavior data;
[0073] Step S3: Based on the user pressing behavior data, the three-dimensional key pressing area data is corrected for the key mis-touch pressing area to generate a valid three-dimensional pressing area; a key pressure distribution gradient model is constructed for the valid three-dimensional pressing area to generate a key pressure distribution gradient model; the valid three-dimensional pressing area is imported into the key pressure distribution gradient model to perform key pressure distribution recognition to generate key pressure distribution recognition data;
[0074] Step S4: Perform pressure point cluster analysis on the key pressure distribution recognition data to generate key three-dimensional pressure point cluster data; optimize the key contact distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data to generate key contact distribution optimization data; optimize the key pressure measurement accuracy of the keyboard key pressure measurement data based on the key contact distribution optimization data to perform the keyboard key pressure recognition operation.
[0075] The present invention measures the pressing stroke of each key by using a pressure sensor, and by screening out the effective pressing stroke, the accuracy of the measurement data can be improved, and the interference of invalid data on subsequent processing can be avoided, thereby providing a more accurate input for subsequent pressure recognition. By combining key structure data and three-dimensional pressing depth recognition, not only more comprehensive pressing data is provided, but also the pressing area and user behavior of the key can be accurately analyzed. By analyzing the pressing behavior, the pressing characteristics of different users can be identified, and support can be provided for the personalized pressure recognition model, thereby improving the recognition accuracy and adaptability. By correcting the mis-touch area, the influence of mis-pressing and unnecessary pressing is avoided, and the accuracy of key recognition is improved. The constructed pressure distribution gradient model can more accurately analyze the key pressure distribution, further enhance the recognition effect of the pressing area, and especially perform well in complex pressing modes. Through the concentrated cluster analysis of pressure points, different pressure distribution characteristics are effectively identified, and the contacts are optimized, thereby optimizing the contact distribution of the key. By improving the contact distribution, the accuracy of pressure measurement is improved, so that the final keyboard key pressure recognition operation can be more accurate and stable, avoiding the recognition error caused by uneven contacts in the traditional method. Therefore, the present invention improves the accuracy and error interference of keyboard key pressure recognition through multi-step technologies such as precise pressing stroke screening, three-dimensional pressure distribution recognition, false touch correction and contact point optimization.
[0076] In the embodiment of the present invention, reference Figure 1 The above is a schematic diagram of the steps of a keyboard key pressure recognition method based on deep learning of the present invention. In this example, the keyboard key pressure recognition method based on deep learning includes the following steps:
[0077] Step S1: obtaining initial pressing stroke data of a single key of the keyboard; using a pressure sensor to measure the pressure of a single key corresponding to the initial pressing stroke data to obtain keyboard key pressure measurement data; using the keyboard key pressure measurement data to screen the initial pressing stroke data of a single key of the keyboard for effective keyboard pressing stroke data to obtain keyboard key pressure measurement data;
[0078] In the embodiment of the present invention, by selecting a pressure sensor and a stroke sensor with high sensitivity, the pressure sensor should generally have a high resolution so as to accurately measure the pressing stroke of the key. The pressure sensor is connected to the bottom of the key so that it can capture the pressure changes during the pressing process in real time. At the same time, the stroke sensor is used to monitor the initial pressing stroke of the key, that is, the motion trajectory and stroke length of the key from never being pressed to being fully pressed. The stroke data in the process is recorded by the data acquisition system to generate an initial pressing stroke data set. The pressure sensor is installed to accurately measure the pressure generated by a single key during the pressing process. The sensor should have a wide measurement range and good linear response to ensure accurate measurement. As the key is pressed, the pressure sensor will capture the pressure value at each moment in the pressing process and generate a pressure measurement data set. The data set will include real-time pressure values at different pressing depths. According to the actual usage scenario and technical requirements, the standard of "effective pressing stroke" is set. For example, the effective stroke can be defined as starting from the initial trigger position of the key until the operational feedback generated after the key reaches a sufficient pressure level. It can be considered that the pressure change generated by the pressing is greater than a certain threshold (for example, the pressure sensed by the sensor starts from 0 to exceed a set critical value). Use an algorithm to filter out invalid key stroke data due to incomplete key contact or external disturbance. Valid stroke data refers to key stroke data within a preset pressure threshold range. The valid key stroke range can be determined by calculating the relationship between the key pressure value and its corresponding stroke position. Based on the screening criteria for valid key stroke, the screened key stroke data is combined with the corresponding pressure measurement data to finally obtain the "keyboard key stroke valid stroke data".
[0079] Step S2: Acquire keyboard key structure data; perform three-dimensional pressing depth recognition on keyboard key pressure measurement data according to keyboard pressing effective stroke data to generate keyboard three-dimensional pressing pressure recognition data; perform pressing area analysis on keyboard three-dimensional pressing pressure recognition data according to keyboard key structure data to generate key pressing three-dimensional area data; perform user pressing behavior analysis on key pressing three-dimensional area data to generate user pressing behavior data;
[0080] In an embodiment of the present invention, by obtaining the detailed structural data of the keyboard, including the size, shape, spring characteristics, contact surface shape, etc. of each key, this information is usually obtained through a CAD (computer-aided design) model or through 3D scanning technology. The keyboard is scanned using a three-dimensional laser scanner or a structured light scanner to generate a three-dimensional model of the keyboard. This method can accurately obtain the geometric structure of each key and the spatial relationship between the key and the chassis. If CAD software (such as SolidWorks or AutoCAD) is used when designing the keyboard, the key structure data can be directly extracted from the design file to obtain the size, shape and other related parameters of each key. It is necessary to understand the material of the key and the hardness of the spring, which affect the reaction and feedback of the key. Using the obtained "keyboard press effective stroke data" and "keyboard key pressure measurement data", we can establish a mathematical model of press depth and pressure through deep learning or polynomial regression model. Different pressure values can be mapped to the depth of the key through the model. According to this model, the pressure data of each key is three-dimensionally identified to obtain the precise depth corresponding to each key during the pressing process. Based on the structural data and the effective press stroke data of the keyboard, the three-dimensional depth corresponding to each pressure point of the key is calculated. Through the mapping relationship between pressure and depth, the three-dimensional pressing pressure recognition data of each key at different pressure points is generated. According to the geometric shape of the key (such as ellipse, circle, etc.), the key surface is divided into multiple areas (such as center area, edge area, etc.). According to the geometric shape of the key (such as ellipse, circle, etc.), the key surface is divided into multiple areas (such as center area, edge area, etc.). Based on the shape and pressure distribution of each key, the key surface is divided into three-dimensional areas. The finite element analysis method can be used to simulate the deformation of the key at different pressing depths to further divide the pressing area. The identified three-dimensional pressing pressure data is combined with the key structure to analyze the pressure distribution in different areas, determine which areas are subjected to greater or less force during the pressing process, and generate key pressing three-dimensional area data. For example, the pressure product of each area (i.e., the product of pressure and area) can be calculated to determine the pressure level of the area. By analyzing the pressing pattern of the user when using the keyboard, multiple behavioral features can be extracted. For example, in which areas do users usually press more (such as the center of the keyboard or a specific key position), the depth distribution of the pressing, the frequency and duration of the pressing, etc. Use machine learning or statistical analysis methods (such as cluster analysis, principal component analysis, etc.) to analyze each user's pressing behavior. The analysis results can reveal the user's pressing habits, such as whether they prefer deep or shallow pressing, whether they often use specific keys, etc. Use the user's pressing data (such as three-dimensional area data, pressing depth, pressure, etc.) to train the model to identify and predict the pressing behavior of different users. Ultimately, through behavioral analysis, an analysis report or data set about the user's pressing habits can be generated.The data set includes user pressing frequency, pressing area preference, pressing force preference, etc.
[0081] Step S3: Based on the user pressing behavior data, the three-dimensional key pressing area data is corrected for the key mis-touch pressing area to generate a valid three-dimensional pressing area; a key pressure distribution gradient model is constructed for the valid three-dimensional pressing area to generate a key pressure distribution gradient model; the valid three-dimensional pressing area is imported into the key pressure distribution gradient model to perform key pressure distribution recognition to generate key pressure distribution recognition data;
[0082] In an embodiment of the present invention, the user's pressing behavior data is analyzed in detail to identify which pressing areas are mis-touched or invalid. The mis-touched area is caused by unintentional or unnecessary pressing by the user during the operation, usually due to excessive pressing, too light pressing or deviation of the pressing position. These mis-touched areas are identified according to the user's pressing habits and data deviations through statistical analysis or machine learning algorithms (such as outlier detection, cluster analysis, etc.). Mis-touched areas are generally those that are frequently pressed in areas other than the target keys, or the pressing data with too shallow or too deep depth. Based on these identified mis-touched areas, a correction mechanism can be designed to filter by removing the pressing data of these mis-touched areas. For example, a reasonable range of pressing force and pressing position is set, and only data that meets these standards is retained as valid data. After the mis-touched area is corrected, the retained area is the "valid three-dimensional pressing area", that is, the area where the user presses effectively and frequently in normal operation. The valid three-dimensional pressing area data (including information such as the pressure value, pressing depth, pressing frequency, etc. of each valid area) is input into the process of constructing the gradient model. Based on the effective three-dimensional pressing area data, the pressure distribution gradient of different areas is calculated by mathematical modeling methods (such as gradient descent method or fitting algorithm). The pressure distribution gradient model can reflect the pressure change trend of different pressing areas. Using common multivariate regression models or decision tree regression methods in machine learning, combined with pressure values and pressing position data, a gradient model for predicting the pressure distribution of the pressing area is generated. The structure of the key can be further simulated using simulation methods such as finite element analysis (FEA) to estimate the gradient changes of pressure distribution on the surface and inside of the key under different pressing depths. According to the pressing position and pressure value, the pressure gradient in each area is calculated, and the changing trend of pressure distribution is presented by visualization means to generate a key pressure distribution gradient model. This model can predict the pressure distribution of each area of the key under various pressing conditions. The corrected effective three-dimensional pressing area data is input into the key pressure distribution gradient model constructed previously. The purpose of this stage is to combine the pressing data of the effective area with the pressure distribution model to identify the actual pressure distribution. Area and gradient matching: According to the pressing depth and pressure value in the effective area, the gradient model is applied to predict the pressure distribution of the area under different pressing conditions. For example, if the pressure in a certain area is too high, the pressure gradient model predicts that the pressure value in that area will increase or decrease rapidly, thereby determining whether the area is over-pressed. Based on the input data (valid area and pressure distribution gradient model), the model calculates and predicts the pressure distribution of each valid area and generates key pressure distribution recognition data: the data includes the pressure gradient of each valid area, the pressure intensity and distribution within the area, and the pressure characteristics of the entire key.Data output: The key pressure distribution recognition data can be displayed in a visual form, such as heat map, pressure curve, etc., or saved as a data set for further analysis.
[0083] Step S4: Perform pressure point cluster analysis on the key pressure distribution recognition data to generate key three-dimensional pressure point cluster data; optimize the key contact distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data to generate key contact distribution optimization data; optimize the key pressure measurement accuracy of the keyboard key pressure measurement data based on the key contact distribution optimization data to perform the keyboard key pressure recognition operation.
[0084] In an embodiment of the present invention, the key pressure distribution identification data obtained from step S3 includes the pressure value of each key in different areas and its corresponding spatial position (usually the three-dimensional coordinates of the key surface), and these data will be used as the input of cluster analysis. Use clustering algorithms, such as K-means clustering, DBSCAN (density-based clustering) or mean shift algorithm to perform pressure point concentration cluster analysis. Through these algorithms, the surface pressure points of each key can be grouped according to their similarity to form a pressure point cluster. Each cluster represents an area with similar pressure distribution characteristics in a specific area on the key surface. Select a predetermined number of clusters, divide the pressure points into different groups, and calculate the center point of each cluster (i.e., the location where the pressure is concentrated). If there is no predefined number of pressure points, the DBSCAN algorithm can be used to determine which points belong to the same cluster based on the density to adapt to local changes in pressure distribution. The result after cluster analysis will be the cluster information of the pressure points on the key surface, including data such as the location, size and pressure intensity of each cluster. This data will form "key three-dimensional pressure point cluster data", which describes the pressure concentration in different areas on the key surface. Through the cluster analysis results, it can be seen which areas have more concentrated pressure and which areas have more dispersed pressure. Based on this information, the goal is to optimize the layout of the key contacts so that the key contacts are more evenly distributed, the pressing feeling is more comfortable, and the pressing behavior of the user can be reflected more accurately. Optimization algorithms such as genetic algorithms and particle swarm optimization (PSO) can be used to optimize the key structure based on the key three-dimensional pressure point cluster data. The goal of the optimization is to distribute the key contacts in the area where the pressure points are concentrated, so as to improve the accuracy and comfort of the key response. Based on the cluster analysis results, the algorithm will adjust the actual position of the key contacts to make them more suitable for the user's pressing area. In particular, for those cluster areas that are often subjected to greater pressure, the contacts can be placed in the center of the area to optimize the pressing response. This process will generate a new key contact distribution scheme (i.e., "key contact distribution optimization data"), which contains the new position and distribution of the key contacts. The optimization of the contacts will better respond to the user's pressing needs and provide more accurate pressure perception. Through the optimized key contact distribution, the measurement accuracy of the pressure sensor can be improved, so that each contact can more accurately reflect the pressure changes of the key during the actual pressing process and reduce errors. The key contact distribution optimization data is used to optimize the accuracy of the original pressure sensor system. This can be achieved by modifying the sensor position, improving the sensor resolution, or adjusting the sensor response curve. The pressure sensor is calibrated for the optimized contact distribution to ensure that the sensor can accurately measure the pressure value at the new contact position. A series of pressure tests can be performed using a calibration board or standard test tools to verify the optimized measurement accuracy.By optimizing the pressure measurement accuracy, we ensure that the pressure changes of the keys in actual use can be accurately captured, providing accurate pressure recognition data to support subsequent keyboard key pressure recognition operations. The optimized sensor system will be able to more accurately capture each user's press behavior and generate accurate key pressure recognition data, which provides a higher guarantee for the keyboard's response speed, accuracy and user experience.
[0085] Preferably, step S1 comprises the following steps:
[0086] Step S11: obtaining initial pressing stroke data of a single key on the keyboard;
[0087] Step S12: using a pressure sensor to measure the pressure of a single key corresponding to the initial pressing stroke data to obtain keyboard key pressure measurement data;
[0088] Step S13: performing data preprocessing on the keyboard key pressure measurement data to generate standard keyboard key pressure measurement data, wherein the data preprocessing includes data cleaning, data denoising, missing value filling and data standardization;
[0089] Step S14: Screening the effective keyboard pressing stroke data of the initial pressing stroke data of a single keyboard key using the standard keyboard key pressure measurement data to obtain the effective keyboard pressing stroke data.
[0090] In an embodiment of the present invention, the motion information of the keyboard keys is captured by means of a high-precision travel sensor. The travel sensor is placed under the keyboard key, and it is closely matched with the mechanical structure of the key. When the user presses the key, the sensor can record the displacement change of the key from the starting position to the pressed position in real time, collect data points at a very high frequency, and form a continuous data sequence about the key pressing process. These unprocessed raw displacement data are the initial pressing stroke data of a single key. For example, for common mechanical keyboard keys, the sensor can be accurate to 0.1 mm displacement accuracy, and record the stroke trajectory of the key from the initial rest to the complete pressing process in all directions. Working in conjunction with the travel sensor is a pressure sensor, which is also aimed at each key. When the key generates a downward pressing action based on the initial pressing stroke data, the pressure sensor will carry out measurement based on the principle of conversion between pressure and electrical signals. The internal piezoelectric material is deformed by force, thereby generating a corresponding voltage change, and then the analog voltage signal is converted into a digital pressure value through the analog-to-digital conversion circuit. As the key press stroke progresses, the pressure sensor continuously outputs the pressure data at the corresponding moment, which corresponds to each time node in the initial press stroke data one by one, thereby constructing a keyboard key pressure measurement data set, which accurately reflects the dynamic changes of pressure during the key press process. Eliminate obviously erroneous data points. For example, extremely large or extremely small abnormal pressure values caused by instantaneous sensor failure or external electromagnetic interference, such data deviate from the normal pressing pressure range and interfere with subsequent analysis, so they are directly deleted from the data set. Use filtering algorithms, such as the common median filter. For the collected data sequence, traverse all data points with a fixed window size, sort the values in the window, and take the middle value to replace the data point in the center of the original window. In this way, high-frequency random noise is removed, the pressure data curve is smoother, and the real pressure change trend is highlighted. In the process of data collection, data loss may occasionally occur. Using the linear interpolation method, a straight line is fitted based on the valid data points before and after the missing value, and the reasonable value corresponding to the missing position is calculated to fill the gap and ensure the continuity of the data sequence. The pressure data after cleaning, denoising and filling is processed according to the standardized formula. For example, by using Z-score standardization, the data mean becomes 0 and the standard deviation becomes 1. This can eliminate the differences in data magnitude between different keys and different test environments, prepare for subsequent unified analysis, and ultimately generate standard keyboard key pressure measurement data. Use the processed standard keyboard key pressure measurement data as a reference to set the pressure threshold. Only when the pressure generated by pressing the key is higher than this threshold, the press is considered to be valid, and the corresponding initial press stroke data is considered to be a valid stroke.For example, after a lot of preliminary testing and analysis, it was determined that for ordinary office keyboards, a pressure of 0.5N is considered the starting point of effective pressing. The initial stroke part below this pressure is screened out, and the stroke data corresponding to the pressure value above this is retained. After integration, accurate keyboard pressing effective stroke data is obtained. These data can more truly reflect the user's actual effective operation of the keyboard.
[0091] Preferably, step S14 includes the following steps:
[0092] Step S141: aligning the initial pressing stroke data of a single keyboard key with the pressing position timestamp using the standard keyboard key pressure measurement data to generate a keyboard pressing pressure-stroke data pair; constructing a curve based on the keyboard pressing pressure-stroke data pair to obtain a keyboard pressure-stroke curve;
[0093] Step S142: using the keyboard pressure-stroke curve to perform keyboard trigger feedback judgment on the key, when the keyboard trigger feedback judgment result is empty, the corresponding keyboard pressure-stroke curve is segmented into invalid pressing curve segments to generate a keyboard effective pressure-stroke curve;
[0094] Step S143: performing data matching on the initial pressing stroke data of a single key of the keyboard based on the keyboard effective pressure-stroke curve, thereby generating keyboard pressing effective stroke data.
[0095] In the embodiment of the present invention, since the standard keyboard key pressure measurement data and the initial pressing stroke data are collected separately, although the two are synchronized on the time axis, there is a slight deviation. First, extract the timestamp information corresponding to each of the two sets of data, and use the timestamp of the pressure measurement data as a reference to accurately align the initial pressing stroke data to the same time scale through difference calculation, linear interpolation and other methods. For example, if the timestamp of a certain sampling point of the pressure data is t1, and the timestamp of the corresponding closest sampling point of the stroke data is t2, calculate the time difference t=t1-t2, adjust the stroke data position accordingly, and finally make the pressure value at each moment correspond to the stroke value one by one, forming a keyboard pressing pressure-stroke data pair. With these data pairs, use drawing software or data analysis library (such as Matplotlib library in Python) to draw points and connect lines for each data pair in turn with stroke as the horizontal axis and pressure as the vertical axis to construct a keyboard pressure-stroke curve. This curve intuitively shows how the pressure changes as the key press stroke increases. Each keyboard has a designed trigger pressure point. When the key is pressed to a certain extent, it will trigger the corresponding electronic feedback signal, such as character input. According to the trigger pressure standard value given in the keyboard product specification manual, search and compare on the constructed keyboard pressure-stroke curve. For example, the trigger pressure of a keyboard is set to 0.5N. From the starting point of the curve, traverse the pressure value and mark the point where the trigger pressure is reached or exceeded for the first time. If the entire curve does not reach the trigger pressure, the keyboard trigger feedback judgment result is empty. When the judgment result is empty, it means that the press did not reach the level of triggering keyboard feedback, which is an invalid press. Observe the shape of the curve, find the entire interval from the beginning of the pressure rise to the pressure returning to zero, and separate it from the complete curve. For example, the initial pressure of the curve is 0, and then it gradually rises and then drops back to 0. Remove this non-trigger feedback curve, and the remaining part is the keyboard effective pressure-stroke curve, which represents the pressing process that can actually trigger the keyboard response action. The keyboard effective pressure-stroke curve corresponds to the effective pressing process, and its horizontal axis records the effective stroke range. Match the stroke data points of this curve with the initial pressing stroke data one by one. Use the stroke value interval of the curve horizontal axis to accurately locate the data segment of the same range in the initial pressing stroke data. For example, the stroke interval of the effective pressure-stroke curve is [1mm, 4mm]. All data in this interval are selected from the initial pressing stroke data, and integrated to generate the keyboard pressing effective stroke data, which accurately reflects the actual effective pressing of the keyboard.
[0096] As an example of the present invention, refer to Figure 2 As shown, in this example, step S2 includes:
[0097] Step S21: Obtain keyboard key structure data;
[0098] Step S22: performing two-dimensional pressing pressure recognition on the keyboard key pressure measurement data according to the keyboard pressing effective stroke data to generate keyboard two-dimensional pressing pressure recognition data;
[0099] Step S23: performing three-dimensional pressing depth recognition on the two-dimensional keyboard pressing pressure recognition data through the keyboard key structure data to generate the three-dimensional keyboard pressing pressure recognition data;
[0100] Step S24: performing a pressing area analysis on the keyboard three-dimensional pressing pressure recognition data to generate key pressing three-dimensional area data; performing a user pressing behavior analysis on the key pressing three-dimensional area data to generate user pressing behavior data.
[0101] In an embodiment of the present invention, the keyboard is carefully disassembled to separate each key unit. For each key, a high-precision caliper, micrometer or other measuring tool is used to accurately measure the key cap size of the key, including parameters such as length, width, thickness, etc., and record geometric information such as the key cap surface area and circumference. The mechanical structure inside the key, such as the length and elastic coefficient of the spring, and the size of the connecting component between the key cap and the chassis, are also accurately measured to obtain their spatial position relationship. The measured data is entered into a professional 3D modeling software (such as SolidWorks or Blender) to construct an accurate 3D digital model of each key, and the size values of each component are marked in detail in the model to generate complete and structured keyboard key structure data, which provide basic physical architecture information for subsequent complex pressing analysis. According to the effective pressing range defined by the keyboard pressing effective stroke data, only the pressure data points within the effective stroke are selected from the existing keyboard key pressure measurement data. The pressure data within this effective stroke is divided into multiple small sub-intervals according to the stroke length, for example, one sub-interval is divided for every 0.1 mm stroke. For the pressure data in each sub-interval, their arithmetic mean is calculated to represent the average pressing pressure in the small stroke segment. These average pressure values are combined with the corresponding stroke positions to form a series of discrete data pairs, which reflect the pressure changes of the key during the effective pressing process from the perspective of the two-dimensional plane (stroke-pressure plane), and then generate the keyboard two-dimensional pressing pressure recognition data. With the help of information such as the keycap height and internal spring compression characteristics in the keyboard key structure data, the stroke value in the two-dimensional pressing pressure recognition data is converted into the actual pressing depth value of the keycap in the three-dimensional space. For example, it is known that the initial height of the keycap is 5 mm, and a certain stroke point in the two-dimensional data is 2 mm. Combined with the structural information, it can be seen that the pressing depth of the keycap in the three-dimensional space is 2 mm at this time. The converted pressing depth value is re-paired with the corresponding average pressure value, and the position coordinates of the key on the keyboard plane are considered at the same time (determined by the layout information in the key structure data). These data points are used to draw points and fit in the three-dimensional coordinate system to generate a three-dimensional model that can reflect the pressure changes at different positions and different pressing depths. The corresponding data set is the keyboard three-dimensional pressing pressure recognition data. On the keyboard plane, a fine two-dimensional grid is constructed based on the key layout. The size of the grid unit can be set according to the keyboard size and accuracy requirements, such as a small square of 1 mm × 1 mm. The three-dimensional pressing pressure recognition data is mapped to these grid units, and statistics such as the pressure extreme value, average value, and variance in each grid unit are counted. Thresholds are set based on statistics to distinguish different pressing area categories such as high pressure areas, medium pressure areas, and low pressure areas, and integrate information such as the boundaries and pressure characteristics of each area to generate three-dimensional key pressing area data.Starting from the three-dimensional area data of key presses, we analyze the order in which users press, the time intervals between presses in different areas, the frequency of repeated presses in the same area, and other information. For example, if a high-pressure area is pressed repeatedly in a short period of time, it means that the user is performing frequent shortcut key operations. We comprehensively summarize the various extracted features, group similar press features into one category, corresponding to specific user operation intentions, such as fast typing, game control, etc., and finally generate a data set that can accurately reflect the user's press behavior.
[0102] Preferably, step S23 includes the following steps:
[0103] Step S231: extracting key geometric parameters of the keys from the keyboard key structure data, obtaining key geometric parameters of the keys, and performing key deformation relationship mapping based on the key geometric parameters to generate a key deformation mathematical model, wherein the formula for key deformation relationship mapping is as follows:
[0104] ;
[0105] In the formula, Expressed as the key shape variable, Expressed as pressure, Expressed as the spring stiffness coefficient;
[0106] Step S232: calibrating the key center pressure value of the keyboard two-dimensional pressing pressure recognition data to generate the key center pressure value; calculating the pressing depth of the key center pressure value using the key deformation mathematical model to obtain the key pressing depth data;
[0107] Step S233: converting the key pressing depth data and the keyboard two-dimensional pressing pressure recognition data into three-dimensional data points to generate the keyboard three-dimensional pressing pressure recognition data.
[0108] In the embodiment of the present invention, the keyboard is disassembled and the key-related components are carefully measured. For each key, key geometric parameters such as the surface area and thickness of the key cap, and the length and wire diameter of the spring under the key are obtained. These parameters will directly affect the deformation characteristics of the key when it is pressed. The measured parameters are recorded and organized into a key geometric parameter data set. Using Hooke's law, that is, the formula The spring stiffness coefficient can be pre-determined by professional mechanical testing of the spring, and the pressure It is the value measured during the pressing process, the deformation It represents the degree of deformation of the key when it is pressed. Substituting the obtained value into the formula and combining it with different pressure values, the corresponding key deformation amount can be derived, thereby generating a key deformation mathematical model that describes the deformation law of the key under different pressures. For example, if the spring stiffness coefficient of a certain key is known, 2N / mm, when the pressure is applied When it is 4N, the deformation can be calculated by the formula is 2mm. In the two-dimensional keyboard pressing pressure recognition data, since the pressure distribution on the key surface is not uniform, it is necessary to find the central pressure value that can represent the overall pressure state of the key. Usually, the weighted average method is adopted to comprehensively consider the relationship between the pressure data of each point on the key surface and the distance to the geometric center of the key. The closer the point is to the center, the higher the weight. After calculation, the most representative pressure value is extracted from the two-dimensional pressing pressure recognition data, that is, the key center pressure value. Substitute the obtained key center pressure value into the key deformation mathematical model constructed in step S231. For example, assuming the key center pressure value is , given the spring stiffness coefficient ,in accordance with , calculate the corresponding key pressing depth value , these calculated pressing depth data are sorted and collected to form a key pressing depth data set. The previous two-dimensional keyboard pressing pressure recognition data only had information in two dimensions: stroke and pressure. Now it is necessary to expand it to three dimensions in combination with the key pressing depth data. Use the stroke value as the horizontal coordinate, the pressure value as the vertical coordinate, and the pressing depth value as the vertical coordinate to perform coordinate transformation on each data point. In other words, each (stroke, pressure) data pair in the original two-dimensional data set is supplemented with the corresponding pressing depth value and converted into a three-dimensional data point such as (stroke, pressure, pressing depth). By summarizing all the converted three-dimensional data points, the keyboard three-dimensional pressing pressure recognition data is generated, thereby realizing the conversion from two-dimensional pressure recognition to three-dimensional pressure recognition.
[0109] Preferably, performing user pressing behavior analysis on the key pressing three-dimensional area data includes:
[0110] Extracting the key pressing feature from the key pressing three-dimensional area data to obtain the basic pressing feature, wherein the basic pressing feature includes the average key pressing pressure and the average pressing depth;
[0111] Extract spatial distribution features of the key pressing three-dimensional area data to obtain pressing center offset data; extract pressing dynamic features of the key pressing three-dimensional area data to obtain pressing rate data;
[0112] The user behavior characteristics are quantified for the average key pressure, the average pressing depth, the pressing center offset data, and the pressing rate data to generate a user behavior characteristic quantification value, wherein the formula for the user behavior characteristic quantification is as follows:
[0113] ;
[0114] In the formula, It is expressed as the quantitative value of user behavior characteristics. Expressed as key pressure feature weight, Expressed as the pressed depth feature weight, Expressed as the pressing center offset feature weight, Expressed as the pressing rate feature weight, Expressed as the average key pressure, Expressed as the maximum value of the key pressure, It is expressed as the minimum value of the key pressure. Expressed as the mean compression depth, It is expressed as the minimum value of compression depth. Expressed as the maximum value of compression depth, Expressed as the pressing center offset value, It is expressed as the minimum value of the pressing center offset. Expressed as the maximum value of the pressing center offset, Expressed as compression rate, Expressed as the minimum value of the compression rate, Expressed as the maximum value of compression rate;
[0115] The user behavior feature quantification value is compared with the preset standard behavior feature threshold range. When the user behavior feature quantification value is less than the preset standard behavior feature threshold range, the user's gentle pressing behavior label data is generated; when the user behavior feature quantification value is within the preset standard behavior feature threshold range, the user's robust pressing behavior label data is generated; when the user behavior feature quantification value is greater than the preset standard behavior feature threshold range, the user's dynamic pressing behavior label data is generated;
[0116] The user pressing behavior data is generated by performing a user pressing behavior analysis on the key pressing three-dimensional area data through the user's soft pressing behavior label data, the user's steady pressing behavior label data and the user's dynamic pressing behavior label data.
[0117] In an embodiment of the present invention, by statistically analyzing the three-dimensional area data of key pressing, the pressure values of each point in the area are accumulated, and then divided by the total number of data points to calculate the average pressure value of the area. This value can reflect the overall pressure intensity applied by the user when pressing the key, and is saved as one of the basic pressing features. Similarly, for the three-dimensional area data of key pressing, the pressing depth values corresponding to each point are accumulated and divided by the total number of data points to obtain the average pressing depth. It reflects the average depth of the key sinking each time the user presses the key, and is also an important part of the basic pressing feature. The center position of the pressure distribution in the three-dimensional area data of key pressing is analyzed, and its deviation from the ideal center position of the key is compared to calculate the pressing center offset data. For example, if the key is a rectangle, the center coordinates in the length and width dimensions are calculated by the pressure weighted average method, and the geometric center coordinates of the key itself are subtracted to obtain the offset on the plane, thereby characterizing the deviation of the finger force point from the ideal position when the user presses. Observe the changes in the three-dimensional area data of button pressing over time, record the time it takes from the button being pressed to being fully pressed, and combine the pressing depth. Divide the pressing depth by the pressing time to calculate the pressing rate data, which reflects how fast the user presses the button. Substitute the previously extracted and calculated average button pressure, pressing depth mean, pressing center offset data, pressing rate data, and the corresponding maximum and minimum values and each feature weight value into the given user behavior feature quantification formula to calculate the user behavior feature quantification value. Pre-set the standard behavior feature threshold range. For example, if the threshold range is set to [0.3, 0.7]. When the calculated user behavior feature quantification value <0.3, it means that the user presses gently overall; when , indicating that the user's pressing style is relatively stable; when >0.7, which means that the user's pressing action is more dynamic, faster and stronger. Based on the above comparison results, the user's gentle pressing behavior label data, the user's steady pressing behavior label data, and the user's dynamic pressing behavior label data are generated respectively. Using the three types of label data generated, the three-dimensional area data of key presses are labeled and classified. For example, data with gentle labels are classified into one category, and the frequency of occurrence of such data, the distribution of key areas and other information are subsequently counted. This generates a data set that can reflect the user's pressing behavior in detail, and intuitively shows the user's habitual preferences when operating the keyboard.
[0118] As an example of the present invention, refer to Figure 3 As shown, in this example, step S3 includes:
[0119] Step S31: performing key mis-touch detection on the key pressing three-dimensional area data based on the user pressing behavior data to generate key mis-touch detection data; performing effective pressing area correction on the key pressing three-dimensional area data based on the key mis-touch detection data to generate an effective three-dimensional pressing area;
[0120] Step S32: extracting effective pressing pressure features from the effective three-dimensional pressing area to obtain effective pressing pressure feature data; dividing the effective pressing pressure feature data into data sets to generate a model training set and a model test set;
[0121] Step S33: training the model training set by a convolutional neural network algorithm to generate a key pressure distribution gradient pre-model; optimizing and iterating the key pressure distribution gradient pre-model by using the model test set to generate a key pressure distribution gradient model;
[0122] Step S34: importing the effective three-dimensional pressing area into the key pressure distribution gradient model to perform key pressure distribution recognition and generate key pressure distribution recognition data.
[0123] In an embodiment of the present invention, by analyzing the user's pressing behavior data, features such as pressing duration, pressing interval, and pressing pressure change trend are extracted from it. For the three-dimensional area data of key pressing, a false touch judgment rule is set. For example, if the pressing duration of a certain area is extremely short (less than a specific threshold, such as 50 milliseconds), and the pressing pressure is far lower than the normal pressing pressure average, it is a false touch. According to these rules, all pressing records are traversed, the suspected false touch area is marked, and the key false touch detection data is generated. Using the key false touch detection data, the data of the false touch area is removed from the key pressing three-dimensional area data. For example, if the upper left corner area of a key is determined to be a false touch, the pressure, stroke, depth and other data points corresponding to the area are deleted, and the remaining data are integrated and smoothed so that the data reflects only the effective pressing situation, thereby generating a valid three-dimensional pressing area. For the effective three-dimensional pressing area, multiple pressure-related features are calculated. For example, the average pressure, pressure standard deviation, pressure peak, etc. of each effective pressing area are calculated, and these values are combined to form effective pressing pressure feature data, accurately describing the pressure characteristics of the effective pressing area. The effective pressing pressure feature data is divided into two parts according to a certain ratio (common ones are 7:3, 8:2, etc.). Most of the data is randomly extracted as the model training set for training the neural network, and the remaining small part of the data is used as the model test set to evaluate the model training effect and adjust the model parameters. Build a convolutional neural network (CNN) architecture and configure hyperparameters such as the number of network layers, convolution kernel size, and stride. Input the model training set into CNN, the convolution layer in the network automatically extracts local features in the data, the pooling layer reduces the data dimension and reduces the amount of calculation, and the fully connected layer integrates features for classification or regression prediction. During the training process, according to the set loss function (such as the mean square error loss function), the network weights are continuously adjusted through the back propagation algorithm, so that the difference between the model output and the true label is gradually reduced, and the key pressure distribution gradient pre-model is generated. Input the model test set into the key pressure distribution gradient pre-model, and calculate the error indicators between the predicted results and the true value of the test set, such as accuracy, recall, etc. According to the error situation, the hyperparameters and network architecture of the pre-model are fine-tuned, and the training set is used for training again. This process is repeated until the performance indicators of the model on the test set reach a stable and satisfactory level, and finally a key pressure distribution gradient model is generated. The effective three-dimensional pressing area data is sorted into a format that meets the input requirements of the key pressure distribution gradient model and input into the model. Based on the previously learned pressure distribution law, the model analyzes and predicts the input data and outputs the pressure distribution corresponding to each area, that is, it generates key pressure distribution recognition data, accurately presenting the pressure distribution state of each key during the pressing process.
[0124] Preferably, performing button false touch detection on button pressing three-dimensional area data based on user pressing behavior data includes:
[0125] Based on the user's pressing behavior data, the three-dimensional area data of the key pressing is collected to obtain the key pressure timing data; the threshold value is set for the key pressure timing data to generate the key pressure threshold data; the rising time mode analysis is performed on the key pressure timing data to generate the pressure rising time data; the peak duration analysis is performed on the key pressure timing data to generate the pressure peak duration data;
[0126] The pressure time pattern analysis rules are defined for the pressure rise time data and the pressure peak duration data through the key pressure threshold data to generate standard data for false touch detection; the key pressure timing data is used to perform adjacent key false touch detection to generate key false touch detection data.
[0127] In an embodiment of the present invention, the pressure data at the corresponding moment is accurately extracted from the three-dimensional area data of the key pressing according to the timestamp information provided by the user's pressing behavior data, and the data is arranged and integrated in chronological order, thereby obtaining the key pressure timing data. For example, the user's pressing behavior data records the start and end time of pressing each key in a complete typing process. By using these time intervals, the pressure change data of each key in the corresponding time period can be screened out from the three-dimensional area data to form timing data. In order to ensure that the timing data can accurately reflect the pressing process, the time accuracy needs to be controlled. According to the keyboard sampling frequency, select a suitable time interval unit, such as the common millisecond interval, so that each data point is closely fitted to the actual pressing time process, and no critical pressure change moment is missed. Analyze the overall distribution of the key pressure timing data, and calculate the mean, standard deviation and other statistics of the pressure. Based on these statistics, combined with the design specifications of the keyboard and past experience, set a reasonable pressure threshold interval. For example, if the normal pressing pressure of a certain type of keyboard has an average value of 0.5N and a standard deviation of 0.1N, the lower pressure threshold can be set to 0.3N and the upper pressure threshold to 0.7N. Data points outside this range are marked as abnormal, and then the key pressure threshold data is generated. Considering the differences in pressing habits of different users, the threshold can also be dynamically fine-tuned according to the long-term pressing intensity trend in the user's pressing behavior data. If it is found that the user's long-term pressing pressure is generally low, the lower threshold is appropriately lowered to better suit the actual operation of the user. In the key pressure timing data, accurately find the starting point when the pressure begins to rise and the time point when the pressure reaches the peak. By traversing the data sequence, when the pressure value first exceeds a very small starting judgment threshold (such as 0.05N), it is marked as the starting point; the pressure growth is continuously tracked, and the time corresponding to the maximum value is found as the peak point. Calculate the time interval from the starting point to the peak point and record it as the pressure rise time data. This rise time will be different for different types of keys and different user habits. Collecting a large number of samples will help with subsequent analysis and judgment. After determining that the pressure has reached its peak, start counting the time the pressure remains near the peak. Set a smaller fluctuation range, for example, with the peak pressure as the center, fluctuations of 0.05N above and below are considered to be in the peak state, record the time span from entering the fluctuation range to leaving, and generate pressure peak duration data. Summarize the peak duration data of different keys and multiple presses, and extract the common features. For example, the peak duration of some function keys is generally shorter than that of letter keys. These features provide auxiliary information for subsequent false touch judgments. Combine the key pressure threshold data, pressure rise time data, and pressure peak duration data to formulate detailed false touch detection standards. For example, if the pressure rise time is less than a specific value (such as 5 milliseconds), the peak duration is extremely short (less than 10 milliseconds), and the pressure peak does not reach the lower limit of the threshold, it is judged as a suspected false touch. Such judgment rules are integrated to generate false touch detection standard data.Use sample data of some known false touches and normal presses to verify the established rules and check the false positive rate and missed positive rate. According to the verification results, adjust and optimize the thresholds, time standards and other parameters in the rules to ensure the accuracy of the rules. Considering that false touches often occur between adjacent keys, the key layout information is used to group the key pressure timing data according to the adjacent relationship. In addition to checking whether the pressure time pattern of a single key meets the false touch standard, it also focuses on the situation where abnormal pressure patterns appear almost simultaneously on adjacent keys. According to the false touch detection standard data, the key pressure timing data is scanned segment by segment. Once a segment that meets the false touch rule is found, it is marked as a false touch in the corresponding key and time period. Finally, the key false touch detection data is generated, which clearly shows which keys and when the suspected false touch event occurred.
[0128] Preferably, step S4 comprises the following steps:
[0129] Step S41: Visualizing the key pressure distribution recognition data to generate a three-dimensional key pressure distribution map; performing pressure point cluster analysis on the key three-dimensional pressure distribution map to generate key three-dimensional pressure point cluster data;
[0130] Step S42: Optimize the key contact distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data, so as to generate key contact distribution optimization data; optimize the key pressure measurement accuracy of the keyboard key pressure measurement data based on the key contact distribution optimization data, so as to perform the keyboard key pressure recognition operation.
[0131] In an embodiment of the present invention, by using professional data visualization tools, such as Matplotlib or Mayavi library in Python, the key pressure distribution recognition data is three-dimensionally visualized. The plane position of the key is used as the two-dimensional coordinate, and the pressure value is used as the height coordinate to draw a three-dimensional pressure distribution map of the key. Different colors and brightness are used to intuitively display the pressure size of each area, so that the originally abstract data can be presented in an intuitive three-dimensional graphic, which is convenient for observing the overall picture of the pressure distribution. A clustering algorithm, such as the K-Means clustering algorithm, is used for the generated three-dimensional pressure distribution map of the key. Set a suitable number of clusters, and let the algorithm automatically divide the numerous pressure points into different clusters based on the spatial distribution of the pressure points and the degree of similarity of the pressure values. Calculate the central position of each cluster, the number of pressure points contained, the mean pressure value and other statistical information, and organize these contents to generate key three-dimensional pressure point cluster data. According to the key three-dimensional pressure point cluster data, compare the contact layout in the current keyboard key structure data. Check whether the contact accurately corresponds to the area where the pressure is concentrated. If it is found that the center of some pressure clusters deviates greatly from the existing contact position, it means that the contact layout is not reasonable enough, which will affect the accuracy of the press feedback. According to the distribution of pressure clusters, the position of the key contacts in the key is re-planned, and the number of contacts, spacing and other parameters are adjusted to distribute the contacts as much as possible in the pressure-concentrated and critical areas, so as to generate key contact distribution optimization data. For example, if the pressure cluster is obvious in the lower right corner of a key, add contacts appropriately in this area. Based on the key contact distribution optimization data, the collection process of the keyboard key pressure measurement data is adjusted in a targeted manner. Due to the change in the contact layout, the sensitivity, sampling frequency and other parameters of the measurement sensor need to be re-adapted to ensure that the pressure changes under the new contact layout can be accurately captured and the measurement error can be reduced. After completing the above optimization, the keyboard key pressure recognition operation is carried out again, and the optimized measurement data and contact layout are used to improve the accuracy and reliability of the entire keyboard key pressure recognition, and more accurately perceive each key press action of the user.
[0132] In this specification, a keyboard key pressure recognition device based on deep learning is provided, which is used to execute the above-mentioned keyboard key pressure recognition method based on deep learning. The keyboard key pressure recognition device based on deep learning includes:
[0133] The pressing stroke analysis module is used to obtain the initial pressing stroke data of a single key on the keyboard; use the pressure sensor to measure the pressure of the single key corresponding to the initial pressing stroke data to obtain the keyboard key pressure measurement data; use the keyboard key pressure measurement data to screen the initial pressing stroke data of a single key on the keyboard for the effective keyboard pressing stroke to obtain the keyboard effective pressing stroke data;
[0134] The three-dimensional pressing modeling module is used to obtain keyboard key structure data; perform three-dimensional pressing depth recognition on keyboard key pressure measurement data according to keyboard pressing effective stroke data to generate keyboard three-dimensional pressing pressure recognition data; perform pressing area analysis on keyboard three-dimensional pressing pressure recognition data through keyboard key structure data to generate key pressing three-dimensional area data; perform user pressing behavior analysis on key pressing three-dimensional area data to generate user pressing behavior data;
[0135] A pressure distribution recognition module is used to correct the key mis-touch pressing area of the key pressing three-dimensional area data based on the user's pressing behavior data to generate a valid three-dimensional pressing area; construct a key pressure distribution gradient model for the valid three-dimensional pressing area to generate a key pressure distribution gradient model; import the valid three-dimensional pressing area into the key pressure distribution gradient model to perform key pressure distribution recognition and generate key pressure distribution recognition data;
[0136] The contact point optimization module is used to perform pressure point cluster analysis on the key pressure distribution recognition data to generate key three-dimensional pressure point cluster data; optimize the key contact point distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data to generate key contact point distribution optimization data; optimize the key pressure measurement accuracy of the keyboard key pressure measurement data based on the key contact point distribution optimization data to perform keyboard key pressure recognition operations.
[0137] The beneficial effect of the present invention is that by combining the pressure sensor to measure the pressure of the key, the pressing stroke of each key can be analyzed with high precision, and effective pressing stroke data can be screened out. This process helps to accurately identify the user's key operation and provide accurate data for subsequent user behavior analysis and keyboard performance optimization. Through three-dimensional pressing depth recognition and pressing area analysis, the system can describe the pressing mode and regional distribution of each key in detail, thereby laying the foundation for further contact optimization and pressure distribution analysis. This process ensures a comprehensive understanding of the key structure and user pressing behavior. Through the analysis of the three-dimensional regional data of key pressing, the user's pressing behavior data can be extracted to help identify the usage habits and needs of different users, which provides a scientific basis for personalized key feedback, comfort optimization and user experience improvement. Based on the user's pressing behavior data and the correction of the pressing area, the system can create an accurate key pressure distribution gradient model and identify the pressure distribution characteristics of the key. This process helps to better understand the distribution changes of key pressure during the pressing process and provide data support for subsequent contact optimization and design improvements. By analyzing the pressure point cluster data, it is possible to accurately identify the concentrated area of pressure distribution on the key, and then optimize the contact distribution of the keyboard key. This optimization can significantly improve the response sensitivity and accuracy of the key, and reduce the situation of false touch and non-triggering. Based on the optimized key contact distribution, the system can optimize the keyboard key pressure measurement accuracy, significantly improve the accuracy and consistency of key pressure recognition, which provides better support for high-precision input and complex operations (such as games, programming, etc.) of the keyboard. By analyzing the user's pressing behavior and identifying the pressure distribution, the system can provide personalized key feedback and operation modes for different users, optimize the user experience, and improve comfort and response speed. Therefore, the present invention improves the accuracy and error interference of keyboard key pressure recognition through multi-step technologies such as precise pressing stroke screening, three-dimensional pressure distribution recognition, false touch correction and contact optimization.
[0138] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.
[0139] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A keyboard key pressure recognition method based on deep learning, characterized in that: The following steps are involved: Step S1: obtaining initial pressing stroke data of a single key of the keyboard; using a pressure sensor to measure the pressure of a single key corresponding to the initial pressing stroke data to obtain keyboard key pressure measurement data; using the keyboard key pressure measurement data to screen the initial pressing stroke data of a single key of the keyboard for effective keyboard pressing stroke data to obtain keyboard key pressure measurement data; Step S2: Acquire keyboard key structure data; perform three-dimensional pressing depth recognition on keyboard key pressure measurement data according to keyboard pressing effective stroke data to generate keyboard three-dimensional pressing pressure recognition data; perform pressing area analysis on keyboard three-dimensional pressing pressure recognition data according to keyboard key structure data to generate key pressing three-dimensional area data; Performing user pressing behavior analysis on the key pressing three-dimensional area data to generate user pressing behavior data; Step S3: Based on the user pressing behavior data, the three-dimensional key pressing area data is corrected for the key mis-touch pressing area to generate a valid three-dimensional pressing area; a key pressure distribution gradient model is constructed for the valid three-dimensional pressing area to generate a key pressure distribution gradient model; the valid three-dimensional pressing area is imported into the key pressure distribution gradient model to perform key pressure distribution recognition to generate key pressure distribution recognition data; Step S4: performing pressure point cluster analysis on the key pressure distribution recognition data to generate key three-dimensional pressure point cluster data; optimizing the key contact point distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data to generate key contact point distribution optimization data; The key pressure measurement accuracy of the keyboard key pressure measurement data is optimized based on the key contact distribution optimization data to perform the keyboard key pressure recognition operation.
2. The keyboard key pressure recognition method based on deep learning according to claim 1 is characterized in that: Step S1 includes the following steps: Step S11: obtaining initial pressing stroke data of a single key on the keyboard; Step S12: using a pressure sensor to measure the pressure of a single key corresponding to the initial pressing stroke data to obtain keyboard key pressure measurement data; Step S13: performing data preprocessing on the keyboard key pressure measurement data to generate standard keyboard key pressure measurement data, wherein the data preprocessing includes data cleaning, data denoising, missing value filling and data standardization; Step S14: Screening the effective keyboard pressing stroke data of the initial pressing stroke data of a single keyboard key using the standard keyboard key pressure measurement data to obtain the effective keyboard pressing stroke data.
3. The keyboard key pressure recognition method based on deep learning according to claim 2 is characterized in that: Step S14 includes the following steps: Step S141: aligning the initial pressing stroke data of a single keyboard key with the pressing position timestamp using the standard keyboard key pressure measurement data to generate a keyboard pressing pressure-stroke data pair; constructing a curve based on the keyboard pressing pressure-stroke data pair to obtain a keyboard pressure-stroke curve; Step S142: using the keyboard pressure-stroke curve to perform keyboard trigger feedback judgment on the key, when the keyboard trigger feedback judgment result is empty, the corresponding keyboard pressure-stroke curve is segmented into invalid pressing curve segments to generate a keyboard effective pressure-stroke curve; Step S143: performing data matching on the initial pressing stroke data of a single key of the keyboard based on the keyboard effective pressure-stroke curve, thereby generating keyboard pressing effective stroke data.
4. The keyboard key pressure recognition method based on deep learning according to claim 1, characterized in that: Step S2 includes the following steps: Step S21: Obtain keyboard key structure data; Step S22: performing two-dimensional pressing pressure recognition on the keyboard key pressure measurement data according to the keyboard pressing effective stroke data to generate keyboard two-dimensional pressing pressure recognition data; Step S23: performing three-dimensional pressing depth recognition on the two-dimensional keyboard pressing pressure recognition data through the keyboard key structure data to generate the three-dimensional keyboard pressing pressure recognition data; Step S24: performing a pressing area analysis on the keyboard three-dimensional pressing pressure recognition data to generate key pressing three-dimensional area data; performing a user pressing behavior analysis on the key pressing three-dimensional area data to generate user pressing behavior data.
5. The keyboard key pressure recognition method based on deep learning according to claim 4 is characterized in that: Step S23 includes the following steps: Step S231: extracting key geometric parameters of the keys from the keyboard key structure data, obtaining key geometric parameters of the keys, and performing key deformation relationship mapping based on the key geometric parameters to generate a key deformation mathematical model, wherein the formula for key deformation relationship mapping is as follows: ; In the formula, Expressed as the key shape variable, Expressed as pressure, Expressed as the spring stiffness coefficient; Step S232: calibrating the key center pressure value of the keyboard two-dimensional pressing pressure recognition data to generate the key center pressure value; calculating the pressing depth of the key center pressure value using the key deformation mathematical model to obtain the key pressing depth data; Step S233: converting the key pressing depth data and the keyboard two-dimensional pressing pressure recognition data into three-dimensional data points to generate the keyboard three-dimensional pressing pressure recognition data.
6. The keyboard key pressure recognition method based on deep learning according to claim 4 is characterized in that: The user pressing behavior analysis of the key pressing three-dimensional area data includes: Extracting the key pressing feature from the key pressing three-dimensional area data to obtain the basic pressing feature, wherein the basic pressing feature includes the average key pressing pressure and the average pressing depth; Extract spatial distribution features of the key pressing three-dimensional area data to obtain pressing center offset data; extract pressing dynamic features of the key pressing three-dimensional area data to obtain pressing rate data; The user behavior characteristics are quantified for the average key pressure, the average pressing depth, the pressing center offset data, and the pressing rate data to generate a user behavior characteristic quantification value, wherein the formula for the user behavior characteristic quantification is as follows: ; In the formula, It is expressed as the quantitative value of user behavior characteristics. Expressed as key pressure feature weight, Expressed as the pressed depth feature weight, Expressed as the pressing center offset feature weight, Expressed as the pressing rate feature weight, Expressed as the average key pressure, Expressed as the maximum value of the key pressure, It is expressed as the minimum value of the key pressure. Expressed as the mean compression depth, It is expressed as the minimum value of compression depth. Expressed as the maximum value of compression depth, Expressed as the pressing center offset value, It is expressed as the minimum value of the pressing center offset. Expressed as the maximum value of the pressing center offset, Expressed as compression rate, Expressed as the minimum value of the compression rate, Expressed as the maximum value of compression rate; The user behavior feature quantification value is compared with the preset standard behavior feature threshold range. When the user behavior feature quantification value is less than the preset standard behavior feature threshold range, the user's gentle pressing behavior label data is generated; when the user behavior feature quantification value is within the preset standard behavior feature threshold range, the user's robust pressing behavior label data is generated; when the user behavior feature quantification value is greater than the preset standard behavior feature threshold range, the user's dynamic pressing behavior label data is generated; The user pressing behavior data is generated by performing a user pressing behavior analysis on the key pressing three-dimensional area data through the user's soft pressing behavior label data, the user's steady pressing behavior label data and the user's dynamic pressing behavior label data.
7. The keyboard key pressure recognition method based on deep learning according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: performing key mis-touch detection on the key pressing three-dimensional area data based on the user pressing behavior data to generate key mis-touch detection data; performing effective pressing area correction on the key pressing three-dimensional area data based on the key mis-touch detection data to generate an effective three-dimensional pressing area; Step S32: extracting effective pressing pressure features from the effective three-dimensional pressing area to obtain effective pressing pressure feature data; dividing the effective pressing pressure feature data into data sets to generate a model training set and a model test set; Step S33: training the model training set by a convolutional neural network algorithm to generate a key pressure distribution gradient pre-model; optimizing and iterating the key pressure distribution gradient pre-model by using the model test set to generate a key pressure distribution gradient model; Step S34: importing the effective three-dimensional pressing area into the key pressure distribution gradient model to perform key pressure distribution recognition and generate key pressure distribution recognition data.
8. The keyboard key pressure recognition method based on deep learning according to claim 7, characterized in that: Detecting false key presses on key press three-dimensional area data based on user key press behavior data includes: Based on the user's pressing behavior data, the three-dimensional area data of the key pressing is collected to obtain the key pressure timing data; the threshold value is set for the key pressure timing data to generate the key pressure threshold data; the rising time mode analysis is performed on the key pressure timing data to generate the pressure rising time data; the peak duration analysis is performed on the key pressure timing data to generate the pressure peak duration data; The pressure time pattern analysis rules are defined for the pressure rise time data and the pressure peak duration data through the key pressure threshold data to generate standard data for false touch detection; the key pressure timing data is used to perform adjacent key false touch detection to generate key false touch detection data.
9. The keyboard key pressure recognition method based on deep learning according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: Visualizing the key pressure distribution recognition data to generate a three-dimensional key pressure distribution map; performing pressure point cluster analysis on the key three-dimensional pressure distribution map to generate key three-dimensional pressure point cluster data; Step S42: Optimize the key contact distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data, so as to generate key contact distribution optimization data; optimize the key pressure measurement accuracy of the keyboard key pressure measurement data based on the key contact distribution optimization data, so as to perform the keyboard key pressure recognition operation.
10. A keyboard key pressure recognition device based on deep learning, characterized in that: Used to execute the keyboard key pressure recognition method based on deep learning as claimed in claim 1, the keyboard key pressure recognition device based on deep learning comprises: The pressing stroke analysis module is used to obtain the initial pressing stroke data of a single key on the keyboard; use the pressure sensor to measure the pressure of the single key corresponding to the initial pressing stroke data to obtain the keyboard key pressure measurement data; use the keyboard key pressure measurement data to screen the initial pressing stroke data of a single key on the keyboard for the effective keyboard pressing stroke to obtain the keyboard effective pressing stroke data; The three-dimensional pressing modeling module is used to obtain keyboard key structure data; perform three-dimensional pressing depth recognition on keyboard key pressure measurement data according to keyboard pressing effective stroke data to generate keyboard three-dimensional pressing pressure recognition data; perform pressing area analysis on keyboard three-dimensional pressing pressure recognition data through keyboard key structure data to generate key pressing three-dimensional area data; perform user pressing behavior analysis on key pressing three-dimensional area data to generate user pressing behavior data; A pressure distribution recognition module is used to correct the key mis-touch pressing area of the key pressing three-dimensional area data based on the user's pressing behavior data to generate a valid three-dimensional pressing area; construct a key pressure distribution gradient model for the valid three-dimensional pressing area to generate a key pressure distribution gradient model; import the valid three-dimensional pressing area into the key pressure distribution gradient model to perform key pressure distribution recognition and generate key pressure distribution recognition data; The contact point optimization module is used to perform pressure point cluster analysis on the key pressure distribution recognition data to generate key three-dimensional pressure point cluster data; optimize the key contact point distribution of the keyboard key structure data according to the key three-dimensional pressure point cluster data to generate key contact point distribution optimization data; optimize the key pressure measurement accuracy of the keyboard key pressure measurement data based on the key contact point distribution optimization data to perform keyboard key pressure recognition operations.
Citation Information
Patent Citations
Key quality detection method and device
CN115979611A
Keyboard dynamic information generation method and system based on deep learning and storage medium
CN118732864A