Key triggering method and device, electric equipment, medium and computer program product

By detecting the pressure data and rate of change of the buttons, valid operations are confirmed and corresponding instructions are executed, solving the problem of accidental button triggering in confined environments and improving the accuracy and adaptability of button triggering.

CN121764337APending Publication Date: 2026-03-31GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, buttons are prone to accidental triggering in confined spaces due to pressure or slight friction, causing electrical devices to perform operations that do not match the user's intentions, thus reducing the accuracy of button triggering.

Method used

By detecting the pressure data of the button, the pressure change rate is calculated, and when the pressure change rate is greater than a preset threshold, the pressing operation is confirmed as a valid operation, and the corresponding trigger command is executed. The pressure threshold is adjusted by combining the duration of the pressure data and historical data to improve accuracy.

Benefits of technology

It effectively reduces the risk of accidental triggering caused by external pressure or friction, improves the accuracy and robustness of button triggering, adapts to different user operating habits, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764337A_ABST
    Figure CN121764337A_ABST
Patent Text Reader

Abstract

The invention relates to a key triggering method and device, electric equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: in response to a detected press operation of a key, acquiring pressure data corresponding to the press operation; under the condition that the pressure data is greater than a preset pressure threshold value, determining a pressure change rate corresponding to the pressing operation according to the pressure data; under the condition that the pressure change rate is greater than a preset change rate threshold value, determining that the pressing operation is effective operation; and under the condition that the pressing operation is the effective operation, executing a trigger instruction corresponding to the pressing operation. By adopting the method, the risk of triggering the key by mistake due to external extrusion or friction can be reduced, so that the accuracy of key triggering is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of touch technology, and in particular to a button triggering method, device, electrical equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] In daily life, button input is a mainstream human-computer interaction method widely used in various electrical devices. These buttons include mechanical buttons, capacitive touch buttons, and virtual buttons. Users can trigger corresponding commands to operate the electrical devices by touching or pressing the buttons.

[0003] However, when electrical devices are placed in narrow environments such as seat gaps or bags, or when other objects are placed on the devices, buttons are prone to false triggering due to pressure or slight friction (such as being accidentally pressed by a body or other objects), causing the devices to perform operations that do not match the user's intentions, resulting in low accuracy of button triggering. Summary of the Invention

[0004] Therefore, it is necessary to provide a key triggering method, device, electrical equipment, computer-readable storage medium, and computer program product that can improve the accuracy of key triggering in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a button-triggered method, the method comprising:

[0006] In response to a detected button press, acquire pressure data corresponding to the press operation;

[0007] If the pressure data is greater than a preset pressure threshold, the pressure change rate corresponding to the pressing operation is determined based on the pressure data.

[0008] If the rate of change of pressure is greater than a preset rate of change threshold, the pressing operation is determined to be a valid operation;

[0009] If the pressing operation is valid, the trigger command corresponding to the pressing operation is executed.

[0010] In one embodiment, determining that the pressing operation is a valid operation when the pressure change rate is greater than a preset change rate threshold includes:

[0011] If the pressure change rate is greater than a preset change rate threshold, the duration for which the pressure data is greater than the pressure threshold is obtained.

[0012] If the duration is less than or equal to the preset maximum effective duration, the pressing operation is determined to be a valid operation.

[0013] In one embodiment, after determining the rate of change of pressure corresponding to the pressing operation based on the pressure data, the method further includes:

[0014] If the rate of change of pressure is less than or equal to a preset rate of change threshold, the pressing operation is determined to be an unconscious operation.

[0015] If the pressing operation is unintentional, the trigger function of the button is disabled.

[0016] In one embodiment, the method further includes:

[0017] Obtain the historical pressure data corresponding to the pressing operation;

[0018] The pressure threshold is adjusted based on the feature values ​​of the historical pressure data.

[0019] In one embodiment, the pressure data includes multiple pressure values ​​with sampling timestamps, and determining the pressure change rate corresponding to the pressing operation based on the pressure data includes:

[0020] Determine the pressure difference between adjacent pressure values ​​and the time difference between the sampling timestamps corresponding to adjacent pressure values;

[0021] The pressure change rate corresponding to the pressing operation is determined based on the pressure difference and the time difference.

[0022] In one embodiment, the method further includes:

[0023] The trigger command corresponding to the pressing operation is determined based on the pressure data.

[0024] In one embodiment, determining that the pressing operation is a valid operation when the pressure change rate is greater than a preset change rate threshold includes:

[0025] If the pressure change rate is greater than a preset change rate threshold, obtain the pressure curve of the pressure data within a preset target time period;

