CN110275639B - Touch data processing method and device, terminal and storage medium - Google Patents

Touch data processing method and device, terminal and storage medium Download PDF

Info

Publication number
CN110275639B
CN110275639B CN201910561908.2A CN201910561908A CN110275639B CN 110275639 B CN110275639 B CN 110275639B CN 201910561908 A CN201910561908 A CN 201910561908A CN 110275639 B CN110275639 B CN 110275639B
Authority
CN
China
Prior art keywords
touch
data
sampling frequency
touch data
event
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.)
Active
Application number
CN201910561908.2A
Other languages
Chinese (zh)
Other versions
CN110275639A (en
Inventor
程杰
陈岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910561908.2A priority Critical patent/CN110275639B/en
Publication of CN110275639A publication Critical patent/CN110275639A/en
Application granted granted Critical
Publication of CN110275639B publication Critical patent/CN110275639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • G06F3/0418Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a touch data processing method, a touch data processing device, a terminal and a storage medium. The method is applied to the touch display screen and comprises the following steps: when the touch display screen is in a dormant state, if a first touch event is detected, acquiring n groups of touch data according to a first sampling frequency, wherein n is an integer greater than 1; the first sampling frequency is greater than the second sampling frequency, and the second sampling frequency is the sampling frequency adopted by the touch display screen in the awakening state; performing statistical processing on the n groups of touch data to obtain processing results corresponding to the n groups of touch data; and calculating touch coordinates corresponding to the first touch event according to processing results corresponding to the n groups of touch data. According to the technical scheme, more touch data are collected to carry out data verification, the occurrence probability of inaccurate touch coordinate calculation caused by external environment interference can be reduced, and the accuracy of the touch coordinate is improved.

Description

Touch data processing method and device, terminal and storage medium
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a touch data processing method and device, a terminal and a storage medium.
Background
At present, a user realizes man-machine interaction with a terminal through a touch display screen and physical keys of the terminal.
When a user performs a touch operation on a touch display screen, the touch display screen needs to report a touch coordinate of the touch operation to a Central Processing Unit (CPU) so that the CPU responds to the touch operation.
In the related art, a touch display screen acquires touch data when a touch operation is received, and then calculates the touch data to obtain a touch coordinate of the touch operation.
Disclosure of Invention
The embodiment of the application provides a touch data processing method, a touch data processing device, a terminal and a storage medium. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a touch data processing method, where the method is applied to a touch display screen, and the method includes:
when the touch display screen is in a dormant state, if a first touch event is detected, acquiring n groups of touch data according to a first sampling frequency, wherein n is an integer greater than 1; the first sampling frequency is greater than a second sampling frequency, and the second sampling frequency is a sampling frequency adopted when the touch display screen is in an awakening state;
performing statistical processing on the n groups of touch data to obtain processing results corresponding to the n groups of touch data;
and calculating touch coordinates corresponding to the first touch event according to processing results corresponding to the n groups of touch data.
On the other hand, an embodiment of the present application provides a touch data processing apparatus, where the apparatus is applied to a touch display screen, and the apparatus includes:
the data acquisition module is used for acquiring n groups of touch data according to a first sampling frequency if a first touch event is detected when the touch display screen is in a dormant state, wherein n is an integer greater than 1; the first sampling frequency is greater than a second sampling frequency, and the second sampling frequency is a sampling frequency adopted by the touch display screen in an awakening state;
the data processing module is used for carrying out statistical processing on the n groups of touch data to obtain processing results corresponding to the n groups of touch data;
and the coordinate calculation module is used for calculating the touch coordinate corresponding to the first touch event according to the processing result corresponding to the n groups of touch data.
In another aspect, an embodiment of the present application provides a terminal, where the terminal includes a processor and a memory, where the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the touch data processing method according to the above aspect.
In still another aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program is loaded and executed by a processor to implement the touch data processing method according to the above aspect.
The beneficial effects that technical scheme that this application embodiment brought include at least:
when the touch display screen is in a dormant state, if a touch event is detected, the sampling frequency for acquiring touch data is increased, so that more touch data can be acquired within the duration of the touch event, then the acquired touch data is subjected to statistical processing to obtain a processing result, data verification is performed through more touch data, the probability of inaccurate calculation of touch coordinates caused by external environment interference can be reduced, and the accuracy of the touch coordinates is increased.
Drawings
FIG. 1 is a flow chart of a touch data processing method provided by an embodiment of the present application;
FIG. 2 is a flow chart of a touch data processing method provided by another embodiment of the present application;
FIG. 3 is a flow chart of a touch data processing method provided by another embodiment of the present application;
FIG. 4 is a flow chart of a touch data processing method provided by another embodiment of the present application;
FIG. 5 is a block diagram of a touch data processing apparatus provided in one embodiment of the present application;
fig. 6 is a block diagram of a terminal shown in one embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the related art, when the touch display screen collects touch data, the touch display screen is interfered by an external environment, so that the calculated touch coordinate is not accurate enough. According to the technical scheme, when the touch display screen is in the dormant state, if the touch event is detected, the sampling frequency of collected touch data is improved, so that more touch data can be collected within the duration of the touch event, then the collected touch data are subjected to statistical processing to obtain a processing result, data verification is performed through more touch data, the probability of inaccurate calculation of touch coordinates caused by external environment interference can be reduced, and the accuracy of the touch coordinates is improved. In addition, the touch data can be subjected to statistical processing, abnormal data can be removed in the statistical processing process, and the accuracy of the touch coordinate can be improved.
According to the technical scheme provided by the embodiment of the application, the execution main body of each step can be a terminal or a touch display screen in the terminal. In the embodiments of the present application, only the main execution body of each step is taken as an example of a touch display screen.
Referring to fig. 1, a flowchart of a touch data processing method according to an embodiment of the present application is shown. The method can be applied to a touch display screen, and comprises the following steps:
step 101, when the touch display screen is in a sleep state, if a first touch event is detected, acquiring n groups of touch data according to a first sampling frequency, wherein n is an integer greater than 1.
If the touch display screen does not detect the touch event within a period of time, the touch display screen enters a sleep state. The first touch event refers to an event that a user performs a touch operation on the touch display screen. The value of N can be actually determined according to the magnitude of the first sampling frequency. The larger the first sampling frequency is, the larger the value of n is; the smaller the first sampling frequency is, the smaller the value of n is.
The first sampling frequency is greater than the second sampling frequency, and the second sampling frequency is the sampling frequency adopted when the touch display screen is in the awakening state. The sampling frequency refers to the frequency of touch data collected by the touch display screen. The first sampling frequency may be preset and limited, may also be actually set according to a current operating condition of the terminal, and may also be actually determined according to a signal type corresponding to a touch event, which is not limited in the embodiment of the present application.
In one possible implementation, the first sampling frequency includes a third sampling frequency and a fourth sampling frequency. The third sampling frequency is greater than the fourth sampling frequency. The third sampling frequency and the fourth sampling frequency may be set according to actual requirements, which is not limited in the embodiment of the present application. The n sets of touch data include third touch data and fourth touch data. The first touch data refers to touch data collected according to a third sampling frequency. The second touch data refers to touch data collected at a fourth sampling frequency.
Step 101 may comprise the following sub-steps: when the first touch event is detected, acquiring first touch data according to a third sampling frequency; and when the duration of the first touch event is detected to be longer than a second preset duration, acquiring second touch data according to a fourth sampling frequency.
The second preset time period may be set according to practical experience, which is not limited in the embodiment of the present application. The touch event with the longer duration may be any one of a long-press operation signal, a slide operation signal, and a drag operation signal. For a touch event with a long duration, the coordinates of the position where the user finger just starts to contact the touch display screen are touch coordinates needing important attention, taking a long-press operation signal as an example, the user finger keeps a certain time after contacting the touch display screen, and the coordinates of the position where the user finger just starts to contact the touch display screen are also touch coordinates corresponding to the long-press operation signal.
In the embodiment of the present application, for the touch event with longer duration, the terminal increases the sampling frequency when the terminal just starts to detect the touch event, so as to accurately locate the coordinates of the position where the finger of the user just contacts the touch display screen, and the subsequent touch display screen reduces the sampling frequency, so as to save the power consumption of the terminal.
As mentioned in the above embodiments, the touch event having a longer duration may also be a slide operation signal or a drag operation signal. The touch coordinates corresponding to the slide operation signal or the drag operation signal generally include a plurality of coordinates, and the coordinates of which the focus is on include the coordinates of the position where the user's finger has first contacted the touch display screen, as well as the coordinates of the position where the user's finger has last contacted the touch display screen. In this case, the touch display screen further performs the steps of: and detecting whether the fluctuation amplitude of the first touch data meets a preset condition, if so, executing the step of acquiring second touch data according to a fourth sampling frequency, and if not, not executing the step of acquiring the second touch data according to the fourth sampling frequency.
The preset condition may be that the fluctuation amplitude of the first touch data is in a small range. The pressing operation signal is generated after the finger of the user is kept in contact with the touch display screen for a certain time, and the sliding operation signal or the dragging operation signal is generated when the finger of the user is in contact with the touch display screen and slides on the touch display screen. Therefore, when the fluctuation amplitude of the touch data detected by the touch display screen is small, the long press operation signal is considered to be received; when the fluctuation amplitude of the touch data detected by the touch display screen is large, the sliding operation signal or the dragging operation signal is considered to be received. In this implementation, when the touch display screen detects that the sliding operation signal or the dragging operation signal is received, the touch data is still collected according to the increased sampling frequency, so that other coordinates except the coordinates of the position where the user finger has just contacted the touch display screen can be accurately located.
And 102, performing statistical processing on the n groups of touch data to obtain processing results corresponding to the n groups of touch data.
In the embodiment of the application, the touch display screen performs statistical processing on a plurality of groups of touch data acquired after the sampling frequency is increased to obtain corresponding processing results, and then calculates the touch coordinates according to the processing results.
Optionally, step 102 may include the following two substeps:
102a, screening n groups of touch data to obtain screened touch data;
the screening process is to remove abnormal data in the n sets of touch data. Anomalous data refers to data that is significantly unreasonable, such as data that differs significantly from other data.
Step 102a may be implemented as: detecting whether the touch data acquired by a first group in the n groups of touch data is abnormal data or not; and if the first group of the acquired touch data is abnormal data, removing the first acquired touch data to obtain the touch data after screening processing.
Because the touch display screen is in the dormant state, if a first touch event is detected, the touch display screen needs to be switched to the awakening state from the dormant state at the moment, and the touch display screen can be charged and discharged in the process, so that the collected touch data can be interfered by charging and discharging, and the touch data is not accurate enough. In this case, the touch display screen may detect whether a difference between the first group of acquired touch data and the subsequently acquired touch data is large, and if the difference is large, it indicates that the first group of acquired touch data is abnormal data and needs to be removed, and if the difference is small, it indicates that the first group of acquired touch data is not abnormal data and may be retained.
And step 102b, processing the touch data after the screening processing through a preset algorithm to obtain processing results corresponding to the n groups of touch data.
The preset algorithm may be any one of the following: the method includes a multiple data point approach point algorithm, a center point algorithm, a straight line fitting algorithm and the like, which are not limited in the embodiment of the application.
And 103, calculating touch coordinates corresponding to the first touch event according to processing results corresponding to the n groups of touch data.
And the touch display screen calculates touch coordinates corresponding to the first touch event according to the processing results corresponding to the n groups of touch data.
Referring to fig. 2, a flowchart of a touch data processing method according to an embodiment of the present application is shown. When a user clicks a touch screen for the first time, the touch screen improves the sampling rate of the touch screen, samples data for multiple times, verifies the data, detects whether the touch data are different greatly, discards the data with large errors if the touch data are different greatly, and performs algorithm optimization processing on the rest data; if not, directly carrying out algorithm optimization processing.
To sum up, the technical scheme provided by the embodiment of the application improves the sampling frequency of collecting touch data if a touch event is detected when the touch display screen is in a dormant state, so that more touch data can be collected within the duration of the touch event, then the collected touch data is subjected to statistical processing to obtain a processing result, and data verification is performed through more touch data, so that the occurrence probability of inaccurate touch coordinate calculation caused by external environment interference can be reduced, and the accuracy of the touch coordinate is improved.
In addition, the touch data can be subjected to statistical processing, abnormal data can be removed in the statistical processing process, and the accuracy of the touch coordinate can be improved.
In the embodiment of fig. 1, it is mentioned that the first sampling frequency may also be actually set according to the current operation condition of the terminal. This case will be explained below.
In an optional embodiment provided based on the embodiment shown in fig. 1, before step 102, the touch data acquisition method may further include the following steps: and receiving a first sampling frequency transmitted by an operating system.
The first sampling frequency is determined by the operating system according to the touch accuracy requirement. The touch precision requirement is used for indicating the precision requirement of the terminal on the touch coordinate. Optionally, the operating system divides the touch accuracy requirement into a plurality of levels, each level corresponding to a respective first sampling frequency. Illustratively, the touch accuracy requirements may include three levels, low, medium, and high. The first sampling frequency corresponding to the low touch precision requirement is the lowest, the first sampling frequency corresponding to the high touch precision requirement is the highest, and the first sampling frequency corresponding to the medium touch precision requirement is between the first sampling frequency and the medium touch precision requirement.
When the touch display screen detects a touch event, sending a frequency acquisition request to an operating system, determining a touch precision requirement level by the operating system according to running information of the terminal, then searching the corresponding relation between the first sampling frequency and the touch precision requirement level to obtain the first sampling frequency, and returning the first sampling frequency to the touch display screen.
The touch precision requirement is actually determined by an operating system according to the running information of the terminal, and the running information of the terminal comprises one or more of the following combinations: the method comprises the steps of operating the application programs in the foreground, operating scenes where the application programs in the foreground are operated, the number of operable objects included in a current display interface and the area of the operable objects.
The operable object refers to an object having a capability of responding to an operation signal, that is, when the terminal receives a trigger operation signal corresponding to the operable object, the terminal may respond to the trigger operation signal, for example, display a certain interface (e.g., a main interface of an application program, a next-level interface), and perform a certain function (e.g., turn on a flashlight, control a motion of a virtual object, etc.). The operable objects in the embodiment of the application can be provided by an operating system, such as application icons and function icons. The actionable objects in embodiments of the present application may also be provided by an application, such as a virtual control displayed in a user interface of the application, and so forth.
The more the number of operable objects included in the current display interface is, the higher the touch precision requirement is; the fewer the number of actionable objects that the current display interface includes, the lower the touch accuracy requirement. The smaller the area of the operable object is, the higher the touch precision requirement is; the larger the area of the operable object, the lower the touch accuracy requirement. The setting mode can reduce the false touch probability.
It should be noted that, when the operation information of the terminal includes at least two items, the operating system may quantize each item of operation information into a specific numerical value, set a corresponding coefficient, and then accumulate the products of the specific numerical value and the coefficient to obtain a result numerical value, where a level corresponding to the result numerical value is also a level corresponding to the touch precision requirement.
According to the technical scheme provided by the embodiment of the application, the touch precision requirement can be determined according to the operation information of the terminal, the first sampling frequency is further determined according to the touch precision requirement, and the first sampling frequency can be flexibly determined by combining the operation information of the terminal.
Referring to fig. 3, a flowchart of a touch data processing method according to an embodiment of the present application is shown. The method is applied to the touch display screen, and can comprise the following steps:
step 101, when the touch display screen is in a sleep state, if a first touch event is detected, acquiring n groups of touch data according to a first sampling frequency, wherein n is an integer greater than 1.
The first sampling frequency is greater than the second sampling frequency, and the second sampling frequency is the sampling frequency adopted when the touch display screen is in the awakening state.
And 102, performing statistical processing on the n groups of touch data to obtain processing results corresponding to the n groups of touch data.
And 103, calculating touch coordinates corresponding to the first touch event according to processing results corresponding to the n groups of touch data.
Step 304, when the second touch event is detected, determining a touch range corresponding to the second touch event according to the touch coordinate corresponding to the first touch event.
The time interval between the occurrence time of the second touch event and the occurrence time of the first touch event is less than a first preset time, and the occurrence time of the second touch event is later than the occurrence time of the first touch event.
In a possible implementation manner, the touch display screen sets a region, which takes the touch coordinate corresponding to the first touch event as a center and has an area of a preset area, as a touch range corresponding to the second touch event. The preset area can be set according to actual requirements, and the embodiment of the application does not limit the preset area.
In another possible implementation manner, the terminal displays a designated user interface after responding to the first touch event, the designated user interface has an operable object, and the touch display screen sets a preset range including the operable object as a touch range corresponding to the second touch event.
In another possible implementation manner, a plurality of operable objects exist in the designated user interface, the trigger probabilities corresponding to the operable objects are different, the touch display screen determines a target operable object whose trigger probability meets a preset condition, and then a preset range including the target operable object is set as a touch range corresponding to the second touch event. The preset condition may be that the trigger probability is first n bits, or the trigger probability is greater than the preset probability, and so on.
In another possible implementation manner, the touch display screen determines the touch range corresponding to the second touch event through a deep learning model. And the touch display screen transmits the touch coordinate corresponding to the first touch event to an operating system, and the operating system inputs the touch coordinate corresponding to the first touch event into a deep learning model to obtain a touch range corresponding to a second touch event. The deep learning model is obtained by training a deep learning network through a plurality of sample touch coordinates, and the sample touch coordinates correspond to the marked touch range.
Step 305, performing screening processing on the touch data corresponding to the second touch event according to the touch range corresponding to the second touch event to obtain the touch data corresponding to the second touch event after the screening processing.
The touch data corresponding to the second touch event refers to touch data acquired when the second touch event is detected by touch. In the embodiment of the application, if the touch data corresponding to the second touch event has touch data which does not belong to the touch range, the touch data which does not belong to the touch range is removed, so that interference can be eliminated, and the accuracy of the touch coordinate is improved.
And step 306, calculating touch coordinates corresponding to the second touch event according to the touch data corresponding to the screened second touch event.
According to the technical scheme provided by the embodiment of the application, after the touch coordinate corresponding to the first touch event is calculated, if the second touch event is detected in a short time, the touch range corresponding to the second touch event is firstly determined according to the touch coordinate corresponding to the first touch event, and the touch data corresponding to the second touch event is screened by utilizing the touch range, so that interference can be eliminated, and the accuracy of the touch coordinate is improved.
Referring to fig. 4, a flowchart of a touch data processing method according to an embodiment of the present application is shown. The method may comprise the steps of:
step 401, when a touch event is detected, sending inquiry information to an operating system.
The query information is used for querying whether an operable object exists in the current display interface. The operable object refers to an object having a capability of responding to an operation signal. Correspondingly, the operating system receives the query information, detects whether an operable object exists in the current display interface according to the query information, obtains reply information, and returns the reply information to the touch display screen.
The operating system can detect whether an operable object exists in the current display interface through the following two implementation modes: in a possible implementation manner, the operating system detects whether the current display interface is a designated interface, and if the current display interface is the designated interface, the current display interface does not include an operable object; and if the current display interface is not the designated interface, the current display interface comprises the operable object. The designated interface can be a video playing interface or an electronic book reading interface. In other possible implementation manners, the operating system may further obtain attribute information of each UI element included in the current display interface from a rendering process of the current display interface, and detect whether an operable object exists in the current display interface according to the attribute information of each UI element.
Step 402, receiving reply information returned by the operating system.
In step 403, if the reply information is used to indicate that an operable object exists in the current display interface, acquiring n sets of touch data according to a first sampling frequency.
If the reply information is used for indicating that no operable object exists in the current display interface, the step of collecting n groups of touch data according to the first sampling frequency is not executed, that is, the technical scheme provided by the embodiment of the application is not executed.
When the current display interface does not include the operable object, the action range of the touch operation performed by the user is generally the whole touch display screen, and at this time, the requirement on the accuracy of the touch coordinate is low, the touch display screen determines whether to increase the sampling frequency according to the attribute so as to increase the calculation accuracy of the touch coordinate, if the current display interface includes the operable object, the sampling frequency is increased, and if the current display interface does not include the operable object, the sampling frequency is not increased.
By the method, two aspects of power consumption of the terminal, calculation accuracy of the touch coordinate and the like can be considered, the sampling frequency is not increased when the accuracy requirement on the touch coordinate is low so as to save power consumption, and the sampling frequency is increased when the calculation accuracy requirement on the touch coordinate is high so as to improve the calculation accuracy of the touch coordinate.
And step 404, performing statistical processing on the n groups of touch data to obtain processing results corresponding to the n groups of touch data.
Step 405, calculating touch coordinates corresponding to the first touch event according to the processing results corresponding to the n groups of touch data.
In summary, according to the technical scheme provided by the embodiment of the application, the sampling frequency of the collected touch data is increased when the operable object exists in the current display interface, so that the calculation accuracy of the touch coordinate is improved, and the probability of false triggering is reduced; and touch data are collected according to the original sampling frequency when no operable object exists in the current display interface, so that the power consumption of the terminal is saved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 5, a block diagram of a touch data processing apparatus according to an embodiment of the present application is shown. The device is applied to the touch display screen, has the functions of realizing the method examples, and can be realized by hardware or hardware executing corresponding software. The apparatus may include: the system comprises a data acquisition module 501, a data processing module 502 and a coordinate calculation module 503.
The data acquisition module 501 is configured to, when the touch display screen is in a sleep state, acquire n sets of touch data according to a first sampling frequency if a first touch event is detected, where n is an integer greater than 1; the first sampling frequency is greater than a second sampling frequency, and the second sampling frequency is a sampling frequency adopted when the touch display screen is in an awakening state.
The data processing module 502 is configured to perform statistical processing on the n groups of touch data to obtain processing results corresponding to the n groups of touch data.
And a coordinate calculation module 503, configured to calculate touch coordinates corresponding to the first touch event according to processing results corresponding to the n sets of touch data.
In an optional embodiment provided based on the embodiment shown in fig. 5, the data processing module 502 is configured to:
screening the n groups of touch data to obtain screened touch data;
processing the touch data after the screening processing through a preset algorithm to obtain processing results corresponding to the n groups of touch data, wherein the preset algorithm is at least one of the following: a multiple data point approach point algorithm, a center point algorithm, and a line fitting algorithm.
Optionally, the data processing module 502 is configured to:
detecting whether the touch data collected by a first group in the n groups of touch data is abnormal data;
and if the first group of acquired touch data is the abnormal data, removing the first acquired touch data to obtain the touch data after screening processing.
In an optional embodiment provided based on the embodiment shown in fig. 5, the apparatus further comprises:
the range determining module is used for determining a touch range corresponding to a second touch event according to the touch coordinate corresponding to the first touch event when the second touch event is detected, wherein the time interval between the occurrence time of the second touch event and the occurrence time of the first touch event is less than a first preset time length, and the occurrence time of the second touch event is later than the occurrence time of the first touch event.
The data processing module 502 is further configured to perform screening processing on the touch data corresponding to the second touch event according to the touch range corresponding to the second touch event, so as to obtain the touch data corresponding to the second touch event after the screening processing.
The coordinate calculation module 503 is further configured to calculate a touch coordinate corresponding to the second touch event according to the touch data corresponding to the second touch event after the screening processing.
In an alternative embodiment provided based on the embodiment shown in fig. 5, the first sampling frequency includes a third sampling frequency and a fourth sampling frequency, the third sampling frequency is greater than the fourth sampling frequency, and the n sets of touch data include first touch data and second touch data; the data acquisition module 501 is configured to:
when the first touch event is detected, acquiring the first touch data according to the third sampling frequency;
and when the duration of the first touch event is detected to be longer than a second preset duration, acquiring second touch data according to the fourth sampling frequency.
In an optional embodiment provided based on the embodiment shown in fig. 5, the apparatus further includes:
the information sending module is used for sending inquiry information to the operating system, wherein the inquiry information is used for inquiring whether an operable object exists in the current display interface, and the operable object refers to an object with the capability of responding to an operation signal.
And the information receiving module is used for receiving reply information returned by the operating system.
The data acquisition module 501 is further configured to:
if the reply information is used for indicating that the operable object exists in the current display interface, executing the step of collecting n groups of touch data according to a first sampling frequency;
and if the reply information is used for indicating that the operable object does not exist in the current display interface, the step of collecting n groups of touch data according to the first sampling frequency is not executed.
In an optional embodiment provided based on the embodiment shown in fig. 5, the apparatus further comprises:
a frequency receiving module, configured to receive the first sampling frequency sent by an operating system, where the first sampling frequency is determined by the operating system according to a touch precision requirement, the touch precision requirement is actually determined by the operating system according to operation information of a terminal, and the operation information of the terminal includes one or more of the following combinations: the method comprises the steps of a foreground running application program, a running scene where the foreground running application program is located, the number of operable objects included in a current display interface and the area of the operable objects.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Referring to fig. 6, a block diagram of a terminal according to an exemplary embodiment of the present application is shown. A terminal in the present application may include one or more of the following components: a processor 610 and a memory 620.
Processor 610 may include one or more processing cores. The processor 610 connects various parts within the overall terminal using various interfaces and lines, performs various functions of the terminal and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 620, and calling data stored in the memory 620. Alternatively, the processor 610 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 610 may integrate one or a combination of a Central Processing Unit (CPU) and a modem. Wherein, the CPU mainly processes an operating system, an application program and the like; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 610, but may be implemented by a single chip.
Alternatively, the processor 610, when executing the program instructions in the memory 620, implements the touch data processing method provided by the various method embodiments described below.
The Memory 620 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 620 includes a non-transitory computer-readable medium. The memory 620 may be used to store instructions, programs, code sets, or instruction sets. The memory 620 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, and the like; the storage data area may store data created according to the use of the terminal, and the like.
The structure of the terminal described above is only illustrative, and in actual implementation, the terminal may include more or less components, such as: a display screen, etc., which are not limited in this embodiment.
Those skilled in the art will appreciate that the configuration shown in fig. 6 is not intended to be limiting of terminal 600 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, a computer-readable storage medium is also provided, in which a computer program is stored, the computer program being loaded and executed by a processor of a terminal to implement the steps in the above-described method embodiments.
In an exemplary embodiment, a computer program product is also provided for implementing the functions of the individual steps in the above-described method embodiments when the computer program product is executed.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (7)

1. A touch data processing method is applied to a touch display screen, and comprises the following steps:
when the touch display screen is in a dormant state, if a first touch event is detected, acquiring n groups of touch data according to a first sampling frequency, wherein n is an integer greater than 1; the first sampling frequency is greater than a second sampling frequency, and the second sampling frequency is a sampling frequency adopted by the touch display screen in an awakening state;
detecting whether a first group of acquired touch data in the n groups of touch data is abnormal data or not based on a data difference between the first group of acquired touch data and subsequently acquired touch data;
if the first group of acquired touch data is the abnormal data, removing the first group of acquired touch data to obtain touch data after screening processing;
processing the touch data after screening processing through a preset algorithm to obtain processing results corresponding to the n groups of touch data;
calculating touch coordinates corresponding to the first touch event according to processing results corresponding to the n groups of touch data;
when a second touch event is detected, determining a touch range corresponding to the second touch event according to a preset range of an operable object in a user interface, wherein the user interface is an interface displayed in response to the first touch event, a time interval between occurrence time of the second touch event and occurrence time of the first touch event is less than a first preset time length, the occurrence time of the second touch event is later than the occurrence time of the first touch event, and the operable object refers to an object with the capability of responding to an operation signal;
removing touch data which do not belong to the touch range in the touch data corresponding to the second touch event to obtain touch data corresponding to the second touch event after screening processing;
and calculating touch coordinates corresponding to the second touch event according to the touch data corresponding to the second touch event after the screening processing.
2. The method of claim 1, wherein the first sampling frequency comprises a third sampling frequency and a fourth sampling frequency, wherein the third sampling frequency is greater than the fourth sampling frequency, and wherein the n sets of touch data comprise first touch data and second touch data;
the acquiring n groups of touch data according to the first sampling frequency comprises:
when the first touch event is detected, acquiring the first touch data according to the third sampling frequency;
and when the duration of the first touch event is detected to be longer than a second preset duration, acquiring second touch data according to the fourth sampling frequency.
3. The method of claim 1, wherein prior to collecting the n sets of touch data at the first sampling frequency, further comprising:
sending query information to an operating system, wherein the query information is used for querying whether an operable object exists in a current display interface, and the operable object refers to an object with the capability of responding to an operation signal;
receiving reply information returned by the operating system;
if the reply information is used for indicating that the operable object exists in the current display interface, executing the step of collecting n groups of touch data according to a first sampling frequency;
and if the reply information is used for indicating that the operable object does not exist in the current display interface, the step of collecting n groups of touch data according to the first sampling frequency is not executed.
4. The method of claim 1, wherein prior to collecting the n sets of touch data at the first sampling frequency, further comprising:
receiving the first sampling frequency sent by an operating system, wherein the first sampling frequency is determined by the operating system according to a touch precision requirement, the touch precision requirement is actually determined by the operating system according to running information of a terminal, and the running information of the terminal comprises one or more of the following combinations: the method comprises the steps of a foreground running application program, a running scene where the foreground running application program is located, the number of operable objects included in a current display interface and the area of the operable objects.
5. A touch data processing apparatus, wherein the apparatus is applied to a touch display screen, the apparatus comprising:
the data acquisition module is used for acquiring n groups of touch data according to a first sampling frequency if a first touch event is detected when the touch display screen is in a dormant state, wherein n is an integer greater than 1; the first sampling frequency is greater than a second sampling frequency, and the second sampling frequency is a sampling frequency adopted by the touch display screen in an awakening state;
the data processing module is used for detecting whether the first group of acquired touch data is abnormal data or not based on the data difference between the first group of acquired touch data and the touch data acquired subsequently in the n groups of touch data; if the touch data acquired by the first group are the abnormal data, removing the touch data acquired by the first group to obtain touch data after screening; processing the touch data after screening processing through a preset algorithm to obtain processing results corresponding to the n groups of touch data;
the coordinate calculation module is used for calculating touch coordinates corresponding to the first touch event according to processing results corresponding to the n groups of touch data;
the range determining module is used for determining a touch range corresponding to a second touch event according to a preset range of an operable object in a user interface when the second touch event is detected, wherein the user interface is an interface displayed in response to the first touch event, a time interval between the occurrence time of the second touch event and the occurrence time of the first touch event is less than a first preset time length, the occurrence time of the second touch event is later than the occurrence time of the first touch event, and the operable object refers to an object with the capability of responding to an operation signal;
the data processing module is further configured to remove touch data that does not belong to the touch range from the touch data corresponding to the second touch event, so as to obtain touch data corresponding to the second touch event after the screening processing;
and the coordinate calculation module is further configured to calculate a touch coordinate corresponding to the second touch event according to the touch data corresponding to the second touch event after the screening processing.
6. A terminal, characterized in that the terminal comprises a processor and a memory, the memory storing a computer program which is loaded and executed by the processor to implement the touch data processing method according to any of claims 1 to 4.
7. A computer-readable storage medium, in which a computer program is stored which is loaded and executed by a processor to implement the touch data processing method according to any one of claims 1 to 4.
CN201910561908.2A 2019-06-26 2019-06-26 Touch data processing method and device, terminal and storage medium Active CN110275639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910561908.2A CN110275639B (en) 2019-06-26 2019-06-26 Touch data processing method and device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910561908.2A CN110275639B (en) 2019-06-26 2019-06-26 Touch data processing method and device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110275639A CN110275639A (en) 2019-09-24
CN110275639B true CN110275639B (en) 2023-03-28

Family

ID=67963361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910561908.2A Active CN110275639B (en) 2019-06-26 2019-06-26 Touch data processing method and device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110275639B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782122B (en) * 2020-05-21 2021-09-10 北京达佳互联信息技术有限公司 Method, device, terminal and storage medium for responding to user operation
CN111672115B (en) * 2020-06-05 2022-09-23 腾讯科技(深圳)有限公司 Virtual object control method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140062646A (en) * 2012-11-14 2014-05-26 엘지디스플레이 주식회사 Method for controlling transmission of touch coordinates and touch screen device using the same
CN104035608A (en) * 2013-03-08 2014-09-10 宏碁股份有限公司 Touch panel sampling frequency adjusting device and method
CN105700668A (en) * 2016-03-04 2016-06-22 华为技术有限公司 Method for processing data collected by touch screen and terminal equipment
CN109766027A (en) * 2019-01-23 2019-05-17 深圳市皓丽智能科技有限公司 A kind of click event triggering method, system and touch one-piece machine and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI442279B (en) * 2011-07-18 2014-06-21 Acer Inc Multiple sampling rate circuits and methods

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140062646A (en) * 2012-11-14 2014-05-26 엘지디스플레이 주식회사 Method for controlling transmission of touch coordinates and touch screen device using the same
CN104035608A (en) * 2013-03-08 2014-09-10 宏碁股份有限公司 Touch panel sampling frequency adjusting device and method
CN105700668A (en) * 2016-03-04 2016-06-22 华为技术有限公司 Method for processing data collected by touch screen and terminal equipment
CN109766027A (en) * 2019-01-23 2019-05-17 深圳市皓丽智能科技有限公司 A kind of click event triggering method, system and touch one-piece machine and storage medium

Also Published As

Publication number Publication date
CN110275639A (en) 2019-09-24

Similar Documents

Publication Publication Date Title
CN108021259B (en) False touch prevention method and electronic equipment
CN105468247B (en) Working mode switching method and mobile terminal
CN107132986B (en) Method and device for intelligently adjusting touch response area through virtual keys
CN109685092B (en) Clustering method, equipment, storage medium and device based on big data
CN110955584B (en) Block device access tracking method and device, storage medium and terminal
CN110275639B (en) Touch data processing method and device, terminal and storage medium
CN107015797A (en) Application integrating display methods and application integrating display device
CN107634901B (en) Session expression pushing method and device and terminal equipment
CN111913848A (en) Data monitoring and analyzing method and related equipment
CN107037951B (en) Automatic operation mode identification method and terminal
CN113778255B (en) Touch recognition method and device
CN107992361B (en) Background application cleaning method and device, storage medium and electronic equipment
CN108604142B (en) Touch screen device operation method and touch screen device
CN113126815A (en) Key response control method and device, terminal equipment and storage medium
CN103543933A (en) Method for selecting files and touch terminal
CN109710111B (en) False touch prevention method and electronic equipment
CN107943536B (en) Method and device for adjusting threshold, storage medium and electronic equipment
CN110955486B (en) File caching efficiency tracking method and device, storage medium and terminal
CN107797924B (en) SQL script abnormity detection method and terminal thereof
CN116095534A (en) Method, device and storage medium for collecting test equipment data
CN105159555A (en) User equipment control method and user equipment
CN111765899B (en) Step counting judgment method and device and computer readable storage medium
CN111399746B (en) Split screen display method and device, mobile terminal and computer readable storage medium
CN113031814A (en) Touch event reporting method and device, terminal and storage medium
CN112367428A (en) Electric quantity display method and system, storage medium and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant