Key error correction method and device, electronic equipment and storage medium

By dividing the molecular area in the key area and calculating the spatial and time weight values ​​to determine the user's input intention, the problem of user's mistaken touch or error is solved, and automatic error correction and accuracy of the operation are achieved.

CN119440292APending Publication Date: 2025-02-14NINGBO FOTILE KITCHEN WARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310962766.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-01
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art cannot effectively solve the problem of user touching or pressing the wrong key, resulting in increased operational difficulty and complexity.

Method used

By dividing the key area into sub-regions, the spatial and time weight values ​​of each sub-region are calculated, and the final weight is calculated based on these weight values ​​to determine the user's input intent.

Benefits of technology

It realizes automatic error correction when users touch or press them incorrectly, reduces operation difficulty and complexity, and improves operation accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440292A_ABST
    Figure CN119440292A_ABST
Patent Text Reader

Abstract

The invention discloses a key error correction method and device, electronic equipment and a storage medium. The error correction method comprises the following steps: determining a space weight value and a time weight value of a sub-region in response to a touch instruction on a key region; wherein the key area comprises at least two keys, and each key is divided into at least two sub-areas; the spatial weight value is determined according to the position of the sub-region and the touch position of the touch instruction; the time weight value is determined according to historical touch data of the key; calculating a final weight value of the key according to the space weight value and the time weight value; and determining a key corresponding to the touch instruction according to the final weight. Therefore, the mistaken touch or wrong pressing of the user can be corrected. The operation difficulty and complexity are reduced, and the operation accuracy and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of key technology, and in particular to a key error correction method, device, electronic equipment, and storage medium. Background Art

[0002] In daily life, touch operation of buttons is usually done by manufacturers by adding a touch feedback mechanism to the buttons so that users can feel the connection with the required operation. Or manufacturers can improve the accuracy and sensitivity of the buttons by optimizing factors such as the touch area, concave-convex shape, and touch force of the buttons. However, these technical solutions cannot effectively solve the problem of users accidentally touching or pressing the wrong button. When users accidentally touch or press the wrong button, they still need to correct it manually, which increases the difficulty and complexity of the operation. Therefore, a method for automatically correcting the buttons is needed. Summary of the invention

[0003] The technical problem to be solved by the present invention is to overcome the defect in the prior art that manual correction is required for user's accidental touches or wrong presses, and to provide a key error correction method, device, electronic device, and storage medium.

[0004] The present invention solves the above technical problems through the following technical solutions:

[0005] In a first aspect, a method for correcting an error of a key being touched accidentally is provided, the method comprising:

[0006] In response to a touch instruction on a key area, determining a spatial weight value and a temporal weight value of a sub-area; wherein the key area includes at least two keys, each key is divided into at least two sub-areas; the spatial weight value is determined according to a position of the sub-area and a touch position of the touch instruction; and the temporal weight value is determined according to historical touch data of the key;

[0007] Calculating a final weight of the button according to the spatial weight value and the temporal weight value;

[0008] The key targeted by the touch instruction is determined according to the final weight.

[0009] Optionally, determining the spatial weight value includes:

[0010] Recording the horizontal and vertical coordinates of the touch position on the key area;

[0011] Record the center coordinates of the touch position in the sub-area;

[0012] The spatial weight value is calculated by using a Gaussian function based on the horizontal and vertical coordinates and the center coordinate.

[0013] Optionally, the calculation formula of the spatial weight value is as follows:

[0014]

[0015] Among them, W i represents the spatial weight value of the ith sub-region; (x i ,y i ) represents the center coordinates of the i-th sub-region; σ i represents the variance of the Gaussian function; (x, y) represents the horizontal and vertical coordinates; n represents the total number of sub-areas into which each key is divided.

[0016] Optionally, determining the time weight value includes:

[0017] Recording historical touch data, wherein the historical touch data includes the timestamp of the historical touch event and the weight value of the historical touch event;

[0018] The time weight value is calculated by using an exponential decay function based on the timestamps of the historical touch events and the weight values ​​of the historical touch events.

[0019] Optionally, the calculation formula of the time weight value is as follows:

[0020]

[0021] Among them, W tm represents the time weight value of the historical touch event; α represents the decay rate parameter; t k Indicates the timestamp of the kth touch event; W k represents the weight value of the kth touch event; m represents the number of historical touch events.

[0022] Optionally, calculating the final weight value according to the spatial weight value and the temporal weight value includes:

[0023] The spatial weight value and the temporal weight value are weighted to obtain the final weight value.