[0026] Determine the similarity between the pressure curve and the preset target pressure curve;

[0027] If the similarity is greater than a preset similarity threshold, the pressing operation is determined to be a valid operation.

[0028] Secondly, this application also provides a button triggering device, comprising:

[0029] The pressure detection module is used to respond to the detected button press operation and acquire the pressure data corresponding to the press operation;

[0030] The pressure change rate detection module is used to determine the pressure change rate corresponding to the pressing operation based on the pressure data when the pressure data is greater than a preset pressure threshold.

[0031] An operation recognition module is used to determine that the pressing operation is a valid operation when the pressure change rate is greater than a preset change rate threshold.

[0032] The trigger module is used to execute the trigger command corresponding to the pressing operation when the pressing operation is a valid operation.

[0033] Thirdly, this application also provides an electrical device, including a button, a pressure detection component, a memory, and a processor. The pressure detection component is connected to the processor and is used to detect pressure data of the button and transmit the pressure data to the processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0034] In response to a detected button press, acquire pressure data corresponding to the press operation;

[0035] If the pressure data is greater than a preset pressure threshold, the pressure change rate corresponding to the pressing operation is determined based on the pressure data.

[0036] If the rate of change of pressure is greater than a preset rate of change threshold, the pressing operation is determined to be a valid operation;

[0037] If the pressing operation is valid, the trigger command corresponding to the pressing operation is executed.

[0038] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0039] In response to a detected button press, acquire pressure data corresponding to the press operation;

[0040] If the pressure data is greater than a preset pressure threshold, the pressure change rate corresponding to the pressing operation is determined based on the pressure data.

[0041] If the rate of change of pressure is greater than a preset rate of change threshold, the pressing operation is determined to be a valid operation;

[0042] If the pressing operation is valid, the trigger command corresponding to the pressing operation is executed.

[0043] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0044] In response to a detected button press, acquire pressure data corresponding to the press operation;

[0045] If the pressure data is greater than a preset pressure threshold, the pressure change rate corresponding to the pressing operation is determined based on the pressure data.

[0046] If the rate of change of pressure is greater than a preset rate of change threshold, the pressing operation is determined to be a valid operation;

[0047] If the pressing operation is valid, the trigger command corresponding to the pressing operation is executed.

[0048] The aforementioned button triggering method, device, electrical equipment, computer-readable storage medium, and computer program product, in response to a detected button press operation, acquire pressure data corresponding to the press operation; if the pressure data is greater than a preset pressure threshold, determine the pressure change rate corresponding to the press operation based on the pressure data; if the pressure change rate is greater than a preset change rate threshold, determine the press operation as a valid operation; and if the press operation is a valid operation, execute the trigger command corresponding to the press operation. This application, upon detecting a button operation, acquires pressure data corresponding to the button operation. Only when the pressure data is greater than a preset pressure range and the pressure change rate obtained based on the pressure data is greater than a preset change rate threshold, is the button operation considered valid, and the trigger command corresponding to the press operation executed. This helps reduce the risk of accidental button triggering due to external pressure or friction, thereby improving the accuracy of button triggering. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is an application environment diagram of a button triggering method in one embodiment;

[0051] Figure 2 This is a flowchart illustrating a button triggering method in one embodiment;

[0052] Figure 3This is a schematic diagram illustrating a specific example of a button triggering method in one embodiment;

[0053] Figure 4 This is a detailed flowchart illustrating the steps for determining a pressing operation as a valid operation when the rate of change of pressure is greater than a preset rate of change threshold, as shown in one embodiment.

[0054] Figure 5 This is a detailed flowchart of a button triggering method in one embodiment;

[0055] Figure 6 This is a detailed schematic diagram illustrating the steps of determining a pressing operation as a valid operation when the rate of change of pressure is greater than a preset rate of change threshold, as described in another embodiment.

[0056] Figure 7 This is a detailed flowchart of the button triggering method in another embodiment;

[0057] Figure 8 This is a detailed flowchart illustrating the steps of determining the rate of change of pressure corresponding to a pressing operation based on pressure data in one embodiment.

[0058] Figure 9 This is a structural block diagram of a button triggering device in one embodiment;

[0059] Figure 10 This is an internal structural diagram of an electrical device in one embodiment. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0061] In modern smart home appliances, in-vehicle central control systems, medical equipment, and smart terminals, button input is a mainstream human-computer interaction method widely used in various computer devices. Computer device buttons include mechanical buttons, capacitive touch buttons, and virtual buttons. By touching or pressing a button, corresponding commands are triggered to operate the computer device.

