WO2016145657A1 - 触摸事件处理方法、装置及终端设备 - Google Patents
触摸事件处理方法、装置及终端设备 Download PDFInfo
- Publication number
- WO2016145657A1 WO2016145657A1 PCT/CN2015/074585 CN2015074585W WO2016145657A1 WO 2016145657 A1 WO2016145657 A1 WO 2016145657A1 CN 2015074585 W CN2015074585 W CN 2015074585W WO 2016145657 A1 WO2016145657 A1 WO 2016145657A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- touch
- response area
- foreground
- touch point
- target control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
- G06F3/0418—Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
- G06F3/04186—Touch location disambiguation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04886—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72469—User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/041—Indexing scheme relating to G06F3/041 - G06F3/045
- G06F2203/04104—Multi-touch detection in digitiser, i.e. details about the simultaneous detection of a plurality of touching locations, e.g. multiple fingers or pen and finger
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04808—Several contacts: gestures triggering a specific function, e.g. scrolling, zooming, right-click, when the user establishes several contacts with the surface simultaneously; e.g. using several fingers or a combination of fingers and pen
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/22—Details of telephonic subscriber devices including a touch pad, a touch sensor or a touch detector
Definitions
- the present invention relates to the field of touch event processing technologies, and in particular, to a touch event processing method, apparatus, and terminal device.
- the event generated by the user touching the touch screen of the terminal is called a touch event, also called a touch event.
- the event processor in the Android system directly sends the received touch event to the current interface, that is, the user interface of the application running in the foreground, and the application processes the touch event by using a corresponding processing method.
- An application running in the foreground is an application whose display interface is visible on the display and can directly interact with the user.
- the display interface of the application in the Android system includes an underlying page, and a control response area set on the bottom layer interface, wherein the control can be a button and a text field. If the location where the touch event occurs is located in the control response area, the event handler reports the touch event to the application corresponding to the control response area; if the touch event occurs outside the control response area, the touch event is sent to the bottom layer.
- the multi-touch event is considered to be initiated for the underlying page, and the multi-touch event is reported to the underlying page.
- the multi-touch event is reported to The underlying page, while the underlying page does not respond to the touch event, causing the touch event to disappear, ie the user's touch operation is not responded.
- the touch screen when the touch screen is turned on, the touch screen will automatically be in a random point even if it is not touched, as if there is an invisible ghost hand touching the touch screen, commonly known as a ghost hand. It can be seen from the above-mentioned touch event processing flow that when the screen appears ghost hand, or the touch event is reported incorrectly due to influence factors such as the user's hand posture and the external environment (such as water droplets on the screen), the user will further cause the user to touch the specified position and not respond.
- a touch event processing method, device, and terminal device are provided to solve the prior art. Intraoperative user touch operations do not get the problem of application response.
- a touch event processing method including:
- the application running in the foreground is a focused application, determining, from each touch point of the multi-touch event, a touch point falling within a target control response area of the application running in the foreground;
- the combined new touch event is delivered to the foreground running application to cause the foreground running application to respond to the new touch event.
- the combining to obtain a new touch event according to a touch point falling within a response area of the target control includes:
- the touch performance parameter includes any one of a click quantity, a moving distance of a touch point, a touch duration, and a touch intensity. One or any combination of any.
- the filtering the interference touch from the touch points in the response area of the target control according to the touch performance parameter Point to get valid touch points including:
- Determining that the touch point is a valid touch if the touch point falls within the target control response area and the distance between the start position and the end position of the touch point is less than the length of the target control response area point;
- Determining that the touch point is a valid touch point if a touch duration of the touch point does not exceed a second preset duration and a distance between the start position and the end position of the touch point is not less than a preset distance;
- the respective from the multi-touch event In the touched point is determined, including:
- the acquiring the location coordinate data corresponding to the target control response area of the current display interface of the foreground running application includes:
- the location coordinate data of the target control response area of each display interface of the stored foreground running application is updated.
- a touch event processing apparatus including:
- a first determining unit configured to determine, when there is an unprocessed, multi-touch event that is about to be discarded, whether the application running in the foreground is a focused application
- a determining unit configured to determine, from each touch point of the multi-touch event, a target control response area of the application running in the foreground when the application running in the foreground is a focused application Touch point
- a combination unit configured to combine to obtain a new touch event according to a touch point in a target control response area of an application running in the foreground;
- a delivery unit configured to pass the combined new touch event to the foreground running application, so that the foreground running application responds to the new touch event.
- the combining unit includes:
- a filtering subunit for passing from a touch point in a response area of the target control according to a touch performance parameter Filter out the interference touch point to get an effective touch point;
- the combining subunit is configured to combine the effective touch points falling within the response area of the target control to obtain a new touch event.
- the touch performance parameter includes any one of a click quantity, a moving distance of a touch point, a touch duration, and a touch intensity. One or any combination of any.
- the filtering subunit is specifically configured to:
- the touched point is clicked within the first preset time period by a preset number of times, the touched point is a valid touch
- Determining that the touch point is a valid touch if the touch point falls within the target control response area and the distance between the start position and the end position of the touch point is less than the length of the target control response area point;
- Determining that the touch point is a valid touch point if a touch duration of the touch point does not exceed a second preset duration and a distance between the start position and the end position of the touch point is not less than a preset distance;
- the determining unit includes:
- Obtaining a subunit configured to acquire location coordinate data corresponding to a target control response area of a current display interface of the application running in the foreground;
- a judging sub-unit configured to determine, by one of the pieces, whether the touch position coordinates of the touch points of the multi-touch event fall within a position coordinate range corresponding to the target control response area of the current display interface
- Determining a subunit configured to determine that the touch point falls within a target control response area of the application running in the foreground if the touch location coordinate of the touch point falls within a target control response area of the current display interface.
- the acquiring subunit is specifically configured to:
- the location coordinate data of the target control response area of each display interface of the stored foreground running application is updated.
- a third aspect provides a terminal device having a touch screen, including a processor and a memory,
- the processor is configured to: by calling a program or instruction stored in the memory:
- the application running in the foreground is a focused application, determining, from each touch point of the multi-touch event, a touch point falling within a target control response area of the application running in the foreground;
- the combined new touch event is delivered to the foreground running application to cause the foreground running application to respond to the new touch event.
- the processor is configured to: when a new touch event is combined according to a touch point in a target control response area of the application running in the foreground, Specifically used for:
- the touch performance parameter includes any one of a click count, a moving distance of a touch point, a touch duration, and a touch intensity. One or any combination of any.
- the processor is configured to: respond to a touch point in the response area from the target control according to the touch performance parameter When the interference touch point is filtered out and the effective touch point is obtained, it is specifically used to:
- Determining that the touch point is a valid touch if the touch point falls within the target control response area and the distance between the start position and the end position of the touch point is less than the length of the target control response area point;
- Determining that the touch point is a valid touch point if a touch duration of the touch point does not exceed a second preset duration and a distance between the start position and the end position of the touch point is not less than a preset distance;
- the processor is configured to use the multipoint In each touch point of the touch event, when it is determined that the touch point in the response area of the target control of the application running in the foreground is used, it is specifically used to:
- the processor is configured to obtain a target control response area corresponding to a current display interface of the foreground running application When the position coordinate data is used, it is specifically used to:
- the location coordinate data of the target control response area of each display interface of the stored foreground running application is updated.
- the method will be processed according to the touch event processing mechanism to each touch point in the multi-touch event that is to be discarded at the end, and the operation according to the foreground should be analyzed one by one.
- the multi-touch event is separated and reorganized by the control response area of the program, that is, the touch event generated by the user touching the control response area of the application is separated, and a new touch event is obtained, which is re-transmitted to the application running in the foreground, thereby
- the application running in the foreground responds to the user's touch event, and finally solves the problem that the touch screen does not respond to the user's touch operation in some scenarios, and improves the response accuracy of the application to the touch event.
- FIG. 1 is a schematic flowchart diagram of a touch event processing method according to an embodiment of the present invention
- FIG. 2 is a schematic flowchart of a method of an S130 according to an embodiment of the present disclosure
- FIG. 3 is a schematic flowchart of a method for an S120 according to an embodiment of the present invention.
- FIG. 4 is a block diagram of a touch event processing apparatus according to an embodiment of the present invention.
- FIG. 5 is a block diagram of a combination unit according to an embodiment of the present invention.
- FIG. 6 is a block diagram of a determining unit according to an embodiment of the present invention.
- FIG. 7 is a structural block diagram of a terminal device according to an embodiment of the present invention.
- the View class is the basic building block of the user interface. It is the basic class for building user interface controls (for example, touch buttons, text fields).
- a View occupies an area on the screen and is responsible for user interface drawing and Event processing.
- Touch events are usually uploaded directly to the user interface currently displayed on the touch screen. There are corresponding processing methods in the user interface.
- a user interface may include three types: parent view, child view, and control.
- the event handler first passes the touch event to the topmost View (the leaf node of the View node tree, ie the control), and if the control does not handle the touch event, continues to pass the touch event to the child View (leaf)
- the upper level node of the node if the child view still does not process the touch event, continue to pass the touch event to the parent view (the upper level node of the child view), if the lowest level View (the root node of the view node tree) , that is, the View root node) still does not handle the Touch event, then the Touch event will "disappear", that is, the Touch event is discarded.
- the Touch event will not be passed to the next
- the present invention provides a touch event processing method, apparatus, and terminal device, which analyze each touch point in an unprocessed, about to be discarded multi-touch event, according to a control of a focused application.
- the response area separates and reorganizes the unprocessed, about to be discarded multi-touch event, that is, the touch event generated by the user touching the control response area of the application is separated, recombined into a new touch event, and transmitted to the application. So that the app responds to the user's touch event.
- the above is the core idea of the present invention.
- FIG. 1 is a schematic flowchart of a touch event processing method according to an embodiment of the present invention.
- the method is applied to a terminal device with a touch screen, and can be specifically applied to an event processor in a terminal device, as shown in FIG. 1 .
- the method can include the following steps:
- the multi-touch event delivered to the parent View is not processed, it is determined that there is a multi-touch event to be discarded, and then the multi-touch event is intercepted and judged to run. Whether the application in the foreground is the key application, if it is the focus application, continue to execute S120.
- the key application can be an application set by the system, for example, an application such as a phone or a short message, or some application can be preset as a focused application by the user.
- the system determines whether the application running in the foreground is the key application by the package name of the application.
- the package name of the application is the unique identification of the application. If the package name of the application running in the foreground is included in the package name of the focused application, then it is determined that the application running in the foreground is the focused application.
- S120. Determine, from each touch point of the multi-touch event, a touch point within a response area of the target control of the application running in the foreground.
- all the controls on the current display interface of the application running in the foreground can respond to the touch event, and all the controls on the current display interface are taken as a set; then, the target control is determined from the control set, and the target control is determined. Corresponding target control response area.
- the target control response area may be determined by the system according to the control area included in the display interface of the focused application, for example, a phone application, if the current display interface is a page for making a call, the call will be answered.
- the control response area corresponding to the control is determined as the target control response area; if the current display interface is the page that answers the call, the control response area corresponding to the control that hangs up the call is determined as the target control response area.
- the current display interface includes three control response areas, namely area I and area II, and area I is the target control response area. If the separated touch points falling within the control response area include two points A and B, wherein the point A falls in the area I, the point A is taken as a new touch event.
- the new touch event obtained by the combination is again transmitted to the application running in the foreground, and the application responds to the new touch event, thereby avoiding the control response area of the application that the user clicks on the foreground running in a certain scenario.
- the phenomenon of response is again transmitted to the application running in the foreground, and the application responds to the new touch event, thereby avoiding the control response area of the application that the user clicks on the foreground running in a certain scenario.
- the touch event processing method if there are still multi-touch events that are not processed and are about to be discarded, and when the application running in the foreground is a focused application, each of the multi-touch events In the touch point, determine the touch point within the control response area of the application running in the foreground. Then, according to the touch point combination in the target control response area of the application running in the foreground, a new touch event is obtained, and the new touch event is re-transmitted to the application running in the foreground, so that the operation is in the foreground.
- the application responds to the new touch event, that is, the application responds to the user's touch event, and finally avoids the user's touch operation being unresponsive in some scenarios.
- the ghost hand may appear in the response area of the control running in the foreground. Therefore, these interference touch points need to be filtered out, and finally the remaining touch points are the touch points that require the application to respond.
- S130 may include the following steps:
- the touch performance parameter may include any one or any combination of the number of clicks, the moving distance of the touch point, the touch duration, and the touch intensity.
- the touch position coordinates of the touch point fall on the target control of the application running in the foreground. In the response area, but the touch point has a certain moving distance, the distance between the start position and the end position of the touch point is greater than the length of the control response area, and at this time, determining that the touch point is an invalid touch point, discarding the Touch the point. If the touch position of the touch point falls within the target control response area, and the distance between the start position and the end position of the touch point is less than the length of the control response area, it is determined that the touch point is a valid touch point.
- the ghost hand appears in the response area of the target control, and the target control response area is hit hundreds of times in the preset duration.
- a touch point can be counted by counting The number of clicks in a certain period of time filters out the ghost hand interference points.
- the touched point is clicked for more than a preset number of times within the first preset time period, the touched point is considered to be an invalid touched point, and the touched point is discarded. If the touched point is clicked within the first preset time period by a preset number of times, the touched point is a valid touch point;
- the ghost hand has a longer touch time and a smaller moving distance.
- detecting the touch duration and the moving distance of the touch point if the touch duration of the touch point does not exceed the second preset duration, and the moving distance of the touch point is not less than the preset distance, determining that the touch point is An effective touch point; if the touch duration of the touched point exceeds the second preset duration, and the moving distance of the touched point is less than the preset distance, determining that the touched point is an invalid touched point, discarding the touched point.
- the interference touch point can be excluded according to the touch intensity. First, detecting the touch intensity of the touch point, if the touch intensity is higher than or equal to the preset touch intensity, determining that the touch point is a valid touch point; if the touch intensity is lower than the preset touch intensity, determining that the touch point is an invalid touch point.
- any combination of touch performance parameters may be used to eliminate the interference touch point.
- the touch control combination in the response area of the target control obtains a new touch event, and the obtained new touch event may be a single touch event or a multi-touch event, for example, the user touches the current display interface with two fingers.
- the case of a control response area is a single touch event or a multi-touch event, for example, the user touches the current display interface with two fingers.
- the method provided by the embodiment provides a new touch event method, filtering the touch points separated from the multi-touch event to be discarded, filtering out the interference touch points, and remaining the touch points that require the application response, that is, Effective touch point. Then, the effective touch points falling in the response area of the target control are combined to obtain a new touch event, and the new touch event obtained by the method greatly reduces the interference touch point in the event, and the accuracy is high.
- S120 may include the following steps:
- the position coordinate data of the target control response area of the display interface of the application running in the foreground may be acquired when it is required to determine the position of each of the touch points in the multi-touch event.
- the position coordinate data of the control response area of the application is dynamically obtained, and the position coordinate data of the response area of the target control is stored, so as to be directly read during subsequent use.
- the control response area of the application may change as the application is updated, and therefore, when the application update of the terminal device installation is detected, the location of the control response area of each display interface of the stored application is updated. Coordinate data to ensure that the position coordinate data of the stored control response area always corresponds to the installed application. In this way, only the position coordinate data of the control response area of the key application is acquired once, and is directly read after subsequent use, and does not need to be acquired every time, thereby saving CPU resources occupied.
- S122 Determine, by one of the pieces, whether the touch position coordinates of the touch points of the multi-touch events fall within the target control response area of the current display interface. If yes, execute S123; otherwise, execute S124.
- the method for determining the touch point falling in the response area of the control obtains the position coordinate data of the target control response area on the display interface of the application, and determines whether each touch point in the multi-touch event falls on the target one by one. Within the control response area, find the touch point where the touch coordinates are within the control's response area.
- the position coordinate data of the response area of the control may be acquired when the key application is started, and the position coordinate data of the response area of the target control is saved, so as to directly read the position coordinate data of the response area of the target control. It does not need to be acquired every time, which saves CPU resources.
- the present invention also provides a touch event processing device embodiment.
- FIG. 4 a block diagram of a touch event processing apparatus according to an embodiment of the present invention is shown, which is applied to a terminal device having a touch screen.
- the apparatus includes: a first determining unit 410, a determining unit 420, a combining unit 430, and a transmitting unit 440.
- the first determining unit 410 is configured to determine, when there is an unprocessed multi-touch event that is about to be discarded, whether the application running in the foreground is a focused application.
- the touch event upload mechanism if there is a multi-touch event that is not processed and is about to be discarded, intercept the A multi-touch event that determines if the application running in the foreground is a focused application.
- the determining unit 420 is configured to determine, when the application running in the foreground is a focused application, from a touch point of the multi-touch event, a target control response area of the application running in the foreground Touch points inside.
- the combining unit 430 is configured to combine to obtain a new touch event according to a touch point falling within the response area of the target control.
- the transmitting unit 440 is configured to deliver the combined new touch event to the application running in the foreground, so that the application running in the foreground responds to the new touch event.
- the determining unit determines whether the application running in the foreground is a focused application. If the application running in the foreground is a focused application, the determining unit determines the touch point within the response area of the target control of the application running in the foreground from each touch point of the multi-touch event.
- the combining unit obtains a new touch event according to the touch point combination falling within the target control response area, and retransmits the new touch event to the foreground running application, so that the foreground running application rings A new touch event should be made so that the application running in the foreground responds to the user's touch event, and finally avoids the phenomenon that the touch screen does not respond to the user's touch operation in some scenarios.
- the combining unit 420 in order to accurately separate a new touch event consisting of touch points that actually require an application response from all current touch points, the combining unit 420 needs to further fall within the response area of the target control.
- the invalid touch points are filtered out in the touch points to obtain valid touch points.
- the combining unit 430 may include a filtering subunit 431 and a combining subunit 432.
- the filtering sub-unit 431 is configured to filter out the interference touch point from the touch points in the response area of the target control according to the touch performance parameter to obtain an effective touch point.
- the touch performance parameter includes any one or any combination of a number of clicks, a moving distance of a touch point, a touch duration, and a touch intensity.
- the touch position coordinate of the touch point falls within the control response area of the application, but the touch point has a certain moving distance, and the distance between the start position and the end position of the touch point is greater than the control response.
- the length of the area at this time, the filtering sub-unit 431 determines that the touch point is an invalid touch point and discards the touch point. If the touch position of the touch point falls within the control response area, and the distance between the start position and the end position of the touch point is less than the length of the control response area, the filter sub-unit 431 determines that the touch point is valid Touch the point.
- the ghost hand appears in the control response area, and the control response area is within the preset duration.
- the number of clicks is high for hundreds of times.
- the ghost touch point can be filtered by counting the number of times a touch point is clicked within a certain period of time.
- the filtering sub-unit 431 considers the touched point to be an invalid touched point, discarding the touched point. If the touched point is clicked within the first preset time period by a preset number of times, the touched point is a valid touch point;
- the ghost hand has a longer touch time and a smaller moving distance.
- the touch duration and the moving distance of the touch point are detected. If the touch duration of the touch point does not exceed the second preset duration, and the moving distance of the touch point is not less than the preset distance, the filtering sub-unit 431 Determining that the touch point is a valid touch point; if the touch duration of the touch point exceeds a second preset duration, and the moving distance of the touch point is less than a preset distance, the filtering sub-unit 431 determines that the touch point is invalid Touch the point to discard the touch point.
- the interference touch point can be excluded according to the touch intensity. First, detecting the touch intensity of the touch point, if the touch intensity is higher than or equal to the preset touch intensity, determining that the touch point is a valid touch point; if the touch intensity is lower than the preset touch intensity, determining that the touch point is an invalid touch point.
- any combination of touch performance parameters may be used to eliminate the interference touch point.
- the combining sub-unit 432 is configured to combine the effective touch points falling within the response area of the target control to obtain a new touch event.
- the combination unit provided by the embodiment filters the touch points separated from the unprocessed multi-touch event, filters out the interference touch points, and obtains a touch point that is required by the application running in the foreground, that is, an effective touch point. . Then, a new touch event is obtained by combining the effective touch points in the response area of the target control of the application running in the foreground, and the new touch event obtained by the method greatly reduces the interference touch point in the event, and the accuracy is high.
- the determining unit 420 includes an obtaining subunit 421, a determining subunit 422, and a determining subunit 423.
- the obtaining sub-unit 421 is configured to acquire position coordinate data corresponding to a target control response area of a current display interface of an application running in the foreground.
- the current display interface of the application refers to the display interface of the application currently displayed by the terminal device with the touch screen, that is, the current display interface of the application. Get the control response area corresponding to all the controls on the current display interface of the application, and determine the control response area corresponding to the target control as the target response area.
- the location of each touch point in the multi-touch event needs to be determined When, the position coordinate data of the target control response area of the current display interface of the application running in the foreground is obtained.
- the position coordinate data of the control response area of the application is dynamically acquired, and the position coordinates of the target control response area of each display interface of the application are stored. Data for direct reading during subsequent use.
- the control response area of the application may change as the application is updated, and therefore, when the application update of the terminal device installation is detected, the location of the control response area of each display interface of the stored application is updated. Coordinate data to ensure that the position coordinate data of the stored control response area always corresponds to the installed application.
- the determining sub-unit 422 is configured to determine, by default, whether the touch position coordinates of the touch points of the multi-touch events fall within the target control response area of the current display interface;
- the determining subunit 423 is configured to determine that the touch point falls within a target control response area of an application running in the foreground if the touch location coordinate of the touch point falls within a target control response area of the current display interface. .
- the acquiring sub-unit obtains the position coordinate data of the target control response area of the current display interface of the application running in the foreground, and judges whether each touch point in the multi-touch event falls on the target control one by one. Within the response area, find the touch point where the touch coordinates are within the response area of the target control.
- the position coordinate data of the control response area may be acquired when the key application is started, and the position coordinate data of the response area of the target control is saved, so that the position coordinate data of the response area of the control is not directly needed for subsequent reading. Get it every time, saving CPU resources.
- the present invention also provides an embodiment of a terminal device to which the touch event processing method is applied.
- the terminal device 600 includes at least one processor 601, at least one communication bus 602, a touch screen 603, and a memory 604604.
- the communication bus 602 is used to implement connection communication between these components; the touch screen 603 is used to implement the touch event processing method described above.
- Touch screen 603 can include a capacitive touch screen or a resistive touch screen.
- Memory 604604 can include read only memory and random access memory and provides instructions and data to processor 601. A portion of the memory 604 may also include non-volatile random access memory (NVRAM).
- NVRAM non-volatile random access memory
- the memory 604 stores the following elements, executable modules or data structures, or a subset thereof, or their extended set; in this embodiment, the memory 604 includes an operating system 6041. And application module 6042.
- the operating system 6041 includes various system programs for implementing various basic services and processing hardware-based tasks;
- the application module 6042 includes various applications, such as a desktop, a media player, a browser, etc., for implementing various application services.
- the processor 601 by calling a program or instruction stored in the memory 604, the processor 601 is configured to:
- the application running in the foreground is a focused application, from the respective touch points of the multi-touch event, the touch point in the response area of the target control of the application running in the foreground is determined;
- the combined new touch event is passed to the foreground running application to cause the foreground running application to respond to the new touch event.
- the processor 601 is configured to: when a new touch event is combined according to a touch point in a target control response area of an application running in the foreground, specifically:
- the touch performance parameter includes any one or any combination of the number of clicks, the moving distance of the touch point, the touch duration, and the touch intensity.
- the processor 601 is configured to filter out the interference touch point from the touch points in the response area of the target control, and when the valid touch point is obtained, specifically:
- Determining that the touch point is a valid touch if the touch point falls within the target control response area and the distance between the start position and the end position of the touch point is less than the length of the target control response area point;
- the touch duration of the touch point does not exceed the second preset duration, and the start position of the touch point is to the end Determining that the touch point is a valid touch point; the distance between the stop positions is not less than a preset distance;
- the processor 601 is configured to determine, when from a touch point in a target control response area of an application running in the foreground, from each touch point of the multi-touch event. Specifically for:
- the processor 601 when configured to acquire the location coordinate data corresponding to the target control response area of the current display interface of the application, as an embodiment of the present invention, the method is specifically configured to:
- the location coordinate data of the target control response area of each display interface of the stored foreground running application is updated.
- the invention may be described in the general context of computer-executable instructions executed by a computer, such as a program module.
- program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
- the invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
- program modules can be located in both local and remote computer storage media including storage devices.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
- Telephone Function (AREA)
- Position Input By Displaying (AREA)
Abstract
一种触摸事件处理方法、装置及终端设备,如果存在没有被处理即将被丢弃的多点触摸事件,而且前台运行的应用程序是重点应用程序,则从所述多点触摸事件的各个触摸点中,确定出落在前台运行的应用程序的目标控件响应区域内的触摸点。然后,根据落在所述目标控件响应区域内的触摸点组合得到新的触摸事件,并将新的触摸事件重新传递给所述前台运行的应用程序,使所述前台运行的应用程序响应该新的触摸事件。最终解决在某些场景下触摸屏不响应用户的触摸操作的问题。
Description
本发明涉及触摸事件处理技术领域,尤其涉及触摸事件处理方法、装置及终端设备。
用户触摸终端的触摸屏所产生的事件称为触摸事件,也称触控事件。在正常情况下,Android系统中的事件处理器将接收到的触摸事件直接发送给当前的界面,即前台运行的应用程序的用户界面,应用程序利用相应的处理方法处理该触摸事件。前台运行的应用程序是指,该应用程序的显示界面在显示屏上可见,且能与用户直接进行交互的应用程序。
Android系统中应用程序的显示界面包括底层页面,以及设置在所述底层界面上的控件响应区域,其中,控件可以是按钮、文本域。如果触摸事件发生的位置位于控件响应区域,事件处理器将该触摸事件上报给该控件响应区域对应的应用程序;如果触摸事件发生的位置位于控件响应区域之外,则该触摸事件被发送给底层页面,而底层页面通常不响应触摸事件,底层页面是事件处理的末端,因此,底层页面不响应的触摸事件将会消失。如果多点触摸事件的一部分触点位于应用程序的控件响应区域之外,认为该多点触摸事件针对底层页面发起,将该多点触摸事件上报给底层页面。例如,如果触摸屏上有水滴,可能出现来电话后用户点击接听电话的按钮不响应的现象,Android系统将水滴和用户的点击看作一个多点触摸事件,因此,将该多点触摸事件上报给底层页面,而底层页面不会响应该触摸事件,导致该触摸事件消失,即用户的触摸操作未得到响应。
在某些场景下,触摸屏处于开启状态下,触摸屏即使没有被触摸,也会自动在乱点,仿佛有一只看不见的鬼手在触摸所述触摸屏,俗称鬼手。由上述的触摸事件处理流程可知,当屏幕出现鬼手,或者,由于用户手持姿势、外界环境(如屏幕上有水滴)等影响因素引起触摸事件上报不对,将进一步导致用户触摸指定位置不响应。
发明内容
本发明实施例中提供了一种触摸事件处理方法、装置及终端设备,以解决现有技
术中的用户触摸操作得不到应用程序响应的问题。
为了解决上述技术问题,本发明实施例公开了如下技术方案:
第一方面,提供一种触摸事件处理方法,包括:
当存在未处理、即将被丢弃的多点触摸事件时,判断前台运行的应用程序是否是重点应用程序;
如果所述前台运行的应用程序是重点应用程序,从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点;
根据落在所述目标控件响应区域内的触摸点,组合得到新的触摸事件;
将组合得到的新的触摸事件传递给所述前台运行的应用程序,以使所述前台运行的应用程序响应所述新的触摸事件。
结合第一方面,在第一方面的第一种可能的实现方式中,所述根据落在所述目标控件响应区域内的触摸点,组合得到新的触摸事件,包括:
根据触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点;
将所述目标控件响应区域内的有效触摸点,组合得到所述新的触摸事件。
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述触摸性能参数包括点击次数、触摸点的移动距离、触摸时长和触摸强度中的任意一种或任意多种组合。
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述根据触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点,包括:
如果所述触摸点在第一预设时长内被点击的次数未超过预设次数,则确定所述触摸点是有效触摸点;
和/或,
如果所述触摸点落在所述目标控件响应区域内,且所述触摸点的起始位置到终止位置之间的距离小于所述目标控件响应区域的长度,则确定所述触摸点是有效触摸点;
和/或,
如果所述触摸点的触摸时长不超过第二预设时长,且所述触摸点的起始位置到终止位置之间的距离不小于预设距离,则确定所述触摸点是有效触摸点;
和/或,
检测所述触摸点的触摸强度,如果所述触摸强度高于或等于预设触摸强度,确定所述触摸点是有效触摸点。
结合第一方面和第一方面的第一至第三种可能的实现方式中的任意一种,在第一方面的第四种可能的实现方式中,所述从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点,包括:
获取所述前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据;
逐个判断所述多点触摸事件中的各个触摸点的触摸位置坐标是否落在所述当前显示界面的目标控件响应区域对应的位置坐标范围内;
如果所述触摸点的触摸位置坐标落在所述当前显示界面的目标控件响应区域内,确定所述触摸点落在所述前台运行的应用程序的目标控件响应区域内。
结合第一方面的第四种可能的实现方式,在第一方面的第五种可能的实现方式中,所述获取前台运行应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据,包括:
当所述前台运行的应用程序启动时,获取所述前台运行的应用程序的各个显示界面的控件响应区域的位置坐标数据,并存储各个显示界面的目标控件响应区域的位置坐标数据;
当检测到所述前台运行的应用程序更新后,更新存储的所述前台运行的应用程序的各个显示界面的目标控件响应区域的位置坐标数据。
第二方面,提供一种触摸事件处理装置,包括:
第一判断单元,用于当存在未处理、即将被丢弃的多点触摸事件时,判断前台运行的应用程序是否是重点应用程序;
确定单元,用于当所述前台运行的应用程序是重点应用程序时,从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点;
组合单元,用于根据落在所述前台运行的应用程序的目标控件响应区域内的触摸点,组合得到新的触摸事件;
传递单元,用于将组合得到的新的触摸事件传递给所述前台运行的应用程序,以使所述前台运行的应用程序响应所述新的触摸事件。
结合第二方面,在第二方面的第一种可能的实现方式中,所述组合单元包括:
过滤子单元,用于根据触摸性能参数,从所述目标控件响应区域内的触摸点中过
滤掉干扰触摸点,得到有效触摸点;
组合子单元,用于将落在所述目标控件响应区域内的有效触摸点,组合得到新的触摸事件。
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述触摸性能参数包括点击次数、触摸点的移动距离、触摸时长和触摸强度中的任意一种或任意多种组合。
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述过滤子单元具体用于:
如果所述触摸点在第一预设时长内被点击的次数未超过预设次数,则所述触摸点是有效触摸;
和/或,
如果所述触摸点落在所述目标控件响应区域内,且所述触摸点的起始位置到终止位置之间的距离小于所述目标控件响应区域的长度,则确定所述触摸点是有效触摸点;
和/或,
如果所述触摸点的触摸时长不超过第二预设时长,且所述触摸点的起始位置到终止位置之间的距离不小于预设距离,则确定所述触摸点是有效触摸点;
和/或,
检测所述触摸点的触摸强度,如果所述触摸强度高于或等于预设触摸强度,确定所述触摸点是有效触摸点。
结合第二方面和第二方面的第一至第三种可能的实现方式中的任意一种,在第二方面的第四种可能的实现方式中,所述确定单元,包括:
获取子单元,用于获取所述前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据;
判断子单元,用于逐个判断所述多点触摸事件中的各个触摸点的触摸位置坐标是否落在所述当前显示界面的目标控件响应区域对应的位置坐标范围内;
确定子单元,用于如果所述触摸点的触摸位置坐标落在所述当前显示界面的目标控件响应区域内,确定所述触摸点落在所述前台运行的应用程序的目标控件响应区域内。
结合第二方面的第四种可能的实现方式,在第二方面的第五种可能的实现方式中,所述获取子单元具体用于:
当所述前台运行的应用程序启动时,获取所述前台运行的应用程序的各个显示界面的控件响应区域,并存储各个显示界面的目标控件响应区域的位置坐标数据;
当检测到所述前台运行的应用程序更新后,更新存储的所述前台运行的应用程序的各个显示界面的目标控件响应区域的位置坐标数据。
第三方面,提供一种具有触摸屏的终端设备,包括处理器和存储器,
通过调用所述存储器内存储的程序或指令,所述处理器用于:
当存在未处理、即将被丢弃的多点触摸事件时,判断前台运行的应用程序是否是重点应用程序;
如果所述前台运行的应用程序是重点应用程序,从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点;
根据落在所述前台运行的应用程序的控件响应区域内的触摸点,组合得到新的触摸事件;
将组合得到的新的触摸事件传递给所述前台运行的应用程序,以使所述前台运行的应用程序响应所述新的触摸事件。
结合第三方面,在第三方面的第一种可能的实现方式中,所述处理器用于根据所述前台运行的应用程序的目标控件响应区域内的触摸点,组合得到新的触摸事件时,具体用于:
根据触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点;
将所述目标控件响应区域内的有效触摸点,组合得到所述新的触摸事件。
结合第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,所述触摸性能参数包括点击次数、触摸点的移动距离、触摸时长和触摸强度中的任意一种或任意多种组合。
结合第三方面的第二种可能的实现方式,在第三方面的第三种可能的实现方式中,所述处理器用于根据所述触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点时,具体用于:
如果所述触摸点在第一预设时长内被点击的次数未超过预设次数,则确定所述触摸点是有效触摸点;
和/或,
如果所述触摸点落在所述目标控件响应区域内,且所述触摸点的起始位置到终止位置之间的距离小于所述目标控件响应区域的长度,则确定所述触摸点是有效触摸
点;
和/或,
如果所述触摸点的触摸时长不超过第二预设时长,且所述触摸点的起始位置到终止位置之间的距离不小于预设距离,则确定所述触摸点是有效触摸点;
和/或,
检测所述触摸点的触摸强度,如果所述触摸强度高于或等于预设触摸强度,确定所述触摸点是有效触摸点。
结合第三方面和第三方面的第一种至第三种可能的实现方式中的任意一种,在第三方面的第四种可能的实现方式中,所述处理器用于从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点时,具体用于:
获取所述前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据;
逐个判断所述多点触摸事件中的各个触摸点的触摸位置坐标是否落在所述当前显示界面的目标控件响应区域对应的位置坐标范围内;
如果所述触摸点的触摸位置坐标落在所述当前显示界面的目标控件响应区域内,确定所述触摸点落在所述前台运行的应用程序的目标控件响应区域内。
结合第三方面的第四种可能的实现方式,在第三方面的第五种可能的实现方式中,所述处理器用于获取所述前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据时,具体用于:
当所述前台运行的应用程序启动时,获取所述前台运行的应用程序的各个显示界面的控件响应区域的位置坐标数据,并存储各个显示界面的目标控件响应区域的位置坐标数据;
当检测到所述前台运行的应用程序更新后,更新存储的所述前台运行的应用程序的各个显示界面的目标控件响应区域的位置坐标数据。由以上技术方案可见,本发明实施例提供的触摸事件处理方法,当存在即将被丢弃的多点触摸事件,而且前台运行的应用程序是重点应用程序时,从所述多点触摸事件的各个触摸点中,确定出落在控件响应区域内的触摸点。然后,根据落在前台运行的应用程序的控件响应区域内的触摸点组合得到新的触摸事件,并将新的触摸事件传递给所述前台运行的应用程序,从而使所述前台运行的应用程序响应该新的触摸事件。该方法将按照触摸事件处理机制处理到末端即将被丢弃的多点触摸事件中的各个触摸点逐一分析,根据前台运行的应
用程序的控件响应区域对所述多点触摸事件进行分离重组,即将用户触摸应用程序的控件响应区域所产生的触摸事件分离出来,得到新的触摸事件,重新传递给前台运行的应用程序,从而使前台运行的应用程序响应用户的触摸事件,最终解决在某些场景下触摸屏不响应用户的触摸操作的问题,提高应用程序对触摸事件的响应准确率。
构成本申请的一部分的说明书附图用来提供对本发明的进一步理解,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1示出了本发明实施例提供的一种触摸事件处理方法的流程示意图;
图2示出了本发明实施例提供的一种S130的方法流程示意图;
图3示出了本发明实施例提供的一种S120的方法流程示意图;
图4示出了本发明实施例提供的一种触摸事件处理装置的框图;
图5示出了本发明实施例提供的一种组合单元的框图;
图6示出了本发明实施例提供的一种确定单元的框图;
图7示出了本发明实施例提供的一种终端设备的结构框图。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
为方便理解本发明的技术方案,首先介绍下事件处理器响应触摸事件的原理:
在Android系统中,View(视窗)类是用户界面的基本构建模块,是构建用户界面控件(例如,触摸按钮、文本域)的基本类,一个View占用屏幕上的一个区域并且负责用户界面绘制和事件处理。
触摸事件通常直接上传给触摸屏当前显示的用户界面,用户界面中会有相应的处理方法,一个用户界面可能包括父View、子View、控件三类,此种应用场景下,当触摸事件(Touch事件)发生时,事件处理器首先将该Touch事件传递给最顶层的View(View节点树的叶子节点,即控件),如果控件未处理该Touch事件,则继续将该Touch事件传递给子View(叶子节点的上一级节点),如果子View仍未处理该Touch事件,则继续将该Touch事件传给父View(子View的上一级节点),如果最底层的View(View节点树的根节点,即View root节点)仍没有处理该Touch事件,则该Touch事件将会“消失”,即该Touch事件被丢弃。上述过程中,如果Touch事件被
上述的任意一个节点处理掉,则不会再向下一层View传递该Touch事件。
为实现本发明的发明目的,本发明提供了触摸事件处理方法、装置及终端设备,该方法将未处理、即将被丢弃的多点触摸事件中的各个触摸点逐一分析,根据重点应用程序的控件响应区域对未处理、即将被丢弃的多点触摸事件进行分离重组,即将用户触摸应用程序的控件响应区域所产生的触摸事件分离出来,重新组合成新的触摸事件,并传递给所述应用程序,从而使应用程序响应用户的触摸事件。以上是本发明的核心思想,为了使本领域技术人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所述描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参见图1,示出了本发明实施例一种触摸事件处理方法的流程示意图,该方法应用于具有触摸屏的终端设备中,具体可以应用于终端设备中的事件处理器中,如图1所示,所述方法可以包括以下步骤:
S110,如果存在未处理、即将被丢弃的多点触摸事件,则判断前台运行的应用程序是否是重点应用程序。如果是,则执行S120;否则,结束当前流程。
按照上述的触摸事件上传机制,如果传递给父View的多点触摸事件没有被处理,此时,确定存在即将被丢弃的多点触摸事件,然后,该多点触摸事件被拦截下来,并判断运行在前台的应用程序是否是重点应用程序,如果是重点应用程序则继续执行S120。
重点应用程序可以是系统设定的应用程序,例如,电话、短信等应用程序,也可以由用户预先设定某些应用程序为重点应用程序。系统通过应用程序的包名判断前台运行的应用程序是否是重点应用程序,应用程序的包名是应用程序的唯一识别标识。如果前台运行的应用程序的包名包含在重点应用程序的包名中,则确定前台运行的应用程序是重点应用程序。S120,从所述多点触摸事件的各个触摸点中,确定出落在前台运行的应用程序的目标控件响应区域内的触摸点。
首先,获取前台运行的应用程序的当前显示界面上的全部能够响应触摸事件的控件,将当前显示界面上的全部控件作为一个集合;然后,从控件集合中确定出目标控件,并确定该目标控件对应的目标控件响应区域。
目标控件响应区域可以是系统根据重点应用程序的显示界面所包含的控件区域确定,例如,电话应用程序,如果当前显示界面是拨打电话的页面,则将接听电话的
控件对应的控件响应区域确定为目标控件响应区域;如果当前显示界面是接听电话的页面,则将挂断电话的控件所对应的控件响应区域确定为目标控件响应区域。
逐一分析多点触摸事件中的各个触摸点是否落入目标控件响应区域内。
S130,根据落在所述应用程序的目标控件响应区域内的触摸点,组合得到新的触摸事件。
将落在目标控件响应区域内的触摸点组合得到一个新的触摸事件。例如,当前显示界面包括三个控件响应区域,分别是区域I和区域II,区域I是目标控件响应区域。如果分离出的落在控件响应区域内的触摸点包括A、B两个点,其中,点A落在区域I中,则将点A作为新的触摸事件。
S140,将组合得到的新的触摸事件传递给前台运行的应用程序,以使所述前台运行的应用程序响应所述新的触摸事件。
将组合得到的新的触摸事件再次传递给前台运行的应用程序,由该应用程序响应所述新的触摸事件,因此,能够避免某种场景下用户点击前台运行的应用程序的控件响应区域得不到响应的现象。
本实施例提供的触摸事件处理方法,如果仍存在未被处理、即将被丢弃的多点触摸事件时,而且,前台运行的应用程序是重点的应用程序时,从所述多点触摸事件的各个触摸点中,确定出落在前台运行的应用程序的控件响应区域内的触摸点。然后,根据落在前台运行的应用程序的目标控件响应区域内的触摸点组合得到新的触摸事件,并将新的触摸事件重新传递给所述运行在前台的应用程序,从而使运行在前台的应用程序响应该新的触摸事件,即应用程序响应用户的触摸事件,最终避免在某些场景下用户的触摸操作得不到响应的现象。
在某些场景下,鬼手可能恰好出现在前台运行的控件响应区域内,因此,需要过滤掉这些干扰触摸点,最终剩下的触摸点才是需要应用程序响应的触摸点。
请参见图2,示出了本发明实施例一种S130的方法流程示意图,如图2所示,S130可以包括以下步骤:
S131,根据触摸性能参数,对所述目标控件响应区域内的触摸点进行过滤,得到有效触摸点。
在本发明的实施例中,所述触摸性能参数可以包括:点击次数、触摸点的移动距离、触摸时长和触摸强度中的任意一种或任意多种组合。
在一种应用场景下,触摸点的触摸位置坐标落在前台运行的应用程序的目标控件
响应区域内,但是触摸点具有一定的移动距离,触摸点的起始位置与终止位置之间的距离大于所述控件响应区域的长度,此时,确定所述触摸点是无效触摸点,丢弃该触摸点。如果触摸点的触摸位置落在目标控件响应区域内,且触摸点的起始位置与终止位置之间的距离小于所述控件响应区域的长度,则确定所述触摸点是有效触摸点。
在另一种场景下,鬼手出现在目标控件响应区域内,而且在预设时长内目标控件响应区域被点击次数高达成百上千次,此种场景下,可以通过统计某个触摸点在一定时间内被点击的次数过滤掉鬼手干扰点。当所述触摸点在第一预设时长内被点击的次数超过预设次数时,认为所述触摸点是无效触摸点,丢弃该触摸点。如果所述触摸点在第一预设时长内被点击的次数未超过预设次数,则所述触摸点是有效触摸点;
在又一种场景下,鬼手触摸时间较长且移动距离较小。此种场景下,检测触摸点的触摸时长及移动距离,如果触摸点的触摸时长不超过第二预设时长,且所述触摸点的移动距离不小于预设距离,则确定所述触摸点是有效触摸点;如果触摸点的触摸时长超过第二预设时长,且触摸点的移动距离小于预设距离,确定所述触摸点是无效触摸点,丢弃所述触摸点。
随着移动终端的屏幕越来越大、边界越来越小,用户的手指极易触碰到屏幕边缘,可能会影响到用户触摸事件的响应。此种场景下,可以根据触摸强度排除干扰触摸点。首先,检测触摸点的触摸强度,如果触摸强度高于或等于预设触摸强度,确定触摸点是有效触摸点;如果触摸强度低于预设触摸强度,则确定触摸点是无效触摸点。
当然,除上述的四种场景外,还可以采用触摸性能参数中的任意组合排除干扰触摸点。
S132,将所述目标控件响应区域内的有效触摸点,组合得到所述新的触摸事件。
目标控件响应区域内的触摸点组合得到一个新的触摸事件,得到的新的触摸事件可能是单点触摸事件,也可能是多点触摸事件,例如,用户用两个手指触摸当前显示界面上的某一个控件响应区域的情况。
本实施例提供的组合得到新的触摸事件的方法,对从即将被丢弃的多点触摸事件中分离出的触摸点进行过滤,过滤掉干扰触摸点,剩下需要应用程序响应的触摸点,即有效触摸点。然后将落在目标控件响应区域内的有效触摸点组合得到一个新的触摸事件,利用该方法得到的新的触摸事件大大降低了事件中的干扰触摸点,精确度高。
请参见图3,示出了本发明实施例一种S120的方法流程示意图,如图3所示,S120可以包括以下步骤:
S121,获取前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置
坐标数据。
在本发明的一个实施例中,可以在需要确定多点触摸事件中的各个触摸点的位置时,再获取前台运行的应用程序的显示界面的目标控件响应区域的位置坐标数据。
在本发明的另一个实施例中,当重点应用程序启动时,就动态获取该应用程序的控件响应区域的位置坐标数据,并存储目标控件响应区域的位置坐标数据,以便后续使用时直接读取。
应用程序的控件响应区域可能随着应用程序的更新而发生变化,因此,当检测到终端设备安装的所述应用程序更新后,更新存储的所述应用程序的各个显示界面的控件响应区域的位置坐标数据,从而保证存储的控件响应区域的位置坐标数据始终与所安装的应用程序相对应。此种方式仅需获取一次重点应用程序的控件响应区域的位置坐标数据,后续使用时直接读取,不需要每次都获取,从而节省了占用的CPU资源。
S122,逐个判断所述多点触摸事件中的各个触摸点的触摸位置坐标是否落在所述当前显示界面的目标控件响应区域内。如果是,则执行S123;否则,执行S124。
S123,确定所述触摸点落在前台运行的应用程序的目标控件响应区域内。
S124,确定所述触摸点不在前台运行的应用程序的目标控件响应区域内。然后,将该触摸点丢弃掉。
本实施例提供的确定落在控件响应区域内的触摸点的方法,获取应用程序的显示界面上的目标控件响应区域的位置坐标数据,逐个判断多点触摸事件中的各个触摸点是否落在目标控件响应区域内,找到触摸坐标位于控件响应区域内的触摸点。其中,在获取控件响应区域时,可以在重点应用程序启动时获取控件响应区域的位置坐标数据,并保存目标控件响应区域的位置坐标数据,以便后续直接读取目标控件响应区域的位置坐标数据,不需要每次都获取,从而节省了占用的CPU资源。
相应于上述的触摸事件处理方法实施例,本发明还提供了触摸事件处理装置实施例。
请参见图4,示出了本发明实施例一种触摸事件处理装置的框图,该装置应用于具有触摸屏的终端设备中。如图4所示,所述装置包括:第一判断单元410、确定单元420、组合单元430和传递单元440。
所述第一判断单元410,用于当存在未处理且即将被丢弃的多点触摸事件时,判断前台运行的应用程序是否是重点应用程序。
按照触摸事件上传机制,如果存在未处理且即将被丢弃的多点触摸事件,拦截该
多点触摸事件,判断前台运行的应用程序是否是重点应用程序。
所述确定单元420,用于当所述前台运行的应用程序是重点应用程序时,从所述多点触摸事件的各个触摸点中,确定出落在前台运行的应用程序的目标哦控件响应区域内的触摸点。
所述组合单元430,用于根据落在所述目标控件响应区域内的触摸点,组合得到新的触摸事件。
所述传递单元440,用于将组合得到的新的触摸事件传递给前台运行的应用程序,以使前台运行的应用程序响应所述新的触摸事件。
本实施例提供的触摸事件处理装置,触摸事件处理到末端仍存在没有被处理、即将被丢弃的多点触摸事件时,由判断单元判断前台运行的应用程序是否是重点应用程序。如果前台运行的应用程序是重点应用程序,由确定单元从所述多点触摸事件的各个触摸点中,确定出落在前台运行的应用程序的目标控件响应区域内的触摸点。然后,组合单元根据落在所述目标控件响应区域内的触摸点组合得到新的触摸事件,并将新的触摸事件重新传递给所述前台运行的应用程序,使所述前台运行的应用程序响应该新的触摸事件,从而使前台运行的应用程序响应用户的触摸事件,最终避免发生在某些场景下触摸屏不响应用户的触摸操作的现象。
在本发明的一个实施例中,为了比较精确地从当前的全部触摸点中分离出真正需要应用程序响应的触摸点构成的新的触摸事件,组合单元420需要进一步从落在目标控件响应区域内的触摸点中过滤掉无效触摸点,得到有效触摸点。如图5所示,所述组合单元430可以包括过滤子单元431和组合子单元432。
所述过滤子单元431,用于根据触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点。
所述触摸性能参数包括点击次数、触摸点的移动距离、触摸时长和触摸强度中的任意一种或任意多种组合。
在一种应用场景下,触摸点的触摸位置坐标落在应用程序的控件响应区域内,但是触摸点具有一定的移动距离,触摸点的起始位置与终止位置之间的距离大于所述控件响应区域的长度,此时,所述过滤子单元431确定所述触摸点是无效触摸点,并丢弃该触摸点。如果触摸点的触摸位置落在控件响应区域内,且触摸点的起始位置与终止位置之间的距离小于所述控件响应区域的长度,则所述过滤子单元431确定所述触摸点是有效触摸点。
在另一种场景中,鬼手出现在控件响应区域内,而且在预设时长内控件响应区域
被点击次数高达成百上千次,此种场景下,可以通过统计某个触摸点在一定时间内被点击的次数过滤掉鬼手触摸点。当所述触摸点在第一预设时长内被点击的次数超过预设次数时,所述过滤子单元431认为所述触摸点是无效触摸点,丢弃该触摸点。如果所述触摸点在第一预设时长内被点击的次数未超过预设次数,则所述触摸点是有效触摸点;
在又一种场景中,鬼手触摸时间较长且移动距离较小。此种场景下,检测触摸点的触摸时长及移动距离,如果触摸点的触摸时长不超过第二预设时长,且所述触摸点的移动距离不小于预设距离,则所述过滤子单元431确定所述触摸点是有效触摸点;如果触摸点的触摸时长超过第二预设时长,且所述触摸点的移动距离小于预设距离,则所述过滤子单元431确定所述触摸点是无效触摸点,丢弃所述触摸点。
随着移动终端的屏幕越来越大、边界越来越小,用户的手指极易触碰到屏幕边缘,可能会影响到用户触摸事件的响应。此种场景下,可以根据触摸强度排除干扰触摸点。首先,检测触摸点的触摸强度,如果触摸强度高于或等于预设触摸强度,确定触摸点是有效触摸点;如果触摸强度低于预设触摸强度,则确定触摸点是无效触摸点。
当然,除上述的四种场景外,还可以采用触摸性能参数中的任意组合排除干扰触摸点。
所述组合子单元432,用于将落在所述目标控件响应区域内的有效触摸点,组合得到新的触摸事件。
本实施例提供的所述组合单元,对从未处理的多点触摸事件中分离出的触摸点进行过滤,过滤掉干扰触摸点,得到需要前台运行的应用程序响应的触摸点,即有效触摸点。然后将落在前台运行的应用程序的目标控件响应区域内的有效触摸点组合得到一个新的触摸事件,利用该方法得到的新的触摸事件大大降低了事件中的干扰触摸点,精确度高。
请参见图6,示出了本发明实施例一种确定单元的框图,所述确定单元420包括:获取子单元421、判断子单元422和确定子单元423。
所述获取子单元421,用于获取前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据。
应用程序的当前显示界面是指具有触摸屏的终端设备当前显示的该应用程序的显示界面,即应用程序的当前显示界面。获取应用程序的当前显示界面上的全部控件对应的控件响应区域,并确定目标控件对应的控件响应区域作为目标响应区域。
在本发明的一个实施例中,可以在需要确定多点触摸事件中的各个触摸点的位置
时,获取前台运行的应用程序的当前显示界面的目标控件响应区域的位置坐标数据。
在本发明的另一个实施例中,当重点应用程序启动时,就动态获取该应用程序的控件响应区域的位置坐标数据,并存储所述应用程序的各个显示界面的目标控件响应区域的位置坐标数据,以便后续使用时直接读取。
应用程序的控件响应区域可能随着应用程序的更新而发生变化,因此,当检测到终端设备安装的所述应用程序更新后,更新存储的所述应用程序的各个显示界面的控件响应区域的位置坐标数据,从而保证存储的控件响应区域的位置坐标数据始终与所安装的应用程序相对应。
所述判断子单元422,用于逐个判断所述多点触摸事件中的各个触摸点的触摸位置坐标是否落在所述当前显示界面的目标控件响应区域内;
所述确定子单元423,用于如果所述触摸点的触摸位置坐标落在所述当前显示界面的目标控件响应区域内,确定所述触摸点落在前台运行的应用程序的目标控件响应区域内。
本实施例提供的确定单元,由获取子单元获取前台运行的应用程序的当前显示界面的目标控件响应区域的位置坐标数据,逐个判断多点触摸事件中的各个触摸点是否落在所述目标控件响应区域内,找到触摸坐标位于目标控件响应区域内的触摸点。其中,在获取控件响应区域时,可以在重点应用程序启动时获取控件响应区域的位置坐标数据,并保存目标控件响应区域的位置坐标数据,以便后续直接读取控件响应区域的位置坐标数据不需要每次都获取,从而节省了占用的CPU资源。
相应于上述的触摸事件处理方法实施例,本发明还提供了应用所述触摸事件处理方法的终端设备的实施例。
请参见图7,示出了本发明实施例提供的一种终端设备的结构框图,该终端设备600包括:至少一个处理器601,至少一个通信总线602,触摸屏603,存储器604604。通信总线602用于实现这些组件之间的连接通信;触摸屏603用于实现上述的触摸事件处理方法。
触摸屏603可以包括电容式触摸屏或电阻式触摸屏。
存储器604604可以包括只读存储器和随机存取存储器,并向处理器601提供指令和数据。存储器604的一部分还可以包括非易失性随机存取存储器(NVRAM)。
在一些实施方式中,存储器604存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集;本实施例中,存储器604包括操作系统6041
和应用程序模块6042。
操作系统6041包含各种系统程序,用于实现各种基础业务以及处理基于硬件的任务;
应用程序模块6042包含各种应用程序,例如桌面(launcher)、媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。
在本发明实施例中,通过调用存储器604存储的程序或指令,处理器601用于:
当存在未处理、即将被丢弃的多点触摸事件,判断前台运行的应用程序是否是重点应用程序;
如果前台运行的应用程序是重点应用程序,从所述多点触摸事件的各个触摸点中,确定出落在前台运行的应用程序的目标控件响应区域内的触摸点;
根据落在前台运行的应用程序的目标控件响应区域内的触摸点,组合得到新的触摸事件;
将组合得到的新的触摸事件传递给前台运行的应用程序,以使前台运行的应用程序响应所述新的触摸事件。
可选地,作为一个实施例,所述处理器601用于根据前台运行的应用程序的目标控件响应区域内的触摸点,组合得到新的触摸事件时,具体用于:
根据触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点;
将所述目标控件响应区域内的有效触摸点,组合得到所述新的触摸事件。
进一步地,所述触摸性能参数包括点击次数、触摸点的移动距离、触摸时长和触摸强度中的任意一种或任意多种组合。
则所述处理器601用于从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点时,具体用于:
如果所述触摸点在第一预设时长内被点击的次数未超过预设次数,则确定所述触摸点是有效触摸点;
和/或,
如果所述触摸点落在所述目标控件响应区域内,且所述触摸点的起始位置到终止位置之间的距离小于所述目标控件响应区域的长度,则确定所述触摸点是有效触摸点;
和/或,
如果所述触摸点的触摸时长不超过第二预设时长,且所述触摸点的起始位置到终
止位置之间的距离不小于预设距离,则确定所述触摸点是有效触摸点;
和/或,
检测所述触摸点的触摸强度,如果所述触摸强度高于或等于预设触摸强度,确定所述触摸点是有效触摸点。
可选地,作为本发明一个实施例,所述处理器601用于从所述多点触摸事件的各个触摸点中,确定出落在前台运行的应用程序的目标控件响应区域内的触摸点时,具体用于:
获取前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据;
逐个判断所述多点触摸事件中的各个触摸点的触摸位置坐标是否落在所述当前显示界面的目标控件响应区域的位置坐标范围内;
如果所述触摸点的触摸位置坐标落在所述当前显示界面的目标控件响应区域内,确定所述触摸点落在所述前台运行的应用程序的目标控件响应区域内。
可选地,作为本发明一个实施例,所述处理器601用于获取所述应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据时,具体用于:
当前台运行的应用程序启动时,获取前台运行的应用程序的各个显示界面的控件响应区域的位置坐标数据,并存储各个显示界面的目标控件响应区域的位置坐标数据;
当检测到所述前台运行的应用程序更新后,更新存储的所述前台运行的应用程序的各个显示界面的目标控件响应区域的位置坐标数据。
可见,采用上述方案后,当触摸事件处理到末端仍存在没有被处理的多点触摸事件,而且,前台运行的应用程序是重点应用程序时,从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点。然后,根据落在所述目标控件响应区域内的触摸点组合得到新的触摸事件,并将新的触摸事件重新传递给所述前台运行的应用程序,从而使所述前台运行的应用程序响应该新的触摸事件,即前台运行的应用程序响应用户的触摸事件,最终解决在某些场景下触摸屏不响应用户的触摸操作的问题。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置或系统实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的装置及系统实施例仅仅是示意性
的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
本发明可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本发明,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个......”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅是本发明的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。
Claims (18)
- 一种触摸事件处理方法,其特征在于,包括:当存在未处理、即将被丢弃的多点触摸事件时,判断前台运行的应用程序是否是重点应用程序;如果所述前台运行的应用程序是重点应用程序,从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点;根据落在所述目标控件响应区域内的触摸点,组合得到新的触摸事件;将组合得到的新的触摸事件传递给所述前台运行的应用程序,以使所述前台运行的应用程序响应所述新的触摸事件。
- 根据权利要求1所述的方法,其特征在于,所述根据落在所述目标控件响应区域内的触摸点,组合得到新的触摸事件,包括:根据触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点;将所述目标控件响应区域内的有效触摸点,组合得到所述新的触摸事件。
- 根据权利要求2所述的方法,其特征在于,所述触摸性能参数包括点击次数、触摸点的移动距离、触摸时长和触摸强度中的任意一种或任意多种组合。
- 根据权利要求3所述的方法,其特征在于,所述根据触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点,包括:如果所述触摸点在第一预设时长内被点击的次数未超过预设次数,则确定所述触摸点是有效触摸点;和/或,如果所述触摸点落在所述目标控件响应区域内,且所述触摸点的起始位置到终止位置之间的距离小于所述目标控件响应区域的长度,则确定所述触摸点是有效触摸点;和/或,如果所述触摸点的触摸时长不超过第二预设时长,且所述触摸点的起始位置到终止位置之间的距离不小于预设距离,则确定所述触摸点是有效触摸点;和/或,检测所述触摸点的触摸强度,如果所述触摸强度高于或等于预设触摸强度,确定所述触摸点是有效触摸点。
- 根据权利要求1-4任一项所述的方法,其特征在于,所述从所述多点触 摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点,包括:获取所述前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据;逐个判断所述多点触摸事件中的各个触摸点的触摸位置坐标是否落在所述当前显示界面的目标控件响应区域对应的位置坐标范围内;如果所述触摸点的触摸位置坐标落在所述当前显示界面的目标控件响应区域内,确定所述触摸点落在所述前台运行的应用程序的目标控件响应区域内。
- 根据权利要求5所述的方法,其特征在于,所述获取所述前台运行应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据,包括:当所述前台运行的应用程序启动时,获取所述前台运行的应用程序的各个显示界面的控件响应区域的位置坐标数据,并存储各个显示界面的目标控件响应区域的位置坐标数据;当检测到所述前台运行的应用程序更新后,更新存储的所述前台运行的应用程序的各个显示界面的目标控件响应区域的位置坐标数据。
- 一种触摸事件处理装置,其特征在于,包括:第一判断单元,用于当存在未处理、即将被丢弃的多点触摸事件时,判断前台运行的应用程序是否是重点应用程序;确定单元,用于当所述前台运行的应用程序是重点应用程序时,从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点;组合单元,用于根据落在所述前台运行的应用程序的目标控件响应区域内的触摸点,组合得到新的触摸事件;传递单元,用于将组合得到的新的触摸事件传递给所述前台运行的应用程序,以使所述前台运行的应用程序响应所述新的触摸事件。
- 根据权利要求7所述的装置,其特征在于,所述组合单元包括:过滤子单元,用于根据触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点;组合子单元,用于将落在所述目标控件响应区域内的有效触摸点,组合得到新的触摸事件。
- 根据权利要求8所述的装置,其特征在于,所述触摸性能参数包括点击次数、触摸点的移动距离、触摸时长和触摸强度中的任意一种或任意多种组合。
- 根据权利要求9所述的装置,其特征在于,所述过滤子单元具体用于:如果所述触摸点在第一预设时长内被点击的次数未超过预设次数,则所述触摸点是有效触摸;和/或,如果所述触摸点落在所述目标控件响应区域内,且所述触摸点的起始位置到终止位置之间的距离小于所述目标控件响应区域的长度,则确定所述触摸点是有效触摸点;和/或,如果所述触摸点的触摸时长不超过第二预设时长,且所述触摸点的起始位置到终止位置之间的距离不小于预设距离,则确定所述触摸点是有效触摸点;和/或,检测所述触摸点的触摸强度,如果所述触摸强度高于或等于预设触摸强度,确定所述触摸点是有效触摸点。
- 根据权利要求7-10任一项所述的装置,其特征在于,所述确定单元,包括:获取子单元,用于获取所述前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据;判断子单元,用于逐个判断所述多点触摸事件中的各个触摸点的触摸位置坐标是否落在所述当前显示界面的目标控件响应区域对应的位置坐标范围内;确定子单元,用于如果所述触摸点的触摸位置坐标落在所述当前显示界面的目标控件响应区域内,确定所述触摸点落在所述前台运行的应用程序的目标控件响应区域内。
- 根据权利要求11所述的装置,其特征在于,所述获取子单元具体用于:当所述前台运行的应用程序启动时,获取所述前台运行的应用程序的各个显示界面的控件响应区域,并存储各个显示界面的目标控件响应区域的位置坐标数据;当检测到所述前台运行的应用程序更新后,更新存储的所述前台运行的应用程序的各个显示界面的目标控件响应区域的位置坐标数据。
- 一种具有触摸屏的终端设备,其特征在于,包括处理器和存储器,通过调用所述存储器内存储的程序或指令,所述处理器用于:当存在未处理、即将被丢弃的多点触摸事件时,判断前台运行的应用程序是否是重点应用程序;如果所述前台运行的应用程序是重点应用程序,从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸 点;根据落在所述前台运行的应用程序的控件响应区域内的触摸点,组合得到新的触摸事件;将组合得到的新的触摸事件传递给所述前台运行的应用程序,以使所述前台运行的应用程序响应所述新的触摸事件。
- 根据权利要求13所述的终端设备,其特征在于,所述处理器用于根据所述前台运行的应用程序的目标控件响应区域内的触摸点,组合得到新的触摸事件时,具体用于:根据触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点;将所述目标控件响应区域内的有效触摸点,组合得到所述新的触摸事件。
- 根据权利要求14所述的终端设备,其特征在于,所述触摸性能参数包括点击次数、触摸点的移动距离、触摸时长和触摸强度中的任意一种或任意多种组合。
- 根据权利要求14所述的终端设备,其特征在于,所述处理器用于根据所述触摸性能参数,从所述目标控件响应区域内的触摸点中过滤掉干扰触摸点,得到有效触摸点时,具体用于:如果所述触摸点在第一预设时长内被点击的次数未超过预设次数,则确定所述触摸点是有效触摸点;和/或,如果所述触摸点落在所述目标控件响应区域内,且所述触摸点的起始位置到终止位置之间的距离小于所述目标控件响应区域的长度,则确定所述触摸点是有效触摸点;和/或,如果所述触摸点的触摸时长不超过第二预设时长,且所述触摸点的起始位置到终止位置之间的距离不小于预设距离,则确定所述触摸点是有效触摸点;和/或,检测所述触摸点的触摸强度,如果所述触摸强度高于或等于预设触摸强度,确定所述触摸点是有效触摸点。
- 根据权利要求13所述的终端设备,其特征在于,所述处理器用于从所述多点触摸事件的各个触摸点中,确定出落在所述前台运行的应用程序的目标控件响应区域内的触摸点时,具体用于:获取所述前台运行的应用程序的当前显示界面的目标控件响应区域对应的 位置坐标数据;逐个判断所述多点触摸事件中的各个触摸点的触摸位置坐标是否落在所述当前显示界面的目标控件响应区域对应的位置坐标范围内;如果所述触摸点的触摸位置坐标落在所述当前显示界面的目标控件响应区域内,确定所述触摸点落在所述前台运行的应用程序的目标控件响应区域内。
- 根据权利要求17所述的终端设备,其特征在于,所述处理器用于获取所述前台运行的应用程序的当前显示界面的目标控件响应区域对应的位置坐标数据时,具体用于:当所述前台运行的应用程序启动时,获取所述前台运行的应用程序的各个显示界面的控件响应区域的位置坐标数据,并存储各个显示界面的目标控件响应区域的位置坐标数据;当检测到所述前台运行的应用程序更新后,更新存储的所述前台运行的应用程序的各个显示界面的目标控件响应区域的位置坐标数据。
Priority Applications (7)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP22154157.6A EP4141628B1 (en) | 2015-03-19 | 2015-03-19 | Touch event processing method and apparatus, and terminal device |
| EP15885040.4A EP3264249B1 (en) | 2015-03-19 | 2015-03-19 | Touch event processing method, apparatus and terminal device |
| PCT/CN2015/074585 WO2016145657A1 (zh) | 2015-03-19 | 2015-03-19 | 触摸事件处理方法、装置及终端设备 |
| EP19210342.2A EP3674857B1 (en) | 2015-03-19 | 2015-03-19 | Touch event processing method and apparatus, and terminal device |
| US15/559,401 US10379671B2 (en) | 2015-03-19 | 2015-03-19 | Touch event processing method and apparatus, and terminal device |
| CN201911033084.8A CN110825304B (zh) | 2015-03-19 | 2015-03-19 | 触摸事件处理方法、装置及终端设备 |
| CN201580021516.7A CN106462351B (zh) | 2015-03-19 | 2015-03-19 | 触摸事件处理方法、装置及终端设备 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2015/074585 WO2016145657A1 (zh) | 2015-03-19 | 2015-03-19 | 触摸事件处理方法、装置及终端设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016145657A1 true WO2016145657A1 (zh) | 2016-09-22 |
Family
ID=56920385
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/074585 Ceased WO2016145657A1 (zh) | 2015-03-19 | 2015-03-19 | 触摸事件处理方法、装置及终端设备 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US10379671B2 (zh) |
| EP (3) | EP4141628B1 (zh) |
| CN (2) | CN110825304B (zh) |
| WO (1) | WO2016145657A1 (zh) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106484288A (zh) * | 2016-09-28 | 2017-03-08 | 依偎科技(南昌)有限公司 | 一种终端控制方法以及移动终端 |
| CN108073347A (zh) * | 2017-12-15 | 2018-05-25 | 掌阅科技股份有限公司 | 多点触控的处理方法、计算设备及计算机存储介质 |
| CN108376050A (zh) * | 2018-02-24 | 2018-08-07 | 海信(山东)空调有限公司 | 家用电器及其控制方法和控制组件 |
| CN110134463A (zh) * | 2018-02-02 | 2019-08-16 | 阿里巴巴集团控股有限公司 | 数据处理方法、装置、设备和机器可读介质 |
| CN115185406A (zh) * | 2021-04-02 | 2022-10-14 | 华为技术有限公司 | 一种输入监控方法、装置和电子设备 |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109725959A (zh) * | 2018-05-08 | 2019-05-07 | 平安普惠企业管理有限公司 | 页面控件的响应方法、显示设备及计算机可读存储介质 |
| CN113325966A (zh) * | 2020-02-28 | 2021-08-31 | 北京小米移动软件有限公司 | 报点处理方法、报点处理装置及存储介质 |
| CN114489354B (zh) * | 2022-01-14 | 2024-12-03 | 深圳Tcl新技术有限公司 | 按键事件处理方法、装置、存储介质及终端 |
| CN114407796B (zh) * | 2022-01-21 | 2025-01-07 | 腾讯科技(深圳)有限公司 | 车载终端的控制方法、装置、设备及存储介质 |
| CN117666826A (zh) * | 2022-08-24 | 2024-03-08 | 开立生物医疗科技(武汉)有限公司 | 一种触摸校正方法、装置、超声设备及存储介质 |
| CN115904148A (zh) * | 2022-11-14 | 2023-04-04 | 京东方科技集团股份有限公司 | 触控事件的处理方法及装置、存储介质、电子设备 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102053748A (zh) * | 2009-10-28 | 2011-05-11 | 鸿富锦精密工业(深圳)有限公司 | 一种多点式触摸屏热键管理系统及方法 |
| CN102768607A (zh) * | 2011-11-02 | 2012-11-07 | 联想(北京)有限公司 | 一种实现触控操作应用程序的方法及装置 |
| CN104102437A (zh) * | 2013-04-03 | 2014-10-15 | 华为技术有限公司 | 在多点触摸设备上进行操作的方法及多点触摸设备 |
| US20150009162A1 (en) * | 2013-07-05 | 2015-01-08 | Samsung Electronics Co., Ltd. | Mobile terminal including touch screen supporting multi-touch input and method of controlling the same |
Family Cites Families (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7956847B2 (en) * | 2007-01-05 | 2011-06-07 | Apple Inc. | Gestures for controlling, manipulating, and editing of media files using touch sensitive devices |
| CN101661363A (zh) * | 2008-08-28 | 2010-03-03 | 比亚迪股份有限公司 | 一种多点触摸感应系统的应用方法 |
| US20130002602A1 (en) | 2011-06-28 | 2013-01-03 | Suzana Apelbaum | Systems And Methods For Touch Screen Image Capture And Display |
| DE102012110278B8 (de) | 2011-11-02 | 2025-07-17 | Beijing Lenovo Software Ltd. | Verfahren und Vorrichtungen zur Fensterdarstellung und Verfahren und Vorrichtungen zur Berührungsbedienung von Anwendungen |
| US8812994B2 (en) | 2011-12-29 | 2014-08-19 | Apple Inc. | Device, method, and graphical user interface for configuring restricted interaction with a user interface |
| US9046958B2 (en) * | 2012-03-15 | 2015-06-02 | Nokia Technologies Oy | Method, apparatus and computer program product for user input interpretation and input error mitigation |
| CN103324325B (zh) * | 2012-03-21 | 2016-02-10 | 宇龙计算机通信科技(深圳)有限公司 | 多点触摸误操作的检测方法及终端 |
| CN103455266A (zh) * | 2012-06-04 | 2013-12-18 | 华为终端有限公司 | 一种触摸屏的误触摸操作的处理方法及终端设备 |
| KR20140016655A (ko) * | 2012-07-30 | 2014-02-10 | (주)라온제나 | 오브젝트에 대한 터치를 식별하는 멀티터치 인식 장치 및 방법 |
| KR20140138224A (ko) | 2013-01-06 | 2014-12-03 | 인텔 코오퍼레이션 | 터치 데이터의 분산된 전처리와 디스플레이 영역 제어를 위한 방법, 장치, 및 시스템 |
| CN103513914B (zh) * | 2013-03-13 | 2016-05-11 | 展讯通信(上海)有限公司 | 应用对象的触摸控制方法与装置 |
| CN103268197B (zh) | 2013-04-28 | 2016-03-02 | 华为技术有限公司 | 一种锁定屏幕的方法、装置和终端设备 |
| CN103513871B (zh) * | 2013-09-30 | 2017-03-15 | 北界创想(北京)软件有限公司 | 控制移动终端的方法和装置 |
| CN104007932B (zh) * | 2014-06-17 | 2017-12-29 | 华为技术有限公司 | 一种触摸点识别方法及装置 |
-
2015
- 2015-03-19 CN CN201911033084.8A patent/CN110825304B/zh active Active
- 2015-03-19 EP EP22154157.6A patent/EP4141628B1/en active Active
- 2015-03-19 US US15/559,401 patent/US10379671B2/en active Active
- 2015-03-19 EP EP15885040.4A patent/EP3264249B1/en active Active
- 2015-03-19 CN CN201580021516.7A patent/CN106462351B/zh active Active
- 2015-03-19 WO PCT/CN2015/074585 patent/WO2016145657A1/zh not_active Ceased
- 2015-03-19 EP EP19210342.2A patent/EP3674857B1/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102053748A (zh) * | 2009-10-28 | 2011-05-11 | 鸿富锦精密工业(深圳)有限公司 | 一种多点式触摸屏热键管理系统及方法 |
| CN102768607A (zh) * | 2011-11-02 | 2012-11-07 | 联想(北京)有限公司 | 一种实现触控操作应用程序的方法及装置 |
| CN104102437A (zh) * | 2013-04-03 | 2014-10-15 | 华为技术有限公司 | 在多点触摸设备上进行操作的方法及多点触摸设备 |
| US20150009162A1 (en) * | 2013-07-05 | 2015-01-08 | Samsung Electronics Co., Ltd. | Mobile terminal including touch screen supporting multi-touch input and method of controlling the same |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP3264249A4 * |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106484288A (zh) * | 2016-09-28 | 2017-03-08 | 依偎科技(南昌)有限公司 | 一种终端控制方法以及移动终端 |
| CN108073347A (zh) * | 2017-12-15 | 2018-05-25 | 掌阅科技股份有限公司 | 多点触控的处理方法、计算设备及计算机存储介质 |
| CN108073347B (zh) * | 2017-12-15 | 2019-07-05 | 掌阅科技股份有限公司 | 多点触控的处理方法、计算设备及计算机存储介质 |
| CN110134463A (zh) * | 2018-02-02 | 2019-08-16 | 阿里巴巴集团控股有限公司 | 数据处理方法、装置、设备和机器可读介质 |
| CN108376050A (zh) * | 2018-02-24 | 2018-08-07 | 海信(山东)空调有限公司 | 家用电器及其控制方法和控制组件 |
| CN115185406A (zh) * | 2021-04-02 | 2022-10-14 | 华为技术有限公司 | 一种输入监控方法、装置和电子设备 |
| CN115185406B (zh) * | 2021-04-02 | 2026-03-10 | 华为技术有限公司 | 一种输入监控方法、装置和电子设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP3674857A1 (en) | 2020-07-01 |
| US20180088731A1 (en) | 2018-03-29 |
| EP4141628B1 (en) | 2024-03-06 |
| CN110825304A (zh) | 2020-02-21 |
| EP3264249A4 (en) | 2018-03-14 |
| CN110825304B (zh) | 2023-04-21 |
| EP3674857B1 (en) | 2022-04-20 |
| US10379671B2 (en) | 2019-08-13 |
| EP3264249B1 (en) | 2019-12-18 |
| EP4141628A1 (en) | 2023-03-01 |
| CN106462351B (zh) | 2019-11-12 |
| CN106462351A (zh) | 2017-02-22 |
| EP3264249A1 (en) | 2018-01-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2016145657A1 (zh) | 触摸事件处理方法、装置及终端设备 | |
| CN103440092B (zh) | 一种返回按键的处理方法、系统及移动终端 | |
| CN104461287B (zh) | 一种悬浮物体的处理方法、装置和终端 | |
| CN104360810B (zh) | 一种虚拟按键的显示方法和电子设备 | |
| CN105487809A (zh) | 一种终端的控制方法及装置 | |
| CN104036030A (zh) | 基于浏览器的弹窗广告拦截方法、系统及相关浏览器 | |
| TWI700629B (zh) | 控制顯示方向的方法和設備 | |
| CN105610915A (zh) | 数据上报方法和系统 | |
| CN111542802A (zh) | 一种屏蔽触摸事件的方法及电子设备 | |
| CN106775085A (zh) | 一种屏幕边缘防误触的方法、装置及移动终端 | |
| WO2016165284A1 (zh) | 启动任务管理界面的方法、装置及设备 | |
| JP6250151B2 (ja) | タッチパッド操作およびダブルタップ・ズーミングに対する独立ヒット・テスト | |
| WO2017004952A1 (zh) | 用于检测和阻止恶意点击广告链接的方法和装置 | |
| CN106937258B (zh) | 一种广播的控制方法、装置及移动终端 | |
| CN109963182A (zh) | 一种遥控器兼容输入方法、系统、存储介质及电视机 | |
| CN104598097A (zh) | 即时通信im窗口的排序方法和装置 | |
| WO2019071571A1 (zh) | 信息处理方法、相关设备及计算机存储之介质 | |
| CN104683460B (zh) | 一种物联网的通信方法、装置及服务器 | |
| CN106919489A (zh) | 应用程序的应用界面异常退出的监测方法及装置 | |
| CN110764683B (zh) | 一种处理操作方法及终端 | |
| CN106598446B (zh) | 截图方法及装置 | |
| CN104252387A (zh) | 用于在终端中管理应用的设备和方法 | |
| WO2015192490A1 (zh) | 触摸屏的去抖动方法、装置及终端 | |
| WO2018103410A1 (zh) | 终端的触摸操作控制方法、终端和计算机可读存储介质 | |
| CN104951222B (zh) | 闹钟控制方法及终端 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15885040 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 15559401 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| REEP | Request for entry into the european phase |
Ref document number: 2015885040 Country of ref document: EP |