[0024] Optionally, the calculation formula of the final weight is as follows:

[0025]

[0026] Among them, W i represents the spatial weight value of the i-th sub-region; W tm represents the time weight value of the historical touch event; Wtotal represents the final weight; λ represents the ratio of the spatial weight to the time weight.

[0027] In a second aspect, a key error correction device is provided, the key error correction device comprising:

[0028] A first determination module, configured to determine a spatial weight value and a temporal weight value of a sub-region in response to a touch instruction on a key region; wherein the key region includes at least two keys, each key being divided into at least two sub-regions; the spatial weight value is determined according to a position of the sub-region and a touch position of the touch instruction; and the temporal weight value is determined according to historical touch data of the key;

[0029] A calculation module, used for calculating a final weight of the sub-region according to the spatial weight value and the temporal weight value;

[0030] The second determining module is used to determine the key targeted by the touch instruction according to the final weight.

[0031] According to a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned methods for correcting mistaken key touches when executing the computer program.

[0032] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the method for correcting an error of a key touch is implemented as described in any one of the above.

[0033] The positive and progressive effect of the present invention is that in the embodiment of the present invention, the pressed key is determined according to the spatial weight value of the key sub-region and the temporal weight value of the key sub-region, and the user can be corrected when the key is accidentally touched or pressed incorrectly. This not only reduces the difficulty and complexity of the operation, but also improves the accuracy and reliability of the operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of the division of some key areas provided by an exemplary embodiment of the present invention;

[0035] Figure 2 A flow chart of a method for correcting an error of a key press provided by an exemplary embodiment of the present invention;

[0036] Figure 3 Another flow chart of a method for correcting an error of key pressing provided by an exemplary embodiment of the present invention

[0037] Figure 4 A schematic diagram of a module of a key mis-touch correction device provided by an exemplary embodiment of the present invention;

[0038] Figure 5 The present invention is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0039] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.

[0040] Example 1

[0041] In order to correct the user's accidental touch or wrong press, an embodiment of the present invention provides a key error correction method, which can be used for but not limited to color film keys, touch screen keys, etc. The error correction method divides each key in the key area into at least two sub-areas in advance, wherein the key area includes at least two keys. Figure 1 A schematic diagram of the division of a part of the key area provided by an exemplary embodiment of the present invention. The key area must include at least two keys, and each key is evenly divided into n sub-areas ( Figure 1 The area of ​​each sub-region is S i ,in, S represents the area of ​​each key. In a specific implementation, the division operation can be completed by mapping the keys to a discrete grid and then dividing the grid into n sub-areas.

[0042] It should be noted that the number of sub-areas divided by each button can be set according to actual needs; the number of sub-areas divided by each button can be the same or different; the area of ​​each sub-area can be the same or different.

[0043] Figure 2 A flow chart of a method for correcting an error of a key touch provided by an exemplary embodiment of the present invention, the method comprising the following steps:

[0044] Step 201: In response to a touch instruction on a key area, determine a spatial weight value and a temporal weight value of a sub-area.

[0045] The key area includes at least two keys, each key is divided into at least two sub-areas, the spatial weight value is determined according to the position of the sub-area and the touch position of the touch instruction, and the temporal weight value is determined according to the historical touch data of the key. The spatial weight value represents the importance and influence of the data point in the spatial dimension. The temporal weight value represents the importance or influence of the data point in the dimension.

[0046] In one embodiment, when a key is touched, the horizontal and vertical coordinates of the touch position on the key area and the center coordinates of the touch position in the sub-area are recorded. The spatial weight value of the sub-area is calculated using a Gaussian function based on the horizontal and vertical coordinates of the touch position on the key area and the center coordinates of the touch position in the sub-area. The closer the center coordinates of the touch position in the sub-area are to the horizontal and vertical coordinates of the touch position on the key area, the greater the weight value of the center coordinates of the touch position in the sub-area. The spatial weight value refers to the contribution of data points at different positions to the final weighted result in the spatial dimension. Generally, data points whose center coordinates of the sub-area are closer to the horizontal and vertical coordinates of the touch position will have a greater impact on the weighted average result, while data points whose distance is farther will have less impact on the weighted average result. Therefore, when calculating the spatial weight value, a distance-based method, such as a Gaussian function, is usually used to describe the contribution of data points at different distances to the weighted average result, thereby obtaining a spatial weight value.

[0047] In one embodiment, the calculation formula of the spatial weight value of the sub-region is as follows:

[0048]