[0062] However, when electrical devices are placed in narrow environments such as seat gaps or bags, or when other objects are placed on the devices, physical buttons are prone to accidental triggering due to pressure or slight friction (such as being accidentally pressed by a body or other objects). Virtual buttons on touchscreen devices may also be accidentally triggered due to external friction and pressure when the device is unlocked (such as an unlocked phone placed in a pocket and accidentally touched due to pressure and friction). This causes the electrical device to perform operations that do not match the user's intention, resulting in low accuracy of button triggering on electrical devices.

[0063] Based on the above problems, this application proposes a button triggering method. The button triggering method provided by this application can be applied to, for example... Figure 1 The electrical device shown includes a button 110, a pressure detection component 120, a memory 130, and a processor 140. The pressure detection component 120 is located below the button 110 and is communicatively connected to the processor 140. It is used to collect the pressure data corresponding to the button 110 when the user presses the button 110, and transmit the pressure data to the processor 140.

[0064] The pressure detection component 120 can be a piezoresistive thin-film pressure sensor, located below the button 110 or below the panel to which the virtual button 110 is located.

[0065] The memory 130 can store the data that the processor 104 needs to process. The memory 130 can be integrated into the processor 104 or placed in the cloud. The pressure detection component 120 continuously detects the pressure data corresponding to the button 110. When a press operation is detected, the processor 140 acquires the pressure data transmitted by the pressure detection component 120 and stores the pressure data in the memory 130. If the processor 140 detects that the pressure data is greater than a preset pressure threshold, it retrieves the pressure data from the memory 130 and determines the pressure change rate corresponding to the press operation based on the pressure data. If the pressure change rate is greater than the preset change rate threshold, the processor 140 determines that the press operation is a valid operation and executes the trigger command corresponding to the press operation, realizing the entire process from the button 110 being pressed to the triggering of the button function. The electrical equipment can be, but is not limited to, various remote control devices, laptops, smartphones, tablets, and IoT devices. IoT devices can include smart speakers, smart vehicle devices, etc.

[0066] In one exemplary embodiment, such as Figure 2 As shown, a key triggering method is provided, which can be applied to... Figure 1 Taking processor 140 as an example, the explanation includes the following steps 202 and 208. Wherein:

[0067] Step 202: In response to the detected button press operation, obtain the pressure data corresponding to the press operation.

[0068] Among them, the pressing operation refers to the information detected by the processor that the button has been pressed when the user applies physical pressure to the button with his finger or other object. This can be based on the detection of pressing operations triggered by electrical signals.

[0069] In this embodiment, when the processor detects that a button is pressed, it captures the pressure data of the button in real time through the pressure detection module. The pressure data is quantitative information reflecting the magnitude of the pressure on the button, and the pressure data is stored in the memory.

[0070] Step 204: If the pressure data is greater than the preset pressure threshold, determine the pressure change rate corresponding to the pressing operation based on the pressure data.

[0071] The pressure threshold refers to a pre-set critical pressure value used to determine whether a pressing operation has reached an effective intensity. The pressure threshold can be set differently for different types of buttons. For example, the pressure used when pressing a physical button is greater than the pressure used when pressing a virtual button. Therefore, the pressure threshold needs to be set according to actual usage.

[0072] The pressure change rate refers to the magnitude of change in pressure value per unit time, reflecting the speed at which the force of the pressing operation changes. In this embodiment, when the acquired pressure data exceeds a preset threshold, the processor calculates the rate of pressure change over time by recording the pressure values ​​at consecutive time points. This value can quantify the urgency of the button being pressed.

[0073] Step 206: If the rate of change of pressure is greater than the preset rate of change threshold, the pressing operation is determined to be a valid operation.

[0074] The rate of change threshold is a pre-set critical value used to determine whether the rate of pressure change meets the characteristics of a valid operation. This threshold also needs to be set according to actual conditions. A valid operation refers to a pressing action that meets the processor's set conditions and should trigger the corresponding function; that is, the current pressing action is considered to be actively triggered by the user.

[0075] In this embodiment, when the calculated pressure change rate exceeds a preset threshold, the processor determines that the pressing operation has sufficient force change characteristics and meets the processor's definition criteria for a valid operation. At this time, the processor marks the operation as a valid operation.

[0076] In some embodiments, if the pressure value is less than or equal to a preset pressure threshold, the processor may determine that the pressing operation is invalid and return to step 202.

[0077] Specifically, if the processor detects that the pressure data corresponding to a button press operation is always less than or equal to the pressure threshold, it will identify that the press operation may not be an active operation by the user, mark the press operation as invalid, and then continue to monitor button press operations.

[0078] Step 208: If the pressing operation is valid, execute the trigger command corresponding to the pressing operation.

[0079] Among them, the trigger instruction refers to the function command that is pre-bound to the pressed button and needs to be executed by the processor.

[0080] In this embodiment, once the processor confirms that the current press operation is valid, it immediately retrieves the trigger instruction associated with the press operation and executes the task included in the trigger instruction, achieving precise alignment between user intent and system response. For example, if the triggered button is the volume down button, when the processor recognizes that the press operation of the volume down button is valid, it executes the volume down instruction corresponding to the press operation of the volume down button, controlling the volume of the audio component in the device to decrease.

[0081] The method described above acquires the pressure data corresponding to the key operation when a key operation is detected. Only when the pressure data is greater than a preset pressure range and the pressure change rate obtained based on the pressure data is greater than a preset change rate threshold will the key operation be considered valid and the trigger command corresponding to the press operation be executed. This helps to reduce the risk of accidental key triggering due to external pressure or friction, thereby improving the accuracy of key triggering.

[0082] In some embodiments, such as Figure 3 As shown, in the electrical equipment, the processor acts as the core control unit, controlling the pressure detection module to collect pressure data at a fixed frequency. Specifically, the processor configures the pressure detection module to perform pressure value sampling every 5 milliseconds (ms), collecting the current pressure value P, and binding this pressure value with the corresponding timestamp (accurate to the microsecond level). To analyze pressure change trends, the processor stores the most recent N (e.g., N=10) pressure value sequences P1 to P2. N and its corresponding timestamp sequence t1 to t N The data is stored in memory to form time-pressure data pairs for subsequent dynamic analysis.

[0083] During the data processing phase, the processor first processes the latest acquired pressure value P. N Perform threshold discrimination: if P N Less than or equal to the preset pressure threshold P th (e.g., P) th=2N, this threshold is used to distinguish between invalid contact and valid press. If the current press operation is determined to be invalid, it may be caused by accidental touch or non-intentional contact. In this case, the processor ignores the press operation and continues to monitor other press operations. If the pressure value P N greater than the pressure threshold P th This indicates that the user has applied sufficient pressure. The processor analyzes the rate of change of pressure to distinguish between active user action and unconscious pressure.

[0084] The pressure change rate R can be calculated using the differential method, where the processor retrieves the two most recent pressure values ​​(P) from memory. n and ) and its timestamp (t n and ), through formula Calculate the rate of change of pressure per unit time, where R represents the rate of change of pressure, and P... n This represents the pressure value collected at the current moment. t represents the pressure value collected at the previous sampling time. n The timestamp represents the current moment. This represents the timestamp of the previous sampling moment. The pressure change rate R effectively reflects the rate of change in the user's pressure. If the pressure change rate R ≤ the change rate threshold R... th If the pressure increase is gradual, it may be due to unconscious pressing caused by the palm being placed naturally or friction from clothing. In this case, the processor activates the anti-accidental touch function, temporarily disabling the button's trigger function to prevent accidental operation; if the pressure change rate R > change rate threshold R th This indicates that the user applied pressure quickly, which is consistent with the characteristics of active operation. The processor recognizes the current press operation as a valid operation, determines the corresponding trigger command (such as long press to wake up, volume adjustment, etc.), and controls the corresponding execution module (such as display driver chip or audio component) according to the trigger command to complete the function response.

[0085] In some embodiments, such as Figure 4 As shown, step 206 above includes steps 402 and 404. Wherein:

[0086] Step 402: If the rate of change of pressure is greater than a preset rate of change threshold, obtain the duration for which the pressure data is greater than the pressure threshold.

[0087] Among them, the duration refers to the time span during which the pressure data continuously exceeds the preset pressure threshold, which is used to quantify the length of time that the pressing operation exceeds the pressure threshold.

[0088] In this embodiment, when the processor detects that the pressure change rate exceeds a preset change rate threshold, it synchronously starts timing, continuously monitors the comparison result between the pressure data and the preset pressure threshold, and records the time interval from the first time the threshold is exceeded to the last time the threshold is exceeded. This interval is the duration for which the pressure data remains greater than the pressure threshold.

[0089] Step 404: If the duration is less than or equal to the preset maximum effective duration, the pressing operation is determined to be a valid operation.

[0090] The maximum effective duration refers to the maximum time limit set in the processor for allowing the pressure data of a press operation to remain above the pressure threshold. If this duration is exceeded, the operation is considered invalid.

[0091] In this embodiment, the processor compares the recorded duration with the preset maximum effective duration. When it detects that the duration does not exceed the limit, it determines that the pressing operation meets the effective operation standard in the time dimension. At this time, the processor confirms that the pressing operation is valid and prepares to execute the trigger instruction associated with the pressing operation.

[0092] In practical applications, buttons may be accidentally pressed due to being pressed down by objects. However, in such scenarios, the pressure on the button may exceed a pressure threshold, and the rate of pressure change may also exceed a rate of change threshold. Therefore, in this embodiment, the duration for which pressure data remains above the pressure threshold is introduced as a criterion for judgment. When a user presses a button, even a long press, the press duration is usually within a certain range. However, when the button is pressed down by an object, the press duration can be prolonged. Based on this, a maximum effective duration is set as the effective press time threshold. When the duration for which pressure data remains above the pressure threshold exceeds the maximum effective duration, the button is considered to be in an accidental press state. This allows the processor to identify the abnormal situation where the button is pressed down by an object, further improving the accuracy of button triggering.

[0093] In some embodiments, such as Figure 5 As shown, after step 204 above, the button triggering method may further include steps 502 to 504. Wherein:

[0094] Step 502: If the rate of change of pressure is less than or equal to a preset rate of change threshold, the pressing operation is determined to be an unconscious operation.

[0095] Unconscious operation refers to pressing behavior that is not initiated by the user and has no clear intention.

[0096] In this embodiment, when the pressure change rate calculated by the processor does not exceed the preset threshold, the processor determines that the pressure change rate of the pressing operation does not meet the pressure change rate of an effective operation. Combining the quantitative value of the pressure change rate with the comparison result of the preset change rate threshold, it is confirmed that the pressing is an accidental touch by the user without clear intention or a non-active operation caused by environmental interference.

[0097] Step 504: If the pressing operation is an unconscious operation, disable the button's trigger function.

[0098] Among them, the trigger function refers to the preset function response mechanism executed by the processor after the button is pressed, including operations such as instruction calling.

[0099] In this embodiment, when the processor determines that the current press operation is an unconscious action, the processor immediately and temporarily disables the trigger response capability of the button until the processor detects a new input that meets the valid operation conditions. For example, after the processor detects an unconscious operation and disables the button's trigger function, the user can re-enable the button's trigger function by pressing another specific target button. Once the processor detects a valid operation on the target button, it re-enables the target button's trigger function.

[0100] By introducing a pressure change rate threshold judgment and dynamic trigger function control method, this solution adds the function of unconscious operation recognition to the original operation recognition. When a pressing behavior with a gradual pressure change is detected, the processor automatically judges it as an unconscious operation and temporarily disables the button function. This can effectively block accidental touches caused by clothing friction, equipment shaking, etc., while ensuring that the user's active operation is not affected, further improving the accuracy of button operation recognition.

[0101] In some embodiments, such as Figure 6 As shown, step 206 above may further include steps 602 to 606. Wherein:

[0102] Step 602: If the rate of change of pressure is greater than the preset rate of change threshold, obtain the pressure curve of the pressure data within the preset target time period.

[0103] The target duration refers to the length of a specific time window set to obtain pressure change characteristics; the pressure curve refers to the continuous function graph formed by the change of pressure data over time within the target duration, which is used to intuitively show the dynamic change trend of pressure.

[0104] In this embodiment, when the processor detects that the pressure change rate exceeds a preset threshold, it acquires the pressure data within the target time period before the current moment, and connects these data in chronological order to form a continuous pressure change curve, which fully reflects the pressure fluctuation characteristics within the time period.

[0105] Step 604: Determine the similarity between the pressure curve and the preset target pressure curve.

[0106] Among them, the target pressure curve refers to the pre-set pressure change pattern curve that represents the effective operation; similarity refers to the degree of matching between two curves in terms of shape, trend and other characteristics.

[0107] In this embodiment, the processor compares the real-time collected pressure curve with the preset target pressure curve by calculating the positional deviation of the two curves at key nodes (such as peak points and inflection points), waveform matching degree and other parameters, and comprehensively obtains a quantitative index reflecting the similarity of the curves, namely similarity. The similarity range can be set to 0-1.

[0108] Step 606: If the similarity is greater than the preset similarity threshold, the pressing operation is determined to be a valid operation.

[0109] The similarity threshold refers to the critical value for determining whether two curves match. When the actual similarity is higher than the similarity threshold, the pressing operation is considered to meet the judgment conditions for a valid operation.

[0110] In this embodiment, the processor compares the calculated curve similarity with a preset similarity threshold. When the similarity exceeds the limit, it is determined that the pressure change pattern of the pressing operation is highly similar to the pressure change pattern of a valid operation. At this time, the pressing operation is confirmed as a valid operation and the corresponding trigger command is prepared to be executed.

