Touch event processing method, device, mobile terminal and storage medium

When the navigation gesture function of the mobile terminal is turned on, the operating system monitors the touch events of the touch screen and filters the event information, solving the problem of reporting unnecessary events when the navigation gesture function is turned on, ensuring the effectiveness of the navigation gesture.

CN114270298BActive Publication Date: 2025-08-12SHENZHEN HEYTAP TECHNOLOGY CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201980099360.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-08
Publication Date
2025-08-12
Estimated Expiration
2039-10-08

AI Technical Summary

Technical Problem

When the navigation gesture function is turned on by the mobile terminal, the system reports unnecessary touch event information to the application layer, causing the navigation gesture to fail.

Method used

When the navigation gesture function is turned on, the operating system monitors the touch events of the touch screen and obtains a variety of event information, including coordinate event information. When the touch coordinates are in the preset range, the event information corresponding to the navigation gesture function is reported to the application layer to avoid reporting of unnecessary event information.

Benefits of technology

It avoids reporting unnecessary event information caused by touch events within the coordinate range of navigation gesture touch when the navigation gesture function is turned on, prevents navigation gesture from failing, and ensures the normal operation of navigation gesture function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114270298B_ABST
    Figure CN114270298B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, mobile terminal, and storage medium for processing touch events. The touch event processing method is applied to an operating system of a mobile terminal, wherein the mobile terminal includes a touch screen. The method comprises: when the navigation gesture function of the mobile terminal is enabled, the operating system monitors touch events on the touch screen; when a touch event on the touch screen is detected, obtains multiple event information corresponding to the touch event, wherein the multiple event information includes coordinate event information; determines the touch coordinates of the touch event based on the coordinate event information; and when the touch coordinates are within a preset range, reports event information corresponding to the navigation gesture function in the multiple event information to the application layer, wherein the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. This method can effectively avoid the problem of navigation gesture failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of mobile terminals, and more specifically, to a method and device for processing touch events, a mobile terminal, and a storage medium. Background Art

[0002] Mobile devices, such as tablets and mobile phones, have become one of the most commonly used consumer electronics in our daily lives. As mobile screens continue to grow, buttons on these devices are gradually being eliminated. Without buttons for returning to the homepage, backing up, or viewing tasks, navigation gestures have emerged. Summary of the Invention

[0003] In view of the above problems, the present application proposes a touch event processing method, device, mobile terminal and storage medium.

[0004] In a first aspect, an embodiment of the present application provides a method for processing touch events, which is applied to an operating system of a mobile terminal, wherein the mobile terminal includes a touch screen, and the method includes: when the navigation gesture function of the mobile terminal is turned on, the operating system monitors touch events on the touch screen; when a touch event on the touch screen is monitored, obtaining a plurality of event information corresponding to the touch event, wherein the plurality of event information includes coordinate event information; determining the touch coordinates of the touch event based on the coordinate event information; when the touch coordinates are within a preset range, reporting the event information corresponding to the navigation gesture function in the plurality of event information to the application layer, wherein the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function, and the event information corresponding to the navigation gesture function is used to instruct the application layer to perform processing operations corresponding to the navigation gesture function.

[0005] In a second aspect, an embodiment of the present application provides a touch event processing device, which is applied to an operating system of a mobile terminal, wherein the mobile terminal includes a touch screen, and the device includes: a touch monitoring module, an event acquisition module, a coordinate acquisition module, and an event reporting module, wherein the touch monitoring module is used to monitor the touch event on the touch screen by the operating system when the navigation gesture function of the mobile terminal is turned on; the event acquisition module is used to obtain a variety of event information corresponding to the touch event when a touch event on the touch screen is monitored, and the multiple event information includes coordinate event information; the coordinate acquisition module is used to determine the touch coordinates of the touch event based on the coordinate event information; the event reporting module is used to report the event information corresponding to the navigation gesture function in the multiple event information to the application layer when the touch coordinates are within a preset range, and the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function, and the event information corresponding to the navigation gesture function is used to instruct the application layer to perform processing operations corresponding to the navigation gesture function.

[0006] In a third aspect, an embodiment of the present application provides an electronic device comprising: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the touch event processing method provided in the first aspect above.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the touch event processing method provided in the first aspect.

[0008] The solution provided by the present application is that when the navigation gesture function of the mobile terminal is turned on, the operating system monitors the touch event on the touch screen. When a touch event on the touch screen is detected, multiple event information corresponding to the touch event is obtained, including coordinate event information. The touch coordinates of the touch time are then determined based on the coordinate event information. When the touch coordinates are within a preset range, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer. The preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform the processing operation corresponding to the navigation gesture function. This can avoid the situation where, when the navigation gesture function is turned on, when a touch event occurs within the touch coordinate range of the navigation gesture, redundant event information is reported to the application layer, causing the navigation gesture to fail. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram of an interface provided in an embodiment of the present application is shown.

[0011] Figure 2 A flow chart of a method for processing a touch event according to an embodiment of the present application is shown.

[0012] Figure 3 A flow chart of a method for processing a touch event according to another embodiment of the present application is shown.

[0013] Figure 4 A flow chart of a method for processing a touch event according to another embodiment of the present application is shown.

[0014] Figure 5 A flow chart of a method for processing a touch event according to another embodiment of the present application is shown.

[0015] Figure 6 A flow chart of a method for processing a touch event according to yet another embodiment of the present application is shown.

[0016] Figure 7 An interface schematic diagram provided in yet another embodiment of the present application is shown.

[0017] Figure 8 Another interface schematic diagram provided in yet another embodiment of the present application is shown.

[0018] Figure 9 A block diagram of a touch event processing device according to an embodiment of the present application is shown.

[0019] Figure 10 A block diagram of an event reporting module in a touch event processing device according to an embodiment of the present application is shown.

[0020] Figure 11 4 is a block diagram of a mobile terminal for executing a method for processing a touch event according to an embodiment of the present application.

[0021] Figure 12 It is a storage unit in an embodiment of the present application for storing or carrying a program code for implementing a method for processing a touch event in accordance with an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0023] Displays in electronic devices such as mobile phones and tablets typically display content such as text, images, icons, or videos. With the advancement of touch technology, more and more electronic devices are equipped with touchscreen displays. Touchscreen displays can respond to user touch operations such as dragging, single-clicking, double-clicking, and sliding on the touchscreen.

