Method for starting shortcut function, electronic equipment, readable medium and computer program product
Through the sliding and velocity detection of the new buttons, the quick start of application functions is achieved, the problem of cumbersome application startup steps in the existing technology is solved, and the user experience and operation efficiency are improved.
Patent Information
- Application Number
- CN202410210800.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-26
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-02-26
AI Technical Summary
When starting an application with existing electronic devices, users need to perform multiple steps, resulting in the function being started inaccurate enough, affecting the user experience.
A new type of button is designed to support sliding operation and press detection of different force, and to map user operations to achieve quick start of application functions. This button can detect operations such as pressing, pressing and sliding, etc., expand the number of functions to quickly start, and judge the user's operating intention through the pressure value and time stamp to avoid error response.
It realizes the rapid start of application functions, reduces user operation steps, improves usage efficiency, avoids the risk of accidentally touching other functions, and improves user experience.
Smart Images

Figure CN119248171A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video processing technology, and in particular to a method for enabling a shortcut function, an electronic device, a computer program product, and a computer-readable storage medium. Background Art
[0002] Currently, electronic devices have become an indispensable part of people's lives. When using electronic devices, users may use certain functions of electronic devices very frequently. For example, if a large number of applications are installed on the electronic device, the functions of the electronic device refer to certain functions of the applications, for example, starting the camera application, starting the camera application and taking a photo, etc.
[0003] In the related art, when a user needs to use these functions of an electronic device, the user needs to input a series of operations, such as searching for and clicking the icon of the application, which is not conducive to quick start of the function. Summary of the invention
[0004] The present application provides a method for enabling a shortcut function, an electronic device, a computer program product, and a computer-readable storage medium, the purpose of which is to quickly and conveniently enable the function of an application.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] In a first aspect, the present application provides a method for enabling a shortcut function of an electronic device, the electronic device comprising a first button, which is different from a traditional mechanical button and can support detection of a user's sliding operation and pressing operations of different strengths; the method for enabling the shortcut function comprises: receiving a pressing operation of the first button by the user; in response to the pressing operation of the first button by the user, running a first function of an application installed in the electronic device; receiving a sliding operation of the first button by the user; in response to the sliding operation of the first button by the user, running a second function of the application installed in the electronic device, the first function and the second function being the same or different, wherein the difference between the first function and the second function may include: the first function and the second function being different functions of the same application installed in the electronic device, and the first function and the second function being functions of different applications installed in the electronic device.
[0007] It can be seen from the above content that the electronic device is equipped with a first button, and the first button can support the detection of the user's sliding operation and pressing operation of different strengths. Based on this, the electronic device can configure the mapping relationship between the user's operation on the first button and the function of the application installed on the electronic device. When the user inputs a pressing operation on the first button, the electronic device can start the function corresponding to the pressing operation. When the user inputs a sliding operation on the first button, the electronic device can start the function corresponding to the sliding operation, thereby realizing the quick start of the application function.
[0008] In one possible implementation, receiving a user's pressing operation on a first button includes: receiving a user's re-pressing operation on the first button; in response to the user's pressing operation on the first button, running a first function of an application installed on the electronic device, including: in response to the user's re-pressing operation on the first button, running the first function of the application installed on the electronic device; based on this, the method for enabling the shortcut function also includes: receiving a user's re-long pressing operation on the first button; in response to the user's re-long pressing operation on the first button, running a third function of the application installed on the electronic device, the first function and the third function are the same or different.
[0009] In this possible implementation, the first button supports detection of different strengths of user's pressing operations, based on which different strengths of pressing operations can correspond to different application functions. In combination with the pressing strength and pressing duration scenarios, the user inputs a heavy press operation on the first button to start the application function corresponding to the heavy press operation, and the user inputs a heavy and long press operation on the first button to start the application function corresponding to the heavy and long press operation, so that the number of quick-start functions can be expanded.
[0010] In a possible implementation, receiving a user's pressing operation on a first button includes: receiving a user's pressing operation on a first position of the first button; in response to the user's pressing operation on the first button, running a first function of an application installed on the electronic device, including: in response to the user's pressing operation on the first position of the first button, running the first function of an application installed on the electronic device; based on this, the method for enabling a shortcut function also includes: receiving a user's pressing operation on a second position of the first button; in response to the user's pressing operation on the second position of the first button, running a fourth function of an application installed on the electronic device, the first function and the fourth function being the same or different, so that the user can input a pressing operation at different positions of the first button to start the function of the application, and the number of functions that can be started quickly can also be expanded. Furthermore, a pressing operation may also refer to a re-pressing operation or a re-long-pressing operation.
[0011] In a possible implementation, receiving a user's sliding operation on a first button includes: receiving a user's sliding operation on the first button along a first direction; in response to the user's sliding operation on the first button, running a second function of an application installed on the electronic device, including: in response to the user's sliding operation on the first button along the first direction, running the second function of the application installed on the electronic device; based on this, the method for enabling a shortcut function also includes: receiving a user's sliding operation on the first button along a second direction; in response to the user's sliding operation on the first button along the second direction, running a fifth function of the application installed on the electronic device, the first function and the fifth function being the same or different, thereby enabling the user to input a sliding operation on the first button in different directions to start the function of the application, and also allowing the number of functions to be quickly started to be expanded.
[0012] In one possible implementation, in response to a user pressing a first button, running a first function of an application installed on an electronic device includes: generating a pressing event in response to a user pressing the first button; and running the first function of the application installed on the electronic device based on the pressing event.
[0013] In a possible implementation, based on a press event, before running the first function of an application installed on the electronic device, it also includes: determining that the pressure value included in the press event is greater than a first value, so that it can be determined whether the operation input by the user is a press operation or a sliding operation by whether the pressure value is greater than the first value.
[0014] In a possible implementation, in response to a user's pressing operation on a first button, a pressing event is generated, including: in response to the user's pressing operation on the first button, a pressing down event and a pressing up event are sequentially generated; based on the pressing event, a first function of an application installed in the electronic device is run, including: based on the pressing down event and the pressing up event, the first function of the application installed in the electronic device is run. The pressing operation input by the user includes a key pressing operation and a key lifting operation, and the electronic device runs the first function of the application installed in the electronic device based on the pressing down event and the pressing up event, which can accurately respond to the user's pressing operation on the first button, start the function of the application, and avoid false responses.
[0015] In a possible implementation, based on a pressed down event and a pressed up event, before running the first function of an application installed on the electronic device, it also includes: determining that the pressure value of the pressed down event is greater than a first value, and determining that the pressure value of the pressed up event is less than a second value, and the second value is less than the first value. The user's pressing operation on the first button usually has a large pressure value. After the user presses the first button, the pressure value changes when the user lifts up from the first button, and the pressure value becomes smaller. By judging whether the pressure value of the pressed event is greater than the first value and whether the pressure value of the lifted event is less than the second value, the user's pressing operation on the first button can be further accurately responded to, the application function can be started, and false responses can be avoided.
[0016] In one possible implementation, based on a pressed down event and a pressed up event, running the first function of an application installed on an electronic device includes: when determining that the pressure value of the pressed down event meets the pressing strength requirement of the first key, based on the pressed down event and the pressed up event, running the first function of the application installed on the electronic device, thereby realizing the function of starting the application in response to the user's hard press operation.
[0017] In one possible implementation, based on a pressed down event and a pressed up event, running the first function of an application installed on an electronic device includes: obtaining a duration of a pressed event based on a timestamp of the pressed down event and a timestamp of a pressed up event; when determining that a pressure value of the pressed down event meets a pressing force requirement of a first key, and determining that the duration of the pressed event meets the pressing duration requirement of the first key, running the first function of an application installed on an electronic device based on the pressed down event and the pressed up event, thereby realizing the function of starting the application in response to a user's long press operation.
[0018] In one possible implementation, in response to a user sliding operation on a first button, running a second function of an application installed on an electronic device includes: generating a sliding event in response to a user sliding operation on the first button; and running the second function of the application installed on the electronic device based on the sliding event.
[0019] In one possible implementation, in response to a user's sliding operation on a first button, a sliding event is generated, including: in response to the user's sliding operation on the first button, obtaining a sliding stroke and a starting point coordinate of the sliding operation; and generating a sliding event based on the sliding stroke and the starting point coordinate of the sliding operation.
[0020] In a possible implementation, before running the second function of an application installed on the electronic device based on a sliding event, it also includes: based on the sliding event, determining that the sliding operation is a valid sliding operation, so as to accurately respond to the user's sliding operation, start the application function, and avoid incorrect response.
[0021] In a possible implementation, based on the sliding event, determining that the sliding operation is a valid sliding operation includes: determining that event information of the sliding event satisfies any one or any combination of the following three conditions; wherein the three conditions include: a sliding stroke of the sliding event is less than a full stroke of the sliding operation and greater than a minimum stroke of the sliding operation, and a sliding stroke score of the sliding event is higher than a first threshold; a sliding speed of the sliding event is greater than a lower speed limit of the sliding operation and less than an upper speed limit of the sliding operation, and a sliding speed score of the sliding event is higher than a second threshold; and a sliding pressure score of the sliding event is higher than a third threshold.
[0022] In a possible implementation, when it is determined that the event information of a key event satisfies three conditions, the score of the sliding stroke of the sliding event is higher than a first threshold, the score of the sliding speed of the sliding event is higher than a second threshold, and the score of the sliding pressure of the sliding event is higher than a third threshold, the weighted sum of the score of the sliding stroke of the sliding event, the score of the sliding speed of the sliding event, and the score of the sliding pressure of the sliding event is greater than the sliding threshold.
[0023] In a possible implementation, before obtaining the sliding stroke and starting point coordinates of the sliding operation, the method further includes: determining that the sliding operation satisfies the sliding stop condition based on the sliding event corresponding to the sliding operation. The sliding operation input by the user is a continuous operation including the start and end of sliding, and it is determined that the sliding operation satisfies the sliding stop condition before obtaining the sliding stroke and starting point coordinates to form a sliding event, so as to realize the function of starting the application corresponding to the sliding operation after the user completely inputs the sliding operation.
[0024] In a possible implementation, the method for enabling the shortcut function further includes: based on the sliding event corresponding to the sliding operation, if it is determined that the sliding operation does not meet the sliding stop condition, recording the parameters in the sliding event corresponding to the sliding operation, or resetting the parameters in the sliding event corresponding to the recorded sliding operation, so as to continuously record the parameters in the sliding event during the user inputting the sliding operation. If the user habitually leaves his finger lightly on the button, causing the electronic device to receive a sliding event, but because the sliding operation does not meet the sliding stop condition, the parameters in the sliding event corresponding to the recorded sliding operation can be reset to update the parameters and obtain a new sliding event.
[0025] In some embodiments, the electronic device records parameters in a sliding event corresponding to a sliding operation, or resets the parameters in a sliding event corresponding to a recorded sliding operation under the following conditions: if the time difference between two consecutive sliding events is greater than or equal to a threshold, then the parameters in the sliding event corresponding to the recorded sliding operation are reset; if the time difference is less than the threshold, then the parameters in the sliding event corresponding to the sliding operation are recorded. This is more in line with the current situation where sliding operations are continuous and quickly completed actions.
[0026] In a possible implementation, the first button is a volume button or a power button of an electronic device, or a button other than the volume button and the power button of an electronic device. In this possible implementation, in the scenario where the first button is a volume button of an electronic device, the first function, the second function, the third function, the fourth function, and the fifth function do not refer to the original function of the volume button, that is, they do not refer to the volume increase or decrease function; similarly, in the scenario where the first button is a power button of an electronic device, the first function, the second function, the third function, the fourth function, and the fifth function do not refer to the original function of the power button, that is, they do not refer to the functions of powering on, powering off, restarting, turning off the screen, and turning on the screen, so that the user can operate the volume button or the power button to quickly start the application function. The first button is a button other than the volume button and the power button of the electronic device. The first button is naturally decoupled from the volume button and the power button, and there will be no problem of accidental touch.
[0027] In a second aspect, the present application provides an electronic device comprising: one or more processors, a memory, and a first button; the memory and the first button are coupled to the one or more processors, the memory is used to store a computer program, the computer program includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes a method for enabling a shortcut function as provided in the first aspect and any one of the possible implementations.
[0028] In a third aspect, the present application provides a computer-readable storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement a method for enabling a shortcut function as provided in the first aspect and any one of the possible implementations.
[0029] In a fourth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute a method for enabling a shortcut function as provided in the first aspect and any one of the possible implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 Set up a display image of the power button and volume button for the phone;
[0031] Figure 2 and Figure 3 A display diagram of multiple operation modes provided by an embodiment of the present application with one-click access;
[0032] Figure 4 A software framework diagram of an electronic device provided in an embodiment of the present application;
[0033] Figure 5 The interval definition of the pressing pressure of the new type of button provided in the embodiment of the present application;
[0034] Figure 6 A flow chart of performing press detection or slide detection on the new key subsystem provided in an embodiment of the present application;
[0035] Figure 7 The validity determination process of a sliding event provided in an embodiment of the present application;
[0036] Figure 8 A hardware structure diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be used as limitations on the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear indication to the contrary in the context.
[0038] References to "some embodiments" and the like described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in some embodiments", "in other embodiments", etc. that appear at different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in another way.
[0039] The multiple involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first", "second", etc. are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.
[0040] Electronic devices such as mobile phones have mechanical buttons on their housings, such as a power button and a volume button. For example, Figure 1 (a) and (b) show two ways to set the power button and volume button on a mobile phone. Figure 1 As shown in (a), the volume button 101 and the power button 102 are arranged on the same side of the mobile phone. Figure 1 As shown in (b), the volume button 101 and the power button 102 are arranged on both sides of the mobile phone.
[0041] Traditional mechanical buttons generally support detection of pressing and releasing. A new type of button supports detection of pressing and releasing; it also supports detection of pressing with different levels of force. For example, the pressing force is divided into three levels, which can be light tap, light press and heavy press; it can also support detection of a combination of pressing force and pressing duration. For example, the new type of button supports heavy press and heavy long press; it also supports detection of sliding up and down. In some embodiments, the power button and volume button on the electronic device can adopt this new type of button. In other embodiments, in addition to the power button and volume button, the electronic device can also set a new type of button separately. In the scenario where the power button and volume button are located on both sides of the electronic device, the new type of button can be set on the same side as the power button and located above the power button (here, the top refers to the end where the camera is located, and the bottom refers to the end where the speaker is located).
[0042] Based on a mechanical key that supports detection of pressing and releasing, detection of pressing at different levels of force, detection of a combination of pressing force and pressing duration, and detection of sliding up and down, the present application embodiment provides a method for opening a shortcut function by operating a new type of key. The new type of key on the electronic device may correspond to one or more shortcut functions, and the shortcut function may refer to a shortcut function for an application service, such as starting a camera application, starting a camera application and taking a photo, etc. The user can control the electronic device to run the shortcut function by inputting a sliding operation or a pressing operation on the new type of key, thereby quickly opening the service (referred to as one-key direct access), which can reduce user operations and improve efficiency.
[0043] In addition, the new buttons support detection of different levels of pressure, detection of different combinations of pressure and duration, and sliding detection. Therefore, users can diversify the types of operations they perform on the new buttons. Compared with the quick-start function of mechanical buttons, the new buttons support more quick-start functions.
[0044] It should be noted that in the scenario where electronic devices use new buttons as power buttons and volume buttons, the shortcut functions corresponding to the power button do not include the functions corresponding to the power button itself, such as power on, power off, restart, screen on, and screen off; similarly, the shortcut functions corresponding to the volume button do not include: the function of adjusting the volume.
[0045] In some embodiments, pressing of a new type of key at different force levels may correspond to different shortcut functions, that is, a mapping relationship is configured between pressing of a new type of key at multiple force levels and shortcut functions.
[0046] It should be noted that, taking the three-level division as an example, according to the relatively precise and accurate range of pressing force, the key type of the new key is divided into three force levels: light tap, light press and heavy press. Assuming that the operator of the new key is a manipulator or a robot, the operator can strictly follow different levels of pressing force to accurately interact with the electronic device through the new key without triggering any misidentification problems. However, from the perspective of the operator being a person, people of different ages, different occupations, different genders, and different health conditions may have a large deviation in the cognition of the force of light tap, light press and heavy press. This concept of dividing the levels by relatively small pressing force intervals and allowing different people to learn and adapt to this division is prone to user misoperation. For example, when the new key is reused with the traditional mechanical key (power button and / or volume button), if the pressing force is used to distinguish the user's intention to use, it is inevitable that the user will feel that it is easy to touch by mistake. Based on this, in some embodiments, the electronic device uses a heavy press or a heavy long press as a trigger condition for the shortcut function.
[0047] like Figure 2 As shown in the figure, one-touch access can be divided into dedicated mode, left-right mode, up-down mode, up-down key mode and separate control mode. The following takes the power button and volume button configured in electronic equipment as new buttons as an example to introduce the above five modes.
[0048] The dedicated mode can be used as the default mode of the system. Its design purpose is to make it as simple and easy as possible for everyone to operate, reducing the learning and memory costs of people. The dedicated mode means that the pressing operation of the new type button corresponds to a quick access function of a business. This mode is the basic mode and does not depend on the number of new type buttons (1 or 2) or the layout of the new type buttons, such as left-right layout or single-side up-down layout.
[0049] Exemplarily, the power button and the volume button are arranged on the left and right sides of the electronic device, and the pressing operations of the power button and the volume button correspond to the quick start of the same service. The pressing operation includes pressing the left button up, pressing the left button down, pressing the right button down, and pressing the right button up (referred to as pressing the left button up, pressing the left button down, pressing the right button down, and pressing the right button down, respectively). That is: when the user performs any operation of pressing the left button up, pressing the left button down, pressing the right button down, and pressing the right button up, it is mapped to the quick direct access function of the same service. The user only needs to remember to press the button to trigger the service function. Among them, pressing the left button up means pressing or long pressing the upper half of the left button; pressing the left button down means pressing or long pressing the lower half of the left button; pressing the right button up means pressing or long pressing the upper half of the right button; pressing the right button down means pressing or long pressing the lower half of the right button.
[0050] As another example, the power button and the volume button are arranged on one side of the electronic device in an upper and lower arrangement. The pressing operations of the power button and the volume button correspond to the quick start of the same service. The pressing operations include pressing the upper button, pressing the upper button, pressing the lower button, and pressing the lower button. That is, any one of the operations of pressing the upper button, pressing the upper button, pressing the lower button, and pressing the lower button is mapped to the quick access function of the same service. Among them, pressing the upper button means pressing or long pressing the upper half of the upper button; pressing the upper button means pressing or long pressing the lower half of the upper button; pressing the lower button means pressing or long pressing the upper half of the lower button; pressing the lower button means pressing or long pressing the lower half of the lower button.
[0051] In some embodiments, the user can customize the shortcut functions corresponding to pressing the up and down keys or the left and right keys in the "focus mode" through the settings application.
[0052] Exemplarily, the menu of the setting application of the electronic device may include "Quick Function Launch", and "Quick Function Launch" may also include a "One-click Direct Mode Selection" menu item. When the user clicks the "One-click Direct Mode Selection" menu item, the electronic device may display the factory default radio button, that is, the "Special Mode" radio button, which can provide users with a variety of customizable shortcut functions, such as: quick launch of the camera application, considering that the camera application is quickly launched through the volume button or the power button, and the functions of the volume button and the power button themselves cannot conflict. The operation of the new type of button corresponding to the quick launch of the camera application may refer to: in the scene of turning off the screen, locking the screen and playing music, pressing the up and down keys again or long, and pressing the left and right keys again or long. The user can select a customizable shortcut function to realize the mapping of pressing the up and down keys again or long, and pressing the left and right keys again or long with the shortcut function.
[0053] After the user completes the customization of the shortcut function, for the scenario where the new buttons are set up left and right, the user can quickly start the customized shortcut function by pressing the left button up, the left button down, the right button down, or the right button up. Of course, for the scenario where the new buttons are set up and down, the user can quickly start the customized shortcut function by pressing the upper button up, the upper button down, the lower button down, or the lower button up.
[0054] The left-right mode is a direct access mode provided for users who are more willing to remember the two configurations and prefer to remember the distinction between left and right. Through this mode, users can map the left-side button operation to a one-key quick direct access function, and users can also map the right-side button operation to another one-key quick direct access function. For the left-right mode, the electronic device allocates and configures the shortcut functions A and B corresponding to the left and right button presses respectively. When the user presses the left button up or down, it will trigger the one-key direct access to function A, and when the user presses the right button up or down, it will trigger the one-key direct access to function B. Pressing the left button up means pressing or long pressing the upper half of the left button; pressing the left button down means pressing or long pressing the lower half of the left button; pressing the right button up means pressing or long pressing the upper half of the right button; pressing the right button down means pressing or long pressing the lower half of the right button.
[0055] This mode usually appears in electronic devices that have two new buttons that support key press detection, and the new buttons are located on the left and right sides of the electronic device. If the user binds the same function to the left and right buttons, that is, A and B are the same function, the effect of using this mode is equivalent to the effect of using the dedicated mode.
[0056] In some embodiments, the user can customize the shortcut functions corresponding to the "left and right mode" through the settings application.
[0057] Exemplarily, the menu of the setting application of the electronic device may include "Quick Function Start", and "Quick Function Start" may also include a "One-click Direct Mode Selection" menu item. When the user clicks the "One-click Direct Mode Selection" menu item, the electronic device may display the factory default radio button, that is, the "Single Mode" radio button, and may also display the "Left and Right Mode" option. Usually, there may be multiple "Left and Right Mode" options, each of which corresponds to a quick function. When the user selects an option of "Left and Right Mode", the pressing operation of the left and right buttons and the allocation configuration function of the quick function can be triggered.
[0058] After the user completes the customization of the shortcut function, the user can quickly start one of the user-customized shortcut functions by pressing the left button up or down, and can quickly start another user-customized shortcut function by pressing the right button up or down.
[0059] The up and down press mode is a direct access mode designed to facilitate remembering the two configurations and is provided for users who prefer to remember up and down operations to distinguish functions. Through this mode, users can map the up press button operation to a one-touch quick direct access function, and users can also map the down press button operation to another one-touch quick direct access function. For the up and down press mode, the electronic device allocates and configures shortcut functions A and B corresponding to the up and down press operations. When the user presses the up button, whether it is the left or right button, the one-touch direct access to function A will be triggered. When the user presses the down button, whether it is the left or right button, the one-touch direct access to function B will be triggered. Among them, the up press operation refers to pressing hard or long pressing the upper half of the button; the down press refers to pressing hard or long pressing the lower half of the button. Figure 2 Take hard pressing as an example.
[0060] When an electronic device has two new buttons that support press detection, this mode can be supported regardless of whether the two buttons are distributed on the same side or opposite sides of the electronic device.
[0061] If the user binds the same function to both the up and down buttons, that is, A and B are the same function, the effect of using this mode is equivalent to that of using the dedicated mode.
[0062] In some embodiments, the user can customize the shortcut functions corresponding to the "up and down press mode" through the settings application.
[0063] Exemplarily, the menu of the settings application of the electronic device may include "Quick Function Launch", and "Quick Function Launch" may also include a "One-key Direct Mode Selection" menu item. When the user clicks the "One-key Direct Mode Selection" menu item, the electronic device may display the factory default radio button, that is, the "Single Mode" radio button, and may also display the "Up and Down Press Mode" option. Usually, there may be multiple options for the "Up and Down Press Mode", each option corresponding to a quick function. When the user selects an option of the "Up and Down Press Mode", the allocation configuration function of the up or down press operation and the quick function can be triggered.
[0064] After the user completes the customization of the shortcut function, the two new buttons are distributed left and right. The user can quickly start a customized shortcut function by pressing the left or right button, and can quickly start another customized shortcut function by pressing the left or right button. The two new buttons are distributed up and down. The user can quickly start a customized shortcut function by pressing the upper button or the lower button, and can quickly start another customized shortcut function by pressing the upper button or the lower button.
[0065] The up-down key mode is a mode in which two new keys that support press detection are located on the same side of the electronic device. Through this mode, users can map the operation of the upper key to a one-key quick direct access function, and users can also map the operation of the lower key to another one-key quick direct access function. For the up-down key mode, the electronic device configures the shortcut functions A and B corresponding to the pressing of the upper and lower keys respectively. When the user presses the upper key up or down, it will trigger the one-key direct access to function A, and when the user presses the lower key up or down, it will trigger the one-key direct access to function B. Pressing the upper key up means pressing the upper half of the upper key hard or long press; pressing the upper key down means pressing the lower half of the upper key hard or long press; pressing the lower key up means pressing the upper half of the lower key hard or long press; pressing the lower key down means pressing the lower half of the lower key hard or long press. Figure 2 Take pressing the up and down keys as an example.
[0066] If the user binds the same function to both the upper and lower buttons, that is, A and B are the same function, the effect of using this mode is equivalent to that of using the dedicated mode.
[0067] In some embodiments, the user can customize the shortcut functions corresponding to the "up and down key mode" through the settings application.
[0068] Exemplarily, the menu of the settings application of the electronic device may include "Quick Function Launch", and "Quick Function Launch" may also include a "One-key Direct Mode Selection" menu item. When the user clicks the "One-key Direct Mode Selection" menu item, the electronic device may display the factory default radio button, that is, the "Single Mode" radio button, and may also display the "Up and Down Key Mode" option. Usually, there may be multiple "Up and Down Key Mode" options, each corresponding to a shortcut function. When the user selects an option of "Up and Down Key Mode", the pressing operation of the up or down key and the allocation configuration function of the shortcut function can be triggered.
[0069] After the user completes the customization of the shortcut function, the user can quickly start one customized shortcut function by pressing the upper key up or down, and can quickly start another customized shortcut function by pressing the lower key up or down.
[0070] The sub-control mode is to provide four direct access modes for the convenience of users who can remember four configurations.
[0071] For example, two new buttons are set on the left and right sides of the electronic device. Through this mode, the user can bind the four operations of left button up, left button down, right button up, and right button down to the four functions A, B, C, and D. The user triggers different business functions through different operations to achieve one-click access.
[0072] For example, if two new buttons are set on the same side of the electronic device, the user can use this mode to bind the four operations of pressing the upper button, pressing the upper button, pressing the lower button, and pressing the lower button to the four functions A, B, C, and D. The user triggers different business functions through different operations to achieve one-click access.
[0073] Among them, pressing the left button up means pressing the upper half of the left button hard or for a long time; pressing the left button down means pressing the lower half of the left button hard or for a long time; pressing the right button up means pressing the upper half of the right button hard or for a long time; pressing the right button down means pressing the lower half of the right button hard or for a long time; pressing the upper button up means pressing the upper half of the upper button hard or for a long time; pressing the upper button down means pressing the lower half of the upper button hard or for a long time; pressing the lower button up means pressing the upper half of the lower button hard or for a long time; pressing the lower button down means pressing the lower half of the lower button hard or for a long time. Figure 2 Take hard pressing as an example.
[0074] It should be noted that the functions A, B, C, and D can be the same. In the case where the four functions A, B, C, and D are the same function, the user experience effect of this mode is consistent with that of the dedicated mode.
[0075] It should also be noted that the number and position distribution of buttons that support detection of presses of different force levels can determine which modes the setting application of the electronic device includes. Exemplarily, the electronic device is configured with a button that supports detection of presses of different force levels, and the setting application only includes a dedicated mode and a separate control mode; the electronic device is configured with two buttons that support detection of presses of different force levels, and the two buttons are located on both sides of the electronic device, and the setting application may include a dedicated mode, a left-right mode, an up-down mode, and a separate control mode; the electronic device is configured with two buttons that support detection of presses of different force levels, and the two buttons are located on the same side of the electronic device, and the setting application may include a dedicated mode, an up-down mode, an up-down key mode, and a separate control mode.
[0076] In some embodiments, the user can customize the shortcut functions corresponding to the "split control mode" through the settings application.
[0077] Exemplarily, the menu of the settings application of the electronic device may include "Quick Function Startup", and "Quick Function Startup" may also include a "One-key Direct Mode Selection" menu item. When the user clicks the "One-key Direct Mode Selection" menu item, the electronic device may display the factory default radio button, that is, the "Exclusive Mode" radio button, and may also display the "Split Control Mode" option. Normally, there may be multiple options for "Split Control Mode", and each option corresponds to a shortcut function. When the user selects an option for "Split Control Mode", one of the four operations of left button up, left button down, right button up, and right button down can be triggered, and the allocation configuration function of the shortcut function can be assigned; or, one of the four operations of upper button up, upper button down, lower button up, and lower button down can be triggered, and the allocation configuration function of the shortcut function can be assigned.
[0078] After the user completes the customization of the shortcut function, the user can quickly launch a customized shortcut function by pressing the left button up, the left button down, the right button up, or the right button down, or can quickly launch a customized shortcut function by pressing the upper button up, the upper button down, the lower button up, or the lower button down.
[0079] In other embodiments, sliding operations at different positions of the new keys correspond to different shortcut functions, that is, there is a mapping relationship between sliding operations at different positions of the new keys and shortcut functions. For example, the new keys of the electronic device are arranged on the left and right, and the four sliding detection capabilities of the new keys may include: left-side up sliding, left-side down sliding, right-side up sliding, and right-side down sliding.
[0080] The new type of buttons supports sliding detection, which traditional buttons cannot support. When traditional buttons are replaced with new buttons, the new buttons can significantly distinguish between the user's sliding recognition and pressing recognition. That is, the new button's ability to detect sliding gestures can effectively achieve the difference from the traditional button's pressing detection capability. Therefore, in terms of hardware form, the new button can appear as a new button or as a replacement for traditional buttons. Moreover, from the perspective of human operation, no matter who it is, it can effectively distinguish and efficiently implement pressing or sliding operations, and there will be no problems of misrecognition and misresponse of operation intentions.
[0081] like Figure 3 As shown in the figure, one-touch access can be divided into dedicated mode, left-right mode, up-down slide mode, up-down key mode and separate control mode. The following takes the power button and volume button configured in electronic equipment as new buttons as an example to introduce the five modes.
[0082] The dedicated mode can be used as the default mode of the system. Its design purpose is to make it as simple and easy as possible for everyone to operate, reducing the learning and memory costs of people. The dedicated mode means that the sliding operation of the new button corresponds to a quick and direct function of a business. This mode is the basic mode and does not depend on the number of new buttons (1 or 2) or the layout of the new buttons, such as left-right layout or one-side up-down layout.
[0083] Exemplarily, the power button and volume button are arranged on the left and right sides of the electronic device, and the sliding operations of the power button and the volume button correspond to the quick start of the same service. The sliding operation includes sliding the left button up, sliding the left button down, sliding the right button down, and sliding the right button up (referred to as left button up, left button down, right button down, and right button down, respectively). That is: when the user performs any operation of sliding the left button up, sliding the left button down, sliding the right button down, and sliding the right button up, it is mapped to the quick direct access function of the same service. The user only needs to remember to slide the button to trigger the service function.
[0084] As another example, the power button and the volume button are arranged on one side of the electronic device in an up-down arrangement. The sliding operations of the power button and the volume button correspond to the quick start of the same service. The sliding operations include sliding up with the upper key, sliding down with the upper key, sliding down with the lower key, and sliding up with the lower key. That is, when the user performs any of the operations of sliding up with the upper key, sliding down with the upper key, sliding down with the lower key, and sliding up with the lower key, they are mapped to the quick access function of the same service.
[0085] In some embodiments, the user can customize the shortcut functions corresponding to sliding the up and down keys or sliding the left and right keys in "focus mode" through the settings application.
[0086] For example, the menu of the setting application of the electronic device may include "Quick Function Launch", and "Quick Function Launch" may also include a "One-key Direct Mode Selection" menu item. When the user clicks the "One-key Direct Mode Selection" menu item, the electronic device may display a factory default radio button, i.e., a "Special Mode" radio button, which may provide the user with a variety of customizable quick functions, such as: quick launch of the camera application, quick launch of the new type of button corresponding to the camera application, sliding the up and down keys, and sliding the left and right keys.
[0087] After the user completes the customization of the shortcut function, for the scenario where the new buttons are set left and right, the user can quickly start the customized shortcut function by swiping the left button up, sliding the left button down, sliding the right button down, or sliding the right button up. Of course, for the scenario where the new buttons are set up and down, the user can quickly start the customized shortcut function by swiping the upper button up, sliding the upper button down, sliding the lower button down, or sliding the lower button up.
[0088] The left-right mode is a direct access mode provided for users who are more willing to remember the two configurations and prefer to remember the distinction between left and right. Through this mode, users can map the sliding operation of the left button to a one-touch quick direct access function, and users can also map the sliding operation of the right button to another one-touch quick direct access function. For the left-right mode, the electronic device allocates and configures the sliding operations of the left and right buttons to the corresponding shortcut functions A and B respectively. When the user slides up or down on the left button, it will trigger the one-touch direct access to function A. When the user slides up or down on the right button, it will trigger the one-touch direct access to function B.
[0089] This mode usually appears in electronic devices that have two new buttons that support key sliding detection, and the new buttons are located on the left and right sides of the electronic device. If the user's sliding operations on the left and right buttons are bound to the same function, that is, A and B are the same function, the effect of using this mode is equivalent to the effect of using the dedicated mode.
[0090] In some embodiments, the user can customize the shortcut functions corresponding to the "left and right mode" through the settings application.
[0091] Exemplarily, the menu of the settings application of the electronic device may include "Quick Function Launch", and "Quick Function Launch" may also include a "One-click Direct Mode Selection" menu item. When the user clicks the "One-click Direct Mode Selection" menu item, the electronic device may display the factory default radio button, that is, the "Single Mode" radio button, and may also display the "Left and Right Mode" option. Usually, there may be multiple "Left and Right Mode" options, each of which corresponds to a quick function. When the user selects an option of "Left and Right Mode", the allocation configuration function of left and right sliding operations and quick functions can be triggered.
[0092] After the user completes the customization of the shortcut function, the user can quickly start one of the user-customized shortcut functions by swiping up or down with the left button, and can quickly start another user-customized shortcut function by swiping up or down with the right button.
[0093] The up and down sliding mode is a direct access mode for users who prefer to remember the up and down operations to distinguish functions. Users can use this mode to map the up sliding button operation to a one-key quick direct access function, and users can also map the down sliding button operation to another one-key quick direct access function. For the up and down sliding mode, the electronic device allocates and configures the shortcut functions A and B corresponding to the up and down sliding operations. When the user slides up, whether the left or right button is used, the one-key direct access to function A will be triggered. When the user slides down, whether the left or right button is used, the one-key direct access to function B will be triggered.
[0094] When an electronic device has two new buttons that support slide detection, this mode can be supported regardless of whether the two buttons are distributed on the same side or opposite sides of the electronic device.
[0095] If the user binds the same function when swiping up or swiping down, that is, A and B are the same function, the effect of using this mode is equivalent to that of using the dedicated mode.
[0096] In some embodiments, the user can customize the shortcut functions corresponding to the "up and down sliding mode" through the settings application.
[0097] Exemplarily, the menu of the settings application of the electronic device may include "Quick Function Launch", and "Quick Function Launch" may also include a "One-click Direct Mode Selection" menu item. When the user clicks the "One-click Direct Mode Selection" menu item, the electronic device may display the factory default radio button, that is, the "Special Mode" radio button, and may also display the "Up and Down Slide Mode" option. Usually, there may be multiple "Up and Down Slide Mode" options, each of which corresponds to a quick function. When the user selects an option of "Up and Down Slide Mode", the allocation configuration function of the up or down slide operation and the quick function can be triggered.
[0098] After the user completes the customization of the shortcut function, the user can quickly start one of the user-customized shortcut functions by swiping up with the left or right button, and can quickly start another user-customized shortcut function by swiping down with the left or right button.
[0099] The up and down key mode is a mode in which two new keys that support sliding detection are located on the same side of the electronic device. Through this mode, users can map the sliding operation of the upper key to a one-key quick direct function, and users can also map the sliding operation of the lower key to another one-key quick direct function. For the up and down key mode, the electronic device configures shortcut functions A and B corresponding to the sliding operations of the upper and lower keys respectively. When the user slides up or down on the upper key, it will trigger the one-key direct function of function A. When the user slides up or down on the lower key, it will trigger the one-key direct function of function B.
[0100] If the user binds the sliding operations on the upper and lower side buttons to the same function, that is, A and B are the same function, the effect of using this mode is equivalent to that of using the dedicated mode.
[0101] In some embodiments, the user can customize the shortcut functions corresponding to the "up and down key mode" through the settings application.
[0102] Exemplarily, the menu of the settings application of the electronic device may include "Quick Function Launch", and "Quick Function Launch" may also include a "One-key Direct Mode Selection" menu item. When the user clicks the "One-key Direct Mode Selection" menu item, the electronic device may display the factory default radio button, that is, the "Single Mode" radio button, and may also display the "Up and Down Key Mode" option. Usually, there may be multiple "Up and Down Key Mode" options, each of which corresponds to a shortcut function. When the user selects an option in the "Up and Down Key Mode", the sliding operation of the up or down key and the allocation configuration function of the shortcut function can be triggered.
[0103] After the user completes the customization of the shortcut function, the user can quickly start one of the user-customized shortcut functions by swiping up or down the upper key, and can quickly start another user-customized shortcut function by swiping up or down the lower key.
[0104] The sub-control mode is to provide four direct access modes for the convenience of users who can remember four configurations.
[0105] For example, with two new buttons set on the left and right sides of the electronic device, the user can use this mode to bind the four operations of left-button up, left-button down, right-button up, and right-button down to four functions A, B, C, and D respectively. The user triggers different business functions through different operations to achieve one-click access.
[0106] For example, if two new buttons are set on the same side of the electronic device, the user can use this mode to bind the four operations of sliding up the upper button, sliding down the upper button, sliding up the lower button, and sliding down the lower button to the four functions A, B, C, and D respectively. The user triggers different business functions through different operations to achieve one-click access.
[0107] It should be noted that the four functions A, B, C, and D may be the same. In the case where the four functions A, B, C, and D are the same function, the user experience effect of this mode is consistent with that of the dedicated mode.
[0108] It should also be noted that the number and position distribution of buttons that support slide detection can determine which modes the setting application of the electronic device includes. For example, the electronic device is configured with a button that supports slide detection, and the setting application only includes a dedicated mode and a separate control mode; the electronic device is configured with two buttons that support slide detection, and the two buttons are located on both sides of the electronic device, and the setting application may include a dedicated mode, a left-right mode, an up-and-down slide mode, and a separate control mode; the electronic device is configured with two buttons that support slide detection, and the two buttons are located on the same side of the electronic device, and the setting application may include a dedicated mode, an up-and-down slide mode, an up-and-down key mode, and a separate control mode.
[0109] In some embodiments, the user can customize the shortcut functions corresponding to the "split control mode" through the settings application.
[0110] Exemplarily, the menu of the settings application of the electronic device may include "Quick Function Launch", and "Quick Function Launch" may also include a "One-key Direct Mode Selection" menu item. When the user clicks the "One-key Direct Mode Selection" menu item, the electronic device may display the factory default radio button, that is, the "Exclusive Mode" radio button, and may also display the "Split Control Mode" option. Usually, there may be multiple options for "Split Control Mode", and each option corresponds to a shortcut function. When the user selects an option in "Split Control Mode", one of the four operations of left-button swipe up, left-button swipe down, right-button swipe up, and right-button swipe down and the allocation configuration function of the shortcut function may be triggered; or, one of the four operations of up-button swipe up, up-button swipe down, down-button swipe up, and down-button swipe down and the allocation configuration function of the shortcut function may be triggered.
[0111] After the user completes the customization of the shortcut function, the user can quickly launch a customized shortcut function by swiping up with the left button, swiping down with the left button, swiping up with the right button, or swiping down with the right button, or can quickly launch a customized shortcut function by swiping up with the upper button, swiping down with the upper button, swiping up with the lower button, or swiping down with the lower button.
[0112] Figure 2 and Figure 3 The advantages of the several modes shown are as follows:
[0113] The biggest convenience that the dedicated mode brings to users is that they do not need to remember different operations and different intentions, they only need to know to slide or press to trigger the service. Users can use any convenient operation button to trigger the corresponding function to start (if the service is not in the foreground and not in the startup, it will trigger the startup) or close (if the service is in the foreground, it will trigger the service to close).
[0114] The left and right mode, up and down sliding mode and up and down key mode are respectively convenient for users who prefer left and right or up and down. You only need to remember two types of operations to directly start the two functions with one click.
[0115] The split-control mode is designed to meet the needs of players with good memory and who prefer trendy and cool styles. They can use more operations and access more functions with one click.
[0116] It should be noted that Figure 2 and Figure 3 A full set of operation modes is shown, and in actual application, all or part or several of the modes may be adopted, without limitation here.
[0117] After the user customizes the corresponding relationship between the triggering mode of the new type of button and the shortcut function on the electronic device, the user inputs the customized triggering operation, and the electronic device can activate the corresponding shortcut function.
[0118] The following is a description of the process of starting a shortcut function by an electronic device in response to a user triggering a new type of key in conjunction with the software structure of the electronic device. Among them, the software structure of the electronic device can be understood as the layered architecture of the operating system of the electronic device. The operating system of the electronic device runs on the hardware components of the electronic device and can be: iOS operating system, Android open source operating system, Windows operating system, etc. The operating system of the electronic device can be understood as being run by the application processor (AP) of the electronic device.
[0119] The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device.
[0120] Figure 4 It is a software structure block diagram of the electronic device according to an embodiment of the present application.
[0121] The layered architecture divides the software into several layers, and the layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer (APP layer), the application framework layer (FWK layer), the local service layer (Native layer), the hardware abstraction layer (HAL layer) and the kernel layer (Kernel layer). The application layer can include multiple applications. For example, Figure 4 It shows some third-party and system applications, settings applications and notification capsule applications.
[0122] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions. For example, Figure 4 The application framework layer shown may include window management service (WindowManagerService), input management service (InputManagerService), power management service (PowerMangerService, PMS). Exemplarily, the Native layer includes input event processing, the HAL layer includes key HAL, and the Kernel layer includes input driver and key driver.
[0123] In some embodiments, Figure 2 and Figure 3 As described in the content of , the settings application is used to support users to customize the corresponding relationship between the operation of new buttons and shortcut functions. Figure 4As shown, the user inputs the operation of customizing the correspondence between the operation of the new type of key and the shortcut function in the interface of the setting application, and the electronic device responds to the operation input by the user, and the window management service (WindowManagerService) binds the operation of the new type of key and the shortcut function. In other embodiments, the electronic device can also support the customization of the correspondence between the operation of the new type of key and the shortcut function in the control center or the boot boot interface, which is not limited here.
[0124] In addition to the application processor, the electronic device may also include a coprocessor that can run a new type of key subsystem to respond to the user's operation on the new type of key and report the key event of the key to the module of the operating system running on the application processor. In some embodiments, according to the difference in the user's operation mode on the new type of key, the key event reported by the new type of key subsystem to the module of the operating system running on the application processor may include a press event and a slide event.
[0125] The following combination Figure 4 The displayed module introduces the process of starting a shortcut function in response to a trigger operation of a new type of key input by a user by an electronic device.
[0126] The new key includes an elastic component that can be deformed. When a user presses the new key or inputs a sliding operation on the new key, the elastic component of the new key can be deformed to generate voltage. The new key can convert the voltage into an electrical signal and transmit it to the new key subsystem. The electrical signal can be understood as the key recognition result.
[0127] like Figure 4 As shown, after obtaining the key recognition result, the key recognition module of the novel key subsystem passes it to the key reporting module through step ①. After the key reporting module confirms that the key recognition result is allowed to be reported to the AP, it reports the sliding event or pressing event to the key driver on the AP side through step ②. The key driver reports the sliding event or pressing event to the input driver through step ③. The input driver then reports the sliding event or pressing event to the InputManagerService through steps ④ to ⑥ after input event processing. The InputManagerService then distributes the sliding event or pressing event to the WindowMangerService.
[0128] When the WindowMangerService on the AP side receives a sliding event or a pressing event, it triggers the quick start of the application started by the shortcut function according to the corresponding relationship between the operation of the new type of button customized by the user and the shortcut function. Of course, this embodiment takes the WindowMangerService on the AP side as an example to illustrate, and in other embodiments, the FWK layer on the AP side may also include other modules, or add a new module to receive sliding events or pressing events, and trigger the quick start of the application started by the shortcut function according to the corresponding relationship between the operation of the new type of button customized by the user and the shortcut function, and execute other actions performed by the WindowMangerService proposed in the following content.
[0129] It should be noted that WindowMangerService can analyze the accidental touch characteristics from the event information of the sliding event or the pressing event based on some user operation behaviors, such as the behavior that the user immediately closes the newly launched application after triggering the shortcut function by operating the new type of button. For the event information of the sliding event or the pressing event that meets the accidental touch characteristics, the notification capsule can be used to prompt that performing a specific operation on the new type of button can trigger the quick launch of an application. This time, only a prompt is given but the application is not launched. If the user operates the new type of button again, the application can be quickly launched.
[0130] In some embodiments, when the event information such as the sliding stroke, force and speed carried by the sliding event does not meet the startup conditions of the shortcut function, WindowMangerService controls the display screen to display a notification capsule through step ⑦ to prompt the user that a specific sliding operation can start a certain application, so as to display the operation prompt to the user.
[0131] When the event information such as the sliding stroke, force and speed carried by the sliding event meets the starting condition of the shortcut function, WindowMangerService controls the starting of an application through step ⑧.
[0132] In other embodiments, when the pressing event carries event information such as pressing force and duration but does not meet the startup conditions of the shortcut function, WindowMangerService can also control the display screen to display a notification capsule through step ⑦ to prompt the user that a specific pressing operation can start an application, so as to display operation prompts to the user.
[0133] When the event information such as the pressing force and duration carried by the pressing event meets the starting condition of the shortcut function, WindowMangerService controls the starting of an application through step ⑧.
[0134] From the above content, it can be seen that WindowMangerService not only records the correspondence between the operation of the new type of buttons and the shortcut functions, but also can quickly pull up the service after receiving a specific sliding operation or pressing operation. It can also remind the user through notification capsules based on the characteristics of some user's accidental touch behaviors to reduce the impact of accidental touch operations on the user.
[0135] It should be noted that when PMS monitors the display status changes of the screen on, AOD (Always On Display), and screen off, the new status settings are sent to the key configuration and system status information of the new key subsystem through the key HAL and key driver, which caches and adjusts the relevant parameters accordingly.
[0136] Combine the following Figures 5 to 7 , the process of starting the shortcut function in response to the user triggering the operation of the new type of key provided in the embodiment of the present application is described in detail. In the following content, [A, B) refers to an interval including the value A but not including the value B, >= refers to greater than or equal to, <= refers to less than or equal to, < refers to less than, and > refers to greater than.
[0137] Before reporting a sliding event or pressing event to the AP, the new button subsystem must also determine that the pressure value of the user pressing or sliding the new button meets certain conditions. The details are as follows:
[0138] Combination Figure 5 If the pressure value sensed by the new key subsystem is too small (for example, less than P_a), it will be ignored, not reported, and no key recognition will be performed. That is, the electronic device does not support the ability to detect when the user touches the key with too little force, thereby reducing unnecessary false touches of functions.
[0139] If the pressure value sensed by the new key subsystem is between [P_b, P_c), it means that the user taps or slides on the key. Considering that it is easy to operate if the user slides with a smaller force, the distribution range of the force is used as the sliding detection range. It should be noted that, in theory, light sliding detection and light tap detection do not conflict. The new key subsystem can detect the sliding distance of the previous N frames to distinguish whether it is a light sliding or a light tap. Since the embodiment of the present application discusses light sliding detection but not light tapping, and considering the reduction of coupling with light tapping, this interval is used as the light sliding detection interval here, and light tap detection is not supported by default. However, if there is a business need to use light tapping to achieve quick triggering, the new key subsystem can also use the sensed pressure between [P_b, P_c) to determine that the user is inputting a light tap.
[0140] The force interval of [P_a, P_b) is used as the state following interval. This interval specifically belongs to the pressure-free section or the sliding detection pressure section, and the pressure section range before following its pressure into this section is called the following interval.
[0141] When the pressure value ≥ P_d, it is used to support button detection, and the pressure range levels such as light press and heavy press can also be defined as needed.
[0142] The force interval of [P_c, P_d) is also used as the state following interval. Whether this interval specifically belongs to the sliding detection pressure interval or the button detection pressure interval, it follows the pressure interval range before the pressure enters this interval, so it is called the following interval.
[0143] Based on the definition of the pressing force interval disclosed above, the new button subsystem obtains the button recognition results reported by the new button. It can scan the pressure value, absolute coordinates, relative coordinates, etc. of each new button at a dynamically configurable scanning frequency (such as 100HZ), which can be collectively referred to as button detection information. The pressure value represents the pressure borne by the new button when the new button reports data. The absolute coordinates represent the coordinate value Y relative to the origin of the button (exemplarily, taking the vertical screen of the mobile phone as an example, the top is the position of the origin 0). The relative coordinates represent the distance that has been slid relative to the starting position of the triggered slide, that is, the sliding travel distance D. The new button subsystem scans to obtain the button detection information of the new button, and based on this button detection information, it can generate button events, that is, generate slide events or press events.
[0144] The new button subsystem can perform first-level filtering processing on button events according to the following rules to reduce the frequency of data reported by the new button subsystem to the AP side, so that the AP can focus more on the subsequent service processing logic. Moreover, since the frequency of scanning the button detection data of the new button is relatively high, the new button subsystem set in the coprocessor is used to perform the first-level filtering processing, which can also avoid the problem of excessive occupation of the application processor resources caused by the application processor performing the first-level filtering.
[0145] I. Regarding the button starting from the released state as the initial state, from the perspective of pressure, the reporting conditions for button events are as follows:
[0146] 1. If the button pressure has always been in the state of < P_a, no button event is reported;
[0147] 2. If the button pressure ≥ P_b, report the corresponding slide or press button event.
[0148] II. When the button is continuously in the pressed state, from the perspectives of pressure and sliding travel, the reporting conditions for button events are as follows:
[0149] 1. If the pressed pressure interval changes, report the button event carrying parameters;
[0150] 2. If the pressed sliding travel exceeds a certain threshold, report the button event carrying parameters.
[0151] In some embodiments, the key events generated by the new key subsystem may carry parameters such as pressure value, absolute coordinates, relative coordinates, etc. In other embodiments, the key events may also carry a timestamp, which refers to the moment when the user inputs a press or slide operation. The new key subsystem may obtain a timestamp when scanning the pressure value, absolute coordinates, and relative coordinates of each new key, and execute the above rules based on the pressure value, absolute coordinates, relative coordinates, and timestamp of the new key to generate a key event or not generate a key event. The new key subsystem may also determine, based on the above rules, that the pressure value of the new key is greater than or equal to P_b, or determine that the pressure interval of the press has changed based on the pressure value of the new key, or determine that the press sliding stroke exceeds a certain threshold based on the relative coordinates of the new key, obtain a timestamp, and obtain a key event based on the pressure value, absolute coordinates, relative coordinates, and timestamp of the new key, thereby reducing system power consumption.
[0152] Figure 6 The process of detecting the user's input pressing or sliding operation and reporting the key event is shown. The process includes secondary filtering of the user's input pressing or sliding operation, which can be executed by the AP or the coprocessor without restriction. For power consumption considerations, the following content is introduced using the execution of the new key subsystem in the coprocessor as an example.
[0153] In some embodiments, after the new key subsystem filters the key events according to the first-level filtering conditions proposed in the above content, the new key subsystem Figure 6 The displayed process performs secondary filtering on the key events after the primary filtering. The key events after the secondary filtering can be reported to the AP by the new key subsystem.
[0154] like Figure 6 As shown, the new key subsystem performs press detection or slide detection, and the process of reporting key events includes the following steps:
[0155] S601: Determine that a new key event has arrived.
[0156] The new type of key detects the transition from an unpressed state to a pressed state, and the new type of key subsystem determines that a new key event has arrived. If the user presses a new type of key, but the pressing force changes, the new type of key subsystem can also determine that a new key event has arrived. If the user slides a new type of key, and the sliding force changes, the new type of key subsystem can also determine that a new key event has arrived.
[0157] The new key subsystem determines that a new key event has arrived, which can be understood as the new key subsystem obtaining a key event that has passed the first-level filtering. In this way, the new key subsystem can prioritize whether it is a key press-down event or a slide event based on the key force threshold.
[0158] In some embodiments, the new key subsystem determines whether a key Down event is generated through the following steps S602 and S603.
[0159] S602: Determine whether the pressure value P>=P_b and whether the detection flag is an initial value.
[0160] The new key subsystem determines that the pressure value P>=P_b and the detection flag is the initial value, indicating that the user has input a sliding operation or a pressing operation on the new key, and the new key subsystem can generate a key event. Among them, the detection flag is used to indicate the detection state of the new key, and the detection flag can be set to different values, each value refers to the detection state of the new key, and the detection state can at least include a sliding detection state and a pressing detection state (also called a key detection state). The detection flag is an initial value, exemplarily 0, which can indicate that the new key is not in a sliding detection state or a pressing detection state.
[0161] After the new key subsystem determines that the pressure value P>=P_b and the detection flag is the initial value, step S603 can be executed to clarify the type of user input operation. If the new key subsystem determines that the pressure value P<P_b or the detection flag is not the initial value, step S606 is executed.
[0162] The new key subsystem can learn the detection state of the new key through the detection flag, and the new key subsystem can more accurately determine the type of key event reported to the AP through the detection flag and the pressure value of the received new key event. In some embodiments, the new key subsystem may not set the detection flag, and the new key subsystem can determine the type of key event reported to the AP only through the pressure value of the received new key event. Based on this, step S602 is an optional step.
[0163] S603: Determine whether the pressure value P>=P_d.
[0164] The new key subsystem determines that the pressure value P>=P_d, indicating that the user has input a pressing operation, and the new key subsystem can generate and report the key press down event through step S604. The new key subsystem determines that the pressure value P<P_d, indicating that the user has input a sliding operation, and the new key subsystem does not need to immediately generate and report the sliding event, and can record the relevant data of the sliding detection through step S605, and continue to receive the subsequent key events, so as to collect the sliding process data, and finally use it to determine whether it is a valid sliding.
[0165] S604: Set the detection flag to key detection, and report the key press Down event to the AP.
[0166] During the process of the new key subsystem generating and reporting the press-down event, the detection flag may also be set from the initial value to key detection to indicate that the new key is in the press-down detection state.
[0167] In some embodiments, the press-down event generated and reported by the new key subsystem includes: the pressure value, absolute coordinates and relative coordinates of the new key; and may also include a timestamp.
[0168] In other embodiments, the press-down event generated and reported by the new key subsystem may also include indication information, such as an identifier of the new key, which is used to indicate which of the multiple new keys of the electronic device the user has operated, or to indicate the identity of the new key operated by the user.
[0169] The AP receives the press-down event and can quickly start the shortcut function corresponding to the user's press operation indicated by the press-down event based on the press-down event.
[0170] In some embodiments, after receiving a button press Down event, the AP can learn which new button the user has operated based on the indication information. For example, in a scenario where the new buttons are arranged on both sides of the electronic device, the AP can learn whether the user has operated the left button or the right button based on the indication information; in a scenario where the new buttons are arranged on the same side of the electronic device, the AP can learn whether the user has operated the up button or the down button based on the indication information.
[0171] In some embodiments, after receiving a key press-Down event, the AP obtains the pressure value in the press-Down event, and can determine whether the user presses the new type of key hard based on the pressure value; the AP obtains the absolute coordinates in the press-Down event, and can obtain the position where the user presses the new type of key based on the absolute coordinates; exemplarily, the origin of the key is the top of the device (the device includes one end of the camera), and the absolute coordinates represent the coordinate value of the position pressed by the user relative to the origin of the key. Based on the absolute coordinates, the AP determines the position where the user presses the new type of key, that is, whether the user presses up or down on the new type of key.
[0172] It should be noted that, based on the above content, after the WindowManagerService of the AP determines the identity and pressing position of the new type of key pressed by the user, it can start the shortcut function based on the correspondence between the pressing operation of the new type of key and the shortcut function.
[0173] Moreover, in the scenario where there is a correspondence between the re-pressing operation of a new type of button and the shortcut function, the AP's WindowManagerService can determine based on the above content that after the user re-presses the new type of button, it can start the shortcut function based on the correspondence between the re-pressing operation of the new type of button and the shortcut function.
[0174] The correspondence between the re-press operation of the new type of key and the shortcut function also includes the re-press operation of different keys corresponding to different shortcut functions, or the re-press operation of different positions of the key. In the scenarios corresponding to different shortcut functions, the AP can also determine the identity of the new type of key pressed by the user based on the indication information in the Press Down event and the Press Up event, and determine the user's pressing position based on the absolute coordinates in the Press Down event and the Press Up event.
[0175] S605, record the relevant data of sliding detection, as follows:
[0176] 1. Set the detection flag to: slide detection to indicate that the new type of key is in the slide detection state.
[0177] 2. Record the sliding start timestamp T 0 ; Sliding start timestamp T 0 It refers to the timestamp corresponding to the key event received in step S601.
[0178] 3. Record the sum of pressure P _sum =P1; P1 refers to the pressure value corresponding to the key event received by the new key subsystem through step S601.
[0179] 4. Record the number of reported points N = 1.
[0180] 5. Record the absolute coordinate Y; the absolute coordinate Y refers to the absolute coordinate corresponding to the key event received by the new key subsystem through step S601.
[0181] 6. Record initialization trip D init .
[0182] It should be noted that the new type of key is very sensitive to the pressure that can detect sliding. As the user gently touches and slides, a stroke may have been generated. Therefore, when recording the relevant data of sliding detection, it is necessary to record the stroke carried in the information reported by the new type of key as D init Value, so that D can be subtracted from the travel information reported in each frame as the slide progresses init value, so that the real sliding travel distance that meets the sliding requirements can be accurately obtained.
[0183] S606: Determine whether the detection mark is a key detection.
[0184] The new button subsystem determines that the pressure value P >= P_b, but the detection flag is not the initial value, indicating that the user may already be in the process of pressing the new button. Or, the new button subsystem determines that the pressure value P < P_b and the detection flag is not the initial value, indicating that the user may already be in the process of sliding the new button. Thus, through this step, it is further clarified whether the user is in the process of pressing the new button.
[0185] Among them, if it is determined that the detection flag is button detection, it indicates that the user is indeed in the process of pressing the new button, and then step S607 is executed. If it is determined that the detection flag is not button detection, step S610 is executed.
[0186] As described in the content of step S602 above, step S606 can also be an optionally executed step.
[0187] S607. Determine whether an end button (P < P_c) event is generated.
[0188] Among them, if the pressure value P < P_c, it indicates that an end button event should be generated, that is, during the user's continuous input of the pressing operation on the new button, the user pre-lifts the finger, resulting in a decrease in the input pressing pressure, meaning that the user is about to complete the pressing operation on the new button.
[0189] If the new button subsystem determines that an end button (P < P_c) event is generated, step S608 is executed; otherwise, step S609 is executed.
[0190] S608. Execute 1. Report the Up event of the button press and 2. Clear the detection flag: invalid initial value.
[0191] Through step S607, the new button subsystem determines that the pressure value P of the user's input pressing operation < P_c, that is, the user starts to lift the finger during the process of pressing the new button, completing a complete pressing operation. Based on this, the new button subsystem reports the Up event of the button press to the AP and clears the detection flag, setting it to an invalid initial value, or an invalid value.
[0192] In some embodiments, the Up event of the button press reported by the new button subsystem to the AP includes the pressure value, absolute coordinates, and relative coordinates of the new button; it can also include a timestamp. In other embodiments, the Up event of the button press generated and reported by the new button subsystem can also include indication information, such as the identifier of the new button, for indicating the identity of the new button operated by the user. In other embodiments, the Down event and Up event of the button press reported by the new button subsystem may not include relative coordinates.
[0193] In some embodiments, the press-down event and the press-up event include timestamps respectively. After receiving the press-down event and the press-up event of a key, the AP obtains the timestamps in the press-down event and the press-up event, and calculates the two timestamps as the duration of the user pressing the key. Based on the duration, the AP can know whether the user has long pressed the key.
[0194] It should be noted that in the scenario where the long press operation of the new type of button is bound to a shortcut function, the AP receives a press-Down event through step S604, and needs to wait for the new type of button subsystem to report a press-Up event through step S608S for the newly received button event.
[0195] After the AP (usually the AP's WindowManagerService) receives the Press Up event, it can obtain the duration of the key being pressed based on the timestamps in the Press Down event and the Press Up event when the pressure value in the Press Down event meets the re-press requirement, and when it is determined that the duration meets the condition for long pressing the key, it can start the shortcut function based on the correspondence between the re-long press operation of the new type of key and the shortcut function.
[0196] The correspondence between the re-long press operation and the shortcut function of the new type of key also includes the re-long press operation of different keys corresponding to different shortcut functions, or the re-long press operation of different positions of the key corresponding to different shortcut functions. In the scenarios, the AP can also determine the identity of the new type of key pressed by the user based on the indication information in the Press Down event and the Press Up event, and determine the user's pressing position based on the absolute coordinates in the Press Down event and the Press Up event.
[0197] S609: Report a button continuous pressing event.
[0198] The new key subsystem determines in step S607 that the pressure value P>=P_c of the pressing operation input by the user, indicating that the user is still pressing the new key, and reports the key continuous pressing event to the AP. In some embodiments, the key continuous pressing event includes the pressure value, absolute coordinates and relative coordinates of the new key; it may also include a timestamp.
[0199] S610: Determine whether the pressure value P>=P_d.
[0200] The new key subsystem determines through step S602 that the pressure value P>=P_b and the detection flag is not the initial value, and determines through step S606 that the detection flag is not a key detection, indicating that the user may be inputting a sliding operation on the new key. Considering that the user may habitually keep his finger lightly on the key, when the user keeps his finger lightly on the key, the pressure value felt by the new key can be just kept in the sliding detection range, that is, the pressure value P>=P_b; and the new key subsystem will also set the detection flag to sliding detection, that is, the detection flag is not the initial value, nor is it a key detection. But the real situation is: the user is not in the process of sliding the new key.
[0201] In this case, the new key subsystem receives a new key event again through step S601, which may mean that the user actually inputs a pressing operation on the new key. Based on this, the new key subsystem determines whether the user inputs a pressing operation on the new key through step S610.
[0202] If the new key subsystem determines that the pressure value P>=P_d, then step S611 is executed. If the new key subsystem determines that the pressure value P<P_d, then step S616 is executed.
[0203] S611, judge T i -T i-1 Is >= T max .
[0204] Among them, T i Refers to the timestamp corresponding to the new key event received by the new key subsystem in step S601; T i-1 The new key subsystem receives the timestamp corresponding to the key event last received in step S601; max It can be called the maximum interval time and can be set in advance based on experience.
[0205] The new key subsystem determines that the pressure value P>=P_d, and that the time interval between the current key event and the previous key event is long, exceeding T max , indicating that the user has actually input a new type of key press operation, and then step S612 is executed. The new type of key subsystem determines that the pressure value P>=P_d, but determines that the time interval between this key press event and the previous key press event does not exceed T max , step S613 can be used to further determine whether the user is performing a sliding operation on the new type of button.
[0206] S612, execute 1. set the detection flag to: key detection; 2. clear the relevant data of sliding detection; 3. report the key press down event.
[0207] In some embodiments, the key press-down event reported by the new key subsystem to the AP includes: the pressure value, absolute coordinates and relative coordinates of the new key; and may also include a timestamp.
[0208] S613, judgement D i -D init whether <D min .
[0209] Among them, D i Refers to the sliding stroke distance corresponding to the new key event received by the new key subsystem in step S601, that is, the relative coordinate; D init Refers to the sliding distance caused by a light touch when the user performs a sliding operation; D min It can be called the minimum travel distance and can be pre-set based on experience.
[0210] New key subsystem judgment D i -D init <D min , indicating that the user has made a slight relative sliding during the pressing operation, rather than inputting a sliding operation. In this case, the new key subsystem also executes step S612 and processes this key event as a pressing event.
[0211] New key subsystem judgment D i -D init >=D min , that is, the sliding stroke is not greater than D min If the value is small, it means that the user is likely to be in the process of an effective sliding operation, and the new key subsystem can be further determined through step S614.
[0212] S614: Determine whether the pressure value P>=P_e.
[0213] Wherein, P_e>=P_d, that is, P_e is a value greater than or equal to P_d. Setting P_e is used to tolerate the situation where the user's pressure occasionally exceeds P_d during the sliding process, improve the tolerance for sliding event detection, and improve the ease of user operation.
[0214] The new key subsystem determines that the pressure value P>=P_e, indicating that the user has pressed with greater force. The new key subsystem also executes step S612 to process this key event as a pressing event.
[0215] When the new key subsystem determines that the pressure value P is less than P_e, it indicates that the event is a sliding event in the user's sliding operation process, and the event information is updated by executing step S615.
[0216] S615, execute 1. Update the pressure sum P_ sum+ = P i ; 2. Update the number of reported points N++; 3. Update the travel distance D = D i -D init ; 4. Record the time T of this report i .
[0217] S616, determine whether the sliding event is over (ie, the pressure value P <P_a)。
[0218] As described in the above step S610, the new key subsystem determines through step S602 that the pressure value P>=P_b and the detection flag is not the initial value, and through step S606 determines that the detection flag is not a key detection, indicating that the user may be inputting a sliding operation on the new key. Further, the new key subsystem determines through step S610 that the pressure value is between [P_b, P_d), which can clearly indicate that the user is in the process of sliding the new key.
[0219] The new key subsystem can determine whether the sliding operation is finished in step S616. Of course, the end condition of the sliding operation is the pressure value P <P_a。
[0220] If the new key subsystem determines that the sliding event is finished, step S617 is executed, otherwise step S621 is executed.
[0221] S617, the relevant data of the settlement record sliding detection are as follows:
[0222] 1. Record the sliding end timestamp T i ; Slide end timestamp T i It refers to the timestamp corresponding to the key event received in step S601.
[0223] 2. Update the sum of pressure P _sum + = P i ;
[0224] Among them, the new key subsystem records the pressure after P _sum On the basis of the pressure values corresponding to the key events received in step S601, the updated sum of the pressures is obtained.
[0225] 3. Update the number of reporting points N++; wherein the new key subsystem adds 1 to the recorded number of reporting points to obtain the updated number of reporting points.
[0226] 4. Update itinerary D = D i -D init ; Among them, D i Refers to the relative coordinates corresponding to the key event received in step S601, such as the content of the aforementioned step S605, D i and Dinit The difference is taken as the updated trip D.
[0227] 5. Calculate the mean pressure P _avr =P _sum / N; N refers to the number of reporting points after the update.
[0228] 6. Calculate the sliding speed V = D / (T i -T 0 ), T 0 Refers to the sliding start timestamp.
[0229] In some embodiments, the sliding stroke D, sliding speed V and average pressure P of the sliding operation of the new key input by the user are calculated in step S617. _avr , can be based on the sliding stroke D, sliding speed V and mean pressure P _avr Determining the validity of the sliding event. Steps S618 to S620 provide a method for determining the validity of the sliding event and a subsequent processing method.
[0230] S618, according to D, V and P _avr Determines whether the sliding event is valid.
[0231] Among them, according to D, V and P _avr If it is determined that the sliding event is valid, step S620 is executed; otherwise, step S619 is executed.
[0232] In some embodiments, D, V and P can be used in the validity determination process of the sliding event. _avr Any one or any combination of the above is used as a determination indicator. For example, Figure 7 Demonstrated based on D, V and P _avr Three judgment indicators are used to determine the effectiveness of sliding events.
[0233] The complete stroke (or full stroke) of a sliding operation of the new key is recorded as D _all , the lower limit of the stroke of an effective sliding operation is denoted as D _low The typical sliding speed from laboratory tests or large data statistics is V _th , the lower limit of the speed of an effective sliding operation is recorded as V _low , the upper limit of speed is recorded as V _hi The typical average sliding pressure value from laboratory tests or large data statistics is P _avr_th .
[0234] like Figure 7 As shown, the new key subsystem starts with D, V and P _avr A score of the effectiveness of the sliding event is calculated, the score being used to indicate the effectiveness of the sliding event.
[0235] S701, determine whether the sliding stroke D <= D _all .
[0236] The maximum travel of the sliding operation is D _all In theory, the calculated itinerary should not be greater than D _all If the sliding stroke D is greater than D _all In this case, it indicates that an abnormality has occurred and the data of this sliding detection is unreliable. In this case, the new key subsystem determines that the sliding stroke D>D _all , then execute step S708. The new key subsystem determines that the sliding stroke D is less than or equal to D _all , then execute step S702.
[0237] S702: Determine whether the sliding stroke D>D _low .
[0238] The lower limit of the travel of an effective sliding operation is denoted by D _low , if the sliding stroke D is not greater than D _low , indicating that the sliding stroke is too short. It is likely to be an accidental touch and cannot be considered as a valid slide. In this case, the new key subsystem determines that the sliding stroke D is not greater than D _low , then execute step S708. The new key subsystem determines that the sliding stroke D>D _low , then execute step S703.
[0239] S703: Determine whether the sliding speed V>V _low .
[0240] The lower limit of the speed of a valid sliding operation is recorded as V _low If the sliding speed is too slow, it does not conform to the objective phenomenon that the user inputs the sliding to trigger the shortcut function. In this case, the new key subsystem determines that the sliding speed V is not greater than V _low , then execute step S708. The new key subsystem determines that the sliding speed V>V _low , then execute step S704.
[0241] S704: Determine whether the sliding speed V <V _hi .
[0242] The upper limit of the speed of an effective sliding operation is recorded as V _hi If the sliding speed is too fast, it does not conform to the objective phenomenon that the user inputs the sliding to trigger the shortcut function. In this case, the new key subsystem determines that the sliding speed V is not less than V _hi , then execute step S708. The new key subsystem determines the sliding speed V <V _hi , then execute step S705.
[0243] It should be noted that the execution order of steps S701 to S704 is not limited to Figure 7 As shown, the execution can be performed in parallel or in other order.
[0244] S705: Calculate the sliding score, as follows:
[0245] 1. Calculate the trip score Score_D.
[0246] For the sliding operation trip, assuming the total score is 100 points, the score from the trip dimension is Score_D = 100*D / D _all , that is, the closer the stroke is to the full stroke, the higher the score. Of course, considering that it is difficult to operate the full stroke manually, after scoring the formula, Score_D> a certain threshold (such as 85 points) can be set to 100 points, and those below the threshold can keep the original calculated score or also be graded and quantized into several level segments (such as quantized into 4 level segments in total), which is not limited here.
[0247] 2. Calculate the speed score Score_V.
[0248] 3. Calculate the stress score Score_P.
[0249] For sliding velocity V and sliding mean pressure P _avr , can be respectively compared to the typical value V _th and P _avr_th Set several levels of quantization intervals. For example, taking the four-level quantization as an example, if the relative typical value deviation is within the neighborhood of deta1, the score is 100 points; if the relative typical value deviation is between the neighborhoods of deta1 and deta2, the score is 80 points; if the relative typical value deviation is between the neighborhoods of deta2 and deta3, the score is 60 points; if the relative typical value deviation is outside the neighborhood of deta3, the score is 20 points. According to this division principle, the sliding speed score Score_V and the sliding pressure score Score_P can be obtained.
[0250] 4. Calculate the weighted sum of the travel score, speed score, and pressure score as the sliding score.
[0251] The calculation formula for the sliding score is: Score = c1*Score_D+c2*Score_V+c3*Score_P.
[0252] Among them, c1, c2 and c3 are weighted coefficients of the three scores, which satisfy the relationship restriction of c1+c2+c2=1, so that the final score can be maintained in percentage.
[0253] S706: Determine whether the sliding score Score>Score_th.
[0254] If the sliding score Score is lower than the threshold Score_th, it means that the confidence of this sliding is low and it is likely to be an accidental touch operation, and it is determined as an invalid sliding in step S708. If the sliding score Score is higher than the threshold Score_th, it is determined as a valid sliding in step S707.
[0255] For a sliding event to be determined to be valid, the event information that needs to be reported may include the sliding score Score, the sliding event generation time T1 and D, V and P _avr Information is collected and used to facilitate the subsequent reporting, analysis and parameter adjustment of relevant big data.
[0256] S707: Determine whether the sliding event is valid.
[0257] S708: Determine that the sliding event is invalid.
[0258] It should be noted that since the sliding detection is triggered by the pressure range, when the final settlement is made to determine the sliding validity, all pressure values during the sliding process are in line with the sliding pressure range. Therefore, the sliding validity judgment algorithm no longer involves the upper limit of the sliding pressure (if it exceeds the upper limit value, the button detection is triggered and the sliding detection is terminated) or the lower limit (if the lower limit is triggered, the sliding validity settlement judgment is started, which will also cause the current sliding detection to be terminated) value.
[0259] It should also be noted that in the scenario where the effectiveness of a sliding event is judged based on any one of the parameters D, V and P_avr as an evaluation indicator, the new key subsystem can judge the effectiveness of the sliding event based on the sliding stroke as an evaluation indicator based on step S701, step S702, and whether the score of the sliding stroke is higher than the first threshold; similarly, the new key subsystem can judge the effectiveness of the sliding event based on the sliding speed as an evaluation indicator based on step S703, step S704 and whether the score of the sliding speed is higher than the second threshold; the new key subsystem can judge the effectiveness of the sliding event based on the sliding pressure as an evaluation indicator based on whether the score of the sliding pressure is higher than the third threshold; wherein the first threshold, the second threshold and the third threshold can be set according to empirical values.
[0260] S619, execute 1. clean up the relevant data of sliding detection; 2. clear the detection flag: invalid initial value; 3. ignore the invalid event to avoid accidental touch.
[0261] If the new key subsystem determines that the sliding event is invalid, it can clean up the relevant data of the recorded sliding detection, clear the detection flag, set it to an invalid initial value, and ignore the invalid sliding event and not report it to the AP to avoid accidental touches.
[0262] S620, execute 1. map to sliding event; 2. report sliding event; 3. clear sliding detection related data; 4. clear detection flag: invalid initial value.
[0263] If the new key subsystem determines that the sliding event is valid, it can generate a sliding event based on the relevant data of the sliding detection, and then report the sliding event to the AP; it can also clear the recorded relevant data of the sliding detection and clear the detection flag to set it to an invalid initial value.
[0264] In some embodiments, the sliding event reported by the new key subsystem may include at least: the absolute coordinates corresponding to the sliding start timestamp, the sliding stroke and the average pressure. After the new key subsystem reports the sliding event to the AP, the AP may determine the starting point of the sliding operation input by the user based on the absolute coordinates corresponding to the sliding start timestamp, and then determine whether the sliding operation input by the user is an upward or downward slide. In other embodiments, the sliding event reported by the new key subsystem may also include the sliding speed.
[0265] In some other embodiments, the sliding event reported by the new key subsystem may further include indication information, such as an identifier of the new key, for indicating the identity of the new key operated by the user. After the new key subsystem reports the sliding event to the AP, the AP may determine on which key the user inputs the sliding operation based on the indication information.
[0266] It should be noted that the WindowManagerService of the AP can determine the identity of the new type of button pressed by the user based on the above content, and after the swipe up or swipe down operation, the shortcut function can be started based on the correspondence between the operation of the new type of button and the shortcut function.
[0267] S621, judge T i -T i-1 Is >= T max .
[0268] The new key subsystem determines through step S616 that the sliding event has not ended, indicating that the user may be continuously inputting sliding operations on the new key. As described in the above step S610, if the user habitually keeps his finger lightly on the key, the pressure range can be kept just within the sliding detection interval, but the user is not in the process of inputting a sliding operation. In this case, if the user starts to input a sliding operation, the new key subsystem obtains a new key event through step S601, and the new key event is a sliding event. The new key subsystem determines through step S621 that the current sliding event is more than T in time relative to the previous sliding event. max , it means that the interval between the sliding operations input by the user is too long, and then step S622 is executed to clear the information of the sliding events previously saved and use the current sliding event as a new starting point for sliding detection.
[0269] Considering that the sliding operation is a continuous and fast action, the new key subsystem determines in step S621 that the time between the current sliding event and the previous sliding event does not exceed T max , indicating that the user is in the process of inputting a sliding operation on the new type of key, and the new type of key subsystem executes step S623.
[0270] S622, execute 1. reset the sliding start timestamp T 0 =T i ; 2. Reset the sum of pressure P_ sum =P i ; 3. Reset the number of reporting points N = 1; 4. Reset the absolute coordinate Y; 5. Reset the initialization stroke D init ; 6. Clear other data of sliding records.
[0271] Among them, the new key subsystem receives the timestamp T corresponding to the new key event received this time. i As the starting timestamp of a sliding event, the sum of the reset pressure is the pressure value P corresponding to the new key event received this time. i ; Reset the number of reporting points N = 1, reset the absolute coordinate to the absolute coordinate Y corresponding to the new key event received this time, and reset the initialization to the stroke D corresponding to the new key event received this time init .
[0272] The new key subsystem also cleans up other data recorded in the sliding detection, which may refer to: the data related to the sliding detection except: the initial timestamp T 0 , the sum of the pressures P _sum , reporting point number N, absolute coordinate Y and initialization stroke D init Data of key events other than those reported historically.
[0273] S623, execute 1. Update the pressure sum P_ sum + = P i ; 2. Update the number of reported points N++; 3. Update the travel distance D = D i -D init ; 4. Record the time point T of this report i .
[0274] Among them, the new key subsystem records the pressure after P _sum Based on the accumulated pressure value P corresponding to the new key event received this time i , and the updated sum of pressures is obtained. The new key subsystem adds 1 to the recorded number of reporting points to obtain the updated number of reporting points. iRefers to the relative coordinates corresponding to the new key event received this time, such as the content of the aforementioned step S605, D i and D init The difference is taken as the updated trip D.
[0275] It should be noted that after the new key subsystem executes step S604, step S605, step S608, step S609, step S604, step S612, step S615, step S619, step S620, step S622 and step S623, it returns to execute step S601 to wait for the arrival of the next new key event.
[0276] The method for enabling a shortcut function provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, personal digital assistants (PDAs), desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, and netbooks.
[0277] Take mobile phones as an example. Figure 8 This is an example of the composition of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 100 may include a processor 110, an internal memory 120, a display screen 130, and a new type of button 140, etc.
[0278] It should be understood that in order to facilitate understanding of the embodiments of the present application, Figure 8 The electronic device 100 shown in the figure only includes some components related to the method for opening the shortcut function provided in the embodiment of the present application. The electronic device provided in the embodiment of the present application may include Figure 8 The electronic device 100 shown may have more or fewer components. That is, Figure 8 The electronic device 100 shown does not constitute a specific limitation on the electronic device provided in the embodiment of the present application.
[0279] The processor 110 may include one or more processing units, for example, the processor 110 may include a coprocessor 110A, an application processor (AP) 110B, a graphics processing unit (GPU), etc. The processor 110 may also be provided with a memory for storing instructions and data.
[0280] The internal memory 120 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 120. In some embodiments, the internal memory 120 stores instructions for methods for opening shortcut functions. The processor 110 can execute the instructions stored in the internal memory 120 to enable the electronic device to execute a quick execution of a certain business in response to the user's pressing operation or sliding operation on the new type button 140, such as quickly starting a certain application.
[0281] The electronic device 100 implements a display function through a GPU, a display screen 130 , and an application processor.
[0282] The new type of button 140 may generally include a power button and a volume button. The new type of button 140 receives a pressing operation or a sliding operation input by a user, obtains a corresponding electrical signal and transmits it to the coprocessor 110A. The coprocessor 110A and the application processor 110B may cooperate to implement a quick execution of a certain service, such as quick launch of a certain application, in response to the user's pressing operation or sliding operation on the new type of button 140.
[0283] Another embodiment of the present application further provides a computer-readable storage medium, which stores instructions, and when the computer-readable storage medium is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
[0284] The computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0285] Another embodiment of the present application further provides a computer program product including instructions. When the computer program product is run on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
Claims
1. A method for enabling a shortcut function, characterized in that: Applied to an electronic device, the electronic device includes a first button, the first button supports detection of a user's sliding operation and pressing operations of different strengths; the method includes: receiving a user's pressing operation on the first button; In response to the user pressing the first button, running a first function of an application installed in the electronic device; receiving a sliding operation of the user on the first button; In response to the user's sliding operation on the first button, a second function of an application installed on the electronic device is run, and the first function and the second function are the same or different.
2. The method for enabling a shortcut function according to claim 1, characterized in that: The receiving a pressing operation of the first button by the user includes: receiving a re-pressing operation of the first button by the user; The step of executing the first function of the application installed in the electronic device in response to the user pressing the first button comprises: executing the first function of the application installed in the electronic device in response to the user re-pressing the first button; The method further comprises: receiving a heavy long press operation of the user on the first button; In response to the user's heavy long press operation on the first button, a third function of the application installed on the electronic device is executed, and the first function and the third function are the same or different.
3. The method for enabling a shortcut function according to claim 1, characterized in that: The receiving a user's pressing operation on the first button includes: receiving a user's pressing operation on a first position of the first button; The step of executing the first function of the application installed in the electronic device in response to the user pressing the first button comprises: executing the first function of the application installed in the electronic device in response to the user pressing the first position of the first button; The method further comprises: receiving a user's pressing operation on a second position of the first button; In response to the user pressing the second position of the first button, a fourth function of the application installed on the electronic device is executed, and the first function and the fourth function are the same or different.
4. The method for enabling a shortcut function according to any one of claims 1 to 3, characterized in that: The receiving a sliding operation of the first button by the user includes: receiving a sliding operation of the first button along a first direction by the user; In response to the user's sliding operation on the first button, running the second function of the application installed in the electronic device includes: in response to the user's sliding operation on the first button along a first direction, running the second function of the application installed in the electronic device; The method further comprises: receiving a sliding operation of the first button along a second direction by a user; In response to the user sliding the first button along the second direction, a fifth function of the application installed on the electronic device is executed, and the first function and the fifth function are the same or different.
5. The method for enabling a shortcut function according to claim 1, characterized in that: The step of executing the first function of the application installed in the electronic device in response to the user pressing the first button comprises: In response to the user pressing the first button, generating a pressing event; Based on the pressing event, a first function of an application installed in the electronic device is executed.
6. The method for enabling a shortcut function according to claim 5, characterized in that: Before running the first function of the application installed in the electronic device based on the pressing event, the method further includes: It is determined that the pressure value included in the press event is greater than a first value.
7. The method for enabling a shortcut function according to claim 5, characterized in that: In response to the user's pressing operation on the first key, generating a pressing event, including: in response to the user's pressing operation on the first key, sequentially generating a pressing down event and a pressing lifting event; The running the first function of the application installed in the electronic device based on the pressing event includes: running the first function of the application installed in the electronic device based on the pressing down event and the pressing up event.
8. The method for enabling a shortcut function according to claim 7, characterized in that: Before running the first function of the application installed in the electronic device based on the pressed down event and the pressed up event, the method further includes: The pressure value of the pressed down event is determined to be greater than a first value, and the pressure value of the pressed up event is determined to be less than a second value, the second value being less than the first value.
9. The method for enabling a shortcut function according to claim 8, characterized in that: The step of running a first function of an application installed in the electronic device based on the pressed down event and the pressed up event includes: When it is determined that the pressure value of the pressed down event meets the pressing force requirement of the first button, a first function of an application installed on the electronic device is run based on the pressed down event and the pressed up event.
10. The method for enabling a shortcut function according to claim 8, characterized in that: The step of running a first function of an application installed in the electronic device based on the pressed down event and the pressed up event includes: Obtaining a duration of the pressing event based on a timestamp of the pressing event and a timestamp of the pressing lifting event; When it is determined that the pressure value of the press-down event meets the press-force requirement of the first key, and when it is determined that the duration of the press event meets the press duration requirement of the first key, the first function of the application installed on the electronic device is run based on the press-down event and the press-lift event.
11. The method for enabling a shortcut function according to any one of claims 1 to 10, characterized in that: The step of running a second function of an application installed in the electronic device in response to the user's sliding operation on the first button comprises: In response to the user's sliding operation on the first button, generating a sliding event; Based on the sliding event, a second function of an application installed in the electronic device is run.
12. The method for enabling a shortcut function according to claim 11, characterized in that: The generating a sliding event in response to the user's sliding operation on the first button includes: In response to the user's sliding operation on the first button, acquiring a sliding stroke and a starting point coordinate of the sliding operation; A sliding event is generated based on the sliding stroke and the starting point coordinates of the sliding operation.
13. The method for enabling a shortcut function according to claim 11, characterized in that: Before running the second function of the application installed in the electronic device based on the sliding event, the method further includes: Based on the sliding event, the sliding operation is determined to be a valid sliding operation.
14. The method for enabling a shortcut function according to claim 13, characterized in that: The determining, based on the sliding event, that the sliding operation is a valid sliding operation includes: Determine that the event information of the sliding event satisfies any one or any combination of the following three conditions; The three conditions include: the sliding stroke of the sliding event is less than the full stroke of the sliding operation and greater than the minimum stroke of the sliding operation, and the sliding stroke score of the sliding event is higher than a first threshold; The sliding speed of the sliding event is greater than the lower limit of the speed of the sliding operation and less than the upper limit of the speed of the sliding operation, and the sliding speed score of the sliding event is higher than the second threshold; The score of the sliding pressure of the sliding event is higher than a third threshold.
15. The method for enabling a shortcut function according to claim 14, characterized in that: In the case where the event information of the key event is determined to satisfy the three conditions, the score of the sliding stroke of the sliding event is higher than a first threshold, the score of the sliding speed of the sliding event is higher than a second threshold, and the score of the sliding pressure of the sliding event is higher than a third threshold, including: A weighted sum of the score of the sliding distance of the sliding event, the score of the sliding speed of the sliding event, and the score of the sliding pressure of the sliding event is greater than a sliding threshold value.
16. The method for enabling a shortcut function according to claim 12, characterized in that: Before obtaining the sliding stroke and the starting point coordinates of the sliding operation, the method further includes: Based on a sliding event corresponding to the sliding operation, it is determined that the sliding operation satisfies a sliding stop condition.
17. The method for enabling a shortcut function according to claim 16, characterized in that: Also includes: Based on the sliding event corresponding to the sliding operation, if it is determined that the sliding operation does not meet the sliding stop condition, the parameters in the sliding event corresponding to the sliding operation are recorded, or the parameters in the sliding event corresponding to the recorded sliding operation are reset.
18. The method for enabling a shortcut function according to any one of claims 1 to 17, characterized in that: The first button is a volume button or a power button of the electronic device, or a button other than the volume button and the power button of the electronic device.
19. An electronic device, characterized in that: include: One or more processors, a memory, and a first button; The memory and the first button are coupled to the one or more processors, the memory is used to store a computer program, the computer program includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method for enabling a shortcut function as described in any one of claims 1 to 18.
20. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed, is specifically used to implement the method for enabling a shortcut function as described in any one of claims 1 to 18.
21. A computer program product, characterized in that When the computer program product runs on a computer, the computer is enabled to execute the method for enabling a shortcut function as claimed in any one of claims 1 to 18.
Citation Information
Patent Citations
Touching keyboard control system and method
CN101387915A
Terminal button achieving method, device and mobile terminal
CN104754092A
Operation method and apparatus based on multi-functional key of mobile terminal
CN104991728A
Multi-level key control method and device and electronic equipment
CN107544683A
Application control method and device, terminal device and computer readable storage medium
CN109885245A