[0111] The above method, in addition to the pressure threshold and the rate of change threshold, also introduces the pressure change curve as an indicator for identification, which further improves the accuracy of key trigger operation identification.

[0112] In some embodiments, such as Figure 7 As shown, the button triggering method further includes steps 702 and 704. Wherein:

[0113] Step 702: Obtain historical pressure data corresponding to the pressing operation.

[0114] Among them, historical pressure data refers to the pressure data corresponding to the button obtained before the current pressing operation, that is, the pressure data corresponding to the button collected by the pressure detection module before the current pressing operation stored in the memory.

[0115] In this embodiment, the processor calls the memory and extracts the pressure data sequence of the N most recent press operations on the button from the memory. The sequence is arranged in chronological order and may include parameters such as the pressure peak value and average value of each press operation.

[0116] Step 704: Adjust the pressure threshold based on the characteristic values ​​of historical pressure data.

[0117] Among them, the characteristic value refers to the statistical quantity determined from historical pressure data that can reflect the characteristics of operating pressure, including but not limited to the mean, standard deviation, maximum value, minimum value, etc.

[0118] In this embodiment, the processor performs statistical analysis on the extracted historical pressure data, calculating the central tendency (e.g., mean) and dispersion (e.g., standard deviation) of the pressure values. Combined with preset adjustment strategies (e.g., mean weighting, dynamic offset), a new pressure threshold is generated. For example, the mean of the historical pressure data can be calculated, and a preset pressure constant can be added to the mean to obtain a pressure value, which is then used as the new pressure threshold. This pressure threshold can be softened (lowered to accommodate gentler operations) or hardened (increased to eliminate false detections) according to user operating habits.

[0119] By introducing historical pressure data analysis and a dynamic threshold adjustment mechanism, this embodiment can automatically optimize pressure threshold parameters based on the evolution of user operating habits, ensuring that the operation recognition standard always matches the actual usage scenario. This improves the adaptability and robustness of button operation recognition, avoiding misjudgments caused by fixed thresholds (such as missing recognition of users who habitually press lightly) and preventing false triggers caused by environmental interference (such as pressure signals caused by device vibration), thus improving operation recognition accuracy and user experience.

[0120] In some embodiments, the pressure data includes multiple pressure values ​​with sampling timestamps, such as Figure 8 As shown, step 204, which determines the pressure change rate corresponding to the pressing operation based on the pressure data, includes steps 802 and 804. Wherein:

[0121] Step 802: Determine the pressure difference between adjacent pressure values ​​and the time difference between the sampling timestamps corresponding to adjacent pressure values.

[0122] Among them, adjacent pressure values ​​refer to the pressure value at the current moment and the pressure value at the previous sampling moment in the pressure data according to the sampling time order; "pressure difference" refers to the numerical difference between two adjacent pressure values; sampling timestamp refers to the time identifier of the time when each pressure value is collected; and time difference refers to the time interval between two adjacent sampling timestamps.

[0123] In this embodiment, when calculating the pressure change rate, the processor calculates the pressure difference between the current pressure value and the pressure value at the previous sampling time, and calculates the time interval between the current time and the previous sampling time.

[0124] Step 804: Determine the pressure change rate corresponding to the pressing operation based on the pressure difference and time difference.

[0125] In this embodiment, after obtaining the pressure difference and time difference, the processor divides the pressure difference by the time difference to obtain the pressure change rate corresponding to the pressing operation.

[0126] The above method can obtain the real-time rate of change in pressure data, improve the real-time performance of the pressure change rate, and further improve the accuracy of key operation recognition.

[0127] In some embodiments, the button triggering method further includes: determining a trigger command corresponding to the pressing operation based on pressure data.

[0128] In this embodiment, in some application scenarios, a button may correspond to multiple triggering methods. Different triggering methods correspond to different pressing operations and triggering instructions. Therefore, the specific triggering instruction to be triggered when the button is pressed can be identified based on the pressure data.

[0129] Specifically, determining the trigger command corresponding to the press operation based on pressure data can include:

[0130] Acquire the trigger pressure curve within a preset trigger duration using pressure data; determine the trigger command corresponding to the trigger pressure curve in the preset mapping relationship corresponding to the button; the mapping relationship is the correspondence between the pressure curve and the trigger command.

