An edge gesture touch response method, device and computer-readable storage medium
By receiving and delaying swipe events in the edge touch area of the display screen, the problem of accidental touches in edge gesture function when hardware is abnormal is solved, achieving a more stable and highly adaptable edge gesture touch response and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NUBIA TECHNOLOGY CO LTD
- Filing Date
- 2022-06-24
- Publication Date
- 2026-05-26
AI Technical Summary
In the prior art, edge gesture functions on display screens may malfunction after prolonged or harsh use, causing the edge gesture function and application interface to slide together, resulting in accidental touches and a reduced user experience.
When a swipe event is received in the touch area at the edge of the screen, the event is sent to the edge gesture module and then sent to the application after a preset delay. The edge gesture module sends an undo event to the application, obtains the difference between the swipe area and the pixel distance, and adjusts the preset duration of the swipe area.
It improves the stability and adaptability of edge gesture touch function, avoids accidental touch problems caused by edge hardware abnormalities, and enhances the user experience.
Smart Images

Figure CN115202474B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile communications, and more particularly to an edge gesture touch response method, device, and computer-readable storage medium. Background Technology
[0002] In current technology, with the continuous development of smart terminal devices, the display screens of devices such as mobile phones are becoming increasingly larger. In particular, the high screen-to-body ratio of these devices dictates that current interactive operations are also performed on full-screen displays. For example, the touch control method of full-screen displays makes functions such as back, home, and multitasking, which were previously handled by navigation keys on mobile phones, impossible to operate with one hand. Therefore, current mobile phones and other devices provide users with the ability to perform necessary operations such as back by swiping along the left or right edges, i.e., edge gesture functionality.
[0003] However, the current problem is that when the display screen is operating normally, edge gesture swipes can complete the normal return task, and the edge gesture swipe function is generally unaffected when the current interface is static. However, after prolonged use or under harsh conditions, the hardware on the left and right edges of the display screen's touchpad may malfunction or be damaged to varying degrees during use. This may result in insufficient edge motion events, causing the edge gesture function to slide along with the current application's interface when performing edge swipes. This not only fails to accurately complete the system's touch interaction but also leads to accidental touches within the application, greatly reducing the user's touch interaction experience. Summary of the Invention
[0004] To address the aforementioned technical deficiencies in the prior art, this invention proposes an edge gesture touch response method, which includes:
[0005] When a swipe event is received in the edge touch area of the screen, the swipe event is sent to the preset edge gesture module. At the same time, after a preset delay, the swipe event is sent to the current application.
[0006] When the edge gesture module determines that it has received the swipe event, it sends an undo event to the application through the edge gesture module.
[0007] When it is determined that the application has received the undo event, the sliding area of the sliding event and the third pixel distance are obtained.
[0008] The preset duration for the sliding area to receive a new sliding event is reduced based on the difference between the second pixel distance and the third pixel distance of the application.
[0009] Optionally, when a swipe event is received in the edge touch area of the screen, the swipe event is sent to a preset edge gesture module, and simultaneously, after a preset delay, the swipe event is sent to the current application, including:
[0010] Obtain the current application and detect whether the current display interface of the application responds to the swipe command of the edge touch area.
[0011] If the display interface does not respond to the swipe command of the edge touch area, then when the edge touch area receives the swipe event, it will only send the swipe event to the edge gesture module.
[0012] Optionally, the step of sending a swipe event to a preset edge gesture module when a swipe event is received in the edge touch area of the screen, and simultaneously sending the swipe event to the current application after a preset delay, further includes:
[0013] Obtain the application type of the application, and obtain the relative position of the sliding area in the edge touch area.
[0014] The preset duration is determined based on the application type and / or the relative position.
[0015] Optionally, the step of sending a reversal event to the application through the edge gesture module when it is determined that the edge gesture module has received the swipe event includes:
[0016] After sending the swipe event to the edge gesture module, wait for the first response command from the edge gesture module.
[0017] At the moment of responding to the first response command, the edge gesture module is controlled to send the undo event to the application.
[0018] Optionally, when it is determined that the application has received the undo event, obtaining the sliding area of the sliding event and the third pixel distance includes:
[0019] The distance between the normal area of the screen and the point where the sliding effect is triggered is obtained and used as the first pixel distance.
[0020] The distance at which the display interface of the application triggers the sliding effect is obtained, and this distance is taken as the second pixel distance, wherein the first pixel distance is less than the second pixel distance.
[0021] Optionally, the step of obtaining the sliding area and the third pixel distance of the sliding event when it is determined that the application has received the undo event further includes:
[0022] After the edge gesture module sends the undo event to the application, it checks whether a second response command for the application to the swipe event is generated after a preset interval.
[0023] If the second response instruction is not detected after the preset interval, then it is determined that the application has received the revocation event after the preset interval.
[0024] Optionally, the step of obtaining the sliding area and the third pixel distance of the sliding event when it is determined that the application has received the undo event further includes:
[0025] Obtain the falling position and lifting position of the sliding event, and take the connected region between the falling position and the lifting position as the sliding region.
[0026] The pixel distance of the swipe event sent to the edge gesture module is obtained as the third pixel distance.
[0027] Optionally, reducing the preset duration for the sliding area to receive a new sliding event again based on the difference between the second pixel distance and the third pixel distance of the application includes:
[0028] When the difference between the third pixel distance and the second pixel distance is positive, the ratio of the difference to a preset reference value is determined.
[0029] Determine the proportional relationship corresponding to the ratio, and adjust the preset duration according to the proportional relationship.
[0030] The present invention also proposes an edge gesture touch response device, the device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the edge gesture touch response method as described in any of the preceding claims.
[0031] The present invention also proposes a computer-readable storage medium storing an edge gesture touch response program, which, when executed by a processor, implements the steps of the edge gesture touch response method as described in any of the preceding claims.
[0032] The edge gesture touch response method, device, and computer-readable storage medium of the present invention, when receiving a swipe event in the edge touch area of the screen, send the swipe event to a preset edge gesture module, and simultaneously send the swipe event to the current application after a preset delay; when it is determined that the edge gesture module has received the swipe event, send a cancel event to the application through the edge gesture module; when it is determined that the application has received the cancel event, obtain the swipe area and a third pixel distance of the swipe event; and adjust the preset delay for the swipe area to receive a new swipe event again based on the difference between the second pixel distance and the third pixel distance of the application. This achieves a user-friendly edge gesture touch response scheme, making the edge gesture touch function more stable and adaptable, effectively avoiding accidental touches caused by possible hardware malfunctions on the left and right edges of the touchpad of the display screen, or damage of varying degrees during use, greatly improving the user's edge gesture touch experience. Attached Figure Description
[0033] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0034] Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal according to the present invention;
[0035] Figure 2 This is a communication network system architecture diagram provided in an embodiment of the present invention;
[0036] Figure 3 This is a flowchart of the first embodiment of the edge gesture touch response method of the present invention;
[0037] Figure 4 This is a flowchart of the second embodiment of the edge gesture touch response method of the present invention;
[0038] Figure 5 This is a flowchart of the third embodiment of the edge gesture touch response method of the present invention;
[0039] Figure 6 This is a flowchart of the fourth embodiment of the edge gesture touch response method of the present invention;
[0040] Figure 7 This is a flowchart of the fifth embodiment of the edge gesture touch response method of the present invention;
[0041] Figure 8 This is a flowchart of the sixth embodiment of the edge gesture touch response method of the present invention;
[0042] Figure 9 This is a flowchart of the seventh embodiment of the edge gesture touch response method of the present invention;
[0043] Figure 10 This is a flowchart of the eighth embodiment of the edge gesture touch response method of the present invention;
[0044] Figure 11 This is an operation diagram of the edge gesture function in the second embodiment of the edge gesture touch response method of the present invention;
[0045] Figure 12 This is a schematic diagram of edge reporting interval dispatch in the third embodiment of the edge gesture touch response method of the present invention;
[0046] Figure 13 This is a schematic diagram of the sliding distance in the fifth embodiment of the edge gesture touch response method of the present invention;
[0047] Figure 14 This is a schematic diagram of the delay response of the sixth embodiment of the edge gesture touch response method of the present invention. Detailed Implementation
[0048] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0049] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0050] Terminals can be implemented in various forms. For example, the terminals described in this invention may include mobile terminals such as mobile phones, tablets, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0051] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from elements specifically designed for mobile purposes, the construction according to embodiments of the present invention can also be applied to fixed-type terminals.
[0052] Please see Figure 1This is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0053] The following is combined with Figure 1 A detailed introduction to each component of the mobile terminal:
[0054] The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, and a duplexer. Furthermore, the radio frequency unit 101 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution).
[0055] WiFi is a short-range wireless transmission technology. Mobile terminals, through the WiFi module 102, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 102 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted as needed without changing the nature of the invention.
[0056] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0057] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.
[0058] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0059] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0060] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as touch screen, can collect touch operations on or near the user (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands from processor 110. In addition, touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being limited here.
[0061] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal. The specific implementation is not limited here.
[0062] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 108 may be used to receive input (e.g., data, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.
[0063] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0064] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.
[0065] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0066] although Figure 1 As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.
[0067] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.
[0068] Please see Figure 2 , Figure 2 This invention provides a communication network system architecture diagram. The communication network system is an LTE system based on the universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and the operator's IP services 204, which are connected in sequence.
[0069] Specifically, UE201 can be the aforementioned terminal 100, which will not be elaborated here.
[0070] E-UTRAN202 includes eNodeB2021 and other eNodeB2022s. Among them, eNodeB2021 can connect to other eNodeB2022s via backhaul (e.g., X2 interface), and eNodeB2021 connects to EPC203. eNodeB2021 can provide UE201 with access to EPC203.
[0071] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gateway) 2034, PGW (Packet Data Network Gateway) 2035, and PCRF (Policy and Charging Rules Function) 2036, etc. Among them, MME2031 is the control node that handles signaling between UE201 and EPC203, providing bearer and connection management. HSS2032 provides registers to manage functions such as the Home Location Register (not shown in the diagram) and stores user-specific information such as service characteristics and data rates. All user data can be sent through SGW2034. PGW2035 can provide UE 201 IP address allocation and other functions. PCRF2036 is the policy and charging control decision point for service data flow and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging enforcement function unit (not shown in the figure).
[0072] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.
[0073] Although the above description uses the LTE system as an example, those skilled in the art should understand that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, etc., which are not limited here.
[0074] Based on the aforementioned mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.
[0075] Example 1
[0076] Figure 3 This is a flowchart of the first embodiment of the edge gesture touch response method of the present invention. An edge gesture touch response method, the method comprising:
[0077] S1. When a swipe event is received in the edge touch area of the screen, the swipe event is sent to the preset edge gesture module. At the same time, after a preset delay, the swipe event is sent to the current application.
[0078] S2. When it is determined that the edge gesture module has received the swipe event, the edge gesture module sends an undo event to the application.
[0079] S3. When it is determined that the application has received the undo event, obtain the sliding area of the sliding event and the third pixel distance.
[0080] S4. Adjust the preset duration for the sliding area to receive a new sliding event again based on the difference between the second pixel distance and the third pixel distance of the application.
[0081] In this embodiment, the current touch scenario is first described, taking a mobile phone as an example. Clicking or swiping on the touchpad triggers a MotionEvent. The MotionEvent type refers to the action represented by the MotionEvent object. For example, when a user swipes their finger across the touchpad screen, the system generates a series of touch event objects, each representing a different action. Some events represent the user pressing down, some represent the user swiping on the screen, and others represent the user lifting their finger off the screen. The event types for these events are ACTION_DOWN, ACTION_MOVE, and ACTION_UP, respectively. This series of events generated by the aforementioned actions is called an event stream, which includes one ACTION_DOWN event, several ACTION_MOVE events, and one ACTION_UP event. If an error occurs during the touch, an ACTION_CANCEL event will also be triggered.
[0082] In this embodiment, considering that after prolonged or harsh use, the touchpad hardware on the left and right edges of some display screens may malfunction or suffer varying degrees of damage during use, this could lead to insufficient edge MotionEvents. When performing edge swipes, the edge gesture function and the current application's interface might swipe together, failing to accurately complete the system's touch interaction and causing accidental touches within the application. Therefore, this embodiment analyzes the above problem: When the current mobile phone screen refresh rate is 60Hz, 10ms is one frame. The mobile phone system's MotionEvents are uniformly dispatched by the underlying input module to various upper-layer functional modules every 16ms. When the user is currently on the application's user interface, MotionEvents are dispatched to both the edge gesture function and the current application simultaneously. Based on this, the edge gesture module determines the distance for triggering a back operation to be 16 pixels, and the distance for the current application to trigger a swipe effect to be 24 pixels. Under normal circumstances, if the touchpad edge notification points are densely packed, the 16-pixel edge gesture's back event will be triggered first. At this point, the edge gesture will immediately send an ACTION_CANCEL event to the current application. Upon receiving the ACTION_CANCEL event, the application will stop all current touch events, thus interrupting the application from receiving subsequent ACTION_MOVE events and preventing the current screen's swiping effect from being triggered. However, in another abnormal situation, some phones' touchpads may have hardware malfunctions or damage during use, resulting in insufficient edge notification points (MotionEvents). Specifically, there might be no notification points between 16 and 24 pixels, with points only appearing after 24 pixels. In this case, both the edge gesture's back function and the current application's swiping effect will be triggered simultaneously. The user intends to return from the current screen, but the current screen's swiping effect is triggered instead, resulting in the aforementioned poor touch interaction experience.
[0083] In this embodiment, the optimization solution for the aforementioned abnormal scenario is to send all touchpad edge swipe events normally to the edge gesture module, but with a delay of a certain period, such as 50ms, before sending them to the current application. That is, within the aforementioned 50ms, the phone only processes the edge gesture function, ensuring the normal operation of the edge gesture return function. If there is a swipe exceeding 16 pixels within 50ms, the edge gesture return function is triggered. Since the current application has no swipe events within 50ms, its interface will not swipe accordingly. Furthermore, after the aforementioned 50ms, since the edge gesture has been triggered and the ACTION_CANCEL event has been sent, the current application, upon receiving it, stops processing all MotionEvents. This effectively avoids simultaneously triggering the edge gesture return function and the current application's swipe effect, completely resolving the problem of poor user edge gesture experience caused by insufficient touchpad edge reporting points.
[0084] As can be seen, in this embodiment, by delaying the dispatch of the current application's swipe move event when the edge gesture is triggered, the purpose of triggering only the edge gesture without triggering the current application's interface swipe is achieved, thereby greatly improving the user experience of edge gestures under different screen hardware environments.
[0085] The beneficial effect of this embodiment is that, when a swipe event is received in the edge touch area of the screen, the swipe event is sent to a preset edge gesture module, and simultaneously, after a preset delay, the swipe event is sent to the current application; when it is determined that the edge gesture module has received the swipe event, a cancel event is sent to the application through the edge gesture module; when it is determined that the application has received the cancel event, the swipe area and the third pixel distance of the swipe event are obtained; and the preset time for the swipe area to receive a new swipe event again is reduced according to the difference between the second pixel distance and the third pixel distance of the application. This achieves a user-friendly edge gesture touch response scheme, making the edge gesture touch function more stable and adaptable, effectively avoiding accidental touch problems caused by possible hardware malfunctions on the left and right edges of the touchpad of the display screen, or damage of varying degrees during use, greatly improving the user's edge gesture touch experience.
[0086] Example 2
[0087] Figure 4This is a flowchart of a second embodiment of the edge gesture touch response method of the present invention. Based on the above embodiment, when a swipe event is received in the edge touch area of the screen, the swipe event is sent to a preset edge gesture module. Simultaneously, after a preset delay, the swipe event is sent to the current application, including:
[0088] S11. Obtain the current application and detect whether the current display interface of the application responds to the sliding command of the edge touch area.
[0089] S12. If the display interface does not respond to the sliding command of the edge touch area, then when the edge touch area receives the sliding event, the sliding event is only sent to the edge gesture module.
[0090] Optionally, in this embodiment, please refer to Figure 11 The diagram shows the operation of the edge gesture function, which supports swiping the edge to the right to trigger the current screen return operation and swiping the edge to the left to trigger the current screen return operation.
[0091] Optionally, in this embodiment, when the current interface return operation is triggered by swiping right from the edge and when the current interface return operation is triggered by swiping left from the edge, the current application is obtained, and it is detected whether the current display interface of the application responds to the swipe command of the edge touch area; if the display interface does not respond to the swipe command of the edge touch area, then when the swipe event is received in the edge touch area, the swipe event is only sent to the edge gesture module.
[0092] The beneficial effect of this embodiment is that by acquiring the current application and detecting whether the current display interface of the application responds to the sliding command of the edge touch area; if the display interface does not respond to the sliding command of the edge touch area, then when the edge touch area receives the sliding event, it only sends the sliding event to the edge gesture module. This achieves a user-friendly edge gesture touch response scheme, making the edge gesture touch function more stable and adaptable, effectively avoiding accidental touch problems caused by possible hardware malfunctions on the left and right edges of the touchpad of the display screen, or damage of varying degrees during use, greatly improving the user's edge gesture touch experience.
[0093] Example 3
[0094] Figure 5This is a flowchart of the third embodiment of the edge gesture touch response method of the present invention. Based on the above embodiment, when a swipe event is received in the edge touch area of the screen, the swipe event is sent to a preset edge gesture module, and simultaneously, after a preset delay, the swipe event is sent to the current application, further comprising:
[0095] S13. Obtain the application type of the application and the relative position of the sliding area in the edge touch area.
[0096] S14. Determine the preset duration based on the application type and / or the relative position.
[0097] Optionally, in this embodiment, please refer to Figure 12 The diagram illustrates the edge reporting interval distribution. The existing input module (i.e., the input module itself) distributes edge reporting points to the edge gesture module at 16ms intervals. Simultaneously, the input module distributes the same edge reporting points to the current interface app (i.e., the current application) at 16ms intervals.
[0098] Optionally, in this embodiment, considering the problem of the above-mentioned dispatch mechanism under abnormal edge reporting conditions, a processing mechanism with a preset duration as the delay is proposed. Specifically, the preset duration is determined by obtaining the application type of the application and the relative position of the sliding area in the edge touch area; the preset duration is determined based on the application type and / or the relative position. For example, when the current application is a game, i.e., the touch priority is high, a shorter preset duration is set; conversely, when the aforementioned relative position is an area with a high failure rate of the display screen or an area with high usage frequency, a longer preset duration is set.
[0099] The beneficial effect of this embodiment is that by obtaining the application type of the application and the relative position of the sliding area in the edge touch area, the preset duration is determined according to the application type and / or the relative position. This achieves a user-friendly edge gesture touch response scheme, making the edge gesture touch function more stable and adaptable. It effectively avoids accidental touch problems caused by potential hardware malfunctions on the left and right edges of the touchpad of the display screen, or damage of varying degrees during use, greatly improving the user's edge gesture touch experience.
[0100] Example 4
[0101] Figure 6 This is a flowchart of the fourth embodiment of the edge gesture touch response method of the present invention. Based on the above embodiment, the step of sending a cancel event to the application through the edge gesture module when it is determined that the edge gesture module has received the swipe event includes:
[0102] S21. After sending the swipe event to the edge gesture module, wait for the first response instruction from the edge gesture module.
[0103] S22. At the moment of responding to the first response instruction, control the edge gesture module to send the undo event to the application.
[0104] Optionally, in this embodiment, to avoid accidental triggering by the current application, at the moment of response to the first response instruction, it is first determined that the swipe event has been successfully triggered, and then the edge gesture module is controlled to send the undo event to the application.
[0105] Optionally, in this embodiment, to avoid the current application not being triggered in a timely manner, at the response time of the first response instruction, if it is determined that the swipe event has not been successfully triggered, the edge gesture module is no longer controlled to send the undo event to the application.
[0106] The beneficial effect of this embodiment is that, after sending the swipe event to the edge gesture module, it waits for the first response command from the edge gesture module; at the moment of the response command, it controls the edge gesture module to send the undo event to the application. This achieves a user-friendly edge gesture touch response scheme, making the edge gesture touch function more stable and adaptable, effectively avoiding accidental touch problems caused by possible hardware malfunctions on the left and right edges of the touchpad of the display screen, or damage of varying degrees during use, greatly improving the user's edge gesture touch experience.
[0107] Example 5
[0108] Figure 7 This is a flowchart of the fifth embodiment of the edge gesture touch response method of the present invention. Based on the above embodiment, the step of obtaining the sliding area and the third pixel distance of the sliding event when it is determined that the application has received the undo event includes:
[0109] S31. Obtain the distance of the normal area of the screen at which the sliding effect is triggered, and use it as the first pixel distance.
[0110] S32. Obtain the distance at which the display interface of the application triggers the sliding effect, as the second pixel distance, wherein the first pixel distance is less than the second pixel distance.
[0111] Optionally, in this embodiment, please refer to Figure 13The diagram illustrates the swipe distance. When the swipe exceeds 16 pixels, the edge gesture return function is triggered; that is, the 16 pixels are used as the first pixel distance. When the swipe exceeds 24 pixels further, the touch function of the current application's current interface is triggered; that is, the 24 pixels are used as the second pixel distance.
[0112] The beneficial effect of this embodiment is that by obtaining the distance of the normal area of the screen at which the sliding effect is triggered, as the first pixel distance; and obtaining the distance of the application's display interface at which the sliding effect is triggered, as the second pixel distance, wherein the first pixel distance is less than the second pixel distance, a user-friendly edge gesture touch response scheme is implemented. This results in higher stability and adaptability of the edge gesture touch function, effectively avoiding accidental touches caused by potential hardware malfunctions on the left and right edges of the touchpad of the display screen, or damage of varying degrees during use, thus greatly improving the user's edge gesture touch experience.
[0113] Example 6
[0114] Figure 8 This is a flowchart of the sixth embodiment of the edge gesture touch response method of the present invention. Based on the above embodiment, the step of obtaining the sliding area and the third pixel distance of the sliding event when it is determined that the application has received the undo event further includes:
[0115] S33. After the edge gesture module sends the undo event to the application, after a preset interval, it is detected whether a second response command for the application to the swipe event is generated.
[0116] S34. If the second response instruction is not detected after the preset interval, then it is determined that the application has received the revocation event after the preset interval.
[0117] Optionally, in this embodiment, please refer to Figure 14 The diagram illustrates the delayed response. The input module normally sends all touchpad edge swipe events to the edge gesture module, but delays them for a period, such as 50ms, before sending them to the current application. That is, within this 50ms period, the phone only processes the edge gesture function to ensure the normal operation of the edge gesture return function. If any swipe exceeding 16 pixels occurs within 50ms, the edge gesture return function is triggered. Since the current application has no swipe events within this 50ms period, its interface will not swipe accordingly. Furthermore, after the 50ms, since the edge gesture has been triggered and the ACTION_CANCEL event has been sent, the current application, upon receiving this event, immediately stops processing all MotionEvents.
[0118] Optionally, in this embodiment, to prevent accidental touches by the application, a preset interval corresponding to the current application is set. Specifically, after the edge gesture module sends the undo event to the application, it is checked after the preset interval whether a second response command for the swipe event has been generated by the application; if no second response command is detected after the preset interval, it is determined that the application has received the undo event after the preset interval.
[0119] The beneficial effect of this embodiment is that, after the edge gesture module sends the undo event to the application, it detects whether a second response command for the swipe event is generated by the application after a preset interval; if no second response command is detected after the preset interval, it is determined that the application has received the undo event after the preset interval. This achieves a user-friendly edge gesture touch response scheme, making the edge gesture touch function more stable and adaptable, effectively avoiding accidental touches caused by potential hardware malfunctions on the left and right edges of the touchpad of the display screen, or damage of varying degrees during use, greatly improving the user's edge gesture touch experience.
[0120] Example 7
[0121] Figure 9 This is a flowchart of the seventh embodiment of the edge gesture touch response method of the present invention. Based on the above embodiment, the step of obtaining the sliding area and the third pixel distance of the sliding event when it is determined that the application has received the undo event further includes:
[0122] S35. Obtain the falling position and lifting position of the sliding event, and take the connected region of the falling position and the lifting position as the sliding region.
[0123] S36. Obtain the pixel distance of the swipe event sent to the edge gesture module, and use it as the third pixel distance.
[0124] Optionally, in this embodiment, the first finger contact area corresponding to the falling position and the second finger contact area corresponding to the lifting position are connected according to the sliding trajectory to obtain the connected area.
[0125] Optionally, in this embodiment, the aforementioned connected region is considered as a potentially abnormal screen touch region.
[0126] Optionally, in this embodiment, when the screen touch is not normal, the pixel distance of the swipe event sent to the edge gesture module is greater than or equal to the second pixel distance mentioned above, and is hereby used as the third pixel distance.
[0127] The beneficial effect of this embodiment is that by obtaining the drop position and release position of the sliding event, the connected region between the drop position and the release position is taken as the sliding region; and the pixel distance of the sliding event sent to the edge gesture module is obtained as the third pixel distance. This achieves a user-friendly edge gesture touch response scheme, making the edge gesture touch function more stable and adaptable, effectively avoiding accidental touches caused by potential hardware malfunctions on the left and right edges of the touchpad of the display screen, or damage of varying degrees during use, greatly improving the user's edge gesture touch experience.
[0128] Example 8
[0129] Figure 10 This is a flowchart of the eighth embodiment of the edge gesture touch response method of the present invention. Based on the above embodiment, the step of reducing the preset duration for the sliding area to receive a new sliding event again according to the difference between the second pixel distance and the third pixel distance of the application includes:
[0130] S41. When the difference between the third pixel distance and the second pixel distance is positive, determine the ratio of the difference to a preset reference value.
[0131] S42. Determine the proportional relationship corresponding to the ratio value, and adjust the preset duration according to the proportional relationship.
[0132] Optionally, in this embodiment, a reference value of 100 is preset. For example, when the distance to the third pixel is 50, the difference between the distance to the third pixel and the distance to the second pixel is determined to be 26, and the ratio is 0.26.
[0133] Optionally, in this embodiment, the preset duration is reduced by the aforementioned ratio of 0.26, thereby improving the sliding response sensitivity of the current interface of the current application.
[0134] The beneficial effect of this embodiment is that, when the difference between the third pixel distance and the second pixel distance is positive, the ratio of the difference to a preset reference value is determined; a proportional relationship corresponding to the ratio is determined, and the preset duration is reduced according to the proportional relationship. This achieves a user-friendly edge gesture touch response scheme, making the edge gesture touch function more stable and adaptable, effectively avoiding accidental touches caused by potential hardware malfunctions on the left and right edges of the touchpad of the display screen, or damage of varying degrees during use, greatly improving the user's edge gesture touch experience.
[0135] Example 9
[0136] Based on the above embodiments, the present invention also proposes an edge gesture touch response device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the edge gesture touch response method as described in any of the above embodiments.
[0137] It should be noted that the above-described device embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the device embodiments, which will not be repeated here.
[0138] Example 10
[0139] Based on the above embodiments, the present invention also proposes a computer-readable storage medium storing an edge gesture touch response program, wherein the edge gesture touch response program, when executed by a processor, implements the steps of the edge gesture touch response method as described in any of the above embodiments.
[0140] It should be noted that the above-described medium embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the medium embodiments, which will not be repeated here.
[0141] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0142] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0143] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0144] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. An edge gesture touch response method, characterized in that, The method includes: When a swipe event is received in the edge touch area of the screen, the swipe event is sent to the preset edge gesture module. At the same time, after a preset delay, the swipe event is sent to the current application. After receiving the first response instruction from the edge gesture module, it is determined that the edge gesture module has received the swipe event, and an undo event is sent to the application through the edge gesture module; When it is determined that the application has received the undo event, the sliding area, the second pixel distance, and the third pixel distance of the sliding event are obtained; wherein, the second pixel distance is the distance at which the application's display interface triggers the sliding effect, and the third pixel distance is the pixel distance of the sliding event sent to the edge gesture module; The preset duration for the sliding area to receive a new sliding event is reduced based on the difference between the second pixel distance and the third pixel distance of the application. Specifically, this includes: when the difference between the third pixel distance and the second pixel distance is positive, determining the ratio of the difference to a preset reference value; determining the proportional relationship corresponding to the ratio; and reducing the preset duration according to the proportional relationship.
2. The edge gesture touch response method of claim 1, wherein, When a swipe event is received in the edge touch area of the screen, the swipe event is sent to a preset edge gesture module. Simultaneously, after a preset delay, the swipe event is sent to the current application, including: Obtain the current application and detect whether the current display interface of the application responds to the swipe command of the edge touch area; If the display interface does not respond to the swipe command of the edge touch area, then when the edge touch area receives the swipe event, it will only send the swipe event to the edge gesture module.
3. The edge gesture touch response method of claim 2, wherein, When a swipe event is received in the edge touch area of the screen, the swipe event is sent to a preset edge gesture module. Simultaneously, after a preset delay, the swipe event is sent to the current application. The method further includes: Obtain the application type of the application, and obtain the relative position of the sliding area in the edge touch area; The preset duration is determined based on the application type and / or the relative position.
4. The edge gesture touch response method of claim 3, wherein, After receiving the first response instruction from the edge gesture module, the step of determining that the edge gesture module has received the swipe event and sending a reversal event to the application through the edge gesture module includes: After sending the swipe event to the edge gesture module, wait for the first response command from the edge gesture module; at the moment of the response to the first response command, control the edge gesture module to send the undo event to the application.
5. The edge gesture touch response method of claim 4, wherein, The step of obtaining the sliding area, second pixel distance, and third pixel distance of the sliding event when it is determined that the application has received the undo event includes: The distance between the normal area of the screen and the point where the sliding effect is triggered is obtained and used as the first pixel distance; The distance at which the display interface of the application triggers the sliding effect is obtained, and is taken as the second pixel distance, wherein the first pixel distance is less than the second pixel distance.
6. The edge gesture touch response method of claim 5, wherein, The step of obtaining the sliding area, second pixel distance, and third pixel distance of the sliding event when it is determined that the application has received the undo event further includes: After the edge gesture module sends the undo event to the application, it checks whether a second response command for the application to the swipe event is generated after a preset interval. If the second response instruction is not detected after the preset interval, then it is determined that the application has received the revocation event after the preset interval.
7. The edge gesture touch response method of claim 6, wherein, The step of obtaining the sliding area, second pixel distance, and third pixel distance of the sliding event when it is determined that the application has received the undo event further includes: Obtain the falling position and lifting position of the sliding event, and take the connected region between the falling position and the lifting position as the sliding region; The pixel distance of the swipe event sent to the edge gesture module is obtained as the third pixel distance.
8. An edge gesture touch responsive device, comprising: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the edge gesture touch response method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an edge gesture touch response program, which, when executed by a processor, implements the steps of the edge gesture touch response method as described in any one of claims 1 to 7.