[0024] As users demand ever-higher clarity and detail in displayed content, more and more electronic devices are adopting larger touchscreen displays. However, in the process of implementing larger touchscreen displays, it has been discovered that functional components such as the front-facing camera, proximity sensor, and earpiece installed on the front of the electronic device can affect the area within which the touchscreen display can be extended.

[0025] Electronic devices typically consist of a front panel, a back cover, and a frame. The front panel includes an upper forehead area, a middle screen area, and a lower keypad area. Typically, the upper forehead area houses functional components such as the earpiece jack and front camera, the middle screen area houses a touchscreen display, and the lower keypad area houses one to three physical buttons.

[0026] As the screens of mobile terminals continue to grow, the lower key area on the mobile terminals is gradually being eliminated. Since there are no keys for returning to the homepage, backing out, viewing tasks, etc. on the mobile terminals, a navigation gesture function is generated. Among them, the navigation gesture function is to use navigation gestures on the system interface or application interface to realize functions such as returning to the desktop, returning to the previous level, and viewing recent tasks, which are completed using physical keys or virtual keys. For example, Figure 1 As shown, the user can return to the desktop by sliding up on the bottom area of the touch screen. Of course, the specific navigation gesture is not limited.

[0027] Among them, the realization of the navigation function is to use the operating system of the mobile terminal to report the event information of the touch event to the upper system (application layer). The upper system determines whether the touch event is a navigation gesture based on the event information of the touch event, and then determines whether to trigger the navigation gesture function.

[0028] After long-term research, the inventors found that when the navigation gesture function of a mobile terminal is turned on, the mobile terminal system may report redundant event information when reporting touch event information to the application layer, causing the navigation gesture to fail.

[0029] To address the above issues, the inventors have proposed the touch event processing method, device, mobile terminal, and storage medium provided in the embodiments of this application. These methods can prevent unnecessary event information from being reported to the application layer when a touch event occurs within the touch coordinate range of a navigation gesture when the navigation gesture function is enabled, thereby causing the navigation gesture to fail. The specific touch event processing method is described in detail in the subsequent embodiments.

[0030] See also Figure 2 , Figure 2 The flowchart of the touch event processing method provided by one embodiment of the present application is shown. The touch event processing method is used to avoid reporting redundant event information to the application layer when a touch event occurs within the touch coordinate range of the navigation gesture when the navigation gesture function is turned on, thereby causing the navigation gesture to fail. In a specific embodiment, the touch event processing method is applied to Figure 9 The touch event processing device 400 and the mobile terminal 100 ( Figure 11 ). The following will take a mobile terminal as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the mobile terminal used in this embodiment can be a smart phone, a tablet computer, a smart watch, etc., which is not limited here. Specifically, the touch event processing method is applied to the operating system of the mobile terminal. Among them, the mobile terminal includes a touch screen. The following will focus on Figure 2 The process shown in FIG. 1 is described in detail. The method for processing a touch event may specifically include the following steps:

[0031] Step S110: When the navigation gesture function of the mobile terminal is enabled, the operating system monitors touch events on the touch screen.

[0032] In an embodiment of the present application, the mobile terminal can monitor the navigation gesture function, and when it detects that the navigation gesture function is turned on, it adopts a corresponding processing method for the touch event of the touch screen. Among them, the navigation gesture function is used to realize functions such as returning to the desktop, returning to the previous level, and viewing recent tasks using physical buttons or virtual buttons based on the navigation gesture detected in the system interface or application interface. The navigation gesture is a pre-set touch gesture for triggering returning to the desktop, returning to the previous level, and viewing recent tasks. The navigation gesture can be an up swipe gesture, a left swipe gesture, a right swipe gesture, etc., which are not limited here.

[0033] In some embodiments, the mobile terminal may be provided with a switch for controlling the turning on and off of the navigation gesture function, such as a switch in a setting interface of the navigation function. By controlling the switch, the turning on and off of the navigation gesture function can be achieved. Accordingly, the mobile terminal may detect the state of the switch and determine whether the navigation gesture function is turned on based on the state of the switch. Specifically, when the switch is on, the navigation gesture function is turned on, and when the switch is off, the navigation gesture function is turned off.

[0034] In other embodiments, the mobile terminal may include a navigation gesture module, which is used to implement the navigation gesture function. The navigation gesture module may be a software module that is used to determine whether a touch event is a navigation gesture based on event information of the touch event reported by the operating system, and perform the corresponding navigation gesture function based on the navigation gesture. Accordingly, the operating system can monitor whether the navigation gesture module is in an on state to determine whether the navigation gesture function is on. Specifically, when the navigation gesture module is in an on state, the navigation gesture function is in an on state, and when the navigation gesture module is in an off state, the navigation gesture function is in a off state.

[0035] For example, the principles of the navigation gesture function are described using a mobile terminal running the Android operating system. The Android system framework, from bottom to top, consists of the kernel layer, core class library layer, framework layer, and application layer. The kernel layer provides core system services, including security, memory management, process management, network protocol stack, and hardware drivers. Hardware drivers within the kernel layer are referred to as the driver layer, which includes touchscreen drivers and camera drivers. The core class library layer includes the Android runtime and libraries. The Android runtime provides most of the functionality available in the Java programming language's core class libraries, including the core libraries and the Dalvik virtual machine (Dalvik VM). Each Android application is an instance of the Dalvik virtual machine, running in its own process. The libraries are used by various components of the Android system, including the Media Framework, Surface Manager, SQLite (a relational database engine), and FreeType (bitmap and vector font rendering). These functions are exposed to developers through the Android system's framework layer. The framework layer provides a series of class libraries necessary for developing Android applications, enabling rapid application development, easy component reuse, and personalized extension through inheritance. Services provided include component management, window management, system data source components, a spatial framework, resource management, and installation package management. The application layer includes various applications that interact directly with users, or Java-based service programs that run in the background. These include desktop applications, contact applications, call applications, camera applications, image viewers, games, maps, web browsers, and other applications developed by developers.

[0036] Furthermore, the navigation gesture module can be located in the application layer. After detecting a touch event, the bottom layer of the Android system (the touch screen system in the kernel layer) reports the event information of the touch event to the application layer. The navigation gesture module of the application layer can determine whether the touch event is a navigation gesture for triggering the navigation gesture function based on the event information of the touch event, and when the touch event is a navigation gesture, perform display control corresponding to the navigation gesture function, such as returning to the desktop, returning to the previous level interface, and viewing recent tasks.

[0037] In some embodiments, when the operating system detects that the navigation gesture function is enabled, it can monitor touch events on the touch screen. Specifically, the bottom layer of the operating system (i.e., the touch screen system in the kernel layer) can monitor touch events on the touch screen. For example, when a press event is detected, it is determined that a touch event on the touch screen has been detected.

[0038] Step S120: when a touch event on the touch screen is detected, obtaining a plurality of event information corresponding to the touch event, wherein the plurality of event information includes coordinate event information.

[0039] In an embodiment of the present application, input events in a mobile terminal (e.g., events from a peripheral device such as a touch screen) can be uniformly mounted in an input system at the kernel layer, which can include a touch screen system, etc. The input system is divided into different event types (type), event codes (code), and event attributes (value). The operating system processes input events as follows: the application layer is at the upper layer of the system and is primarily responsible for monitoring, receiving, and processing event information of input events reported from the lower layer of the system.

[0040] For example, taking a touch screen system as an example, the event information of the touch screen events it monitors may include press events, lift events, coordinate event information, hand pressure event information, approximate event information of the diameter of the finger in contact with the touch screen, and approximate event information of the finger's diameter. The coordinate event information can be further divided into event information of the horizontal coordinate and event information of the vertical coordinate. When the touch screen system reports event information of touch events, the event information that must be reported may include press events, lift events, and coordinate event information. Optional event information may include hand pressure event information, approximate event information of the diameter of the finger in contact with the touch screen, and approximate event information of the finger's diameter.

[0041] In some embodiments, when an operating system detects a touch event on a touch screen, it can obtain various event information corresponding to the touch event. The various event information may include a press event, a lift event, coordinate event information, hand pressure event information, event information about the approximate diameter of the finger contacting the touch screen, and event information about the approximate diameter of the finger. Of course, the specific event information corresponding to the touch event is not limited.

[0042] Step S130: determining the touch coordinates of the touch event according to the coordinate event information.

[0043] In an embodiment of the present application, after the operating system obtains multiple event information of the touch event, that is, the underlying touch screen system obtains multiple event information, it can determine the touch coordinates of the touch event based on the coordinate event information in the multiple event information.

[0044] In some embodiments, the coordinate information obtained by the touch screen system may include the horizontal coordinates and vertical coordinates of one or more touch points corresponding to the touch event. It is understood that when the touch event corresponds to a click operation, the coordinate information may include the horizontal coordinates and vertical coordinates corresponding to the click position; when the touch event corresponds to a slide operation, the coordinate information may include the horizontal coordinates and vertical coordinates corresponding to multiple touch points on the slide track.

[0045] Step S140: When the touch coordinates are within a preset range, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer, and the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform processing operations corresponding to the navigation gesture function.

[0046] In an embodiment of the present application, after obtaining the touch coordinates of a touch event, the touch screen system at the bottom of the operating system can determine whether the touch coordinates are within a preset range to confirm whether the touch position of the touch event is within the touch range of the navigation gesture. If the touch coordinates are within the preset range, it means that the touch position of the touch event is within the touch range of the navigation gesture, and the touch event may be an input event of the navigation gesture. Therefore, when the operating system (i.e., the bottom touch screen system) reports the event information of the touch event to the application layer, it can report the event information corresponding to the navigation gesture function to the application layer. It is understandable that when the navigation gesture function is turned on, when the user triggers the navigation gesture function, only the touch screen system needs to report the necessary input event information, that is, only the press event, lift event, and coordinate information need to be reported, and no redundant pressure event information, finger contact touch screen diameter event information, and finger diameter event information can be reported. Reporting redundant event information will cause the navigation gesture algorithm to misjudge and cause the navigation gesture to fail. Therefore, when the touch screen event may be a touch event of a navigation gesture, the press event, lift event, and coordinate information will be reported to the application layer, and no redundant event information will be reported to the application layer, thereby avoiding the failure of the navigation gesture. The preset range may be a screen coordinate range corresponding to the navigation gesture, or may be understood as a screen coordinate range that triggers the navigation gesture. The specific preset range may not be limited.

[0047] Among them, after the event information corresponding to the navigation gesture function is reported to the application layer, the navigation gesture module in the application layer can determine whether the touch event is an input event of the navigation gesture based on the reported event information. If it is an input event of the navigation gesture, the control corresponding to the navigation gesture function can be performed, such as returning to the desktop, returning to the previous level interface, and viewing recent tasks, etc. If it is not an input event of the navigation gesture, the control corresponding to the navigation gesture function will not be performed.

[0048] In some embodiments, if the touch coordinates are not within the preset range, it means that the touch position of the touch event is not within the touch range of the navigation gesture, and the touch event cannot be an input event of the navigation gesture. Therefore, when the operating system (i.e., the underlying touch screen system) reports the event information of the touch event to the application layer, it can report all event information of the touch event to the application layer to ensure that the touch event input by the user can be recognized by the application layer and achieve the required input purpose.

[0049] The touch event processing method provided by the embodiment of the present application is that when the navigation gesture function of the mobile terminal is turned on, the operating system monitors the touch event on the touch screen. When the touch event on the touch screen is detected, multiple event information corresponding to the touch event is obtained, the multiple event information includes coordinate event information, and then the touch coordinates of the touch time are determined according to the coordinate event information. When the touch coordinates are within a preset range, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer. The preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform the processing operation corresponding to the navigation gesture function, thereby avoiding the situation where the navigation gesture function is turned on and a touch event within the touch coordinate range of the navigation gesture occurs, and redundant event information is reported to the application layer, causing the navigation gesture to fail.

[0050] See also Figure 3 , Figure 3 The flow chart of the touch event processing method provided by another embodiment of the present application is shown. The method is applied to the operating system of the above-mentioned mobile terminal, which includes a touch screen. Figure 3 The process shown in FIG. 1 is described in detail. The method for processing a touch event may specifically include the following steps:

[0051] Step S210: When the navigation gesture function of the mobile terminal is enabled, the operating system monitors touch events on the touch screen.

[0052] Step S220: When a touch event on the touch screen is detected, multiple event information corresponding to the touch event is obtained, where the multiple event information includes coordinate event information.

