Key pressing position detection model training method and device, equipment and medium

By constructing and training the compression position detection model, the problem of nonlinear factors affecting moment balance in the sliding position detection of the mobile phone button is solved, achieving more accurate compression position recognition and better user experience.

CN119402581APending Publication Date: 2025-02-07GOERTEK MICROELECTRONICS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411397100.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the prior art, nonlinear factors affect the moment balance in the sliding position detection of the buttons on the mobile phone side, resulting in the inaccurate press position and affecting the user experience.

Method used

By obtaining multiple sets of training data, each set of data includes readings of two pressure sensors, a torque balance relationship model between the readings of two pressure sensors and the pressing position is constructed, and the model is trained through the training data to solve the influence of nonlinear factors.

Benefits of technology

By constructing and training a press position detection model, the press position can be more accurately identified, improve the user experience, and reduce the possibility of false triggers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402581A_ABST
    Figure CN119402581A_ABST
Patent Text Reader

Abstract

The invention relates to the field of key detection, in particular to a training method and device of a key pressing position detection model, equipment and a medium. Two pressure sensors are arranged in a key, and the method comprises the steps that multiple sets of training data are acquired, and each set of training data comprises sensor readings of the two pressure sensors; the pressing position detection model is constructed, and the pressing position detection model is a torque balance relation model of the readings of the two pressure sensors and the pressing position; and training a pressing position detection model through the training data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of key detection, and more specifically, to a training method, device, equipment and medium for a key pressing position detection model. Background Art

[0002] With the popularity of smart phones, the interactive functions of mobile phones are becoming more and more key functions that affect the user experience. The sliding function of the side buttons on the mobile phone can provide convenient gesture operations such as volume control and map zooming in and out, which can provide users with rich interactive options and enhance the user experience. There are two common ways to detect the sliding position of the side buttons of the mobile phone: capacitive sensors and pressure sensors. Capacitive sensors have the problem of false triggering (such as water drops, orange peels and other objects), resulting in poor user experience. Pressure sensors generate readings by detecting the deformation of objects, which can effectively avoid similar false touch problems.

[0003] At present, the buttons of the pressure sensor method can be detected by two channels of pressure sensors, and the specific position of the applied force can be identified based on the principle of torque balance. However, in actual situations, after the side buttons of the mobile phone are installed, it is not an ideal torque balance model. There are many other influencing factors, such as when the force is applied, the displacement of the side buttons of the mobile phone causes a slight bending of the torque, resulting in a change in the torque balance, the mounting of the side buttons of the mobile phone cannot be theoretically flat, and there are deviations in the sensitivity of the sensor, etc. This will lead to inaccurate determination of the pressing position, affecting the actual user experience. Summary of the invention

[0004] One purpose of the present disclosure is to provide a training method for a key press position detection model, which can solve the problem of inaccurate press position caused by the influence of nonlinear factors on torque balance.

[0005] According to a first aspect of the present disclosure, a method for training a key press position detection model is provided, wherein two pressure sensors are provided in the key, and the method comprises:

[0006] Acquire multiple sets of training data, wherein each set of the training data includes sensor readings of the two pressure sensors;

[0007] Constructing the pressing position detection model, wherein the pressing position detection model is a torque balance relationship model between the readings of the two pressure sensors and the pressing position;

[0008] The press position detection model is trained using the training data.

[0009] According to a second aspect of the present disclosure, a method for detecting a pressed position of a key is provided, wherein the key is provided with two pressure sensors, and the method comprises:

[0010] acquiring sensor data of the two pressure sensors;

[0011] The pressing position of the key pressed by the user is determined according to the sensor data and a pre-trained pressing position detection model of the key, wherein the pressing position detection model is trained by the method described in the first aspect.

[0012] According to a third aspect of the present disclosure, a training device for a key pressing position detection model is provided, wherein two pressure sensors are provided in the key, and the device comprises:

[0013] A first acquisition module, configured to acquire multiple sets of training data, wherein each set of the training data includes sensor readings of the two pressure sensors;

[0014] A construction module, used to construct the pressing position detection model, wherein the pressing position detection model is a torque balance relationship model between the readings of the two pressure sensors and the pressing position;

[0015] A training module is used to train the press position detection model using the training data.

[0016] According to a fourth aspect of the present disclosure, a key pressing position detection device is provided, the device comprising:

[0017] A second acquisition module, used to acquire sensor data of the two pressure sensors;

[0018] A determination module is used to determine the pressing position of the key pressed by the user based on the sensor data and a pre-trained pressing position detection model of the key, wherein the pressing position detection model is trained by the method described in any one of the first aspects.

[0019] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the steps of the method described in any one of the first aspect and the second aspect are implemented.

[0020] According to a sixth aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the steps of the method described in any one of the first aspect and the second aspect are implemented.

[0021] One technical effect of the present disclosure is that a training method for a key press position detection model is provided, comprising: obtaining multiple groups of training data, each group of the training data comprising sensor readings of two pressure sensors, constructing a press detection model of a torque balance relationship between the two pressure sensor readings and the press position, and then training the model with the training data. In this way, the constructed press position detection model can be used for training, and the influence of nonlinear factors can be resolved through the position detection model.

[0022] Other features and advantages of the embodiments of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the embodiments of the present disclosure.

[0024] Figure 1 is a schematic diagram of the structure of a key according to an embodiment;

[0025] Figure 2 is a flow chart of a method for training a key pressing position detection model according to one embodiment;

[0026] Figure 3 is a flow chart of a method for detecting a pressed position of a key according to an embodiment;

[0027] Figure 4 is a schematic structural diagram of an electronic device according to an embodiment. DETAILED DESCRIPTION

[0028] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0029] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0030] Techniques and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the techniques and equipment should be considered part of the specification.

[0031] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0032] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0033] Buttons with pressure sensors can be Figure 1 As shown, when the user clicks or slides on the key, the pressure sensors of the two channels can identify the detection of the pressing or sliding position based on the torque balance. Figure 1 As shown in the figure, the user presses a certain position on the key with his hand, and the pressure sensor readings of the left and right channels are f1 and f2 respectively. The distance between the position where the force is applied and the left side is s, and the right side is Ls (L is the total length). According to the torque balance condition, we get f1*s=f2*(Ls). Therefore, we can get the position where the force is applied s=f2 / (f1+f2)*L. However, this is only an ideal situation. In actual applications, there are other factors that may cause the above balance conditions to change, resulting in inaccurate position recognition. Therefore,

[0034] In this embodiment, a training method for a key pressing position detection model is provided, which can be Figure 2 As shown, the method includes steps S11 to S13.

[0035] Step S11, obtaining multiple sets of training data, wherein each set of training data includes sensor readings of two pressure sensors.

[0036] In this embodiment, training data can be obtained by pressing a button. Figure 1 When the button is pressed, the two pressure sensors can respectively collect pressure readings. In this embodiment, the pressure sensor can continuously collect data based on a certain collection frequency, and at the same time, the training data can also include the user's pressing position.

[0037] In an example of this embodiment, when a key is pressed, sensor readings of the two pressure sensors at each moment are continuously collected according to a first time interval, wherein each set of training data includes sensor readings of the two pressure sensors at one moment, or sensor readings of the two pressure sensors at multiple consecutive moments.

[0038] In one example, a user can obtain training data by pressing a button. Specifically, while the user is pressing a button, the pressure sensor can continuously collect pressure data at a preset time interval. In one example, the time interval can be less than a predetermined threshold, so that the pressure when the user presses the button or slides on the button can be obtained. For example, the threshold can be 0.01 seconds. In this way, the readings of the two sensors at each moment are collected.

[0039] In this embodiment, each set of training data may include sensor readings at one time, or sensor readings at multiple consecutive time points. For example, when each set of training data includes only sensor readings at one time point, Figure 1 For example, the readings of the left sensor and the right sensor at a certain moment are x1 and x2, then x1 and x2 are taken as a set of training data. In another example, each set of training data includes sensor readings at three consecutive times, where the left sensor includes sensor readings at three moments, namely x1, x3, and x5, and the right sensor also includes sensor readings at three moments, namely x2, x4, and x6. Then x1, x3, x5, x2, x4, and x6 are taken as a set of training data.

[0040] In this example, when obtaining each set of training data, the number of sensor readings at each time point can be determined according to actual needs. When it is necessary to reduce the amount of calculation and shorten the training time, a smaller number of sensor readings can be set in each set of training data. When it is necessary to improve the training accuracy and eliminate the contingency of a single reading, sensor readings at multiple time points can also be set in each set of training data.

[0041] In this embodiment, acquiring multiple sets of training data further includes: pre-dividing the keys into multiple preset areas; and acquiring position information of the preset areas of the keys corresponding to each set of training data.

[0042] In this embodiment, before obtaining the training data, the keys may be pre-divided into multiple areas, for example, Figure 1 As shown, the area between the two sensors can be divided into multiple areas by average length, such as 8 areas, 13 areas or more areas. The number of areas can be set according to actual conditions. The higher the accuracy requirement, the more areas can be set. The higher the training speed requirement, the smaller the number of preset areas can be.

[0043] After presetting multiple areas, this embodiment can further obtain the location information of the preset area corresponding to the reorganized training data when obtaining each set of training data. The location information can be the number of the area or other set information, etc. The location information can be used as a label of the sensor reading in the set of training data to facilitate subsequent training.

[0044] In an example of this embodiment, acquiring multiple sets of training data further includes: normalizing position information of preset areas of keys corresponding to the multiple sets of training data.

[0045] In an example, the location information of the corresponding preset area in each set of training data may be the corresponding area number, or other information. Therefore, in order to facilitate the calculation of the model, the location information in each set of training data can be normalized, for example, normalized to the interval of (-1,1), so as to facilitate subsequent model calculations and improve calculation efficiency.

[0046] Step S12, constructing a pressing position detection model, wherein the pressing position detection model is a torque balance relationship model between the readings of the two pressure sensors and the pressing position.

[0047] The ideal torque balance model is actually a linear model, that is, Y = a*x + b, where Y is the position to be solved, x = x1 / (x1+x2), and x1 and x2 are the readings of the pressure sensors of the two channels respectively. However, in practical applications, many nonlinear factors will affect the above torque balance model. Therefore, a new press position detection model can be constructed. Since the polynomial model can handle the nonlinear relationship between features in addition to linear features, the model can be a polynomial form, or other similar forms of models. In this example, the polynomial model can be a two-dimensional polynomial model, or a higher-dimensional polynomial model, which can contain constants, original features and higher-dimensional features, where the original features can represent the readings of the pressure sensor, and the high-dimensional features can represent the nonlinear factors.

[0048] In one example of this embodiment, when constructing the press position detection model, it can be set based on how many sensor readings at each moment are included in each set of training data. For example, when each set of training data contains only one sensor reading, the press position detection model can be set to the following form:

[0049]

[0050] Among them, Y is the pressing position to be solved, X1 and X2 are the sensor readings of the two pressure sensors, and a, b, c, d, e, and f are the coefficients of each feature, which are solved through model training.

[0051] In another example, when each set of training data contains only a variety of sensor readings, taking three sets as an example, the press position detection model can be set up as follows:

[0052]

[0053] Among them, Y is the pressing position to be solved, X1, X2, X3, X4, X5, and X6 are the sensor readings of two pressure sensors at three moments, including constants, original features X1-X6, and two-dimensional features, namely, the product and square of X1-X6.

[0054] The above examples take a two-dimensional polynomial as an example. It can be understood that those skilled in the art can set a polynomial model with a higher dimension according to actual needs.

[0055] Step S13, training the pressing position detection model using training data.

[0056] In an example of this embodiment, the pressed position detection model can be trained by the acquired training data. In this example, the pressed position detection model can be trained by a linear regression algorithm or a polynomial regression algorithm, and the sensor reading is input into the model as a feature, and the pressed position is used as a label for training and testing to obtain a trained pressed position detection model.

[0057] In this example, a training method for a key press position detection model is provided, including obtaining multiple groups of training data, each group of training data includes sensor readings of two pressure sensors, constructing a press detection model of the torque balance relationship between the two pressure sensor readings and the press position, and then training the model with the training data. In this way, the constructed press position detection model can be used for training, and the influence of nonlinear factors can be resolved through the position detection model.

[0058] In an example of the present embodiment, the press position detection model is trained using training data, including: dividing multiple groups of training data into training set data and test set data; inputting the training set data into the press position detection model, and training it using a linear regression algorithm to determine the coefficients of each term of the two-dimensional polynomial; using the test set data to determine the mean square error and determination coefficient of the trained press position detection model; and completing the training of the press position detection model when the mean square error and the determination coefficient meet preset conditions.

[0059] In this embodiment, after obtaining the above-mentioned multiple groups of data, the above-mentioned data can be grouped into a training group and a test group, and the training set data is input into the model for training through a linear regression algorithm, and each characteristic coefficient in the two-dimensional polynomial is calculated by the least squares method. Thereafter, the mean square error and the determination coefficient are calculated using the data of the test set. When the mean square error and the determination coefficient both meet the requirements of the preset conditions, it is determined that the model training is completed. If the conditions are not met, new training data is obtained for further training.

[0060] In this embodiment, a method for detecting a key pressing position is provided. Figure 3 As shown, the method includes steps S21 and S22.

[0061] S21, acquiring sensor data of two pressure sensors.

[0062] In this embodiment, when the user presses or slides the button, the sensor reading of the pressure sensor can be synchronously obtained. In this example, the pressure sensor can continuously collect the sensor readings of the two pressure sensors at each moment according to the first time interval. The time interval can be less than a predetermined threshold, for example, the threshold can be 0.01 seconds, in this way, the readings of the two sensors at each moment are collected.

[0063] S22, determining the pressing position of the key pressed by the user according to the sensor data and a pre-trained pressing position detection model of the key, wherein the pressing position detection model is trained by the training method of the pressing position detection model of the key of any embodiment.

[0064] In this embodiment, after the press position detection model is trained by the aforementioned method, the collected sensor data can be input into the corresponding pre-trained press position detection model. When the press position detection model is trained by training data including the sensor reading of the pressure sensor at one moment, the press position can be determined by the model for the sensor data at each moment, or the position of the sensor can be determined at a certain time interval. When the press position detection model is trained by training data including the sensor reading of the pressure sensor at multiple consecutive moments, the press position can be determined after obtaining the readings of the pressure sensor at multiple consecutive moments.

[0065] An embodiment of the present application also discloses a training device for a key press position detection model, in which two pressure sensors are arranged in the key, and the device comprises: a first acquisition module, for acquiring multiple groups of training data, wherein each group of training data comprises sensor readings of two pressure sensors; a construction module, for constructing a press position detection model, wherein the press position detection model is a torque balance relationship model of the two pressure sensor readings and the press position; and a training module, for training the press position detection model through the training data.

[0066] Optionally, the first acquisition module is specifically used to continuously collect sensor readings of the two pressure sensors at each moment according to a first time interval when the button is pressed, wherein each group of the training data includes sensor readings of the two pressure sensors at one moment, or sensor readings of the two pressure sensors at multiple consecutive moments.

[0067] Optionally, the first acquisition module is specifically used to pre-divide the button into a plurality of preset areas; and obtain position information of the preset area of ​​the button corresponding to each set of training data.

[0068] Optionally, the first acquisition module is specifically used to normalize the position information of the preset area of ​​the button corresponding to the multiple groups of training data.

[0069] Optionally, the press position detection model is a two-dimensional polynomial model, and the training module is specifically used to: divide the multiple groups of training data into training set data and test set data; input the training set data into the press position detection model, and train it through a linear regression algorithm to determine the coefficients of each term of the two-dimensional polynomial; use the test set data to determine the mean square error and determination coefficient of the trained press position detection model; and complete the training of the press position detection model when the mean square error and determination coefficient meet preset conditions.