[0049] Among them, W i represents the spatial weight value of the ith sub-region; (x i ,y i ) represents the center coordinate of the i-th sub-region; σ i represents the variance of the Gaussian function; (x, y) represents the horizontal and vertical coordinates; n represents the total number of sub-areas into which each key is divided.

[0050] In one embodiment, when a key is touched, historical touch data needs to be recorded. The historical touch data includes the timestamp of the historical touch event, the time weight value of the historical touch event, and the touch position of the historical touch event. The final weight of the historical touch event can be determined by the touch position of the historical touch event.

[0051] The time weight value is calculated using an exponential decay function based on the timestamps of historical touch events and the weight values ​​of historical touch events. The time weight value refers to the contribution of sub-areas at different times to the weighted result in the time dimension. Generally speaking, sub-areas with a close time interval to the current touch button have a greater impact on the weighted result, while data points that are farther away in the past will gradually reduce their impact on the weighted average result. Therefore, when calculating the time weight, an exponential decay function can be used, but is not limited to, to reflect the importance of recent data points to the weighted average result, and to decay the impact of past data points over time, thereby obtaining a time weight value.

[0052] In one embodiment, the calculation formula of the time weight value is as follows:

[0053]

[0054] Among them, W tm represents the time weight value of the historical touch event; α represents the decay rate parameter, which controls the degree of weight decay over time; t k Indicates the timestamp of the kth touch event; W k represents the weight value of the kth touch event; m represents the number of historical touch events.

[0055] By dividing each key into multiple sub-areas in equal parts, and by calculating the spatial weight value and time weight value of each sub-area, the spatial weight value and time weight value are used to jointly determine the final touch key in the spatial dimension and the time dimension, the user's input intention can be accurately determined, thereby improving the accuracy of the user's touch key.

[0056] Step 202: Calculate the final weight of the key according to the spatial weight value and the temporal weight value. In one embodiment, the spatial weight value and the temporal weight value are weighted to obtain the final weight.

[0057] In one embodiment, the calculation formula of the final weight is as follows:

[0058]

[0059] Among them, W i represents the spatial weight value of the i-th sub-region; W tm represents the time weight value of the historical touch event; Wtotal represents the final weight; λ represents the ratio of the spatial weight to the temporal weight, wherein the value of λ is related to the actual application scenario. In the scenario of the embodiment of the present invention, the optimal value of λ is 0.5.

[0060] The judgment in the spatial dimension is only to calculate a touch at the physical level. If the key is pressed at the edge of two keys, it is easy to make mistakes by judging in space alone. At this time, it is necessary to judge the result of historical touches at this point, that is, the time dimension. Therefore, by correcting the key in two dimensions, the user's input intention can be accurately determined, which improves the reliability of the key.

[0061] Step 203: Determine the key targeted by the touch instruction according to the final weight.

[0062] In one embodiment, the final weights of the various keys are compared to determine which key is finally pressed. Usually, the final weights are numerically compared, and the key with the largest final weight is selected as the key actually pressed. In a specific implementation, a threshold may be set. If the final weight is greater than the threshold, a numerical comparison is performed. If the final weight is lower than the threshold, the weight value is directly filtered out.

[0063] Combine the following Figure 3 , further explains the method of correcting accidental key touches.

[0064] Step 301: When a key receives a touch instruction, the touch position and touch time of the touch key are recorded.

[0065] Step 302: Calculate a spatial weight value of the touch position by using a Gaussian function according to the touch position.

[0066] Step 303: Calculate the time weight value of the touch position using an exponential decay function according to the touch position and the historical touch record of the touch position.

[0067] Step 304: Perform weighted calculation on the spatial weight value of the touch position and the temporal weight value of the touch position to obtain a final weight value of the touch position.

[0068] Step 305: Determine the key that is finally pressed according to the final weight of the touch position.

[0069] Example 2

[0070] Corresponding to the aforementioned embodiment of the method for correcting the error of key touching accidentally, the present invention also provides an embodiment of a device for correcting the error of key touching accidentally.

[0071] Figure 4 A schematic diagram of a module of a key mis-touch correction device provided by an exemplary embodiment of the present invention, the device comprising:

[0072] A first determination module 41 is used to determine the spatial weight value and the temporal weight value of the sub-region in response to the touch instruction on the key region; wherein the key region includes at least two keys, each of which is divided into at least two sub-regions; the spatial weight value is determined according to the position of the sub-region and the touch position of the touch instruction; and the temporal weight value is determined according to the historical touch data of the key;

[0073] A calculation module 42, used to calculate the final weight of the sub-region according to the spatial weight value and the temporal weight value;

[0074] The second determination module 43 is used to determine the key targeted by the touch instruction according to the final weight.

[0075] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0076] Example 3

[0077] Figure 5 The schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present invention shows a block diagram of an exemplary electronic device 50 suitable for implementing the embodiment of the present invention. Figure 5 The electronic device 50 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0078] like Figure 5 As shown, the electronic device 50 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 50 may include, but are not limited to: at least one processor 51, at least one memory 52, and a bus 53 connecting different system components (including the memory 52 and the processor 51).

[0079] The bus 53 includes a data bus, an address bus, and a control bus.

[0080] The memory 52 may include a volatile memory, such as a random access memory (RAM) 521 and / or a cache memory 522 , and may further include a read-only memory (ROM) 523 .

[0081] The memory 52 may also include a program tool 525 (or utility) having a set (at least one) of program modules 525, such program modules 525 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0082] The processor 51 executes various functional applications and data processing by running the computer program stored in the memory 52, such as the method provided in any of the above embodiments.

[0083] The electronic device 50 may also communicate with one or more external devices 55 (e.g., keyboard, pointing device, etc.). Such communication may be performed via an input / output (I / O) interface 55. Furthermore, the model-generated electronic device 50 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 56. As shown, the network adapter 56 communicates with other modules of the model-generated electronic device 50 via a bus 53. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated electronic device 50, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0084] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0085] Example 5

[0086] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method provided by any of the above embodiments is implemented.

[0087] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0088] In a possible implementation manner, the embodiment of the present invention may also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute a method for implementing any of the above embodiments.

[0089] Among them, the program code for executing the present invention can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.

[0090] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. A method for correcting an error of a key press, characterized in that: The method for correcting an error of a key touch includes: In response to a touch instruction on a key area, determining a spatial weight value and a temporal weight value of a sub-area; wherein the key area includes at least two keys, each key is divided into at least two sub-areas; the spatial weight value is determined according to a position of the sub-area and a touch position of the touch instruction; and the temporal weight value is determined according to historical touch data of the key; Calculating a final weight of the button according to the spatial weight value and the temporal weight value; The key targeted by the touch instruction is determined according to the final weight.

2. The method according to claim 1, characterized in that Determining the spatial weight value includes: Recording the horizontal and vertical coordinates of the touch position on the key area; Record the center coordinates of the touch position in the sub-area; The spatial weight value is calculated by using a Gaussian function based on the horizontal and vertical coordinates and the center coordinate.

3. The method according to claim 2, characterized in that The calculation formula of the spatial weight value is as follows: Among them, W i represents the spatial weight value of the ith sub-region; (x i ,y i ) represents the center coordinates of the i-th sub-region; σ i represents the variance of the Gaussian function; (x, y) represents the horizontal and vertical coordinates; n represents the total number of sub-areas into which each key is divided.

4. The method according to claim 1, characterized in that Determining the time weight value includes: Recording historical touch data; wherein the historical touch data includes timestamps of historical touch events and weight values ​​of historical touch events; The time weight value is calculated by using an exponential decay function based on the timestamps of the historical touch events and the weight values ​​of the historical touch events.

5. The method according to claim 4, characterized in that The calculation formula of the time weight value is as follows: Among them, W tm represents the time weight value of the historical touch event; α represents the decay rate parameter; t k Indicates the timestamp of the kth touch event; W k represents the weight value of the kth touch event; m represents the number of historical touch events.

6. The method according to claim 1, characterized in that Calculating the final weight value according to the spatial weight value and the temporal weight value includes: The spatial weight value and the temporal weight value are weighted to obtain the final weight value.

7. The method according to claim 6, characterized in that The calculation formula of the final weight is as follows: Among them, W i represents the spatial weight value of the i-th sub-region; W tm represents the time weight value of the historical touch event; Wtotal represents the final weight value; λ represents the ratio of the spatial weight value to the time weight value.

8. A key error correction device, characterized in that: The button mis-touch error correction device comprises: A first determination module, configured to determine a spatial weight value and a temporal weight value of a sub-region in response to a touch instruction on a key region; wherein the key region includes at least two keys, each key being divided into at least two sub-regions; the spatial weight value is determined according to a position of the sub-region and a touch position of the touch instruction; and the temporal weight value is determined according to historical touch data of the key; A calculation module, used for calculating a final weight of the sub-region according to the spatial weight value and the temporal weight value; The second determination module is used to determine the key targeted by the touch instruction according to the final weight.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for correcting incorrect key touches according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for correcting incorrect key touches according to any one of claims 1 to 7 is implemented.