[0053] Step S230: determining the touch coordinates of the touch event according to the coordinate event information.

[0054] In the embodiment of the present application, steps S210 to S230 can refer to the contents of the aforementioned embodiment and will not be repeated here.

[0055] Step S240: determining the starting point coordinates of the touch starting point of the touch event according to the touch coordinates.

[0056] In an embodiment of the present application, after the operating system obtains the touch coordinates of the touch event, it can determine the starting coordinates of the touch starting point of the touch event based on the touch coordinates. The touch coordinates of the touch event may include the touch coordinates of the touch point during the entire touch process of the touch event. The touch screen system at the bottom of the operating system can obtain the starting point coordinates of the touch starting point of the touch event based on the touch coordinates corresponding to the touch event. It can be understood that the navigation gesture in the navigation gesture function is usually a sliding gesture that slides from the edge area of the touch screen to the center of the screen. Therefore, the touch starting point of the navigation gesture is usually located in the edge area, so that the coordinates of the touch starting point can be determined, and whether the touch event may be an input event of the navigation gesture can be determined based on the touch starting point coordinates.

[0057] Step S250: When the starting point coordinates are within the preset range, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer, and the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform processing operations corresponding to the navigation gesture function.

[0058] In an embodiment of the present application, after the operating system obtains the starting point coordinates of the touch starting point of the touch event, it can determine whether the starting point coordinates are within a preset range. If the starting point coordinates are within the preset range, it indicates that the touch event may be an input event of a navigation gesture; if the starting point coordinates are not within the preset range, it indicates that the touch event cannot be an input event of a navigation gesture.

[0059] In some embodiments, the preset range may be a touch coordinate range corresponding to a navigation gesture of the navigation gesture function. The touch coordinate range refers to a coordinate range corresponding to a touch point corresponding to the navigation gesture.

[0060] In a specific embodiment, since the determination of whether a touch event is likely to be a navigation gesture input event is based on the coordinates of the touch event's starting point, and a navigation gesture is typically a sliding gesture from the edge of the touch screen toward the center, the preset range may be the coordinate range corresponding to the edge region of the touch screen, where the edge region is defined as an area less than a preset distance from the edge of the touch screen. Therefore, by determining whether the coordinates of the touch event's starting point are within the coordinate range corresponding to the edge region, it can be determined whether the touch event is likely to be a navigation gesture input event.

[0061] In some embodiments, in addition to the starting point being located at the edge of the touch screen, a navigation gesture generally requires that the sliding length corresponding to the navigation gesture be greater than a certain length. Therefore, the distance between the touch starting point and the touch terminal can be determined, and based on the distance, whether the touch event is likely to be an input event for a navigation gesture can be further determined, thereby accurately confirming whether the touch event is likely to be an input event for a navigation gesture. Therefore, the touch event processing method can also include: when the starting point coordinates are within the preset range, determining the end point coordinates of the touch event based on the touch coordinates; obtaining the distance between the starting point coordinates and the end point coordinates; if the distance is greater than a set threshold, reporting the event information corresponding to the navigation gesture function in the multiple event information to the application layer.

[0062] It can be understood that the coordinate information is used to obtain the end point coordinates of the touch focus of the touch event, and based on the distance between the starting point coordinates and the end point coordinates, if the distance is greater than the set threshold, the sliding length of the touch event is greater than a certain length, and the touch event may be an input event of a navigation gesture. If the distance is less than or equal to the set threshold, it means that the touch event cannot be an input event of a navigation gesture. Among them, the specific value of the set threshold may not be used as a limitation. Therefore, when the distance is greater than the set threshold, indicating that the touch event may be an input event of a navigation gesture, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer to avoid reporting redundant event information to the application layer and causing the navigation gesture to fail.

[0063] Furthermore, the touch event processing method may further include: if the distance is less than or equal to the set threshold, reporting the multiple event information to the application layer. It is understood that when the threshold is less than or equal to the set threshold, it indicates that the touch event is unlikely to be an input event of a navigation gesture. Therefore, all of the acquired multiple event information can be reported to the application layer to ensure that the user's touch event can be recognized by the application layer and achieve the required input purpose.

[0064] Step S260: If the touch coordinates are located in a range other than the preset range, reporting the various event information to the application layer.

[0065] In an embodiment of the present application, if the touch coordinates are not within the preset range, it means that the touch position of the touch event is not within the touch range of the navigation gesture, and the touch event cannot be an input event of the navigation gesture. Therefore, when the operating system (i.e., the underlying touch screen system) reports the event information of the touch event to the application layer, it can report all event information of the touch event to the application layer to ensure that the touch event input by the user can be recognized by the application layer and achieve the required input purpose.

[0066] The touch event processing method provided in the embodiment of the present application determines whether the touch event may be an input event of a navigation gesture based on whether the coordinates of the touch starting point of the touch event are within a preset range. When the coordinates of the touch starting point are within the preset range, the event information corresponding to the navigation gesture function among the multiple event information of the touch event is reported to the application layer, thereby avoiding the situation where the navigation gesture function is turned on and a touch event occurs within the touch coordinate range of the navigation gesture, and redundant event information is reported to the application layer, causing the navigation gesture to fail.

[0067] See also Figure 4 , Figure 4 The flow chart of the method for processing a touch event provided by another embodiment of the present application is shown. The method is applied to the operating system of the above-mentioned mobile terminal, which includes a touch screen. Figure 4 The process shown in FIG. 1 is described in detail. The method for processing a touch event may specifically include the following steps:

[0068] Step S310: When the navigation gesture function of the mobile terminal is turned on, the operating system monitors the touch event on the touch screen.

[0069] Step S320: when a touch event on the touch screen is detected, obtaining a plurality of event information corresponding to the touch event, wherein the plurality of event information includes coordinate event information.

[0070] Step S330: Determine the touch coordinates of the touch event according to the coordinate event information.

[0071] In the embodiment of the present application, steps S310 to S330 can refer to the contents of the aforementioned embodiment and will not be repeated here.

[0072] Step S340: When all the coordinates in the touch coordinates are within a preset range, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer, and the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform processing operations corresponding to the navigation gesture function.

[0073] Step S350: When there is a touch coordinate that is not within the preset range among the touch coordinates, reporting the multiple event information to the application layer.