[0070] An embodiment of the present application also discloses a device for detecting the pressed position of a key, wherein the key is provided with two pressure sensors, and the device comprises: a second acquisition module, used to acquire sensor data of the two pressure sensors; and a determination module, used to determine the pressed position of the key pressed by the user based on the sensor data and a pre-trained pressed position detection model of the key, wherein the pressed position detection model is trained by the training method of the pressed position detection model of the key of any of the aforementioned embodiments.

[0071] The present application embodiment also provides an electronic device 400, such as Figure 4 As shown, it includes a processor 401 and a memory 402, in which computer instructions are stored. When the computer instructions are executed by the processor, a training method for a key pressing position detection model and any one of the methods in the key pressing position detection method embodiments are implemented.

[0072] The present application also provides a storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of a training method for a key pressing position detection model and any one of the methods described in the key pressing position detection method embodiments.

[0073] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0074] The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0075] The embodiments of the present disclosure may be systems, methods and / or computer program products. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the embodiments of the present disclosure.

[0076] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0077] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0078] The computer program instructions for performing the operation of the embodiments of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of a computer-readable program instruction, and the electronic circuit may execute a computer-readable program instruction, thereby realizing various aspects of the embodiments of the present disclosure.

[0079] Various aspects of the embodiments of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0080] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0081] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0082] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and a part of a module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0083] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for training a key pressing position detection model, characterized in that: The button is provided with two pressure sensors, and the method comprises: Acquire multiple sets of training data, wherein each set of the training data includes sensor readings of the two pressure sensors; Constructing the pressing position detection model, wherein the pressing position detection model is a torque balance relationship model between the readings of the two pressure sensors and the pressing position; The press position detection model is trained using the training data.

2. The method according to claim 1, characterized in that The obtaining of multiple sets of training data comprises: When the button is pressed, the sensor readings of the two pressure sensors at each moment are continuously collected according to a first time interval, wherein each group of the training data includes the sensor readings of the two pressure sensors at one moment, or the sensor readings of the two pressure sensors at multiple consecutive moments.

3. The method according to claim 2, characterized in that The acquiring of multiple sets of training data further comprises: Dividing the key into a plurality of preset areas in advance; The position information of the preset area of ​​the key corresponding to each set of training data is obtained.

4. The method according to claim 3, characterized in that The acquiring of multiple sets of training data further comprises: The position information of the preset areas of the buttons corresponding to the multiple sets of training data are normalized.

5. The method according to claim 3, characterized in that: The pressed position detection model is a two-dimensional polynomial model, and the training of the pressed position detection model by using the training data includes: Dividing the multiple sets of training data into training set data and test set data; Inputting the training set data into the press position detection model, and training it through a linear regression algorithm to determine the coefficients of each term of the two-dimensional polynomial; Determine the mean square error and coefficient of determination of the pressed position detection model after training using the test set data; When the mean square error and the determination coefficient meet the preset conditions, the training of the pressing position detection model is completed.

6. A method for detecting a pressed position of a key, characterized in that: The button is provided with two pressure sensors, and the method comprises: acquiring sensor data of the two pressure sensors; The pressing position of the key pressed by the user is determined based on the sensor data and a pre-trained pressing position detection model of the key, wherein the pressing position detection model is trained by the method described in any one of claims 1-5.

7. A training device for a key pressing position detection model, characterized in that: Two pressure sensors are arranged in the button, and the device comprises: A first acquisition module, configured to acquire multiple sets of training data, wherein each set of the training data includes sensor readings of the two pressure sensors; A construction module, used to construct the pressing position detection model, wherein the pressing position detection model is a torque balance relationship model between the readings of the two pressure sensors and the pressing position; A training module is used to train the press position detection model using the training data.

8. A key pressing position detection device, characterized in that: The button is provided with two pressure sensors, and the device comprises: A second acquisition module, used to acquire sensor data of the two pressure sensors; A determination module is used to determine the pressing position of the key pressed by the user based on the sensor data and a pre-trained pressing position detection model of the key, wherein the pressing position detection model is trained by the method described in any one of claims 1-5.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the steps of the method described in any one of claims 1 to 6 are implemented.

10. A storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Keyboard key pressure identification method and device based on deep learning

    CN119598353A