[0131] The trigger duration is a pre-defined time interval in the processor used to define the time range for analyzing pressure data. This duration is set according to the actual application scenario and operational requirements. For example, in button operations on smart devices, it may be set to 0.5 to 2 seconds to ensure that the pressure change process of a complete user press operation can be fully captured. The trigger pressure curve is a curve plotted with time on the horizontal axis and pressure value on the vertical axis, intuitively showing the change of pressure over time within the preset trigger duration. Through this curve, key information such as the start of the press operation, the trend of pressure change, and the end can be clearly observed. The mapping relationship is a pre-established correspondence in the processor that associates different types of trigger pressure curves with corresponding trigger commands. For example, in the button operation of a game controller, a pressure curve that rises rapidly and then falls slowly may correspond to a "rapid attack" command, while a pressure curve that rises slowly and evenly may correspond to a "charge attack" command.

[0132] In this embodiment, the processor filters data points whose timestamps fall within a preset trigger duration from the collected pressure data. For example, if the preset trigger duration is 1 second and pressure data is collected every 10 milliseconds, then 100 pressure data points collected within this 1 second are selected. The processor arranges the selected pressure data points in chronological order and plots a trigger pressure curve on a coordinate system with time as the horizontal axis and pressure value as the vertical axis. Methods such as linear interpolation can be used to make the curve smoother and more accurately reflect the actual pressure changes. For example, for two adjacent pressure data points (time t1, pressure P1) and (time t2, pressure P2), several points are inserted between t1 and t2, and the pressure values ​​of these inserted points are calculated based on a linear relationship to obtain a more detailed curve. The processor performs feature extraction on the plotted trigger pressure curve. The features may include at least one of the following: the initial pressure value, the peak pressure value, the time to reach the peak value, the rate of pressure change, and the shape of the curve (such as linear, curvilinear, etc.). For example, the rate of pressure change is determined by calculating the derivative of the curve, and the peak pressure value is obtained by finding the highest point of the curve. The processor compares the extracted curve features with the curve features of each curve in the preset mapping relationship. Similarity calculation methods, such as Euclidean distance or cosine similarity, can be used to calculate the similarity between the current trigger pressure curve and each curve in the mapping relationship. The trigger command corresponding to the curve with the highest similarity is selected as the final command. For example, if the peak pressure value of the current trigger pressure curve is 50N, the time to reach the peak is 0.3 seconds, the pressure change is initially rapid and then slows down, and the feature similarity with a certain curve in the preset mapping relationship reaches 90%, and the trigger command corresponding to that curve is "confirmation operation," then the trigger command corresponding to this press operation is determined to be "confirmation operation."

[0133] By acquiring the trigger pressure curve within a preset trigger duration and using the preset mapping relationship between the pressure curve and the trigger command to determine the trigger command, the matching method based on curve features in this embodiment improves the accuracy and reliability of command determination, reduces the possibility of misoperation, and provides users with a smoother and more convenient operating experience. It has strong practicality and scalability.

[0134] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0135] Based on the same inventive concept, this application also provides a key triggering device for implementing the key triggering method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more key triggering device embodiments provided below can be found in the limitations of the key triggering method described above, and will not be repeated here.

[0136] In one exemplary embodiment, such as Figure 9 As shown, a button triggering device is provided, comprising:

[0137] The pressure detection module 901 is used to respond to the detected button press operation and acquire the pressure data corresponding to the press operation;

[0138] The pressure change rate detection module 902 is used to determine the pressure change rate corresponding to the pressing operation based on the pressure data when the pressure data is greater than a preset pressure threshold.

[0139] The operation recognition module 903 is used to determine that the pressing operation is a valid operation when the pressure change rate is greater than a preset change rate threshold.

[0140] The trigger module 904 is used to execute the trigger command corresponding to the press operation when the press operation is a valid operation.

[0141] In one embodiment, the operation recognition module 903 is further configured to acquire the duration for which the pressure data is greater than the pressure threshold when the pressure change rate is greater than the preset change rate threshold; and to determine the pressing operation as a valid operation when the duration is less than or equal to the preset maximum effective duration.

[0142] In one embodiment, the operation recognition module 903 is further configured to determine that the pressing operation is an unconscious operation when the pressure change rate is less than or equal to a preset change rate threshold; and to disable the button triggering function when the pressing operation is an unconscious operation.

[0143] In one embodiment, the button triggering device further includes a threshold adjustment module for acquiring historical pressure data corresponding to the pressing operation and adjusting the pressure threshold based on the feature values ​​of the historical pressure data.

[0144] In one embodiment, the pressure data includes multiple pressure values ​​with sampling timestamps. The pressure change rate detection module 902 is also used to determine the pressure difference between adjacent pressure values ​​and the time difference between the sampling timestamps corresponding to adjacent pressure values; and to determine the pressure change rate corresponding to the pressing operation based on the pressure difference and the time difference.