[0074] In an embodiment of the present application, after obtaining the touch coordinates of the touch event, the operating system can determine whether the touch coordinates of all touch points are within a preset range based on the touch coordinates. It can be understood that the preset range is the touch coordinate range corresponding to the navigation gesture. If the touch coordinates of all touch point coordinates are all within the preset range, it means that the touch event is very likely to be an input event of the navigation gesture. If there are touch coordinates that are not within the preset range among the touch coordinates of all touch point coordinates, it means that the touch event cannot be an input event of the navigation gesture. Therefore, when the touch coordinates of all touch points are within the preset range, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer to avoid reporting redundant event information to the application layer and causing the navigation gesture to fail. When there are touch coordinates that are not within the preset range among the touch coordinates of all touch points, all the multiple event information are reported to the application layer to ensure the normal reporting of input events on the touch screen.

[0075] The touch event processing method provided in the embodiment of the present application determines whether a touch event may be an input event of a navigation gesture based on whether the touch coordinates of all touch points of the touch event are all within a preset range. When the touch coordinates of all touch points of the touch event are all within the preset range, the event information corresponding to the navigation gesture function in the multiple event information of the touch event is reported to the application layer. When there are touch coordinates that are not within the preset range among the touch coordinates of all touch points of the touch event, the multiple event information of the touch event is reported to the application layer, thereby avoiding the situation where when the navigation gesture function is turned on, when a touch event within the touch coordinate range of the navigation gesture occurs, redundant event information is reported to the application layer, causing the navigation gesture to fail.

[0076] See also Figure 5 , Figure 5 A flow chart of a method for processing a touch event provided by another embodiment of the present application is shown. The method is applied to the operating system of the above-mentioned mobile terminal, which includes a touch screen. Figure 5 The process shown in FIG. 1 is described in detail. The method for processing a touch event may specifically include the following steps:

[0077] Step S410: Request the application layer to obtain event information corresponding to the navigation gesture function, and store the event information corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is determined by the application layer according to the navigation gesture algorithm corresponding to the navigation gesture function.

[0078] In an embodiment of the present application, the event information corresponding to the navigation gesture function, that is, the event information of the touch event that the bottom layer of the operating system needs to report to the application layer when the navigation gesture function is turned on, can be obtained by the kernel layer of the operating system from the navigation gesture module in the application layer. Specifically, the kernel layer can initiate a request for the event information corresponding to the navigation gesture function to the navigation gesture module in the application layer. After the navigation gesture module in the application layer receives the request, it can return the event information corresponding to the navigation gesture function to the kernel layer. The kernel layer obtains the event information corresponding to the navigation gesture function and can store the event information corresponding to the navigation gesture function in the framework layer. When reporting the event information of the touch event, the kernel layer can obtain the event type that needs to be reported from the framework layer.

[0079] Step S420: When the navigation gesture function of the mobile terminal is enabled, the operating system monitors touch events on the touch screen.

[0080] Step S430: when a touch event on the touch screen is detected, obtaining a plurality of event information corresponding to the touch event, wherein the plurality of event information includes coordinate event information.

[0081] Step S440: Determine the touch coordinates of the touch event according to the coordinate event information.

[0082] Step S450: When the touch coordinates are within a preset range, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer, and the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform processing operations corresponding to the navigation gesture function.

[0083] In the embodiment of the present application, steps S430 to S450 can refer to the contents of the aforementioned embodiment and will not be repeated here.

[0084] Step S460: If touch events on the touch screen are detected multiple times within a preset time period, and the touch coordinates of the multiple detected touch events are within a preset range, the application layer is again requested to obtain event information corresponding to the navigation gesture function, and the event information corresponding to the navigation gesture is stored.

[0085] In an embodiment of the present application, when the bottom layer of the operating system determines that a touch event may be an input event for a navigation gesture, after reporting event information corresponding to the navigation gesture function to the application layer, it can monitor subsequent events. If multiple touch events on the touch screen are detected within a preset time period, and the touch coordinates of the multiple detected touch events are within a preset range, it means that the user may have made multiple navigation gestures within the preset time period but they were not recognized. Therefore, the bottom layer of the operating system can obtain event information corresponding to the navigation gesture function from the application layer again to determine whether the event information corresponding to the navigation gesture function needs to be updated to avoid the event information required for the navigation gesture function being updated, which may cause the navigation gesture to be unrecognizable. For example, the event information required for the navigation gesture function previously included a press event, a lift event, and coordinate information, while the navigation gesture algorithm was updated to also include an approximate event of the finger diameter. Therefore, the bottom layer of the operating system only reports the press event, lift event, and coordinate information. The navigation gesture module in the application layer cannot recognize the navigation gesture, and thus the navigation gesture function cannot be implemented. Therefore, the bottom layer of the operating system can re-acquire event information corresponding to the navigation gesture function to avoid subsequent navigation gestures being unrecognizable.

[0086] Step S470: Requesting the application layer to obtain the touch coordinate range of the navigation gesture corresponding to the navigation gesture function, and updating the preset range according to the obtained touch coordinate range.

[0087] In an embodiment of the present application, if the touch event on the touch screen is detected multiple times within a preset time period, and the touch coordinates of the multiple detected touch events are within a preset range, it indicates that the navigation gesture algorithm may have been updated, resulting in multiple navigation gestures not being recognized. Therefore, after the bottom layer of the operating system updates the event information corresponding to the navigation gesture function, it can also update the touch coordinate range corresponding to the navigation gesture, that is, update the preset range. Therefore, the bottom layer of the operating system can obtain the touch coordinate range of the navigation gesture corresponding to the navigation gesture function from the navigation gesture module of the application layer, and update the preset range to avoid changes in the touch coordinate range of the navigation gesture, which may cause subsequent navigation gestures made by users to be unrecognizable.

[0088] In the touch event processing method provided by the embodiment of the present application, the bottom layer of the operating system obtains event information corresponding to the navigation gesture function from the application layer and stores the event information in the driver layer. Each time a touch event of a navigation gesture is reported, it is reported based on the event information corresponding to the navigation gesture function stored in the driver layer. Furthermore, when multiple touch events are detected and the touch coordinates of the touch events are within a preset range, the event information corresponding to the navigation gesture function is updated, and the preset range is updated to prevent subsequent navigation gestures input by the user from being unrecognized, thereby affecting the user experience.

