Data processing method and electronic device

By calculating the difference in capacitance data of the touch panel and reusing the touch reporting information of the previous frame when the difference is less than a threshold, the problem of high CPU time and power consumption of the touch module is solved, and low power consumption optimization of the device is achieved.

CN120029478BActive Publication Date: 2025-11-28HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311498134.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2025-11-28
Estimated Expiration
2043-11-10

AI Technical Summary

Technical Problem

Touchscreen modules consume significant amounts of CPU time and power in electronic devices, impacting standby time and system smoothness.

Method used

By acquiring the capacitance data of the touch panel, calculating the difference data, and reusing the touch reporting information of the previous frame when the difference value is less than the threshold, the CPU time and power consumption of the touch process are reduced.

Benefits of technology

It reduces the load and power consumption of the touch process, and extends the standby time of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029478B_ABST
    Figure CN120029478B_ABST
Patent Text Reader

Abstract

The application provides a data processing method and an electronic device. The method comprises: obtaining first capacitance data; obtaining first difference data corresponding to the first capacitance data based on the first capacitance data; generating first touch report point information corresponding to the first capacitance data according to the first difference data; saving the first difference data as first reference difference data and saving the first touch report point information as first reference touch report point information; obtaining second capacitance data; processing the second capacitance data to obtain second difference data corresponding to the second capacitance data; determining a difference value between the second difference data and the first reference difference data, denoted as a first difference value; and if the first difference value is less than a first threshold value, using the first reference touch report point information as second touch report point information corresponding to the second capacitance data. In this way, the CPU time occupied by the touch process can be reduced, thereby reducing the load and power consumption of the touch process.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of terminal devices, in particular to a data processing method and an electronic device. BACKGROUND

[0002] At present, touch is the main input method of human-computer interaction of consumer electronic devices. With the increasing demand of terminal users for standby time and system fluency of intelligent electronic devices, the demand for reducing power consumption and load of each business module is increasingly strong.

[0003] Touch, as a function used very frequently in such electronic devices, has an important influence on the overall power consumption and load of the electronic device. Therefore, reducing the power consumption and load of the touch function module is of great significance to prolong the standby time of the electronic device. SUMMARY

[0004] In order to solve the above technical problems, the present application provides a data processing method and an electronic device, which reduces the load and power consumption of the touch process by reducing the CPU occupation time of the touch process.

[0005] In a first aspect, the present application provides a data processing method applied to an electronic device. The method comprises: obtaining first capacitance data generated by a touch panel of the electronic device in response to touch of a user; processing the first capacitance data to obtain first difference data corresponding to the first capacitance data; generating first touch report point information corresponding to the first capacitance data according to the first difference data; saving the first difference data as first reference difference data and saving the first touch report point information as first reference touch report point information; obtaining second capacitance data generated by the touch panel in response to touch of the user; processing the second capacitance data to obtain second difference data corresponding to the second capacitance data; determining a difference value between the second difference data and the first reference difference data, denoted as a first difference value; and using the first reference touch report point information as second touch report point information corresponding to the second capacitance data if the first difference value is less than a first threshold. In this way, the CPU time occupied by the touch process can be reduced, thereby reducing the load and power consumption of the touch process.

[0006] According to the first aspect, the method further comprises: performing first processing on the second difference data to obtain first time information and first frame number information, the first processing being processing related to time and frame number in a touch report point generation algorithm, the touch report point generation algorithm being used to generate touch report point information according to difference data corresponding to capacitance data; updating time information in the touch report point generation algorithm according to the first time information, and updating frame number information in the touch report point generation algorithm according to the first frame number information, the touch report point generation algorithm being used to generate touch report point information corresponding to capacitance data according to difference data corresponding to the capacitance data.

[0007] According to the first aspect, the method further comprises: obtaining third capacitance data generated by the touch panel in response to the touch of the user; processing the third capacitance data to obtain third difference data corresponding to the third capacitance data; determining a difference value between the third difference data and the first reference difference data, denoted as a second difference value; and using the first reference touch point report information as third touch point report information corresponding to the third capacitance data if the second difference value is less than the first threshold value.

[0008] According to the first aspect, the method further comprises: performing first processing on the third difference data to obtain second time information and second frame number information, the first processing being processing related to time and frame number in a touch point report generation algorithm, the touch point report generation algorithm being used to generate touch point report information according to difference data corresponding to capacitance data; and updating time information in the touch point report generation algorithm according to the second time information and updating frame number information in the touch point report generation algorithm according to the second frame number information.

[0009] According to the first aspect, the method further comprises: obtaining fourth capacitance data generated by the touch panel in response to the touch of the user; processing the fourth capacitance data to obtain fourth difference data corresponding to the fourth capacitance data; determining a difference value between the fourth difference data and the first reference difference data, denoted as a third difference value; and generating fourth touch point report information corresponding to the fourth capacitance data according to the fourth difference data if the third difference value is greater than or equal to the first threshold value.

[0010] According to the first aspect, after the fourth touch point report information corresponding to the fourth capacitance data is generated, the method further comprises: saving the fourth difference data as second reference difference data and saving the fourth touch point report information as second reference touch point report information.

[0011] According to the first aspect, before the fourth difference data is saved as second reference difference data and the fourth touch point report information is saved as second reference touch point report information, the method further comprises: deleting the first reference difference data and the first reference touch point report information.

[0012] According to the first aspect, the method further comprises: obtaining fifth capacitance data generated by the touch panel in response to the touch of the user; processing the fifth capacitance data to obtain fifth difference data corresponding to the fifth capacitance data; determining a difference value between the fifth difference data and the second reference difference data, denoted as a third difference value; and using the second reference touch point report information as fifth touch point report information corresponding to the fifth capacitance data if the third difference value is less than the first threshold value.

[0013] According to the first aspect, the difference value between the difference data and the difference reference data is determined by: taking the matrix in which the difference data is located as a first matrix, and taking the matrix in which the difference reference data is located as a second matrix; obtaining the difference value of the data in two elements at the same position in the first matrix and the second matrix; finding the maximum value in all the difference values, taking the maximum value as a maximum difference value, and determining that the difference value between the difference data and the difference reference data is equal to the maximum difference value; and determining the relationship between the difference value and the first threshold value by: determining that the first threshold value is a preset difference threshold value; if the maximum difference value is less than the difference threshold value, determining that the difference value is less than the first threshold value; or if the maximum value is greater than or equal to the difference threshold value, determining that the difference value is greater than or equal to the first threshold value.

[0014] According to the first aspect, the difference value between the difference data and the difference reference data is determined by: taking the matrix in which the difference data is located as a first matrix, and taking the matrix in which the difference reference data is located as a second matrix; obtaining the difference value of the data in two elements at the same position in the first matrix and the second matrix; counting the number of difference values greater than a target value in all the difference values, taking the number as a first number, and determining that the difference value between the difference data and the difference reference data is equal to the first number; and determining the relationship between the difference value and the first threshold value by: determining that the first threshold value is a preset second number; if the first number is less than the second number, determining that the difference value is less than the first threshold value; or if the first number is greater than or equal to the second number, determining that the difference value is greater than or equal to the first threshold value.