[0145] In one embodiment, the button triggering device further includes an instruction recognition module for determining the trigger instruction corresponding to the pressing operation based on the pressure data.

[0146] In one embodiment, the operation recognition module 903 is further configured to acquire a second pressure curve of pressure data within a preset second time period when the pressure change rate is greater than a preset change rate threshold; determine the similarity between the second pressure curve and a preset target pressure curve; and determine the pressing operation as a valid operation when the similarity is less than a preset similarity threshold.

[0147] Each module in the aforementioned button triggering device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electrical device in hardware form or independent of it, or stored in the memory of the electrical device in software form, so that the processor can call and execute the operations corresponding to each module.

[0148] In one exemplary embodiment, an electrical appliance is provided, the internal structure of which can be shown in the following diagram. Figure 10As shown, this electrical device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores the device's control data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When the computer program is executed by the processor, it implements a key-triggering method.

[0149] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electrical equipment to which the present application is applied. Specific electrical equipment may include more or fewer components than those shown in the figure, or may combine certain components, or may have different component arrangements.

[0150] In one exemplary embodiment, an electrical device is provided, including a button, a pressure detection component, a memory, and a processor. The pressure detection component is connected to the processor and is used to detect pressure data of the button and transmit the pressure data to the processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps in the above-described button triggering method embodiment.

[0151] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps in the above-described key triggering method embodiment.

[0152] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described key triggering method embodiment.

[0153] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0154] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0155] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A key trigger method, characterized by, The method comprises: in response to a detected pressing operation of a key, acquiring pressure data corresponding to the pressing operation; in a case where the pressure data is greater than a preset pressure threshold, determining a pressure change rate corresponding to the pressing operation according to the pressure data; in a case where the pressure change rate is greater than a preset change rate threshold, determining that the pressing operation is a valid operation; in a case where the pressing operation is a valid operation, executing a trigger instruction corresponding to the pressing operation.

2. The method of claim 1, wherein, The method comprises: in a case where the pressure change rate is greater than a preset change rate threshold, acquiring a duration for which the pressure data is greater than the pressure threshold; in a case where the duration is less than or equal to a preset maximum valid duration, determining that the pressing operation is a valid operation.

3. The method of claim 1, wherein, The method further comprises: in a case where the pressure change rate is less than or equal to a preset change rate threshold, determining that the pressing operation is an unconscious operation; in a case where the pressing operation is an unconscious operation, closing a trigger function of the key.

4. The method of claim 1, wherein, The method further comprises: acquiring historical pressure data corresponding to the pressing operation; adjusting the pressure threshold according to a characteristic value of the historical pressure data.

5. The method of claim 1, wherein, The pressure data comprises a plurality of pressure values with sampling time stamps, and the determination of the pressure change rate corresponding to the pressing operation according to the pressure data comprises: determining a pressure difference between adjacent pressure values, and a time difference between the sampling time stamps corresponding to the adjacent pressure values; determining the pressure change rate corresponding to the pressing operation according to the pressure difference and the time difference.

6. The method of claim 1, wherein, The method further comprises: determining a trigger instruction corresponding to the pressing operation according to the pressure data.

7. The method according to any one of claims 1 to 6, characterized in that, The method comprises: in a case where the pressure change rate is greater than a preset change rate threshold, acquiring a pressure curve of the pressure data within a preset target duration; determining a similarity between the pressure curve and a preset target pressure curve; in a case where the similarity is greater than a preset similarity threshold, determining that the pressing operation is a valid operation.

8. A key trigger device, characterized by The device comprises: a pressure detection module configured to acquire pressure data corresponding to a pressing operation of a key in response to the detected pressing operation of the key; a pressure change rate detection module configured to determine a pressure change rate corresponding to the pressing operation according to the pressure data in a case where the pressure data is greater than a preset pressure threshold; an operation identification module configured to determine that the pressing operation is a valid operation in a case where the pressure change rate is greater than a preset change rate threshold; a trigger module configured to execute a trigger instruction corresponding to the pressing operation in a case where the pressing operation is a valid operation.

9. An electric device, characterized by The method comprises a key, a pressure detection component, a memory and a processor, the pressure detection component is connected to the processor, used for detecting pressure data of the key and transmitting the pressure data to the processor, the memory stores a computer program, and the processor executes the computer program to realize steps of the method in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize steps of the method in any one of claims 1 to 7.

11. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize steps of the method in any one of claims 1 to 7.