[0089] See also Figure 6 , Figure 6 A flow chart of a method for processing a touch event provided by another embodiment of the present application is shown. The method is applied to the operating system of the above-mentioned mobile terminal, which includes a touch screen. Figure 6 The process shown in FIG. 1 is described in detail. The method for processing a touch event may specifically include the following steps:

[0090] Step S501: displaying a navigation setting interface, wherein the navigation setting interface includes function options of the navigation gesture function.

[0091] In some embodiments, the mobile terminal may provide a navigation function setting. The operating system of the mobile terminal may control the display screen to display a navigation setting interface, which includes a function option of a navigation gesture function. For example, Figure 7 As shown, the function option may be in the form of a switch control A1, and the user can control the opening and closing of the navigation gesture function by operating the switch control A1.

[0092] Step S502: When an opening operation of the function option is detected, the navigation gesture function is enabled.

[0093] In some embodiments, when the operating system detects an activation operation on a function option, it indicates that the user needs to activate the navigation gesture function, and thus can control the activation of the navigation gesture function. For example, detecting an activation operation on a switch control can control the activation of the navigation gesture function. Specifically, the bottom layer of the operating system can send an instruction to the application layer, which is used to control the activation of the navigation gesture module corresponding to the navigation gesture function.

[0094] Step S503: displaying a selection interface for navigation gestures, wherein the selection interface includes selection options corresponding to a plurality of navigation modes.

[0095] In some embodiments, the navigation gesture function can have multiple navigation modes. When setting the navigation gesture function, a navigation gesture selection interface can be displayed. The selection interface includes selection options corresponding to multiple navigation modes. The selection options are used by the user to select a navigation mode. For example, Figure 8As shown, the navigation modes include two-side return, simple gesture, right return and left return. The user can select the navigation mode by selecting the option corresponding to the navigation mode. Among them, the two-side return mode is that the swipe up operation from the two side areas of the bottom of the touch screen corresponds to returning to the previous level, the swipe up operation from the middle area of the bottom of the touch screen corresponds to returning to the desktop, and the swipe up and holding operation from the middle area of the bottom of the touch screen corresponds to viewing the recent tasks; the simple gesture mode is that the swipe up operation from the bottom area of the touch screen corresponds to returning to the desktop, and the swipe up and holding operation from the bottom area of the touch screen corresponds to viewing the recent tasks; the right return mode is that the swipe up operation from the right area of the bottom area of the touch screen is used to return to the previous level, the swipe up operation from the middle area of the bottom area of the touch screen is used to return to the desktop, and the swipe up operation from the left area of the bottom area of the touch screen is used to view the recent tasks; the right return mode is that the swipe up operation from the right area of the bottom area of the touch screen is used to view the recent tasks, the swipe up operation from the middle area of the bottom area of the touch screen is used to return to the desktop, and the swipe up operation from the left area of the bottom area of the touch screen is used to return to the previous level. Of course, the above navigation methods are only examples and do not limit the navigation methods of the navigation gesture function in the embodiments of the present application.

[0096] Step S504: determining a selected navigation mode according to the operation on the selected option, wherein the navigation mode corresponds to different navigation gestures.

[0097] Step S505: According to the navigation mode, determine a navigation gesture corresponding to the navigation mode.

[0098] Step S506: Acquire the touch coordinate range of the navigation gesture corresponding to the navigation mode, and use the touch coordinate range as the preset range.

[0099] It is understandable that different navigation modes may correspond to different navigation gestures. Therefore, the navigation gesture corresponding to the navigation mode can be determined according to the selected navigation mode, and the touch coordinate range of the navigation gesture can be determined as the preset range according to the navigation gesture.

[0100] Step S507: When the navigation gesture function of the mobile terminal is enabled, the operating system monitors touch events on the touch screen.

[0101] Step S508: When a touch event on the touch screen is detected, multiple event information corresponding to the touch event is obtained, where the multiple event information includes coordinate event information.

[0102] Step S509: Determine the touch coordinates of the touch event according to the coordinate event information.

[0103] Step S510: When the touch coordinates are within a preset range, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer, and the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform processing operations corresponding to the navigation gesture function.

[0104] In the embodiment of the present application, steps S507 to S510 can refer to the contents of the aforementioned embodiment and will not be repeated here.

[0105] Step S511: When the navigation gesture function of the mobile terminal is turned off, if the operating system detects a touch event on the touch screen, it obtains multiple event information corresponding to the touch event and reports the multiple event information to the application layer.

[0106] It is understandable that when the navigation gesture function of the mobile terminal is turned off, all event information of the touch event can be reported to the application layer. Therefore, if the operating system detects a touch event on the touch screen, all time information of the touch event can be reported to the application layer.

[0107] The touch event processing method provided in the embodiment of the present application provides a method for setting the navigation gesture function, which facilitates the user to manage the navigation gesture function. In addition, based on whether the touch coordinates of the touch event are within a preset range, it is determined whether the touch event may be an input event of a navigation gesture. When the touch coordinates are within the preset range, the event information corresponding to the navigation gesture function among the various event information of the touch event is reported to the application layer, thereby avoiding the situation where the navigation gesture function is enabled and a touch event occurs within the touch coordinate range of the navigation gesture, and redundant event information is reported to the application layer, causing the navigation gesture to fail.

[0108] See also Figure 9, which shows a structural block diagram of a touch event processing device 400 provided in an embodiment of the present application. The touch event processing device 400 applies the above-mentioned operating system of the mobile terminal, and the touch event processing device 400 includes: a touch monitoring module 410, an event acquisition module 420, a coordinate acquisition module 430, and an event reporting module 440. Among them, the touch monitoring module 410 is used to monitor the touch event on the touch screen by the operating system when the navigation gesture function of the mobile terminal is turned on; the event acquisition module 420 is used to obtain a variety of event information corresponding to the touch event when a touch event on the touch screen is detected, and the variety of event information includes coordinate event information; the coordinate acquisition module 430 is used to determine the touch coordinates of the touch event based on the coordinate event information; the event reporting module 440 is used to report the event information corresponding to the navigation gesture function in the variety of event information to the application layer when the touch coordinates are within a preset range, and the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform the processing operation corresponding to the navigation gesture function.

[0109] In some implementations, the event reporting module 440 is further configured to report the various event information to the application layer if the touch coordinates are located in a range other than the preset range.