[0015] According to the first aspect, the difference value between the difference data and the difference reference data is determined by: taking the matrix in which the difference data is located as a first matrix, and taking the matrix in which the difference reference data is located as a second matrix; obtaining the difference value of the data in two elements at the same position in the first matrix and the second matrix; counting the number of difference values greater than a target value in all the difference values, taking the number as a first number, and determining that the difference value between the difference data and the difference reference data is equal to the first number; and determining the relationship between the difference value and the first threshold value by: determining that the first threshold value is a preset second number; if the first number is less than the second number, determining that the difference value is less than the first threshold value; or if the first number is greater than or equal to the second number, determining that the difference value is greater than or equal to the first threshold value.

[0016] According to the first aspect, the difference value between the difference data and the difference reference data is determined by: taking the matrix in which the difference data is located as a first matrix, and taking the matrix in which the difference reference data is located as a second matrix; obtaining the difference value of the data in two elements at the same position in the first matrix and the second matrix; counting the number of difference values greater than a target value in all the difference values, taking the number as a first number, and determining that the difference value between the difference data and the difference reference data is equal to the first number; and determining the relationship between the difference value and the first threshold value by: determining that the first threshold value is a preset second number; if the first number is less than the second number, determining that the difference value is less than the first threshold value; or if the first number is greater than or equal to the second number, determining that the difference value is greater than or equal to the first threshold value.

[0017] According to the first aspect, the electronic device is a mobile phone, a tablet, a personal computer (PC), a wearable device, a car control panel, or an electric vehicle control panel.

[0018] The second aspect provides an electronic device, including: a memory and a processor, the memory being coupled with the processor; the memory storing program instructions, when the program instructions are executed by the processor, causing the electronic device to execute the data processing method of any one of the first aspect.

[0019] In a third aspect, the present application provides a computer readable storage medium, comprising a computer program, when the computer program is run on an electronic device, the computer program causes the electronic device to execute the data processing method of any one of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 Structure schematic diagram of the electronic device 100 shown for example;

[0021] Figure 2A Software structure block diagram of the electronic device 100 of the embodiment of the present application shown for example;

[0022] Figure 2B Application scenario example diagram of the data processing method in the embodiment shown for example;

[0023] Figure 3 Overall interaction logic schematic diagram of the THP scheme in the embodiment shown for example;

[0024] Figure 4 Touch control algorithm processing flow schematic diagram of the touch control algorithm service module in the THP scheme in the embodiment shown for example;

[0025] Figure 5 Flow example diagram of the data processing method in the embodiment shown for example;

[0026] Figure 6 Another touch control algorithm processing flow schematic diagram of the touch control algorithm service module in the THP scheme in the embodiment shown for example;

[0027] Figure 7 Another flow example diagram of the data processing method in the embodiment shown for example;

[0028] Figure 8 Another flow example diagram of the data processing method in the embodiment shown for example;

[0029] Figure 9 Another flow example diagram of the data processing method in the embodiment shown for example;

[0030] Figure 10 Touch control report point and reference difference data example diagram corresponding to each frame of data in the process of the touch control algorithm service module processing the first frame of data to the tenth frame of data;

[0031] Figure 11 Comparison schematic diagram of the CPU time occupied by the touch control process in the scheme shown for example and the scheme shown for example; Figure 4 Figure 6 DETAILED DESCRIPTION ​​

[0032] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0033] The term "and / or" in the present application is only used to describe the association relationship of the associated objects, and can represent three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone.

[0034] The terms "first" and "second" and the like in the description and claims of the embodiments of the present application are used to distinguish different objects, and are not used to describe the specific order of the objects. For example, the first target object and the second target object are used to distinguish different target objects, and are not used to describe the specific order of the target objects.

[0035] The present embodiment provides a data processing method, which can be applied to electronic devices such as mobile phones, tablets, computers, etc. Of course, it is not limited to these electronic devices.

[0036] In the present embodiment, the structure of the electronic device can be as shown in Figure 1

[0037] Figure 1 The structure of the electronic device 100 shown is shown for example. It should be understood that Figure 1 The electronic device 100 shown is only an example of an electronic device, and the electronic device 100 can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. Figure 1 The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0038] Please refer to Figure 1 The electronic device 100 can include a processor 110, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, an indicator 192, a camera 193, etc.

[0039] ​Among them, the sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0040] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0041] Among them, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, complete the control of fetching instructions and executing instructions.

[0042] The memory in the processor 110 can also be provided for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.

[0043] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0044] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 can include multiple sets of I2C buses. The processor 110 can be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example, the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface, and realize the touch function of the electronic device 100.

[0045] The touch sensor 180K, also referred to as a “touch panel”, can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a “touch screen”. The touch sensor 180K is configured to detect a touch operation acting on or near the touch sensor 180K. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the type of touch event. The display screen 194 can provide visual output related to the touch operation. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0046] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program (such as a sound playing function, an image playing function, etc.) required by a function, etc. The data storage area can store data (such as audio data, a phone book, etc.) created during the use of the electronic device 100, etc. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0047] Of course, in addition to the above components, the electronic device 100 can further include other hardware components, which are not listed here one by one.

[0048] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiments of the present application take the Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.

[0049] Figure 2A The software structure block diagram of the electronic device 100 of the embodiments of the present application is exemplarily shown.

[0050] The layered architecture of the electronic device 100 divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system can include an application layer, an application framework layer, a system library, and a kernel layer, etc.

[0051] The application layer can include a series of application packages.

[0052] As shown in Figure 2A , the application packages can include camera, gallery, map, WLAN, music, short message, call, navigation, Bluetooth, video, etc. Of course, these applications are only exemplary, in other embodiments, the application layer can include applications not shown in Figure 2A , and can not include one or more applications shown in Figure 2A .

[0053] As shown in Figure 2A , the application framework layer can include a window manager, a resource manager, a view system, a phone manager, a content provider, a notification manager, an input system, etc.

[0054] The window manager is used to manage windows programs. The window manager can acquire the display screen size, determine whether there is a status bar, lock the screen, intercept the screen, etc.

[0055] The view system includes visual controls, such as controls that display text, controls that display pictures, etc. The view system can be used to build an application program. A display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon can include a view that displays text and a view that displays a picture.

[0056] The resource manager provides various resources for an application program, such as localized strings, icons, pictures, layout files, video files, etc.

[0057] The content provider is used to store and acquire data, and make the data accessible to an application program. The data can include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc.

[0058] The telephony manager is used to provide the communication function of the electronic device 100. For example, the management of the call state (including call connection, call hang-up, etc.).

[0059] The notification manager makes it possible for an application program to display notification information in the status bar. The notification manager can be used to convey a message of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of a download, a message reminder, etc. The notification manager can also be a notification that appears in the form of a chart or a scroll bar text in the top status bar of the system, such as a notification of an application program running in the background, or a notification that appears in the form of a dialogue window on the screen. For example, a text message is prompted in the status bar, a prompt sound is emitted, the electronic device vibrates, the indicator light flashes, etc.

[0060] The input system is used to receive the touch report points reported by the touch algorithm service module in the system library.

[0061] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0062] The core library includes two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

[0063] The application program layer and the application program framework layer run in the virtual machine. The virtual machine executes the java files of the application program layer and the application program framework layer into binary files. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.

[0064] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), touch algorithm service module, etc.

[0065] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0066] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0067] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0068] A 2D graphics engine is a graphics engine for 2D (two-dimensional) drawing.

