Touch data processing method and apparatus, electronic device, and medium
By employing self-capacitive scanning for initial scanning on the touchscreen and mutual capacitive scanning when touch positions do not match, the problem of high power consumption during long presses in electronic devices is solved, thus reducing power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2026-03-27
AI Technical Summary
Electronic devices consume a lot of power when the user presses and holds the touch screen, as they continuously perform mutual capacitance scanning to obtain touch data.
The touchscreen is initially scanned using a self-capacitance scanning method to obtain the first touch position. When the first touch position and the second touch position do not match, the target touch data is obtained using a mutual capacitance scanning method and reported to the processor. The second touch position is scanned earlier than the first touch position.
This reduces the number of times electronic devices initiate mutual capacitance scanning and report touch data to the processor, thereby reducing the power consumption of electronic devices.
Smart Images

Figure CN115756203B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic technology, specifically relating to a touch data processing method, apparatus, electronic device, and medium. Background Technology
[0002] Typically, when a user uses their finger to input on the touchscreen of an electronic device, the electronic device can control the touchscreen's integrated circuit (IC) to be in a wake-up state. In this way, the touchscreen's IC can scan the touchscreen using self-capacitance scanning and mutual capacitance scanning methods, and report the touch data of the input position obtained by scanning to the processor, so that the processor can execute the operation corresponding to the touch data.
[0003] However, since users may use their fingers to press and hold on the touchscreen, the electronic device will continuously perform mutual capacitance scanning to obtain touch data at the input position and continuously report the touch data obtained from the mutual capacitance scanning to the processor.
[0004] This results in high energy consumption for electronic devices. Summary of the Invention
[0005] The purpose of this application is to provide a touch data processing method, apparatus, electronic device, and medium that can solve the problem of high power consumption when electronic devices process touch data.
[0006] To solve the above-mentioned technical problems, this application is implemented as follows:
[0007] In a first aspect, embodiments of this application provide a touch data processing method, the method comprising: scanning the touch screen of an electronic device in a self-capacitive scanning manner to obtain a first touch position; in the case that the first touch position and the second touch position do not match, scanning the touch screen of the electronic device in a mutual capacitive scanning manner to obtain target touch data, and reporting the target touch data to the processor of the electronic device; wherein the time at which the second touch position is obtained is earlier than the time at which the first touch position is obtained.
[0008] Secondly, embodiments of this application provide a touch data reporting device, which includes: a scanning module and a processing module; the scanning module is used to scan the touch screen of an electronic device in a self-capacitive scanning manner to obtain a first touch position; the processing module is used to scan the touch screen of the electronic device in a mutual capacitive scanning manner when the first touch position and the second touch position obtained by the scanning module do not match, to obtain target touch data, and to report the target touch data to the processor of the electronic device; wherein the time when the second touch position is obtained is earlier than the time when the first touch position is obtained.
[0009] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions implementing the steps of the method as described in the first aspect when executed by the processor.
[0010] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, and when the program or instructions are executed by a processor, they implement the steps of the method as described in the first aspect.
[0011] Fifthly, embodiments of this application provide a chip, which includes a processor and a communication interface, the communication interface and the processor being coupled together, the processor being used to run programs or instructions to implement the steps of the method as described in the first aspect.
[0012] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the method as described in the first aspect.
[0013] In this embodiment, the electronic device can scan its touchscreen using self-capacitance scanning to obtain a first touch position. If the first and second touch positions do not match, it can scan the touchscreen using mutual capacitance scanning to obtain target touch data, which is then reported to the processor. The second touch position is obtained earlier than the first touch position. Since the electronic device only acquires touch data via mutual capacitance scanning when the first and second touch positions do not match (i.e., mutual capacitance scanning is only initiated when the touch position changes), and the touch data obtained from mutual capacitance scanning is reported to the processor, the number of times mutual capacitance scanning is initiated and the number of times touch data is reported to the processor can be reduced. Therefore, the power consumption of the electronic device can be reduced. Attached Figure Description
[0014] Figure 1 This is one of the schematic diagrams illustrating a Tx self-capacity scanning method provided in the embodiments of this application;
[0015] Figure 2 This is one of the schematic diagrams illustrating an example of an Rx self-capacity scanning method provided in the embodiments of this application;
[0016] Figure 3 This is one of the schematic diagrams illustrating a mutual capacitance scanning method provided in the embodiments of this application;
[0017] Figure 4 This is one of the flowcharts illustrating a touch data processing method provided in an embodiment of this application;
[0018] Figure 5 This is one of the schematic diagrams illustrating a touch data processing method provided in an embodiment of this application;
[0019] Figure 6 This is a schematic diagram of the structure of a touch data processing device provided in an embodiment of this application;
[0020] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0021] Figure 8 This is a hardware schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0023] The following will explain the terminology used in the embodiments of this application.
[0024] 1. Self-capacity scanning method and mutual capacity scanning method
[0025] In existing technologies, capacitive touchscreens (hereinafter referred to as capacitive screens) have become a common input device widely used in mobile terminals such as mobile phones and tablets. Currently, there are two main scanning methods for capacitive screens: self-capacitive scanning and mutual capacitive scanning. Most capacitive mobile terminals currently use a hybrid self-capacitive and mutual capacitive screen, meaning they can use both self-capacitive and mutual capacitive scanning methods. The working principles of self-capacitive scanning and mutual capacitive scanning will be explained with examples below.
[0026] The transmit (Tx) and receive (Rx) ports of the sensors on the touchscreen of a mobile terminal are interspersed, assuming that Tx is distributed vertically and Rx is distributed horizontally.
[0027] For example, the self-capacitive scanning method of Tx is as follows: each Tx outputs a scanning waveform simultaneously, and then an analog-to-digital converter is used to acquire the electrical signals on the Tx. The scanning waveform can be any of the following: square wave, sine wave, etc.
[0028] For example, such as Figure 1 As shown, taking the Tx self-capacitance scanning method as an example, each Tx simultaneously outputs scanning waveform 11 (i.e., coding waveform). When a finger 12 touches the touchscreen 13, the sampling result 10 on the corresponding Tx of the touchscreen 13 will change (the change result is as follows). Figure 1 The sampling results are shown in Figure 10. Then, based on the changes in the electrical signals on each Tx, the touchscreen can calculate the lateral position of the finger on the touchscreen using the center of gravity algorithm.
[0029] For example, the self-capacitive scanning method of Rx is as follows: each Rx outputs a scanning waveform simultaneously, and then an analog-to-digital converter is used to acquire the electrical signals on the Rx. The scanning waveform can be a square wave, a sine wave, etc.
[0030] For example, such as Figure 2 As shown, taking the self-capacitive scanning method of Rx as an example, each Rx simultaneously outputs scanning waveform 21 (i.e., coding waveform). When a finger 22 presses on the touch screen 23 for touch input, the sampling result 20 on the corresponding Rx of the touch screen 23 sensor will change (the change result is as follows). Figure 2 (As shown in sampling result 20), then the touch screen 23 can calculate the vertical position of the finger on the touch screen based on the change in electrical signal on each Rx, through the center of gravity algorithm, etc.
[0031] For example, the mutual capacitance scanning method is as follows: Tx is the output terminal of the coding signal, and Rx is connected to the sampler and serves as the signal acquisition terminal. Within the same scanning period T, only one Tx can output the coding waveform. After the coding of the Tx is completed in the current period, Rx samples the signals emitted by all Tx terminals; then the next Tx codes, and Rx samples again. After X periods, the sampling of one mutual capacitance scan is completed.
[0032] For example, such as Figure 3 As shown, taking the scanning of the touch screen by mutual capacitance scanning as an example, in cycle 0-1, the waveform output on Tx0 is coded and transmitted, and then the sampler samples the signals on all Rx. Then, the next cycle 1-2 is entered, the waveform on Tx1 is coded and transmitted, and then the sampler samples the signals on all Rx. Then the next cycle is entered, and so on. After 7 cycles, one mutual capacitance sampling is completed.
[0033] 2. Other terms
[0034] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0035] The touch data reporting method, device, electronic device, and medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0036] Normally, when a user uses their finger to input data on the touchscreen of an electronic device, the device can keep the touch IC of the touchscreen in a wake-up state. The touch IC can then scan the touchscreen using self-capacitance scanning and mutual capacitance scanning methods, reporting the touch data of the input position to the processor. The processor can then execute the operation corresponding to that touch data. However, because users may use their fingers to long-press on the touchscreen, the input position may not change, meaning the touch data at the input position remains the same. Nevertheless, the electronic device will still perform a mutual capacitance scan after each self-capacitance scan to obtain the touch data of the input position, and report the same touch data from multiple scans to the processor. This results in higher power consumption for the electronic device.
[0037] However, in this embodiment, the electronic device can scan its touchscreen using a self-capacitance scanning method to obtain a first touch position; and if the first touch position and the second touch position do not match, it can scan the touchscreen using a mutual capacitance scanning method to obtain target touch data, thereby reporting the target touch data to the processor of the electronic device; wherein, the time when the second touch position is obtained is earlier than the time when the first touch position is obtained. Since the electronic device can only obtain touch data through mutual capacitance scanning when the first and second touch positions obtained by self-capacitance scanning do not match, that is, only when the touch position at the input location changes, and report the touch data obtained by mutual capacitance scanning to the processor, the number of times the electronic device initiates mutual capacitance scanning can be reduced, and the electronic device can avoid reporting the same touch data obtained by mutual capacitance scanning to the processor. Therefore, the power consumption of the electronic device can be reduced.
[0038] The touch data reporting method provided in this application is executed by a touch data processing device. This touch data processing device can be an electronic device, or it can be a control unit or module within the electronic device. This application does not limit this. The following will describe the technical solution provided in this application using an electronic device as an example.
[0039] This application provides a touch data processing method, such as... Figure 4 As shown, the touch data processing method may include the following steps 201 and 202.
[0040] Step 201: Scan the touch screen of the electronic device using a self-capacitive scanning method to obtain the first touch position.
[0041] For example, when a user's finger performs touch input on the touchscreen of an electronic device, the electronic device can periodically scan the touchscreen using a self-scanning method to obtain a first touch position. Here, the first touch position is the touch position obtained by the electronic device at the current moment.
[0042] Specifically, the number of the aforementioned first touch locations can be one or more.
[0043] Specifically, the aforementioned self-capacitance scanning methods include at least one of the following: Transmitter (Tx) self-capacitance scanning method, Receiver (Rx) self-capacitance scanning method, etc.
[0044] For example, the above-mentioned "Tx self-capacitance scanning method" can be understood as: a scanning method that collects electrical signals on each Tx of the touch screen through the touch integrated circuit IC (hereinafter referred to as the touch IC). The above-mentioned "Rx self-capacitance scanning method" can be understood as: a scanning method that collects electrical signals on each Rx of the touch screen through the touch IC.
[0045] For example, the aforementioned first touch position can specifically be a first touch coordinate. This first touch coordinate is calculated based on first touch data, which is touch data of the finger touch point collected by the electronic device via the touch IC at the current moment.
[0046] Specifically, when there is only one first touch position, there is also only one first touch coordinate; when there are multiple first touch positions, there are also multiple first touch coordinates.
[0047] Optionally, in this embodiment of the application, the first touch coordinates include horizontal coordinates and vertical coordinates.
[0048] In one example, assuming there is one first touch position, the first touch position includes a first touch coordinate, the horizontal coordinate of the first touch coordinate is X, and the vertical coordinate is Y.
[0049] In another example, suppose there are multiple first touch positions, each comprising multiple first touch coordinates, for example, p first touch coordinates. The first first touch coordinate has a horizontal coordinate of X1 and a vertical coordinate of Y1, the second first touch coordinate has a horizontal coordinate of X2 and a vertical coordinate of Y2, the third first touch coordinate has a horizontal coordinate of X3 and a vertical coordinate of Y3, and so on. The electronic device can sort the horizontal coordinates of the p first touch coordinates in a preset order to obtain the horizontal coordinates of the first touch position as (X1, X2, ..., Xp), and sort the horizontal coordinates of the p first touch coordinates in a preset order to obtain the vertical coordinates of the first touch position as (Y1, Y2, ..., Yp). That is, the horizontal coordinates of the first touch position are (X1, X2, ..., Xp), and the vertical coordinates are (Y1, Y2, ..., Yp); where p is a positive integer greater than 1.
[0050] Specifically, the preset order can be any of the following: coordinate values in ascending order, or coordinate values in descending order.
[0051] Optionally, in the embodiments of this application, step 201 can be implemented by the following steps 201a and 201b.
[0052] Step 201a: Scan the touch screen using the touch IC of the touch screen in a self-capacitive scanning manner to obtain the first touch data.
[0053] For example, the first touch data described above is used to indicate the amount of change in the electrical signal of the finger touch point on Tx or Rx at the current moment.
[0054] Step 201b: Calculate the first touch position based on the first touch data.
[0055] The first touch data and the first touch position are in one-to-one correspondence.
[0056] For example, the above calculation method can be a method such as calculating the centroid. For the method of calculating the centroid, please refer to the specific description in related technologies; it will not be repeated here in the embodiments of this application.
[0057] It should be noted that electronic devices can determine the first touch position corresponding to the first touch data based on the first touch data collected by the touch IC of the touch screen.
[0058] Step 202: If the first touch position and the second touch position do not match, scan the touch screen of the electronic device using the mutual capacitance scanning method to obtain the target touch data, and report the target touch data to the processor of the electronic device.
[0059] The second touch position is obtained earlier than the first touch position.
[0060] For example, the second touch position can be a touch position obtained by scanning the touch screen using a self-capacitance scanning method, or it can be a touch position obtained by scanning the touch screen using a mutual capacitance scanning method.
[0061] Specifically, the number of the aforementioned second touch locations can be one or more.
[0062] For example, the aforementioned second touch position can specifically be a second touch coordinate. This second touch coordinate is calculated based on second touch data, which is touch data of a finger touch point collected by the electronic device via a touch IC at a first moment, the first moment being earlier than the moment the first touch data was collected.
[0063] Specifically, when there is only one second touch position, there is also only one second touch coordinate; when there are multiple second touch positions, there are also multiple second touch coordinates.
[0064] Optionally, in this embodiment of the application, the second touch coordinates include horizontal coordinates and vertical coordinates.
[0065] In one example, assuming there is one second touch position, the second touch position includes a second touch coordinate, the horizontal coordinate of the second touch coordinate is X, and the vertical coordinate is Y.
[0066] In another example, suppose there are multiple second touch positions, each comprising multiple second touch coordinates. For instance, j second touch coordinates, where the first second touch coordinate has a horizontal coordinate of X′1 and a vertical coordinate of Y′1, the second second touch coordinate has a horizontal coordinate of X′2 and a vertical coordinate of Y′2, the third second touch coordinate has a horizontal coordinate of X′3 and a vertical coordinate of Y′3, and so on. Then the electronic device can... The horizontal coordinates of the j second touch coordinates are sorted in a preset order to obtain the horizontal coordinates of the second touch position as (X′1, X′2, ..., X′j). The horizontal coordinates of the j second touch coordinates are also sorted in a preset order to obtain the vertical coordinates of the second touch position as (Y′1, Y′2, ..., Y′j). That is, the horizontal coordinates of the second touch position are (X′1, X′2, ..., X′j), and the vertical coordinates are (Y′1, Y′2, ..., Y′j); j is a positive integer greater than 1.
[0067] Specifically, the preset order can be either from smallest to largest or from largest to smallest.
[0068] For example, the moment when the second touch position is obtained by scanning is the previous scan moment when the first touch position is obtained within the scanning cycle of the electronic device scanning the touch screen of the electronic device.
[0069] For example, the above-mentioned "mismatch between the first touch position and the second touch position" can be any of the following: the distance between the first touch position and the second touch position is greater than or equal to a first preset threshold, or the difference between the first pressure parameter corresponding to the first touch position and the second pressure parameter corresponding to the second touch position is greater than or equal to a second preset threshold.
[0070] It is understandable that if the first touch position and the second touch position do not match, it can be assumed that the input position of the finger on the touch screen has changed.
[0071] It is understandable that the electronic device can determine whether to enable the mutual capacitance scanning method to scan the touch screen based on whether the first touch position and the second touch position match, obtain touch data, and report the touch data obtained by scanning the touch screen using the mutual capacitance scanning method to the processor.
[0072] In other words, mutual capacitance scanning is only activated and the processor is woken up when the electronic device determines that the first touch position and the second touch position do not match, so as to report the touch data scanned by the touch screen.
[0073] Optionally, in this embodiment of the application, the processor of the electronic device calculates the coordinates corresponding to the target touch data based on the read target touch data.
[0074] Optionally, in this embodiment of the application, the processor of the electronic device sends the coordinates corresponding to the target touch data to the electronic device for processing. After waiting for the electronic device to complete the processing, it enters a sleep state and waits for an interrupt event to wake it up again.
[0075] Optionally, in the embodiments of this application, step 202 above can be replaced by step 203 below.
[0076] Step 203: When the first touch position and the second touch position match, the touch IC of the control screen is put into a sleep state.
[0077] For example, the above "the first touch position and the second touch position match" can be understood as the distance between the first touch position and the second touch position being less than a first preset threshold, that is, the touch position of the finger on the touch screen has not changed.
[0078] It is understandable that when an electronic device determines that the touch position of a finger has not moved, the touch IC controlling the touch screen is in a sleep state.
[0079] For example, such as Figure 5 As shown, if the electronic device detects that the finger position has not changed at time n+3 through self-capacitance scanning, then there is no need to activate mutual capacitance scanning, i.e., the touch IC is controlled to be in sleep mode.
[0080] Thus, it can be seen that since the electronic device does not need to activate the mutual capacitance scanning method when the first touch position matches the second touch position, that is, the touch IC is kept in sleep mode, thereby reducing the power consumption of the electronic device.
[0081] Optionally, in this embodiment of the application, if the first touch position and the second touch position match, the electronic device continues to scan the touch screen using a self-capacitive scanning method.
[0082] For example, if the first touch position and the second touch position match, the electronic device can continue to scan the touch screen using the self-capacitance scanning method until the touch position obtained at the current moment does not match the touch position obtained at the previous moment, at which point the touch screen is scanned using the mutual capacity scanning method.
[0083] Thus, it can be seen that since electronic devices can continue to use self-capacitive scanning to scan the touchscreen when the first touch position matches the second touch position, the number of times mutual capacitive scanning is used to scan the touchscreen can be reduced, thereby reducing the energy consumption of electronic devices.
[0084] The touch data processing method provided in this application embodiment can scan the touchscreen of an electronic device using self-capacitance scanning to obtain a first touch position; and if the first touch position and the second touch position do not match, it can scan the touchscreen of the electronic device using mutual capacitance scanning to obtain target touch data, thereby reporting the target touch data to the processor of the electronic device; wherein, the time when the second touch position is obtained is earlier than the time when the first touch position is obtained. Since the electronic device can only obtain touch data through mutual capacitance scanning when the first touch position and the second touch position obtained by scanning the touchscreen do not match, that is, only when the touch position at the input position changes, and only then report the touch data obtained by mutual capacitance scanning of the touchscreen to the processor, the number of times the electronic device initiates mutual capacitance scanning and the number of times touch data is reported to the processor can be reduced. Therefore, the power consumption of the electronic device can be reduced.
[0085] The following example illustrates how to determine whether the first touch position matches the second touch position.
[0086] Optionally, in the embodiments of this application, step 202 above can be specifically implemented by step 202a below.
[0087] Step 202a: If the distance between the first touch position and the second touch position is greater than or equal to the first preset threshold, the touch screen is scanned using a mutual capacitance scanning method.
[0088] Optionally, in this embodiment, the first preset threshold can be pre-stored by the electronic device or set by the user according to their needs. Specifically, the first preset threshold can be any of the following: 0.5, 1, 1.5, 2, etc., and can be set according to user needs.
[0089] Optionally, in this embodiment of the application, the electronic device can determine whether the distance between the first touch position and the second touch position is greater than or equal to a first preset threshold based on whether preset conditions are met.
[0090] Specifically, the aforementioned preset conditions may include at least one of the following:
[0091] The difference between the first horizontal coordinate and the second horizontal coordinate is greater than or equal to the first preset value;
[0092] The difference between the first and second vertical coordinates is greater than or equal to the second preset value.
[0093] Wherein, the aforementioned first horizontal coordinate is any one of the following: the coordinate with the largest value among the horizontal coordinates of the first touch coordinates, the coordinate with the smallest value among the horizontal coordinates of the first touch coordinates, the coordinate determined based on the average value of the horizontal coordinates of the first touch coordinates, or the coordinate determined based on the median value of the horizontal coordinates of the first touch coordinates.
[0094] Here, when the first horizontal coordinate is a coordinate determined based on the average value of the horizontal coordinates of the first touch coordinates, the value of the first horizontal coordinate is the average value of the horizontal coordinates of the first touch coordinates. When the first horizontal coordinate is a coordinate determined based on the median value of the horizontal coordinates of the first touch coordinates, the value of the first horizontal coordinate is the median value of the horizontal coordinates of the first touch coordinates.
[0095] Here, when the first horizontal coordinate is the coordinate with the largest value among the horizontal coordinates of the first touch coordinate, the second horizontal coordinate is the coordinate with the largest value among the horizontal coordinates of the second touch coordinate. When the first horizontal coordinate is the coordinate with the smallest value among the horizontal coordinates of the first touch coordinate, the second horizontal coordinate is the coordinate with the smallest value among the horizontal coordinates of the second touch coordinate. When the first horizontal coordinate is a coordinate determined based on the average value of the horizontal coordinates of the first touch coordinate, the second horizontal coordinate is a coordinate determined based on the average value of the horizontal coordinates of the second touch coordinate. When the first horizontal coordinate is a coordinate determined based on the median value of the horizontal coordinates of the first touch coordinate, the second horizontal coordinate is a coordinate determined based on the median value of the horizontal coordinates of the second touch coordinate.
[0096] Wherein, the aforementioned first vertical coordinate is any one of the following: the coordinate with the largest coordinate value among the vertical coordinates of the first touch coordinates, the coordinate with the smallest coordinate value among the vertical coordinates of the first touch coordinates, the coordinate determined based on the average value of the vertical coordinates of the first touch coordinates, or the coordinate determined based on the median value of the vertical coordinates of the first touch coordinates.
[0097] Here, when the first vertical coordinate is a coordinate determined based on the average value of the vertical coordinates of the first touch coordinates, the value of the first vertical coordinate is the average value of the vertical coordinates of the first touch coordinates. When the first vertical coordinate is a coordinate determined based on the median value of the vertical coordinates of the first touch coordinates, the value of the first vertical coordinate is the median value of the vertical coordinates of the first touch coordinates.
[0098] Here, when the first vertical coordinate is the coordinate with the largest value among the vertical coordinates of the first touch coordinates, the second vertical coordinate is the coordinate with the largest value among the vertical coordinates of the second touch coordinates. When the first vertical coordinate is the coordinate with the smallest value among the vertical coordinates of the first touch coordinates, the second vertical coordinate is the coordinate with the smallest value among the vertical coordinates of the second touch coordinates. When the first vertical coordinate is the coordinate determined based on the average value of the vertical coordinates of the first touch coordinates, the second vertical coordinate is the coordinate determined based on the average value of the vertical coordinates of the second touch coordinates. When the first vertical coordinate is the coordinate determined based on the median value of the vertical coordinates of the first touch coordinates, the second vertical coordinate is the coordinate determined based on the median value of the vertical coordinates of the second touch coordinates.
[0099] The first preset value and the second preset value can be the same or different.
[0100] Specifically, under preset conditions, the electronic device can determine that the distance between the first touch position and the second touch position is greater than or equal to a first preset threshold.
[0101] Thus, since the electronic device determines whether to use mutual capacitance scanning to scan the touchscreen based on the distance between the first touch position and the second touch position, the electronic device does not need to use mutual capacitance scanning after each self-capacitance scanning, thereby reducing the number of times the electronic device uses mutual capacitance scanning.
[0102] Optionally, in the embodiments of this application, step 202 above can be specifically implemented by step 202b below.
[0103] Step 202b: If the difference between the second pressure parameter and the first pressure parameter is greater than or equal to the second preset threshold, the touch screen is scanned using a mutual capacitance scanning method.
[0104] Wherein, the first pressure parameter is the pressure parameter corresponding to the first touch position, and the second pressure parameter is the pressure parameter corresponding to the second touch position.
[0105] For example, the aforementioned second preset threshold can be pre-stored by the electronic device or set in advance by the user according to their needs. Specifically, the aforementioned second preset threshold can be any of the following: 0.5, 1, 1.5, 2, etc., which can be set according to the user's needs.
[0106] It should be noted that during the user's touch input on the touch screen, if the difference between the first pressure parameter corresponding to the first touch position and the second pressure parameter corresponding to the second touch position detected by the electronic device is greater than the second preset threshold, it indicates that the touch position has changed during the touch input process, that is, it is necessary to scan the touch screen through mutual capacitance scanning to obtain touch data.
[0107] For example, during the process of scanning a touch screen using a self-capacitance scanning method, the electronic device acquires the touch position corresponding to the touch input, as well as the pressure parameters corresponding to that touch position.
[0108] Thus, it can be seen that since the electronic device determines whether to use mutual capacitance scanning to scan the touch screen based on the difference between the first pressure parameter corresponding to the first touch position and the second pressure parameter corresponding to the second touch position, the accuracy of the electronic device in detecting changes in touch position can be improved by determining whether the touch position has changed through the difference in pressure parameters, thereby reducing the number of times the electronic device uses mutual capacitance scanning.
[0109] Optionally, in this embodiment of the application, before “reporting the target touch data to the processor of the electronic device” in step 202 above, the touch data processing method provided in this embodiment of the application may further include the following step 301.
[0110] Step 301: Control the processor to be in a wake-up state.
[0111] It should be noted that if the electronic device determines that the touch position has changed, it will obtain the target touch data of the touch position through mutual capacitance scanning, wake up the processor, and report the target touch data to the processor.
[0112] For example, such as Figure 5 As shown, after the electronic device detects a change in the finger position at time n+1 using self-capacitance scanning, it uses mutual capacitance scanning to obtain the touch data (i.e., target touch data) of the finger position change at time n+1, then controls the processor to be in a wake-up state and reports the touch data to the processor.
[0113] Thus, it can be seen that when the electronic device determines that the touch position has moved, it uses mutual capacitance scanning to scan and wakes up the processor, and then reports the touch data obtained from the mutual capacitance scanning to the processor. This eliminates the need to keep the processor in a wake-up state under all circumstances, thereby saving the power consumption of the electronic device.
[0114] The touch data processing method provided in this application can be executed by a touch data processing device. This application uses a touch data processing device executing the touch data processing method as an example to illustrate the touch data processing device provided in this application.
[0115] This application provides a touch data processing device, such as... Figure 6 As shown, the touch data processing device 400 includes a scanning module 401 and a processing module 402. The scanning module 401 is used to scan the touch screen of the touch data processing device using a self-capacitive scanning method to obtain a first touch position. The processing module 402 is used to scan the touch screen of the touch data processing device using a mutual capacitive scanning method when the first touch position and the second touch position obtained by the scanning module do not match, to obtain target touch data, and to report the target touch data to the processor of the touch data processing device. The second touch position is obtained earlier than the first touch position.
[0116] Optionally, in this embodiment of the application, the processing module 402 is specifically used to scan the touch screen using a mutual capacitance scanning method when the distance between the first touch position and the second touch position is greater than or equal to a first preset threshold.
[0117] Optionally, in this embodiment of the application, the processing module 402 is specifically used to scan the touch screen using a mutual capacitance scanning method when the difference between the second pressure parameter and the first pressure parameter is greater than or equal to a second preset threshold; wherein, the first pressure parameter is the pressure parameter corresponding to the first touch position, and the second pressure parameter is the pressure parameter corresponding to the second touch position.
[0118] Optionally, in this embodiment of the application, the processing module 402 is further configured to control the touch IC of the touch screen to be in a sleep state when the first touch position and the second touch position match.
[0119] In the touch data processing apparatus provided in this application embodiment, since the touch data processing apparatus can only acquire touch data through mutual capacitance scanning when the first touch position and the second touch position obtained by scanning the touch screen do not match, that is, when the touch position at the input position changes, and the touch data obtained by mutual capacitance scanning of the touch screen is reported to the processor, the number of times the touch data processing apparatus initiates mutual capacitance scanning and the number of times touch data is reported to the processor can be reduced. Therefore, the power consumption of the touch data processing apparatus can be reduced.
[0120] The touch data processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0121] The touch data processing device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0122] The touch data processing device provided in this application embodiment can achieve... Figures 1 to 5 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0123] Optionally, such as Figure 7 As shown, this application embodiment also provides an electronic device 600, including a processor 601 and a memory 602. The memory 602 stores a program or instructions that can run on the processor 601. When the program or instructions are executed by the processor 601, they implement the various steps of the above-described touch data processing method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0124] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.
[0125] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0126] The electronic device 100 includes, but is not limited to, components such as: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, and processor 110.
[0127] Those skilled in the art will understand that the electronic device 100 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0128] The processor 110 is configured to scan the touchscreen of the electronic device using a self-capacitive scanning method to obtain a first touch position; the processor 110 is also configured to scan the touchscreen of the electronic device using a mutual capacitive scanning method when the first touch position and the second touch position obtained by the scanning module do not match, obtain target touch data, and report the target touch data to the processor of the electronic device; wherein the time when the second touch position is obtained is earlier than the time when the first touch position is obtained.
[0129] Optionally, in this embodiment of the application, the processor 110 is specifically used to scan the touch screen using a mutual capacitance scanning method when the distance between the first touch position and the second touch position is greater than or equal to a preset threshold.
[0130] Optionally, in this embodiment of the application, the processor 110 is specifically used to scan the touch screen using a mutual capacitance scanning method when the difference between the second pressure parameter and the first pressure parameter is greater than or equal to a second preset threshold; wherein, the first pressure parameter is the pressure parameter corresponding to the first touch position, and the second pressure parameter is the pressure parameter corresponding to the second touch position.
[0131] Optionally, in this embodiment of the application, the processor 110 is specifically used to control the touch IC of the touch screen to be in a sleep state when the first touch position and the second touch position match.
[0132] In the electronic device provided in this application embodiment, since the electronic device only acquires touch data through mutual capacitance scanning when the first touch position and the second touch position obtained by scanning the touch screen do not match, that is, when the touch position at the input position changes, and the touch data obtained by mutual capacitance scanning of the touch screen is reported to the processor, the number of times the electronic device initiates mutual capacitance scanning and the number of times touch data is reported to the processor can be reduced. Therefore, the power consumption of the electronic device can be reduced.
[0133] It should be understood that, in this embodiment, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.
[0134] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 109 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0135] Processor 110 may include one or more processing units; optionally, processor 110 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 110.
[0136] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described touch data processing method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0137] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0138] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described touch data processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0139] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0140] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described touch data processing method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0141] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0143] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A touch data processing method, applied to electronic devices, characterized in that, The method includes: The touchscreen of the electronic device is scanned using a self-capacitive scanning method to obtain the first touch position; If the first touch position and the second touch position do not match, the touch screen of the electronic device is scanned using a mutual capacitance scanning method to obtain the target touch data, and the target touch data is reported to the processor of the electronic device. The second touch position is obtained earlier than the first touch position is obtained.
2. The method according to claim 1, characterized in that, The step of scanning the touchscreen of the electronic device using a mutual capacitance scanning method when the first touch position and the second touch position do not match includes: When the distance between the first touch position and the second touch position is greater than or equal to a first preset threshold, the touch screen is scanned using the mutual capacitance scanning method.
3. The method according to claim 1, characterized in that, The step of scanning the touchscreen of the electronic device using a mutual capacitance scanning method when the first touch position and the second touch position do not match includes: If the difference between the second pressure parameter and the first pressure parameter is greater than or equal to the second preset threshold, the touch screen is scanned using the mutual capacitance scanning method. Wherein, the first pressure parameter is the pressure parameter corresponding to the first touch position, and the second pressure parameter is the pressure parameter corresponding to the second touch position.
4. The method according to claim 1, characterized in that, The method further includes: When the first touch position and the second touch position match, the touch IC controlling the touch screen is put into a sleep state.
5. A touch data processing device, characterized in that, The touch data processing device includes: a scanning module and a processing module; The scanning module is used to scan the touch screen of the touch data processing device in a self-capacitive scanning manner to obtain the first touch position; The processing module is used to scan the touch screen of the touch data processing device using a mutual capacitance scanning method when the first touch position and the second touch position obtained by the scanning module do not match, to obtain target touch data, and to report the target touch data to the processor of the touch data processing device. The second touch position is obtained earlier than the first touch position is obtained.
6. The apparatus according to claim 5, characterized in that, The processing module is specifically used to scan the touch screen using the mutual capacitance scanning method when the distance between the first touch position and the second touch position is greater than or equal to a first preset threshold.
7. The apparatus according to claim 5, characterized in that, The processing module is specifically used to scan the touch screen using the mutual capacitance scanning method when the difference between the second pressure parameter and the first pressure parameter is greater than or equal to the second preset threshold. Wherein, the first pressure parameter is the pressure parameter corresponding to the first touch position, and the second pressure parameter is the pressure parameter corresponding to the second touch position.
8. The apparatus according to claim 5, characterized in that, The processing module is also used to control the touch IC of the touch screen to be in a sleep state when the first touch position and the second touch position match.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the touch data processing method as described in any one of claims 1 to 4.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the touch data processing method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Scanning method for projected capacitive touch panels
CN101840293A
Method and device for driving in cell touch panel and display device
CN104020908A