[0110] In some embodiments, see Figure 10 The event reporting module 440 includes a starting point acquisition unit 441 and a reporting execution unit 442. The starting point acquisition unit 441 is configured to determine the starting point coordinates of the touch starting point of the touch event based on the touch coordinates; and the reporting execution unit 442 is configured to report the event information corresponding to the navigation gesture function among the multiple event information to the application layer when the starting point coordinates are within the preset range.

[0111] In this embodiment, the reporting execution unit 442 can be specifically used to: when the starting point coordinates are within the preset range, determine the end point coordinates of the touch event based on the touch coordinates; obtain the distance between the starting point coordinates and the end point coordinates; if the distance is greater than the set threshold, report the event information corresponding to the navigation gesture function in the multiple event information to the application layer.

[0112] Furthermore, the reporting execution unit 442 may be further configured to: report the multiple event information to the application layer if the distance is less than or equal to the set threshold.

[0113] In some implementations, the reporting execution unit 442 may also be specifically configured to: when all coordinates in the touch coordinates are within a preset range, report event information corresponding to the navigation gesture function in the multiple event information to the application layer.

[0114] In some embodiments, the touch event processing device 400 may further include an event information acquisition module. The event information acquisition module may be configured to request the application layer to obtain event information corresponding to the navigation gesture function and store the event information corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is determined by the application layer according to a navigation gesture algorithm corresponding to the navigation gesture function.

[0115] In this embodiment, the touch event processing device 400 may further include an event information updating module. The event information updating module may be configured to, if multiple touch events on the touch screen are detected within a preset time period, request the application layer again to obtain event information corresponding to the navigation gesture function, and store the event information corresponding to the navigation gesture.

[0116] Furthermore, the touch event processing device 400 may further include a range updating module. The range updating module may be configured to request the application layer to obtain the touch coordinate range of the navigation gesture corresponding to the navigation gesture function, and update the preset range according to the obtained touch coordinate range.

[0117] In some embodiments, the touch event processing device 400 may further include: a settings interface display module and a navigation gesture activation module. The settings interface display module is configured to display a navigation settings interface including function options of the navigation gesture function when the navigation gesture function of the mobile terminal is enabled and before the operating system detects a touch event on the touch screen; the navigation gesture activation module is configured to activate the navigation gesture function when an activation operation of the function option is detected.

[0118] In this embodiment, the touch event processing device 400 may further include: a selection interface display module and a navigation mode acquisition module. The selection interface display module is configured to display a navigation gesture selection interface after the navigation gesture function is enabled upon detecting an activation operation on the function option, the selection interface including selection options corresponding to multiple navigation modes; and the navigation mode acquisition module is configured to determine a selected navigation mode based on an operation on the selection option, the navigation modes corresponding to different navigation gestures.

[0119] Furthermore, the touch event processing device 400 may further include: a navigation gesture acquisition module and a preset range determination module. The navigation gesture acquisition module is configured to determine a navigation gesture corresponding to the navigation mode according to the navigation mode; the preset range determination module is configured to obtain a touch coordinate range of the navigation gesture corresponding to the navigation mode and use the touch coordinate range as the preset range.

[0120] In some embodiments, the event reporting module 440 can also be used to: when the navigation gesture function of the mobile terminal is turned off, if the operating system detects a touch event on the touch screen, obtain multiple event information corresponding to the touch event and report the multiple event information to the application layer.

[0121] In some embodiments, the multiple event information includes coordinate event information, press event, lift event, event information of pressing pressure, approximate event of the diameter of the finger contacting the touch screen, and approximate event of the diameter of the finger; the event information corresponding to the navigation gesture function includes coordinate event information, press event, and lift event.

[0122] In some embodiments, the preset range includes a coordinate range corresponding to an edge area of the touch screen, where the edge area is an area whose distance from the edge of the touch screen is less than a set distance.

[0123] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0124] In several embodiments provided in this application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0125] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.

[0126] In summary, when the navigation gesture function of the mobile terminal is turned on, the operating system monitors the touch events on the touch screen. When a touch event on the touch screen is detected, multiple event information corresponding to the touch event is obtained, including coordinate event information. The multiple event information then determines the touch coordinates of the touch time based on the coordinate event information. When the touch coordinates are within a preset range, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer. The preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform the processing operation corresponding to the navigation gesture function. This can avoid the situation where when the navigation gesture function is turned on, when a touch event occurs within the touch coordinate range of the navigation gesture, redundant event information is reported to the application layer, causing the navigation gesture to fail.

[0127] Please refer to Figure 11 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The mobile terminal 100 can be an electronic device capable of running applications, such as a smart phone, a tablet computer, an e-book, etc. The mobile terminal 100 in the present application may include one or more of the following components: a processor 110, a memory 120, a touch screen 130, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more programs are configured to execute the method as described in the aforementioned method embodiment.

[0128] The processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and circuits to connect the various components within the entire electronic device 100. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and accessing data stored in the memory 120, the processor 110 performs various functions of the electronic device 100 and processes data. Optionally, the processor 110 may be implemented in the form of at least one hardware component selected from the group consisting of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 110 and may be implemented separately via a communication chip.

[0129] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the terminal 100 during use (such as a phone book, audio and video data, chat record data), etc.

[0130] The touch screen 130 can collect the user's touch operations on or near it (such as the user's operations on or near the touch screen 130 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch screen 130 may include a touch detection device and a touch controller. The touch detection device detects the user's touch direction, detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, and converts the touch information into contact coordinates, and then sends it to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch detection function of the touch screen 130 can be implemented using various types such as resistive, capacitive, infrared and surface acoustic wave.

[0131] Please refer to Figure 12 , which shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program code, which can be called by a processor to execute the method described in the above method embodiment.

[0132] The computer-readable storage medium 800 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for program code 810 for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in a suitable form.

[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing a touch event, characterized in that: An operating system applied to a mobile terminal, the mobile terminal including a touch screen, the method comprising: When the navigation gesture function of the mobile terminal is turned on, monitoring touch events on the touch screen through the touch screen system in the operating system; When the touch screen system detects a touch event on the touch screen, the touch screen system obtains, through the touch screen system, multiple event information corresponding to the touch event, the multiple event information including coordinate event information, a press event, a lift event, an approximate event of the diameter of the finger contacting the touch screen, and an approximate event of the diameter of the finger; determining, by the touch screen system, touch coordinates of the touch event according to the coordinate event information; When the touch screen system determines that the touch coordinates are within a preset range, the touch screen system reports the event information corresponding to the navigation gesture function in the multiple event information to the application layer, wherein the preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function, and the event information corresponding to the navigation gesture function is used to instruct the application layer to perform a processing operation corresponding to the navigation gesture function, so that the navigation gesture module in the application layer determines whether the touch event is an input event of the navigation gesture based on the reported event information, and performs control corresponding to the navigation gesture function when it is determined that the touch event is an input event of the navigation gesture, and the event information corresponding to the navigation gesture function includes coordinate event information, a press event, and a lift event; If the touch coordinates are located in a range other than the preset range, the multiple event information is reported to the application layer.

2. The method according to claim 1, characterized in that When the touch coordinates are within a preset range, reporting event information corresponding to the navigation gesture function among the multiple event information to the application layer includes: determining the coordinates of a starting point of a touch event according to the touch coordinates; When the coordinates of the starting point are within the preset range, event information corresponding to the navigation gesture function among the multiple event information is reported to the application layer.

3. The method according to claim 2, characterized in that When the coordinates of the starting point are within the preset range, reporting event information corresponding to the navigation gesture function among the multiple event information to the application layer includes: When the coordinates of the starting point are within the preset range, determining the coordinates of the end point of the touch event according to the touch coordinates; Obtaining the distance between the starting point coordinates and the end point coordinates; If the distance is greater than a set threshold, the event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer.

4. The method according to claim 3, characterized in that The method further comprises: If the distance is less than or equal to the set threshold, the multiple event information is reported to the application layer.

5. The method according to claim 1, wherein When the touch coordinates are within a preset range, reporting event information corresponding to the navigation gesture function among the multiple event information to the application layer includes: When all the coordinates in the touch coordinates are within a preset range, event information corresponding to the navigation gesture function in the multiple event information is reported to the application layer.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The application layer is requested to obtain event information corresponding to the navigation gesture function, and the event information corresponding to the navigation gesture function is stored. The event information corresponding to the navigation gesture function is determined by the application layer according to the navigation gesture algorithm corresponding to the navigation gesture function.

7. The method according to claim 6, characterized in that When the touch coordinates are within a preset range, after reporting event information corresponding to the navigation gesture function among the multiple event information to the application layer, the method further includes: If touch events on the touch screen are detected multiple times within a preset time period, and the touch coordinates of the multiple detected touch events are within a preset range, the application layer is requested again to obtain event information corresponding to the navigation gesture function, and the event information corresponding to the navigation gesture is stored.

8. The method according to claim 7, characterized in that The method further comprises: The application layer is requested to obtain a touch coordinate range of the navigation gesture corresponding to the navigation gesture function, and the preset range is updated according to the obtained touch coordinate range.

9. The method according to any one of claims 1 to 5, characterized in that When the navigation gesture function of the mobile terminal is enabled, before the operating system monitors a touch event on the touch screen, the method further includes: Displaying a navigation setting interface, wherein the navigation setting interface includes function options of the navigation gesture function; When an opening operation of the function option is detected, the navigation gesture function is enabled.

10. The method according to claim 9, characterized in that After enabling the navigation gesture function when an activation operation on the function option is detected, the method further includes: Displaying a navigation gesture selection interface, the selection interface including selection options corresponding to multiple navigation modes; According to the operation on the selection option, a selected navigation mode is determined, and the navigation mode corresponds to different navigation gestures.

11. The method according to claim 10, characterized in that The method further comprises: Determining, according to the navigation mode, a navigation gesture corresponding to the navigation mode; A touch coordinate range of the navigation gesture corresponding to the navigation mode is acquired, and the touch coordinate range is used as the preset range.

12. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the navigation gesture function of the mobile terminal is disabled, if the operating system detects a touch event on the touch screen, it obtains multiple event information corresponding to the touch event and reports the multiple event information to the application layer.

13. The method according to any one of claims 1 to 5, characterized in that The preset range includes a coordinate range corresponding to an edge area of the touch screen, where the edge area is an area whose distance from the edge of the touch screen is less than a set distance.

14. A touch event processing device, characterized in that: An operating system applied to a mobile terminal, wherein the mobile terminal includes a touch screen, and the device includes: a touch monitoring module, an event acquisition module, a coordinate acquisition module, and an event reporting module, wherein: The touch monitoring module is configured to monitor touch events on the touch screen through the touch screen system in the operating system when the navigation gesture function of the mobile terminal is enabled; The event acquisition module is configured to acquire, when the touch screen system detects a touch event on the touch screen, various event information corresponding to the touch event, the various event information including coordinate event information, a press event, a lift event, an approximate event of the diameter of the finger contacting the touch screen, and an approximate event of the diameter of the finger; The coordinate acquisition module is used to determine the touch coordinates of the touch event according to the coordinate event information through the touch screen system; The event reporting module is used to report the event information corresponding to the navigation gesture function in the multiple event information to the application layer through the touch screen system when the touch screen system determines that the touch coordinates are within a preset range. The preset range includes the touch coordinate range of the navigation gesture corresponding to the navigation gesture function. The event information corresponding to the navigation gesture function is used to instruct the application layer to perform the processing operation corresponding to the navigation gesture function, so that the navigation gesture module in the application layer determines whether the touch event is an input event of the navigation gesture based on the reported event information, and performs control corresponding to the navigation gesture function when it is determined that the touch event is an input event of the navigation gesture. The event information corresponding to the navigation gesture function includes coordinate event information, press event and lift event. If the touch coordinates are within a range other than the preset range, the multiple event information is reported to the application layer.

15. The device according to claim 14, characterized in that The event reporting module includes: a starting point acquisition unit and a reporting execution unit, wherein: The starting point acquisition unit is used to determine the starting point coordinates of the touch starting point of the touch event according to the touch coordinates; The reporting execution unit is configured to report event information corresponding to the navigation gesture function among the multiple event information to the application layer when the starting point coordinates are within the preset range.

16. A mobile terminal, characterized in that: include: one or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 13.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Touch input equipment, electronic equipment and mobile phone

    CN102023735A

  • Mobile terminal and touch input method thereof

    CN102819331A

  • Control method and electronic device

    CN103257820A