[0069] The touch algorithm service module can be used to execute the data processing method of this application embodiment, obtain touch reporting points, and upload the touch reporting points to the input system in the application framework layer.

[0070] The kernel layer is the layer between hardware and software.

[0071] like Figure 2A As shown, the kernel layer can include display drivers, Wi-Fi drivers, audio drivers, touch drivers, Bluetooth drivers, etc.

[0072] For details on the touch driver functionality, please refer to the subsequent sections. Figure 4 and Figure 6 Explanation.

[0073] Understandable Figure 2A The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.

[0074] The data processing method in this embodiment aims to optimize the load of the touch process on the AP (main chip) side of the touch THP solution. Under stable signal conditions, it maximizes the reuse of the reporting points and various state information of the algorithm from the previous frame, thereby reducing the CPU (Central Processing Unit) occupancy time of the touch process and achieving the goal of reducing load and power consumption.

[0075] The state information referred to by the multiplexing can be, for example, a move state, an up state, a down state, and the like.

[0076] In this document, the touch report information can include the following information reported: length of the long axis, length of the short axis, direction, pressure value, barycentric position, and the like.

[0077] Electronic devices using touch as the main input method for human-computer interaction can include a main chip AP and a touch chip (TP IC). The main chip and the touch chip are independent of each other, and data communication can be performed between the two through an interface.

[0078] Figure 2B An application scenario example of the data processing method in the embodiment is exemplarily shown. As shown in Figure 2B In the process of using the mobile phone, for example, in the process of using a game application in the mobile phone, the user touches the screen of the mobile phone. The touch panel of the mobile phone generates a capacitive signal in response to the touch operation of the user, and the touch chip collects the capacitive signal. Based on the capacitive data corresponding to the capacitive signal, the embodiment can generate touch report information.

[0079] Figure 3 An overall interaction logic diagram of the THP scheme in the embodiment is exemplarily shown. Please refer to Figure 3 In the embodiment, the modules involved in the THP scheme include the following modules on the main chip side: an input system (located in the application program framework layer), a touch algorithm service (also referred to as TP Daemon, located in the system library) module, and a touch driver (i.e., TP Driver, located in the kernel layer) module, and the following modules on the touch chip side: a touch chip (TP IC) and a touch panel (Touch Panel).

[0080] The overall interaction logic of the THP scheme is as follows:

[0081] The touch chip (TP IC) drives the touch panel (Touch Panel) to scan and collect raw capacitive value data (the raw capacitive value data is represented by RawData), the AP side drives the touch driver (TP Driver) to read data through an SPI (Serial Peripheral Interface) interface, and the data is transmitted to the touch algorithm service (TP Daemon) module for algorithm operation. The touch algorithm service module finally generates touch report point (Touch Point) information, and then the touch report point information is transmitted to the input (Input) system of the application program framework layer (Framework) through the touch driver TP Driver.

[0082] Figure 4 A flowchart of a touch algorithm processing procedure of the touch algorithm service module in the THP solution in the embodiment is shown by way of example. Please refer to Figure 4 In the embodiment, the processing procedure of the touch algorithm service module includes the following steps:

[0083] In step (1), the touch algorithm service module TP Daemon acquires a frame of original capacitance value data, denoted as FrameData.

[0084] Each frame of original capacitance value data FrameData can be represented by a two-dimensional matrix, each element in the two-dimensional matrix corresponds to the position of a capacitance value sampling point on the touch panel, and the element value filled in the element represents the capacitance value collected at the sampling point corresponding to the element.

[0085] In step (2), the touch algorithm service module TP Daemon calls the algorithm library to perform data processing on FrameData.

[0086] The algorithm library here can be regarded as a collection of a series of algorithms for data processing on FrameData.

[0087] In step (3), the algorithm library performs digital signal filtering on FrameData.

[0088] Through filtering, the influence of interference signals on FrameData can be reduced, thereby improving the accuracy of touch point detection.

[0089] In step (4), the algorithm library performs Diff value (i.e. difference value) operation on the filtered FrameData to obtain the Diff value (i.e. difference value) data corresponding to the filtered FrameData.

[0090] Here, the Diff value operation refers to subtracting the capacitance value at the same position in the reference capacitance value data from each capacitance value in FrameData. The reference capacitance value data can be the capacitance value data of each sampling point on the touch panel collected when there is no touch on the touch panel, and can also be represented by a matrix, called reference capacitance value data matrix. The reference capacitance value data is pre-stored in the electronic device.

[0091] For example, suppose the matrix corresponding to FrameData is A, and the matrix corresponding to the reference capacitance value data is B. The element value in the first row and first column of matrix A is a11, the element value in the first row and first column is a12, …; the element value in the second row and first column is a21, the element value in the second row and second column is a22, …; the element value in the third row and first column is a31, the element value in the third row and second column is a32, …; and so on.

[0092] The element value of the first row and the first column in the matrix B is b11, the element value of the first row and the first column is b12, and so on; the element value of the second row and the first column is b21, the element value of the second row and the second column is b22, and so on; the element value of the third row and the first column is b31, the element value of the third row and the second column is b32, and so on; and so on.

[0093] The result of the Diff value operation on the matrix A by the algorithm library is also a matrix C. The element value of the first row and the first column in the matrix C is c11, the element value of the first row and the first column is c12, and so on; the element value of the second row and the first column is c21, the element value of the second row and the second column is c22, and so on; the element value of the third row and the first column is c31, the element value of the third row and the second column is c32, and so on; and so on.

[0094] The element value cij (i, j are natural numbers) of each element in the matrix C is equal to the difference between the element aij in the i-th row and the j-th column of the matrix A and the element bij in the i-th row and the j-th column of the matrix B. For example, c11 is equal to the difference value obtained by subtracting b11 from a11, and c12 is equal to the difference value obtained by subtracting b12 from a12.

[0095] The operation result matrix C of the Diff value can also be referred to as a Diff value signal image. The operation result matrix C of the Diff value can be referred to as a diff value data matrix (i.e., a difference value data matrix).

[0096] Step (5), peak value Peak finding is performed on the signal Diff value signal image.

[0097] The signal peak value Peak in the Diff value signal image refers to each maximum value in the Diff value signal image.

[0098] Step (6), touch area TouchZone traversal is performed.

[0099] Through the touch area traversal, touch area framing is performed. The detailed traversal process can be referred to the description in the related art, which will not be described here.

[0100] Step (7), touch mode TouchMode determination is performed.

[0101] The touch mode TouchMode can include, for example, finger touch, glove touch, palm touch, and the like.

[0102]

[0103] Step (n), touch report point information is generated.

[0104] The touch report point information generated in this step is used to indicate the position where the touch occurs.

[0105] After the touch report point is generated, the touch algorithm service module sends the touch report point information to the touch driver (as shown in Figure 3 ) module, and then the touch driver module uploads the touch report point information to the input system, so that the input system performs corresponding processing according to the touch report point.

[0106] As can be seen from the above, in the embodiment, after the touch algorithm service module receives the original capacitance value data, the original capacitance value data is first filtered and Diff value operation processing is performed, then signal peak (Peak) searching is performed in the generated Diff value signal image, and then a series of algorithm processing such as touch area framing and touch mode determination is performed through the signals around the position of the Peak, and finally the touch report point information is generated.

[0107] In the embodiment, the touch algorithm processing flow performs a complete set of algorithm full-flow operation (the complete set of algorithm full-flow is described in Figure 4 ) on each frame of original capacitance value data reported by the touch chip, and thus occupies more CPU time of the main chip, so the load of the touch process is high.

[0108] In order to reduce the CPU time of the main chip occupied by the touch algorithm processing flow and reduce the load of the touch process, the present application proposes the following embodiments.

[0109] Figure 5 A flowchart of an example of the data processing method in the embodiment is shown. The data processing method in the embodiment can be executed by the touch algorithm service module (the touch algorithm service module executes the data processing method by occupying the resources of the CPU in the main chip) in Figure 2A , Figure 3 . When the touch algorithm service module executes the data processing method in the embodiment, the CPU occupation time of the main chip can be reduced and the load can be reduced. The data processing method executed by the touch algorithm service module in the embodiment belongs to the touch process.

[0110] As shown in Figure 5 , in the embodiment, the flow of the data processing method can include the following steps:

[0111] S501, obtaining first capacitance data generated by a touch panel in an electronic device in response to a touch of a user.

[0112] Here, the touch of the user can be, for example, a touch with a finger, a touch while wearing gloves, or a touch with a palm, and the like.

[0113] It should be noted that the first capacitance data in the embodiment can be the first frame of original capacitance value data received by the touch algorithm service module.

[0114] As shown in Figure 3As shown, the touch chip uploads the collected raw capacitance value data of the touch panel to the touch algorithm service module through the touch drive. In this way, the touch algorithm service module receives the raw capacitance value data.

[0115] S502, processing the first capacitance data to obtain first difference data corresponding to the first capacitance data.

[0116] In this step, the first difference data corresponding to the first capacitance data is obtained based on the first capacitance data.

[0117] The process of obtaining the first difference data is described in the description of step (4) of the above-described Figure 4 , which will not be repeated here.

[0118] In this embodiment, the process of obtaining the difference data corresponding to any capacitance data is described in the description of step (4) of the above-described Figure 4 , which will not be repeated here.

[0119] S503, generating first touch report point information corresponding to the first capacitance data according to the first difference data; saving the first difference data as first reference difference data and saving the first touch report point information as first reference touch report point information.

[0120] It should be noted that the "first", "second" and the like are added before the reference difference data in this embodiment in order to distinguish the changes of the reference difference data. In application, there is only one frame of reference difference data, and when the new reference difference data is updated, the old reference difference data is deleted and the new reference difference data is saved.

[0121] S504, obtaining second capacitance data generated by the touch panel in response to the user's touch.

[0122] The second capacitance data is obtained by the touch algorithm service module after obtaining the first capacitance data. That is, the time when the touch algorithm service module obtains the second capacitance data is later than the time when the touch algorithm service module obtains the first capacitance data.

[0123] S505, processing the second capacitance data to obtain second difference data corresponding to the second capacitance data.

[0124] In this step, the second difference data corresponding to the second capacitance data is obtained based on the second capacitance data.

[0125] S506, determining the difference value between the second difference data and the first reference difference data, denoted as a first difference value.

[0126] S507, if the first difference value is less than the first threshold, the first reference touch reporting information is used as the second touch reporting information corresponding to the second capacitance data.

[0127] According to this step, when the difference between the second difference data corresponding to the second capacitance data and the first reference difference data is less than the first threshold, the touch reporting information corresponding to the obtained first reference difference data (i.e., the first reference touch reporting information) is directly used as the second touch reporting information corresponding to the second capacitance data. There is no need to perform a series of algorithm processing such as peak finding, touch area selection, and touch mode determination on the second difference data. This reduces the processing steps, thereby reducing the time that the touch process occupies the main chip CPU and reducing the load and power consumption of the touch process.

[0128] Following step S507, the following may also be included:

[0129] The second difference data is processed to obtain the first time information and the first frame number information. The first processing is the time and frame number related processing in the touch reporting generation algorithm. The touch reporting generation algorithm is used to generate touch reporting information based on the difference data corresponding to the capacitance data.

[0130] The time information in the touch reporting generation algorithm is updated based on the first time information, and the frame information in the touch reporting generation algorithm is updated based on the first frame number information. The touch reporting generation algorithm is used to generate touch reporting information corresponding to the capacitance data based on the difference data corresponding to the capacitance data.

[0131] In this way, by updating the time information and frame number information, the processing of data frames after the second capacitor data can proceed smoothly.

[0132] In this paper, the touch reporting generation algorithm can be: Figure 4 The second set of algorithms in (and subsequent) Figure 6 The second algorithm set is the same (as in the first set). The first processing can be... Figure 4 The processing of time- and frame-count-related algorithms in the second set of algorithms. In other words, it can... Figure 4 The second set of algorithms is divided into two parts: the first part consists of algorithms related to time and frame rate, and the second part consists of algorithms unrelated to time and frame rate. The algorithms used in the first processing are from the first part. The first part of the algorithms is relatively few compared to the entire second set of algorithms; therefore, the CPU time required to execute the first processing is also very small.

[0133] For example, Figure 4 The algorithm that accumulates the number of frames in the second set of algorithms belongs to the first processing.

[0134] Figure 5In the embodiment shown, the touch algorithm service module does not need to perform Figure 4 In the second algorithm set, the algorithm other than the algorithm related to time and frame number is executed, thus reducing the time occupied by the main chip CPU, reducing the load and power consumption.

[0135] Figure 6 Another touch algorithm processing flow diagram of the touch algorithm service module in the THP scheme in the embodiment shown for example. Please refer to Figure 6 In the embodiment, the processing flow of the touch algorithm service module includes the following steps:

[0136] Step (1), the touch algorithm service module TP Daemon acquires a frame of original capacitance value data, denoted as FrameData.

[0137] This step is the same as step (1) in the embodiment shown, which will not be repeated here. Figure 4

[0138] Step (2), the touch algorithm service module TP Daemon calls the algorithm library to process FrameData.

[0139] This step is the same as step (2) in the embodiment shown, which will not be repeated here. Figure 4

[0140] Step (3), the algorithm library performs digital signal filtering on FrameData.

[0141] This step is the same as step (3) in the embodiment shown, which will not be repeated here. Figure 4

[0142] Step (4), the algorithm library performs Diff value operation on the filtered FrameData to obtain the Diff value data corresponding to the filtered FrameData.

[0143] This step is the same as step (4) in the embodiment shown, which will not be repeated here. Figure 4

[0144] Step (5), Diff signal stability detection is performed. If it is confirmed through detection that the Diff signal is stable, the subsequent step (6) is executed, otherwise, if it is confirmed through detection that the Diff signal is not stable, the subsequent step (7) is executed.

[0145] Wherein, whether the Diff signal is stable depends on the current difference value data (Diff) and the previous difference value data (Diff). Figure 6 ​​​​The difference value between the current frame of raw capacitance value data FrameData and the reference difference value data is obtained. The method of obtaining the difference value will be described later. If the difference value is small (e.g., less than a first threshold value), the Diff signal is considered stable; otherwise, if the difference value is large (e.g., greater than or equal to the first threshold value), the Diff signal is considered unstable.

[0146] In step (6), it is confirmed that the touch report point information of the current frame of raw capacitance value data FrameData is the same as the touch report point information corresponding to the reference difference value data. The touch report point information corresponding to the reference difference value data is used as the touch report point information of the current frame of raw capacitance value data FrameData, the code of the algorithm part related to time and frame number is processed, and step (1) is returned.

[0147] In this step, the touch report point information corresponding to the reference difference value data is used as the touch report point information of the current frame of raw capacitance value data FrameData, and the algorithms in the second algorithm set (except the algorithms related to time or frame number) do not need to be executed again. Figure 6 In this step, the touch report point information corresponding to the reference difference value data is used as the touch report point information of the current frame of raw capacitance value data FrameData, and the algorithms in the second algorithm set (except the algorithms related to time or frame number) do not need to be executed again.

[0148] Thus, the processing of the current frame of raw capacitance value data FrameData ends here, and the subsequent steps (8) and the steps after step (8) do not need to be executed again. After returning to step (1), the next frame of raw capacitance value data FrameData is received and processed.

[0149] In step (7), the current reference difference value data is updated.

[0150] In this step, the current reference difference value data is updated to the Diff value data corresponding to the current frame of raw capacitance value data FrameData (i.e., the Diff value calculation result in step (4) in the embodiment).

[0151] In step (8), the peak value Peak of the Diff value signal image is found.

[0152] This step is described in step (5) in the embodiment shown in FIG. 6 and will not be described again here. Figure 4

[0153] In step (9), the touch zone TouchZone is traversed.

[0154] This step is described in step (6) in the embodiment shown in FIG. 6 and will not be described again here. Figure 4

[0155] In step (10), the touch mode TouchMode is determined.

[0156] This step is described in step (7) in the embodiment shown in FIG. 6 and will not be described again here.​​Figure 4 Step (7) in the embodiment shown is not described here again.

[0157]

[0158] (n+3) generates touch report points.

[0159] This step is described above Figure 4 Step (n) in the embodiment shown is not described here again.

[0160] Figure 6 The first algorithm set in Figure 4 is the same as the first algorithm set in Figure 6 The second algorithm set in Figure 4 is the same as the second algorithm set in

[0161] As can be seen, in this embodiment, the Diff signal stability detection (executed by the DiffSignalStablility detection module (hereinafter referred to as the DSS module)) is added on the basis of the flow shown in Figure 4 As shown in Figure 6 When the DSS module detects that the Diff value in the Diff value data corresponding to the original capacitance value data FrameData is basically consistent compared with the Diff value in the Diff Baseline (referring to the current baseline Diff value data), the report point information corresponding to the current baseline Diff value data is maximally reused. Moreover, for subsequent algorithms that need to rely on time or frame number, such as the anti-mis-touch algorithm, partial algorithm content processing is needed to ensure that the algorithm state machine can be updated in real time.

[0162] Figure 11 The comparison diagram of the CPU time occupied by the touch process in the scheme shown in Figure 4 and the scheme shown in Figure 6 As can be seen from Figure 11 , the CPU time occupied by the scheme shown in Figure 6 is significantly reduced compared with the scheme shown in Figure 4 , so the scheme shown in Figure 6 reduces the load and power consumption of the touch process.

[0163] When the DSS module determines that the Diff value in the Diff value data corresponding to the original capacitance value data FrameData is significantly different from the Diff value in the Diff Baseline, the Diff Baseline is updated to the Diff value data corresponding to the original capacitance value data FrameData, and the entire flow of the second algorithm set in Figure 6 is executed.

[0164] Here, the way of comparing the Diff values in the Diff value data corresponding to the frame original capacitance value data FrameData with the Diff values in the Diff Baseline is exemplified, and is not limited to the following examples.

[0165] In one example, the way of comparing the Diff values in the Diff value data (hereinafter referred to as the current Diff value data) corresponding to the frame original capacitance value data FrameData with the Diff values in the Diff Baseline can be as follows.

[0166] Calculate the difference between each Diff value in the current Diff value data and the Diff value at the same position in the Diff Baseline, and record it as a Diff difference value.

[0167] Find the maximum value in all Diff difference values, i.e., the maximum Diff difference value.

[0168] Determine whether the maximum Diff difference value is less than a first value (which can be referred to as a Diff difference value threshold).

[0169] If the maximum Diff difference value is less than the first value, it is determined that the Diff values in the Diff value data corresponding to the frame original capacitance value data FrameData are basically consistent with the Diff values in the Diff Baseline (or the Diff signal is stable).

[0170] If the maximum Diff difference value is greater than or equal to the first value, it is determined that the Diff values in the Diff value data corresponding to the frame original capacitance value data FrameData are significantly different from the Diff values in the Diff Baseline (or the Diff signal is unstable).

[0171] In another example, the way of comparing the Diff values in the Diff value data (hereinafter referred to as the current Diff value data) corresponding to the frame original capacitance value data FrameData with the Diff values in the Diff Baseline can be as follows.

[0172] Calculate the difference between each Diff value in the current Diff value data and the Diff value at the same position in the Diff Baseline, and record it as a Diff difference value.

[0173] Find the number of Diff difference values greater than a second value (which can be less than the first value as the Diff difference value threshold in the foregoing example) in all Diff difference values, and record it as a first number.

[0174] Determine whether the first number is less than a preset number threshold.

[0175] If the first number is less than the preset number threshold, it is determined that the Diff value in the Diff value data corresponding to the current frame raw capacitance value data FrameData is basically consistent with the Diff value in the Diff Baseline (or the Diff signal is stable).

[0176] If the first number is greater than or equal to the preset number threshold, it is determined that the Diff value in the Diff value data corresponding to the current frame raw capacitance value data FrameData is greatly different from the Diff value in the Diff Baseline (or the Diff signal is unstable).

[0177] Of course, in actual applications, the above two methods can also be used simultaneously. In this case, only when the maximum Diff difference is less than the first value and the first number is less than the preset number threshold, it is determined that the Diff value in the Diff value data corresponding to the current frame raw capacitance value data FrameData is basically consistent with the Diff value in the Diff Baseline. Otherwise, if the maximum Diff difference is greater than or equal to the first value, or the first number is greater than or equal to the preset number threshold, it is determined that the Diff value in the Diff value data corresponding to the current frame raw capacitance value data FrameData is greatly different from the Diff value in the Diff Baseline.

[0178] Connect Figure 5 The embodiment shown. Figure 7 Another flowchart of the data processing method in the embodiment is shown for example. The data processing method in the embodiment can be executed by a touch algorithm service module (the touch algorithm service module executes the data processing method by occupying the resources of the CPU in the main chip) in the Figure 2A , Figure 3

[0179] As shown in the embodiment, the flow of the data processing method in the embodiment can include the following steps: Figure 7 S701, obtaining third capacitance data generated by the touch panel in response to the user's touch.

[0180] The time when the touch algorithm service module obtains the third capacitance data is later than the time when the touch algorithm service module obtains

[0181] the first capacitance data in the embodiment shown. Figure 5

[0182] S702, processing the third capacitance data to obtain third difference value data corresponding to the third capacitance data.

[0183] In this step, the third difference value data corresponding to the third capacitance data is obtained based on the third capacitance data.

[0184] ​​S703, determine the difference between the third difference data and the first benchmark difference data, and denot it as the second difference value.

[0185] S704, if the second difference value is less than the first threshold, the first reference touch reporting information is used as the third touch reporting information corresponding to the third capacitance data.

[0186] Figure 7 In the illustrated embodiment, since the difference between the third difference data and the first benchmark difference data (i.e., the second difference value) is less than the first threshold, the touch algorithm service module does not need to execute... Figure 6 The second set of algorithms includes all algorithms other than those related to time or frame count.

[0187] After step S704, it may also include:

[0188] The third difference data is processed in the first step to obtain the second time information and the second frame number information. The first step is the time and frame number related processing in the touch reporting generation algorithm. The touch reporting generation algorithm is used to generate touch reporting information based on the difference data corresponding to the capacitance data.

[0189] The time information in the touch reporting generation algorithm is updated based on the second time information, and the frame information in the touch reporting generation algorithm is updated based on the second frame number information.

[0190] In this way, by updating the time information and frame number information, the processing of data frames after the third capacitor data can proceed smoothly.

[0191] catch Figure 7 The illustrated embodiment. Figure 8 This is an exemplary flowchart illustrating another data processing method in this embodiment. The data processing method in this embodiment can be... Figure 2A , Figure 3 The touch algorithm service module (which executes data processing methods by occupying CPU resources in the main chip) is used for execution.

[0192] like Figure 8 As shown, in this embodiment, the data processing method may include the following steps:

[0193] S801, acquires the fourth capacitance data generated by the touch panel in response to the user's touch.

[0194] The touch algorithm service module obtains the fourth capacitor data later than the touch algorithm service module obtains the fourth capacitor data. Figure 7 The timing of the third capacitor data in the illustrated embodiment.

[0195] S802, processing the fourth capacitance data to obtain fourth difference data corresponding to the fourth capacitance data.

[0196] The fourth difference data corresponding to the fourth capacitance data is obtained based on the fourth capacitance data.

[0197] S803, determining a difference value between the fourth difference data and the first reference difference data, denoted as a third difference value.

[0198] S804, if the third difference value is greater than or equal to a first threshold value, generating fourth touch report point information corresponding to the fourth capacitance data according to the fourth difference data.

[0199] S805, saving the fourth difference data as second reference difference data and saving the fourth touch report point information as second reference touch report point information.

[0200] Before step S805, it can also include: deleting the first reference difference data and the first reference touch report point information.

[0201] Figure 8 In the embodiment shown, since the difference value between the fourth difference data and the first reference difference data (i.e. the third difference value) is greater than or equal to the first threshold value, the touch algorithm service module not only needs to execute each algorithm in the first algorithm set in step S801, but also needs to execute each algorithm in the second algorithm set in step S802. Moreover, it also needs to update the current reference difference data and the reference touch report point information for use in subsequent processing. Figure 6 Figure 6

[0202] In the embodiment shown, the touch algorithm service module acquires the fourth capacitance data at a time later than the time at which the touch algorithm service module acquires the fourth capacitance data in the embodiment shown in Figure 8 . Figure 9 Another flowchart example of the data processing method in the embodiment shown is exemplarily shown. The data processing method in the embodiment can be executed by the touch algorithm service module (the touch algorithm service module executes the data processing method by occupying the resources of the CPU in the main chip) in Figure 2A , Figure 3 .

[0203] In the embodiment shown, the flow of the data processing method can include the following steps. Figure 9

[0204] S901, acquiring fifth capacitance data generated by a touch panel in response to a user's touch.

[0205] The time at which the touch algorithm service module acquires the fifth capacitance data is later than the time at which the touch algorithm service module acquires the fourth capacitance data in the embodiment shown in Figure 8 .

[0206] ​​​S902, processing the fifth capacitance data to obtain fifth difference data corresponding to the fifth capacitance data.

[0207] The fifth difference data corresponding to the fifth capacitance data is obtained based on the fifth capacitance data.

[0208] S903, determining a difference value between the fifth difference data and the second reference difference data, denoted as a third difference value.

[0209] S904, if the third difference value is less than a first threshold value, using the second reference touch report point information as the fifth touch report point information corresponding to the fifth capacitance data.

[0210] After step S904, it can further include:

[0211] The first processing is processing related to time and frame number in a touch report point generation algorithm, and the touch report point generation algorithm is used to generate touch report point information according to difference data corresponding to capacitance data.

[0212] The time information in the touch report point generation algorithm is updated according to the third time information, and the frame number information in the touch report point generation algorithm is updated according to the third frame number information.

[0213] In this way, by updating the time information and the frame number information, the processing of the data frames after the fifth capacitance data can be smoothly carried out. Figure 9 In the embodiments shown, the touch algorithm service module does not need to execute Figure 6 algorithms in the second algorithm set except algorithms related to time or frame number, so the time occupied by the main chip CPU is reduced, and the load and power consumption are reduced.

[0214] In addition, the touch algorithm service module can further include: Figure 5

[0215] According to the first difference data, the first state information of each state in the touch report point generation algorithm is generated, and the touch report point generation algorithm is used to generate touch report point information according to difference data corresponding to capacitance data.

[0216] After obtaining the second capacitance data generated by the touch panel in response to the touch of the user, it further includes: if the first difference value is less than the first threshold value, setting each state in the touch report point generation algorithm according to the first state information.

[0217] In this way, in the case where the difference value is less than the first threshold value, the state information of each state in the touch report point generation algorithm can remain unchanged, thereby reducing the processing of the algorithm for generating the state information of each state in the touch report point generation algorithm, and saving the main chip CPU time. ​

[0218] The algorithm for generating the state information of each state in the touch report point generation algorithm also belongs to the algorithm in the second algorithm set in the algorithm (or Figure 6 ) in the first algorithm set. Figure 4

[0219] In the above embodiments, after the touch algorithm service module obtains the touch report point information, the touch algorithm service module can report the touch report point information to the input system in the electronic device through the touch driver.

[0220] The data processing method of the present embodiment is further described below through some examples.

[0221] Suppose that the touch algorithm service module receives the 1st frame data, the 2nd frame data, the 3rd frame data, …, the 10th frame data in the order of time, and the 1st frame data to the 10th frame data are all original capacitance value data of the touch panel. The processing procedure of the touch algorithm service module on the 1st frame data to the 10th frame data is as follows:

[0222] Obtain the 1st frame data, process the 1st frame data, and obtain the diff value data 1 corresponding to the 1st frame data; generate the touch report point 1 corresponding to the 1st frame data based on the preset touch report point generation algorithm; set the current reference difference value data as the diff value data 1, and the reference touch report point as the touch report point 1, and save the reference difference value data and the reference touch report point.

[0223] Obtain the 2nd frame data, process the 2nd frame data, and obtain the diff value data 2 corresponding to the 2nd frame data; determine the difference value 2 of the diff value data 2 and the diff value data 1 as the current reference difference value data according to the diff value data 2 and the diff value data 1, and if the difference value 2 is less than the preset threshold value, determine that the touch report point 2 corresponding to the 2nd frame data is equal to the current reference touch report point, i.e., the touch report point 1. Furthermore, perform the first processing based on the diff value data 2 to obtain the time information 2 and the frame number information 2, and the first processing is the processing related to the time or the frame number; update the time information in the touch report point generation algorithm according to the time information 2, and update the frame number information in the touch report point generation algorithm according to the frame number information 2.

[0224] ​The third frame data is acquired, the third frame data is processed, and diff value data 3 corresponding to the third frame data is obtained; difference value 3 of the diff value data 3 and the diff value data 1 as the current reference difference value data is determined according to the diff value data 3 and the diff value data 1, and if the difference value 3 is also less than the preset threshold value, it is determined that the touch report point 3 corresponding to the third frame data is also equal to the current reference touch report point, that is, the touch report point 1. And the first processing based on the diff value data 3 obtains time information 3 and frame number information 3, and the first processing is the processing related to time or frame number; the time information in the touch report point generation algorithm is updated according to the time information 3, and the frame number information in the touch report point generation algorithm is updated according to the frame number information 3.

[0225] The fourth frame data is acquired, the fourth frame data is processed, and diff value data 4 corresponding to the fourth frame data is obtained; difference value 4 of the diff value data 4 and the diff value data 1 as the current reference difference value data is determined according to the diff value data 4 and the diff value data 1, and if the difference value 4 is greater than or equal to the preset threshold value, the touch report point 4 corresponding to the fourth frame data is generated based on the preset touch report point generation algorithm; the current reference difference value data is updated to the diff value data 4, and the reference touch report point is updated to the touch report point 4.

[0226] The fifth frame data is acquired, the fifth frame data is processed, and diff value data 5 corresponding to the fifth frame data is obtained; difference value 5 of the diff value data 5 and the diff value data 4 as the current reference difference value data is determined according to the diff value data 5 and the diff value data 4, and if the difference value 5 is less than the preset threshold value, it is determined that the touch report point 5 corresponding to the fifth frame data is equal to the current reference touch report point, that is, the touch report point 4. And the first processing based on the diff value data 5 obtains time information 5 and frame number information 5, and the first processing is the processing related to time or frame number; the time information in the touch report point generation algorithm is updated according to the time information 5, and the frame number information in the touch report point generation algorithm is updated according to the frame number information 5.

[0227] The sixth frame data is acquired, the sixth frame data is processed, and diff value data 6 corresponding to the sixth frame data is obtained; difference value 6 of the diff value data 6 and the diff value data 4 as the current reference difference value data is determined according to the diff value data 6 and the diff value data 4, and if the difference value 6 is also less than the preset threshold value, it is determined that the touch report point 6 corresponding to the sixth frame data is also equal to the current reference touch report point, that is, the touch report point 4. And the first processing based on the diff value data 6 obtains time information 6 and frame number information 6, and the first processing is the processing related to time or frame number; the time information in the touch report point generation algorithm is updated according to the time information 6, and the frame number information in the touch report point generation algorithm is updated according to the frame number information 6.

[0228] Data frame 7 is acquired and processed to obtain the corresponding diff value data 7. Based on the diff value data 7 and the diff value data 4 used as the current reference difference data, the difference value 7 between the diff value data 7 and the diff value data 4 is determined. If the difference value 7 is also less than a preset threshold, the touch reporting point 7 corresponding to data frame 7 is determined to be equal to the current reference touch reporting point, i.e., touch reporting point 4. Furthermore, based on the diff value data 7, a first processing is performed to obtain time information 7 and frame number information 7. The first processing is related to time or frame number. The time information in the touch reporting point generation algorithm is updated according to the time information 7, and the frame number information in the touch reporting point generation algorithm is updated according to the frame number information 7.

[0229] Data frame 8 is acquired and processed to obtain the corresponding diff value data 8. Based on the diff value data 8 and the diff value data 4 used as the current baseline difference data, the difference value 8 between the diff value data 8 and the diff value data 4 is determined. If the difference value 8 is also less than a preset threshold, the touch reporting point 8 corresponding to data frame 8 is determined to be equal to the current baseline touch reporting point, i.e., touch reporting point 4. Furthermore, based on the diff value data 8, a first processing step is performed to obtain time information 8 and frame count information 8. This first processing step is related to time or frame count. The time information in the touch reporting point generation algorithm is updated based on the time information 8, and the frame count information in the touch reporting point generation algorithm is updated based on the frame count information 8.

[0230] Receive data frame 9, process data frame 9 to obtain diff value data 9 corresponding to data frame 9; determine the difference value 9 between diff value data 9 and diff value data 4, which is the current reference difference data, based on diff value data 9 and diff value data 4. If the difference value 9 is greater than or equal to a preset threshold, generate touch reporting point 9 corresponding to data frame 9 based on a preset touch reporting point generation algorithm; update the current reference difference data to diff value data 9, and update the reference touch reporting point to touch reporting point 9.

[0231] The system receives the 10th frame of data, processes it to obtain the diff value data 10 corresponding to the 10th frame; based on the diff value data 10 and the diff value data 9 used as the current reference difference data, it determines the difference value 10 between the diff value data 10 and the diff value data 9. If the difference value 10 is less than a preset threshold, it determines that the touch reporting point 10 corresponding to the 10th frame of data is equal to the current reference touch reporting point, i.e., touch reporting point 9. Furthermore, based on the diff value data 10, a first processing is performed to obtain time information 10 and frame number information 10. The first processing is time- or frame-number-related processing; the time information in the touch reporting point generation algorithm is updated according to the time information 10, and the frame number information in the touch reporting point generation algorithm is updated according to the frame number information 10.

[0232] Figure 10 Fig. 1 shows an example of touch report point and reference difference value data corresponding to each frame of data processed by the touch algorithm service module in the process of processing the first frame of data to the tenth frame of data.

[0233] As can be seen, for the first frame of data to the tenth frame of data, the touch report point information reported (to the input system) by the touch algorithm service module is in turn: touch report point 1, touch report point 1, touch report point 1, touch report point 4, touch report point 4, touch report point 4, touch report point 4, touch report point 4, touch report point 9, touch report point 9. As the number of frames of data processed by the touch algorithm service module increases, more algorithm processing processes are saved, thereby reducing the CPU occupancy time of the main chip and reducing the load and power consumption.

[0234] Furthermore, the data processing method of the embodiment can accurately identify the cumulative changes of the difference value data corresponding to the capacitance data generated by the touch, thereby making the obtained touch report point information more accurate. For example Figure 10 In the embodiment shown, the difference between the difference value data between the fifth, sixth, seventh, and eighth frames of data and the fourth frame of data is not large, but the difference between the difference value data between the ninth frame of data and the fourth frame of data is large enough, so the reference difference value data is updated, so that the touch report point obtained subsequently is more accurate.

[0235] The embodiment of the present application also provides an electronic device, which comprises a memory and a processor, the memory is coupled to the processor, and the memory stores program instructions, when the program instructions are executed by the processor, the electronic device executes the data processing method of the foregoing electronic device.

[0236] It can be understood that, in order to implement the above functions, the electronic device comprises hardware and / or software modules corresponding to each function. The algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of the present application.

[0237] The embodiment also provides a computer storage medium, which stores computer instructions, when the computer instructions run on the electronic device, the electronic device executes the related method steps to implement the data processing method in the above embodiment.

[0238] The embodiment also provides a computer program product, which, when running on a computer, enables the computer to perform the above related steps to realize the data processing method in the above embodiment.

[0239] In addition, the embodiment of the present application further provides a device, which can be a chip, a component or a module. The device can include a processor and a memory connected to each other. The memory is used to store computer-executable instructions. When the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the chip to perform the data processing method in the above method embodiments.

[0240] The electronic device, the computer storage medium, the computer program product or the chip provided in the embodiment can be used to perform the corresponding method provided above, and thus the beneficial effects achieved thereby can refer to the beneficial effects in the corresponding method provided above, which will not be described herein again.

[0241] From the above description of the embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration. In actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0242] In the several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the modules or units is only a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0243] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0244] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware, or in the form of software functional unit.

[0245] Any part of any embodiment of the present application, and any part of the same embodiment, can be freely combined. Any combination of the above is within the scope of the present application.

[0246] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium, includes a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage media that can store program codes.

[0247] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative, not restrictive, and those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.

[0248] The steps of the method or algorithm described in combination with the disclosure of the embodiments of the present application can be implemented in the form of hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), a register, a hard disk, a mobile hard disk, a compact disc (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC.

[0249] Those skilled in the art can understand that the functions described in the embodiments of the present application in the one or more examples above can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes computer storage medium and communication medium, wherein the communication medium includes any medium that facilitates the transfer of computer program from one place to another. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0250] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the specific embodiments described above, which are merely illustrative rather than restrictive, and those of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims.

Claims

1. A data processing method, characterized by, The method is applied to an electronic device, and comprises: obtaining first capacitance data generated by a touch panel in the electronic device in response to a user's touch; processing the first capacitance data to obtain first difference data corresponding to the first capacitance data; generating first touch report point information corresponding to the first capacitance data according to the first difference data; saving the first difference data as first reference difference data and saving the first touch report point information as first reference touch report point information; obtaining second capacitance data generated by the touch panel in response to the user's touch; processing the second capacitance data to obtain second difference data corresponding to the second capacitance data; determining a difference value between the second difference data and the first reference difference data, denoted as a first difference value; if the first difference value is less than a first threshold value, using the first reference touch report point information as second touch report point information corresponding to the second capacitance data.

2. The method of claim 1, wherein, Further comprising: performing first processing on the second difference data to obtain first time information and first frame number information, the first processing being processing related to time and frame number in a touch report point generation algorithm, the touch report point generation algorithm being used to generate touch report point information according to difference data corresponding to capacitance data; updating time information in the touch report point generation algorithm according to the first time information and updating frame number information in the touch report point generation algorithm according to the first frame number information, the touch report point generation algorithm being used to generate touch report point information corresponding to capacitance data according to difference data corresponding to the capacitance data.

3. The method according to claim 1 or 2, characterized in that, Further comprising: obtaining third capacitance data generated by the touch panel in response to the user's touch; processing the third capacitance data to obtain third difference data corresponding to the third capacitance data; determining a difference value between the third difference data and the first reference difference data, denoted as a second difference value; if the second difference value is less than the first threshold value, using the first reference touch report point information as third touch report point information corresponding to the third capacitance data.

4. The method of claim 3, wherein, Further comprising: performing first processing on the third difference data to obtain second time information and second frame number information, the first processing being processing related to time and frame number in a touch report point generation algorithm, the touch report point generation algorithm being used to generate touch report point information according to difference data corresponding to capacitance data; updating time information in the touch report point generation algorithm according to the second time information and updating frame number information in the touch report point generation algorithm according to the second frame number information.

5. The method of claim 4, wherein, Further comprising: obtaining fourth capacitance data generated by the touch panel in response to the user's touch; processing the fourth capacitance data to obtain fourth difference data corresponding to the fourth capacitance data; determining a difference value between the fourth difference data and the first reference difference data, denoted as a third difference value; if the third difference value is greater than or equal to the first threshold value, generating fourth touch report point information corresponding to the fourth capacitance data according to the fourth difference data.

6. The method of claim 5, wherein, The method further includes, after generating the fourth touch report point information corresponding to the fourth capacitance data: saving the fourth difference value data as second reference difference value data and saving the fourth touch report point information as second reference touch report point information.

7. The method of claim 6, wherein, The method further includes, before saving the fourth difference value data as second reference difference value data and saving the fourth touch report point information as second reference touch report point information: deleting the first reference difference value data and the first reference touch report point information.

8. The method of claim 6, wherein, The method further includes: obtaining fifth capacitance data generated by the touch panel in response to a touch of a user; processing the fifth capacitance data to obtain fifth difference value data corresponding to the fifth capacitance data; determining a difference value between the fifth difference value data and the second reference difference value data, denoted as a third difference value; if the third difference value is less than the first threshold value, using the second reference touch report point information as fifth touch report point information corresponding to the fifth capacitance data.

9. The method of any one of claims 1, 3, 5, or 8, wherein, The difference value between the difference value data and the reference difference value data is determined in the following manner: the matrix in which the difference value data is located is denoted as a first matrix, and the matrix in which the reference difference value data is located is denoted as a second matrix; obtaining a difference value of data in two elements at the same position in the first matrix and the second matrix; finding a maximum value in all the difference values, denoted as a maximum difference value, and determining that the difference value between the difference value data and the reference difference value data is equal to the maximum difference value; The relationship between the difference value and the first threshold value is determined in the following manner: determining that the first threshold value is a preset difference value threshold value; if the maximum difference value is less than the difference value threshold value, determining that the difference value is less than the first threshold value; or, if the maximum value is greater than or equal to the difference value threshold value, determining that the difference value is greater than or equal to the first threshold value.

10. The method of any one of claims 1, 3, 5, or 8, wherein, The difference value between the difference value data and the reference difference value data is determined in the following manner: the matrix in which the difference value data is located is denoted as a first matrix, and the matrix in which the reference difference value data is located is denoted as a second matrix; obtaining a difference value of data in two elements at the same position in the first matrix and the second matrix; counting a number of difference values greater than a target value in all the difference values, denoted as a first number, and determining that the difference value between the difference value data and the reference difference value data is equal to the first number; The relationship between the difference value and the first threshold value is determined in the following manner: determining that the first threshold value is a preset second number; if the first number is less than the second number, determining that the difference value is less than the first threshold value; or, if the first number is greater than or equal to the second number, determining that the difference value is greater than or equal to the first threshold value.

11. The method according to any one of claims 1 to 8, characterized in that, The method further includes: reporting, to an input system in the electronic device, touch report point information corresponding to capacitance data through touch driving.

12. The method of claim 1, wherein, The method further includes: generating first state information of each state in a touch report point generation algorithm according to the first difference value data, the touch report point generation algorithm being used to generate touch report point information according to difference value data corresponding to capacitance data; After the second capacitance data generated by the touch panel in response to the touch of the user is acquired, the method further comprises: if the first difference value is less than the first threshold value, setting each state in the touch report point generation algorithm according to the first state information.

13. The method of claim 1, wherein, The electronic device is a mobile phone, a tablet, a personal computer (PC), a wearable device, a car control panel, or an electric vehicle control panel.

14. An electronic device, comprising: The electronic device comprises: a memory and a processor, the memory being coupled to the processor; the memory stores program instructions, when the program instructions are executed by the processor, the electronic device executes the data processing method according to any one of claims 1 to 13.

15. A computer readable storage medium comprising a computer program, characterized in that, When the computer program runs on the electronic device, the electronic device executes the data processing method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Scanning method for projected capacitive touch panels

    CN101840293A

  • Control method and apparatus for touch and display integrated system

    CN107943341A