Data processing method, electronic device, readable medium and program product

By directly adjusting the sampling rate and interpolation processing of the touch driver in kernel space, the problem of the touch sampling rate not being able to be adjusted in time when the screen refresh rate changes is solved, resulting in reduced power consumption and improved touch position accuracy, thus enhancing the user experience.

WO2026097919A1PCT designated stage Publication Date: 2026-05-15HONOR DEVICE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2025-07-15
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In electronic devices, when the screen refresh rate changes, the touch sampling rate cannot be adjusted in time, resulting in high power consumption and affecting the screen's responsiveness.

Method used

By directly adjusting the sampling rate of the touch driver through the file node path exposed in the kernel space, a shorter signaling transmission path is established, the touch sampling rate is dynamically adjusted, and the accuracy of the touch position is ensured through interpolation processing.

Benefits of technology

While reducing power consumption, it ensures that electronic devices can accurately recognize touch positions and improve screen responsiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025108608_15052026_PF_FP_ABST
    Figure CN2025108608_15052026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of terminals, and particularly relates to a data processing method, an electronic device, a readable medium and a program product. In the method, the amount of data processed from raw capacitance data is reduced by means of lowering the touch sampling rate in scenarios where the screen refresh rate is relatively low, thereby decreasing the power consumption of an electronic device; moreover, for touch event coordinates obtained by correspondingly processing the raw capacitance data that is reduced due to the lowered touch sampling rate, methods such as interpolation processing are further performed thereon to increase the amount of touch event coordinate data, such that the amount of touch event coordinate data ultimately used for determining the touch position is increased to the amount before the touch sampling rate was lowered. Therefore, on the premise of ensuring that the electronic device can accurately identify the touch position and can thus respond to accurate touch events, the power consumption of the electronic device can be decreased.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing methods, electronic devices, readable media and program products

[0001] This application claims priority to Chinese Patent Application No. 202411577771.7, filed on November 5, 2024, entitled “Data Processing Method, Electronic Device, Readable Medium and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This invention relates to the field of terminal technology, and more specifically to a data processing method, electronic device, readable medium, and program product. Background Technology

[0003] During the use of electronic devices, the screen refresh rate can be adjusted in real time to suit different display scenarios. For example, in gaming scenarios, to meet the requirements of smooth gameplay, electronic devices use a higher screen refresh rate, such as 120 Hz or 144 Hz or even higher; while in display scenarios such as web browsing interfaces in browser applications, a lower screen refresh rate can be set.

[0004] It's understandable that for electronic devices with touch panels (TP), a higher screen refresh rate requires a higher required touch sampling rate, and vice versa. However, in the software system of an electronic device, adjusting the touch sampling rate requires a longer signaling transmission path when the screen refresh rate changes. Therefore, to adapt to different screen refresh rates, electronic devices generally configure the touch sampling rate corresponding to the highest screen refresh rate, and maintain this rate regardless of screen refresh rate changes. In other words, the electronic device samples touch data using the same rate in all display scenarios.

[0005] Thus, electronic devices still use a higher touch sampling rate when the screen refresh rate is reduced, but a higher touch sampling rate will also lead to higher power consumption of electronic devices. Summary of the Invention

[0006] This application provides a data processing method, an electronic device, a readable medium, and a program product. The method can reduce the power consumption of the electronic device while ensuring accurate identification of the touch location and thus accurate response to touch events.

[0007] In a first aspect, embodiments of this application provide a data processing method applied to an electronic device, the electronic device including a screen, and the method comprising: displaying first content on the screen at a first screen refresh rate, and the screen having a first touch sampling rate corresponding to the first screen refresh rate; detecting that the screen displays second content at a second screen refresh rate, wherein the second screen refresh rate is less than the first screen refresh rate; adjusting the touch sampling rate of the screen to a second touch sampling rate corresponding to the second screen refresh rate, wherein the second touch sampling rate is less than the first touch sampling rate; acquiring first capacitance data corresponding to the second touch sampling rate; acquiring first coordinate data corresponding to the first capacitance data, wherein the first coordinate data corresponds to the second touch sampling rate; and performing interpolation processing on the first coordinate data to obtain second coordinate data, wherein the second coordinate data corresponds to the first touch sampling rate.

[0008] For example, the aforementioned electronic device may be a mobile phone or other electronic device with a screen and supporting touch operation. The aforementioned first content may be the game interface content displayed when the mobile phone is running a game application, or it may be the video playback interface content displayed when the mobile phone is running a video application, etc.

[0009] It is understandable that adjusting the screen's touch sampling rate to a smaller second touch sampling rate corresponding to the second screen refresh rate can reduce the amount of raw capacitance data processed in scenarios with low screen refresh rates, thereby reducing the power consumption of the electronic device. Furthermore, by interpolating and other methods, the number of touch event coordinate data points obtained from the reduced raw capacitance data due to the lower touch sampling rate is increased, ultimately restoring the number of touch event coordinate data points used to determine the touch position to the level before the touch sampling rate was lowered. In this way, the power consumption of the electronic device can be reduced while ensuring accurate recognition of the touch position and thus accurate response to touch events.

[0010] In one possible implementation of the first aspect described above, the electronic device includes a touch driver, and adjusting the touch sampling rate of the screen to a second touch sampling rate corresponding to a second screen refresh rate includes: acquiring a first file node corresponding to the touch driver, wherein the first file node is used to receive relevant control parameters set for the touch driver; writing the second touch sampling rate corresponding to the second screen refresh rate into the first file node; acquiring the second touch sampling rate in the first file node through the touch driver, and controlling the screen to collect capacitance data with the second touch sampling rate.

[0011] For example, the first file node mentioned above could include a file node with a path such as " / dev" or " / sys / class / input / ". This file node could be a file node exposed in kernel space by the touch driver.

[0012] In one possible implementation of the first aspect described above, the electronic device includes a synthesis service, and acquiring a first file node corresponding to the touch driver includes: accessing the first file node exposed in the kernel space by the touch driver through the synthesis service.

[0013] For example, electronic devices can access the file nodes corresponding to the touch driver through the synthesis service provided by the system, and adjust the touch sampling rate used by the touch driver to control the screen to collect capacitance data in a timely manner.

[0014] In one possible implementation of the first aspect above, writing the second touch sampling rate corresponding to the second screen refresh rate to the first file node includes: the synthesis service using the write interface provided by the file system in the kernel space to open the first file node; the synthesis service writing the second touch sampling rate to the first file node; and the synthesis service using the close interface provided by the file system to close the first file node after writing the second touch sampling rate.

[0015] For example, the aforementioned write interface can be "write" to open a file node. The aforementioned close interface can be "close" to close that file node. The synthesis service can utilize the API provided by the file system in the electronic device's kernel space to open the file node accessed by the touch driver during operation to adjust the touch sampling rate, and close the file node after adjustment. This signaling transmission path for adjusting the touch sampling rate is shorter than the signaling transmission path provided by the operating system of some electronic devices, which is System UI → Touch Service → Daemon Process → Touch HAL → Touch Driver. That is, the data processing method provided in this application can provide a shorter signaling transmission path, achieving the purpose of quickly adjusting the touch sampling rate in display scenarios that require reducing the touch sampling rate, resulting in a stronger timeliness in reducing device power consumption and a better corresponding power reduction effect.

[0016] It is understood that the above method of writing the touch sampling rate through a file node can be effective within one or more screen refresh cycles. When a mobile phone or other electronic device switches to display the interface of another application, or when it receives high-frequency touch operations from the user on the currently displayed interface and switches the screen refresh rate, the touch sampling rate in the file node can be restored to the touch sampling rate set at the highest screen refresh rate before the adjustment, i.e., the first touch sampling rate mentioned above.

[0017] In this way, for display scenarios that require ensuring screen responsiveness, mobile phones and other electronic devices can use a higher touch sampling rate to sample capacitance data, and respond quickly and accurately to the user's touch operations on the screen.

[0018] In one possible implementation of the first aspect above, obtaining the second touch sampling rate in the first file node through the touch driver and controlling the screen to collect capacitance data with the second touch sampling rate includes: the touch driver accessing the first file node to obtain the second touch sampling rate using the access interface provided by the file system; the touch driver generating a sampling control signal based on the second touch sampling rate; and the touch driver controlling the screen to collect capacitance data based on the sampling control signal, wherein the refresh frequency of the sampling control signal corresponds to the second touch sampling rate.

[0019] In one possible implementation of the first aspect above, the first touch sampling rate corresponds to collecting a first quantity of capacitance data within a preset time period, the second touch sampling rate corresponds to collecting a second quantity of capacitance data within a preset time period, the second quantity being less than the first quantity, and acquiring the first capacitance data corresponding to the second touch sampling rate includes: acquiring the second quantity of first capacitance data within a preset time period.

[0020] In one possible implementation of the first aspect above, obtaining the first coordinate data corresponding to the first capacitance data includes: processing the second quantity of first coordinate data based on the second quantity of first capacitance data to obtain the second quantity of first coordinate data.

[0021] In one possible implementation of the first aspect above, interpolating the first coordinate data to obtain the second coordinate data includes: performing interpolation operations on adjacent first coordinate data in a data queue formed by a second quantity of first coordinate data to obtain a third quantity of third coordinate data, wherein the first quantity is the sum of the second quantity and the third quantity; and obtaining a first quantity of second coordinate data based on the second quantity of first coordinate data and the third quantity of third coordinate data.

[0022] The aforementioned preset time can be, for example, one or more screen refresh cycles. For instance, corresponding to a 60Hz screen refresh rate, the preset time could be 16.67ms, or 125ms, etc., without limitation. The aforementioned data queue can be, for example, the event queue read by the input event consumption (unit) in the input subsystem 224 when it generates touch events.

[0023] In one possible implementation of the first aspect above, before adjusting the touch sampling rate of the screen to the second touch sampling rate corresponding to the second screen refresh rate, the method further includes: identifying whether the display scene corresponding to the second content displayed on the screen is a target scene; and adjusting the touch sampling rate of the screen to the second touch sampling rate if the display scene corresponding to the second content displayed on the screen is a target scene.

[0024] For example, the target scenario mentioned above could be a low frame rate scenario, i.e., a display scenario where the interface content typically changes slowly or the user operation frequency is low. For instance, a mobile phone running a browser application displaying a webpage for the user to browse. In such low frame rate scenarios, because the electronic device consistently maintains a high touch sampling rate to collect raw capacitance data, it wastes system computing resources and internal transmission channel resources. As mentioned earlier, by establishing a signaling transmission path to send the application VSYNC to the touch driver, the system can dynamically adjust the touch sampling rate according to the current screen refresh rate. This avoids the computing resources wasted by the system using a high touch sampling rate in low frame rate scenarios, and also avoids excessive occupation of internal transmission channel bandwidth resources during the transmission of raw capacitance data, thus helping to reduce system load and device power consumption.

[0025] In one possible implementation of the first aspect above, identifying whether the display scene corresponding to the second content displayed on the screen is a target scene includes: obtaining the rate of change of the second content and / or the frequency of the user's touch operation on the second content; determining that the display scene is a target scene when the rate of change of the second content is less than a first threshold and the frequency of the user's touch operation on the second content is less than the second threshold; and determining that the display scene is not a target scene when the frequency of the user's touch operation on the second content is greater than or equal to the second threshold.

[0026] For example, the first threshold mentioned above could be a rate threshold set according to the rate of change of the interface content of the corresponding interface. The second threshold mentioned above could be a frequency threshold set according to the frequency of user touch operations on the corresponding interface.

[0027] It is understandable that when the rate of change of the interface content is large, such as when it exceeds the first threshold mentioned above, electronic devices such as mobile phones can increase the screen refresh rate accordingly, which also requires a higher touch sampling rate. At this time, there is no need to reduce the touch sampling rate.

[0028] Secondly, embodiments of this application provide an electronic device, including: one or more memories; the one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the data processing methods provided in the first aspect and various possible implementations of the first aspect.

[0029] Thirdly, embodiments of this application provide a computer-readable medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the data processing method provided in the first aspect and various possible implementations of the first aspect.

[0030] Fourthly, embodiments of this application provide a computer program product, which includes computer instructions that, when executed by an electronic device, cause the electronic device to perform the data processing method provided in the first aspect and various possible implementations of the first aspect.

[0031] The beneficial effects of the second to fourth aspects mentioned above can be referred to the relevant descriptions in the first aspect and various possible implementations of the first aspect, which will not be repeated here. Attached Figure Description

[0032] Figure 1 shows a schematic diagram of an application scenario of a data processing method provided in an embodiment of this application.

[0033] Figure 2 shows a schematic diagram of the operating system software structure of an electronic device provided in an embodiment of this application.

[0034] Figure 3a shows a schematic diagram of a process for processing raw capacitance data into vertical synchronization signal (VSYNC) to trigger consumer touch event coordinates.

[0035] Figure 3b is a schematic diagram of a process provided in this application embodiment of processing raw capacitance data into vertical synchronization signal (VSYNC) to trigger consumer touch event coordinates.

[0036] Figure 4a shows a portion of the interactive implementation flow of a data processing method provided in an embodiment of this application.

[0037] Figure 4b shows another part of the interactive implementation flow diagram of a data processing method provided in an embodiment of this application.

[0038] Figure 5 shows a flowchart of an implementation method for a data processing method provided in an embodiment of this application.

[0039] Figure 6 shows a schematic diagram of the implementation process of another data processing method provided in the embodiments of this application.

[0040] Figure 7 shows a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0042] It is understood that the methods provided in this application can be applied to any electronic device, including but not limited to mobile stations (MS) and mobile terminals (MT). For example, electronic devices can be mobile phones, smart TVs, wearable devices, tablets, desktop computers, laptops, virtual reality (VR) devices, augmented reality (AR) devices, terminals in industrial control, self-driving, remote medical surgery, smart grids, transportation safety, smart cities, smart homes, and so on. This application does not limit the specific form of the electronic device. The following description uses mobile phone 10 as an example.

[0043] It is understood that the screen of an electronic device can be a touchscreen covering and integrated with a display screen, or it can consist of a touch sensor mounted on the display screen, in which case the screen is a touchscreen. The touchscreen can detect user touch operations. Taking a capacitive touchscreen as an example, a user's touch operation can cause a change in the capacitance value of the touchscreen surface. Based on this, the touchscreen can collect raw capacitance data by sampling the capacitance signal. The display screen provides display functionality, updating the images, videos, text, and other visual information sent by the system at a fixed screen refresh rate and displaying them to the user. In the embodiments of this application, the touchscreen and the display screen can be collectively referred to as the screen.

[0044] As mentioned earlier, in order to adapt to different screen refresh rates, electronic devices generally configure the touch sampling rate to correspond to the highest screen refresh rate, and still use a higher touch sampling rate when the screen refresh rate is reduced. A higher touch sampling rate will lead to higher power consumption of electronic devices.

[0045] For example, referring to the interface display scenario shown in Figure 1, the web browsing interface 100 displayed by an electronic device such as a mobile phone 10 running a browser application can respond to the user's swiping operation, such as the user's finger swiping up as shown in Figure 1, and refresh the interface to update the displayed content for the user to browse. This web browsing interface 100 can be an interface where the content changes slowly and the user operation is infrequent; therefore, a lower screen refresh rate is required, such as 60Hz or 30Hz, or even lower values.

[0046] However, due to the software system of the phone 10, when the screen refresh rate changes, a longer signaling transmission path is required to adjust the touch sampling rate. Therefore, the phone 10 will adapt to the highest screen refresh rate, such as 120Hz or 144Hz, and configure the touch sampling rate accordingly. For example, to adapt to a maximum screen refresh rate of 120Hz, it may be fixed at 120Hz or even higher. When the screen refresh rate corresponding to the web browsing interface on the phone 10 decreases, the phone 10 still uses a 120Hz touch sampling rate to obtain capacitance data, thereby determining the touch position and generating a touch event, which is then provided to the browser application to respond to the user's touch operation on the web browsing interface 100. Thus, the phone 10's fixed use of a high touch sampling rate and collection of a large amount of capacitance data results in a large amount of data that the system needs to process, consuming more computing resources and thus increasing the device's power consumption.

[0047] To address the aforementioned issues, this application provides a data processing method that reduces the amount of raw capacitance data processed by lowering the touch sampling rate in scenarios with low screen refresh rates, thereby reducing the power consumption of the electronic device. For example, a shorter signaling transmission path can be established in the electronic device system to directly provide the application vertical synchronization signal (application VSYNC) generated based on the hardware vertical synchronization signal (VSYNC) to the touch driver in the system. The real-time generated application VSYNC is provided to the touch driver, which then controls the touch driver to generate sampling control signals according to the refresh frequency of the application VSYNC and send them to the touch screen, thus reducing the touch sampling rate. The refresh frequency of the hardware VSYNC corresponds to the screen refresh rate; therefore, the refresh frequency of the generated application VSYNC also corresponds to the real-time screen refresh rate. Thus, as the screen refresh rate decreases, the refresh frequency of the application VSYNC provided to the touch driver can also decrease accordingly, thereby controlling and reducing the touch sampling rate of the electronic device.

[0048] Furthermore, it is understood that the accuracy of touch position related to touch events is associated with the number of touch event coordinates used to determine the touch position. Reducing the touch sampling rate may lead to a decrease in the number of touch event coordinate data obtained from processing the collected capacitance data, which may in turn reduce the accuracy of the touch position determined based on the touch event coordinates. Therefore, to ensure the accuracy of the touch position, the number of touch event coordinate data obtained from processing the reduced original capacitance data due to the decreased touch sampling rate can be increased through interpolation or other methods. This will increase the number of touch event coordinate data ultimately used to determine the touch position back to the number before the reduction in the touch sampling rate. In this way, the power consumption of the electronic device can be reduced while ensuring that the electronic device accurately identifies the touch position and responds to accurate touch events.

[0049] It is understood that the screen refresh rate can be any of 30Hz, 60Hz, 75Hz, 120Hz, 144Hz, 165Hz, or 240Hz, and the touch sampling rate can be any of 60Hz, 120Hz, 180Hz, 240Hz, 320Hz, or 480Hz.

[0050] As an example, the following explanation of the signaling transmission path and interpolation process will be based on the operating system architecture of electronic devices such as the iPhone 10.

[0051] Figure 2 shows a schematic diagram of the operating system software structure of an electronic device according to an embodiment of this application.

[0052] It is understood that in the embodiments of this application, the electronic device can be the mobile phone 10 in the scenario shown in Figure 1 above. In other embodiments, the electronic device can also be other electronic devices such as tablet computers, laptops, and smart TVs, and no limitation is made here.

[0053] Furthermore, it is understood that the operating system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application's embodiments use a layered architecture like Android. TM Taking a system as an example, this section illustrates the system software architecture of an electronic device. A layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces.

[0054] As shown in Figure 2, in this embodiment of the application, Android TM The system's layered architecture can include five layers, from top to bottom: the application layer (application layer) 210, the application framework layer (framework layer) 220, and Android... TM runtime (Android) TMThe system library 230 includes a runtime, a hardware abstraction layer (HAL) 240, and a kernel layer 250. The kernel layer 250 can interact with the hardware devices in the electronic device hardware layer, providing hardware drivers to operate the corresponding hardware structures within the hardware layer.

[0055] Specifically, as shown in Figure 2, application layer 210 may include a series of application packages. In this embodiment, the application packages of application layer 210 may include a system user interface (System UI) and user-installed browser applications, game applications, etc. In some embodiments, the application packages may also include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS, etc., without limitation.

[0056] The System UI controls the threads used to perform user interface drawing tasks (e.g., the UI thread, or main thread) to draw the graphic data of each layer of the application interface (e.g., web browsing interface 100) affected by the user's touch operation, based on touch events reported by the system. The drawn layers can be rendered by the Compositing Service (SF) of the framework layer 220, composed by the hardware composer (HWC), and displayed by the display driver 253. Finally, after display is completed, the corresponding interface displayed on the screen is the system's response to the user's touch operations on the interface of applications such as browsers and games.

[0057] The framework layer 220 provides an application programming interface (API) and programming framework for the application layer 210. In some embodiments, the framework layer 220 may include some predefined functions.

[0058] In this embodiment, the framework layer 220 may include a touch service (TS) 221, a touch screen algorithm (TSA) 222, a daemon 223, an input subsystem 224, and a surface flinger (SF) 225. The input subsystem 224 may include units or modules such as an input event reader, an input event dispatcher, an input event publisher, and an input event consumer.

[0059] The touch service 221 responds to calls from applications such as the System UI, instructing the daemon 223 to report touch coordinates. This process of reporting touch coordinates may include obtaining raw capacitance data and reporting touch event coordinates. It can be understood that applications such as the System UI can trigger the touch service 223 to work via VSYNC, instructing the daemon 223 to report touch coordinates.

[0060] The touch coordinate algorithm 222 is used to perform feature extraction and coordinate transformation based on the preprocessed raw capacitance data provided by the daemon process 223 to calculate the reporting point coordinates. In some embodiments, the touch coordinate algorithm 222 can further adjust or calibrate the calculated reporting point coordinates to obtain the touch event coordinates.

[0061] The daemon process 223 is used to obtain the raw capacitance data reported by the touch HAL 241 and send the raw capacitance data to the touch coordinate algorithm 222 for calculation and processing to obtain the reported point coordinates and touch event coordinates. Furthermore, the daemon process 223 is also used to send the processed touch event coordinates to the touch HAL 241, touch driver 251, etc. In some embodiments, after obtaining the reported point coordinates calculated by the touch coordinate algorithm 222, the daemon process 223 may also execute corresponding adjustment or calibration processing algorithms to process the reported point coordinates into touch event coordinates before sending them to the touch HAL 241 and touch driver 251.

[0062] It is understood that daemon process 223 can have multiple threads to execute different tasks. For example, the point data reporting thread in daemon process 223 can be used to perform tasks such as reporting point data, including processing raw capacitance data into point data, and reporting point data, or processing the point data to be reported into touch event coordinates, etc. In some embodiments, the point data reporting thread in daemon process 223 may be, for example, an aptouch_daemon thread or an XXX_daemon thread, without limitation.

[0063] The input event processing (unit) in the input subsystem 224 can receive the touch event coordinates reported by the input driver 252 through the kernel layer 250 and forward them to the input event distribution (unit) for distribution, such as assigning the corresponding application process to the received touch event coordinates.

[0064] The compositing service 225 can receive buffer data from multiple data sources to be displayed, compose the received buffer data, and then send it to a display device (e.g., a screen) for display.

[0065] Specifically, the compositing service 225 can generate an application VSYNC request based on relevant application instructions, capture the hardware VSYNC to generate the application VSYNC, and provide the application VSYNC to the relevant applications in the application layer 210, such as browser applications and game applications. Applications in the application layer 210 can obtain touch events reported by the input subsystem 224, control the rendering process of image frames through the System UI, and then the System UI can call the compositing service 225 to render the drawn image frames. The compositing service 225 can further call the system's hardware compositor 242 to composite the rendered image frames, and send the composited image frames to the screen for display through the display driver 253, generating a touch-responsive interface.

[0066] In other embodiments, the frame layer 220 may also include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc. The functions of each structure in the frame layer 220 can be found in the relevant descriptions in the prior art, and will not be elaborated here.

[0067] Android TM runtime (Android) TM Runtime includes the core libraries and the virtual machine. Android TM runtime is responsible for Android TM System scheduling and management.

[0068] The core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part is the Android core library. The application layer 210 and framework layer 220 can run in a virtual machine. The virtual machine executes the Java files of the application layer 210 and framework layer 220 as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0069] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

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

[0071] 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.

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

[0073] A 2D graphics engine is a graphics engine for 2D drawing.

[0074] The Hardware Abstraction Layer 240 provides a standard interface to display device hardware functionality to a higher-level Java API framework. The HAL contains multiple library modules, each implementing an interface for a specific type of hardware component, such as the Touch Library Module (Touch HAL) 241, as well as Audio HAL, Bluetooth HAL, Camera HAL, etc. In some embodiments, the Hardware Abstraction Layer 240 may also include a hardware synthesizer 242, etc. When the API provided by the framework layer 220 requests access to the hardware of the electronic device (i.e., the hardware layer), the system loads the corresponding library module for the relevant hardware component.

[0075] Hardware compositor 242 is a system tool used by compositor service 225 to composite the interface onto the screen for display. It can be understood that hardware compositor 242 can call display driver 253 to composite the interface onto the screen.

[0076] Kernel layer 250 is the layer between hardware and software. In the embodiments of this application, kernel layer 250 may include touch driver 251, input driver 252, and display driver 253. In other embodiments, kernel layer 250 may also include camera driver, audio driver, sensor driver, etc., which are not limited here.

[0077] As mentioned earlier, kernel 250 can interact with the hardware layer of electronic devices, providing hardware drivers to drive the corresponding hardware structures in the hardware layer. For example, the touch driver 251 provided by kernel layer 250 can drive the touch panel of the hardware layer to work, collecting raw capacitance signals to obtain raw capacitance data; as another example, the display driver 253 provided by kernel layer 250 can drive the screen of the hardware layer to work, and can control the hardware synthesizer 242 to control the synthesized interface, such as the touch response interface corresponding to the touch event, and send it to the screen for display, i.e., the display sending process.

[0078] For the aforementioned relatively long signaling transmission path, refer to Figure 2: System UI → Touch Service 221 → Daemon Process 223 → Touch HAL 241 → Touch Driver 251. The System UI can receive the application VSYNC generated by the hardware VSYNC captured by the synthesis service 225, and sequentially call the touch driver 251 through the touch service 221, daemon process 223, and touch HAL 241 to send sampling control signals to the touch screen according to the set touch sampling rate. This touch sampling rate can be a fixed value set for different screen refresh rates.

[0079] When the screen refresh rate changes, for example, when the screen refresh rate decreases, if the touch sampling rate needs to be changed accordingly through this signaling transmission path, the System UI needs to transmit the lower touch sampling rate corresponding to the reduced screen refresh rate sequentially through the touch service 221, daemon process 223, and touch HAL 241 to the touch driver 251, so as to control the touch driver 251 to change the frequency of sending sampling control signals to the touch screen. Obviously, this signaling transmission path is relatively long. If the user operates the phone 10 to open a game application or other applications that require a high frame rate refresh rate interface, and the screen refresh rate changes to a higher value again, if the touch sampling rate used by the touch driver 251 cannot be adjusted in time through the above-mentioned long signaling transmission path, the frequency at which the touch screen obtains capacitance data based on the touch sampling signal may not be able to meet the high screen refresh requirements. The screen responsiveness of the phone 10 may therefore deteriorate, leading to a worse user experience.

[0080] To address this, the shorter signaling transmission path provided in the data processing method of this application allows the synthesis service 225 to access the file node path exposed by the touch driver 251 in the kernel space, such as " / dev" or " / sys / class / input / ", and use the file system's write interface (API), such as "write", to open the file node and write the refresh frequency of the hardware VSYNC or application VSYNC corresponding to the screen refresh rate change as the adjusted touch sampling rate for the touch driver 251 into that file node. After writing is complete, the synthesis service 225 can close the file node by calling the file system's close interface (API), such as "close". Thus, when the touch driver 251 responds to the call command of the touch HAL 241, it can read the adjusted touch sampling rate written in the file node. For example, the touch driver 251 can use the file system's access interface (API), such as "read", to obtain the touch sampling rate written by the synthesis service 225 in the file node. Furthermore, the touch driver 251 can use this touch sampling rate to generate a sampling control signal and send it to the touch screen to drive the touch screen to sample the capacitance signal and obtain the corresponding capacitance data.

[0081] As can be understood, the kernel space described above is the space where the operating system kernel runs, a region within computer memory. Code running in kernel space has the highest privileges and can directly access hardware resources. Kernel space is primarily responsible for managing hardware resources, scheduling processes, handling interrupts, and managing memory and the file system—core functions of the operating system. User-space programs need to indirectly execute kernel code through system calls to utilize these core functions provided by kernel space. The code and data structures in kernel layer 250 of the aforementioned operating system are typically stored in kernel space, and kernel layer 250 can implement the core functions of the operating system through the code and data structures in kernel space. Simultaneously, kernel space provides the environment and resources required for kernel layer execution.

[0082] When the screen refresh rate changes, for example, when the screen refresh rate decreases, the frequency of the screen refresh hardware VSYNC of the mobile phone 10 decreases accordingly. The synthesis service 225 can quickly adjust the touch sampling rate of the touch driver 251 by capturing the frequency of the hardware VSYNC and generating the application VSYNC using the above-mentioned method of writing to the file node. For example, the fixed touch sampling rate set for different screen refresh rates can be temporarily reduced and adjusted to the touch sampling rate corresponding to the reduced screen refresh rate. This reduces the amount of raw capacitance data collected when the screen refresh rate decreases, thereby reducing the computing resources consumed in processing the raw capacitance data and saving device power consumption.

[0083] Furthermore, in some embodiments of this application, the System UI can also identify the current display scenario of the electronic device, such as a mobile phone 10, based on currently displayed interface-related data, such as the content displayed on the interface and the application type corresponding to the interface. This could be a game scenario or a non-game scenario (e.g., a browser application display scenario). In game scenarios, the interface content typically changes rapidly or the user operation frequency is high, requiring the electronic device to use a higher screen refresh rate; this type of scenario can be called a high frame rate scenario. Conversely, in non-game scenarios, the interface content typically changes slowly or the user operation frequency is low, requiring the electronic device to use a lower screen refresh rate; this type of scenario can be called a low frame rate scenario.

[0084] It is understandable that in the aforementioned low frame rate scenarios, the electronic device consistently maintains a high touch sampling rate to collect raw capacitance data, resulting in a waste of system computing resources and internal transmission channel resources. As mentioned earlier, by establishing a signaling transmission path to send the application VSYNC to the touch driver 251, the system can dynamically adjust the touch sampling rate according to the current screen refresh rate. This avoids the waste of computing resources caused by the system still using a high touch sampling rate in low frame rate scenarios, and also avoids excessive occupation of internal transmission channel bandwidth resources during the transmission of raw capacitance data, which helps reduce system load and device power consumption.

[0085] For ease of description, the following hereinafter, the fixed touch sampling rate configured by the electronic device to adapt to high frame rate scenarios is referred to as the first touch sampling rate, and the reduced touch sampling rate obtained by implementing the data processing method provided in this application is the second touch sampling rate. Correspondingly, the amount of original capacitance data collected under the control of the second touch sampling rate can be denoted as the second quantity, and the amount of original capacitance data collected under the control of the first touch sampling rate can be denoted as the first quantity. Corresponding to the reduction of the touch sampling rate, the aforementioned first quantity is greater than the second quantity, that is, the second quantity is less than the first quantity.

[0086] As mentioned above, in order to ensure the accuracy of touch position related to touch events, the data processing method provided in this application can perform interpolation processing on the coordinate data obtained by the system processing based on the reduced second touch sampling rate. Specifically, refer to the structure shown in Figure 2 above.

[0087] The input event processing (unit) in the input subsystem 224 can receive touch event coordinates reported by the input driver 252 through the kernel layer 250 and forward them to the input event distribution (unit) for distribution, for example, assigning a corresponding consuming application process to the received touch event coordinates. After distribution is completed, the touch event coordinates can be published by the input event publishing (unit) to the input event consuming (unit) for consumption by the designated application process. The number of touch event coordinates can correspond to the number of original capacitance data acquired using the reduced second touch sampling rate; that is, the number of touch event coordinates received and processed by the input subsystem 224 can be a second number. This second number of touch event coordinates can be added to the event queue of the input subsystem 224 for use by the input event consuming (unit) when generating touch events.

[0088] In this embodiment, when the input event consuming unit obtains touch event coordinates from the event queue to generate a touch event, it can first perform interpolation on the second number of touch event coordinates in the event queue, processing them to include the interpolated coordinates, and then add them back to the event queue. Furthermore, the input event consuming unit then determines a more accurate touch position based on the first number of touch event coordinates in the event queue to generate the touch event. This ensures that the electronic device accurately identifies the touch position and responds to accurate touch events, without affecting the user's touch experience.

[0089] The specific process of processing the collected raw capacitance data into touch event coordinates and interpolating the touch event coordinates is explained below through comparative analysis with reference to Figures 3a to 3b.

[0090] Figure 3a illustrates a process of processing raw capacitance data into touch event coordinates and interpolating the touch event coordinates.

[0091] Taking a mobile phone 10 with a reduced screen refresh rate of 60Hz and a touch sampling rate of 120Hz as an example, referring to Figure 3a, the mobile phone 10, based on a touch sampling rate of 120Hz, can collect 15 frames of touch capacitance signals within 125ms, referring to the original capacitance signals S1 to S15. Further, the original capacitance data corresponding to the original capacitance signals S1 to S15 needs to undergo data preprocessing, feature extraction, coordinate transformation, and other processing operations to obtain the reporting point coordinates, such as P1 to P15. These reporting point coordinates can be further adjusted or calibrated to become touch event coordinates used to determine touch events, such as T1 to T15. Simultaneously, based on the reduced screen refresh rate of 60Hz, the mobile phone 10 can generate 7 frames of hardware VSYNC within 125ms, such as V... h1 To V h7The interface is refreshed by sending 7 frames within 125ms. Correspondingly, the phone can generate 7 frames of VSYNC application VSYNC within 125ms based on hardware VSYNC, for example, V... a1 To V a7 Each frame of the VSYNC application can be used to report touch events to the input subsystem. During each touch event reporting process, the input subsystem 224 can determine a touch position based on the coordinates of two touch events, and then generate a touch event and report it to the relevant application.

[0092] It is understandable that if the user does not frequently operate on the interface of the relevant application, the original capacitance data provided by the sampled original capacitance signals will be relatively close. For example, S1 may be close to the original capacitance data provided by S2, and similarly, S3 may be close to the original capacitance data provided by S4, S5 may be close to the original capacitance data provided by S6, S7 may be close to the original capacitance data provided by S8, S9 may be close to the original capacitance data provided by S10, S11 may be close to the original capacitance data provided by S12, S13 may be close to the original capacitance data provided by S14, and so on. In this case, processing the original capacitance data provided by the 15 frames of sampled original capacitance signals within 125ms consumes a lot of computing resources, which in turn leads to high power consumption of the electronic device.

[0093] Figure 3b illustrates a process of processing raw capacitance data into touch event coordinates and interpolating the touch event coordinates according to an embodiment of this application.

[0094] Referring to Figure 3b, in display scenarios where the screen refresh rate is 60Hz and user operations are infrequent, the touch sampling rate can be reduced from 120Hz to 60Hz. Thus, compared to the data processing process shown in Figure 3a, the original capacitance signal collected by the electronic device within 125ms can be reduced from the 15 frames (S1 to S15) shown in Figure 3a to the 8 frames (S1, S3, S5, S7, S9, S11, S13, S15) shown in Figure 3b. Furthermore, based on the original capacitance data provided by these 8 reduced frames, 8 reporting points can be obtained, such as P1, P3, P5, P7, P9, P11, P13, and P15 shown in Figure 3b. After adjusting or calibrating the reporting points, the 8 touch event coordinates T1, T3, T5, T7, T9, T11, T13, and T15 shown in Figure 3b can be obtained.

[0095] Referring to Figure 3b, the above touch event coordinates are then interpolated sequentially, also known as interpolation operation or interpolation calculation. This yields the interpolated coordinates between each touch event coordinate. For example, the interpolated coordinates T2' between T1 and T3, T4' between T3 and T5, T6' between T5 and T7, T8' between T7 and T9, T10' between T9 and T11, T12' between T11 and T13, and T14' between T13 and T15, and so on. Ultimately, the eight touch event coordinates obtained from processing the original capacitance data can be transformed into 15 touch event coordinates including interpolated coordinates, such as the interpolated touch event coordinates T1, T2', T3, T4', T5, T6', T7, T8', T9, T10', T11, T12', T13, T14', and T15 shown in Figure 3b. Thus, VSYNC is applied to each frame, for example, V... a1 To V a7 When the input subsystem is triggered to report a touch event, the input subsystem can still obtain the coordinates of two touch events each time it reports a touch event to determine the accurate touch position, and then generate a touch event for reporting, thus ensuring the accuracy of the reported touch events.

[0096] Specifically, Figures 4a and 4b illustrate an interactive implementation flow of a data processing method according to an embodiment of this application. This interactive implementation flow may involve the interaction between various software structures in the operating system shown in Figure 2 above.

[0097] In other embodiments, when the operating system of the electronic device includes a software structure different from the operating system shown in FIG2 above, the interaction implementation process shown in FIG4a to FIG4b may also involve the interaction between software structures with corresponding functions.

[0098] It should also be stated that the steps in the methods and processes in this application are numbered for ease of reference, not to limit the order of steps. If there is an order between the steps, the textual description shall prevail.

[0099] Specifically, as shown in Figure 4a, S401 to S416 of this interactive implementation process are as follows:

[0100] S401: Application layer 210 runs relevant applications and provides relevant application interfaces for user operation.

[0101] For example, application layer 210 can run an application that provides a corresponding user interface for user touch operations. As an example, application layer 210 can run a browser application that provides a web browsing interface 100 as shown in FIG1 for user touch operations.

[0102] S402: Application layer 210 sends current interface-related data to touch service 221.

[0103] For example, the System UI of the application layer 210 can respond to the data acquisition request of the touch service 221 and send relevant data of the current interface to the touch service 221, such as the content displayed on the interface and the application type corresponding to the interface, so that the touch service 221 can execute the following S403 to identify the current display scene.

[0104] In some embodiments, the System UI may also identify the content of the current display scene based on relevant data of the current display interface and send the identification result to the touch service 221. That is, the electronic device may not execute the following S403 and may schedule the touch service 221 to identify the current display scene; this is not a limitation.

[0105] S403: Touch service 221 identifies target scene.

[0106] For example, touch service 221 can identify whether the current display scene is a target scene, such as the low frame rate scene mentioned above, based on relevant data of the current display interface. In some embodiments, electronic devices such as mobile phone 10 can set a rate threshold (denoted as a first threshold) corresponding to the rate of change of the interface content of the relevant interface, and set a frequency threshold (denoted as a second threshold) corresponding to the frequency of user touch operations on the relevant interface. In this way, electronic devices such as mobile phone 10 can determine whether the current display scene is a target scene by judging whether the rate of change of the interface content is less than the first threshold and whether the frequency of user touch operations on the relevant interface is less than the second threshold. For example, if the rate of change of the interface content is less than the first threshold and the frequency of user touch operations on the relevant interface is less than the second threshold, it can be determined that the current display scene is a target scene. Conversely, if the frequency of user touch operations on the relevant interface is greater than or equal to the second threshold, it can be determined that the display scene is not a target scene.

[0107] It is understandable that when the rate of change of the interface content is large, such as when it exceeds the first threshold mentioned above, electronic devices such as mobile phones can increase the screen refresh rate accordingly, which also requires a higher touch sampling rate. At this time, there is no need to reduce the touch sampling rate.

[0108] As mentioned earlier, in the aforementioned low frame rate scenarios, the electronic device consistently maintains a high touch sampling rate to collect raw capacitance data, resulting in a waste of system computing resources and internal transmission channel resources. Therefore, when touch service 221 identifies the current display scenario as a low frame rate scenario, it can continue to perform the following steps to reduce system load and device power consumption.

[0109] In other embodiments, the target scenario described above may also be other display scenarios, such as high frame rate scenarios where users do not frequently perform touch operations on the corresponding interface, etc., which are not limited here.

[0110] S404: Touch service 221 sends target scene identifier to composition service 225.

[0111] For example, touch service 221 can send a corresponding low frame rate scene identifier to synthesis service 225 based on the target scene identified in S403 above, such as a low frame rate scene. Correspondingly, synthesis service 225 can receive the low frame rate scene identifier sent by touch service 221 and continue to execute S405 below. That is, when a low frame rate scene is detected, mobile phone 10 can execute the data touch method provided in this application to control the reduction of touch sampling rate to save device power consumption.

[0112] In some other embodiments, electronic devices such as mobile phones 10 may execute S405 directly after executing S401, without executing the relevant contents of S402, S403 and S404, which is not a limitation here.

[0113] S405: The synthesis service 225 sends an application vertical synchronization signal to the touch driver 251.

[0114] For example, after receiving the low frame rate scene identifier sent by the touch service 221, the synthesis service 225 can call the touch service 221 and the daemon process 223 through the System UI of the application layer 210, and then send the application vertical synchronization signal, i.e. the aforementioned application VSYNC, to the touch driver 251 through the touch HAL 241 and other system calls.

[0115] It is understood that application layer 210 runs relevant applications and can provide the interface of these applications for user touch operation (i.e., for user operation). Furthermore, the relevant applications in application layer 210 can also send a request to the compositing service 225 of framework layer 220 to generate application VSYNC, requesting the compositing service 225 to capture the hardware VSYNC and generate application VSYNC. As mentioned earlier, this application VSYNC can trigger the relevant applications in application layer 210, such as video applications and game applications. At this time, the relevant applications in application layer 210 obtain the generated application VSYNC, i.e., generate an application vertical synchronization signal, and can then continue to execute processes such as S406 described below.

[0116] It's understandable that the refresh rate of an application's VSYNC can be the same as the refresh rate of a hardware VSYNC, and there's a certain time delay offset between the two. Screens of electronic devices like the iPhone 10 can generate hardware VSYNC to synchronize the frame rate of the graphics processing unit (GPU) processing images with the screen refresh rate, making the screen display smoother. In both high and low frame rate scenarios, the frequency of user operations and the speed of changes in the application's interface can affect the refresh rate of the application's VSYNC.

[0117] It's understandable that when the Phone 10 runs a game app, it displays the game interface, where users can perform frequent touch operations, and the content of the game interface can change rapidly. In this case, the Phone 10 needs to use a high screen refresh rate to refresh the interface. Similarly, when the Phone 10 runs a video app, it displays a video playback interface, where the content can change rapidly. Even if the user's touch operation frequency on this video playback interface is low, the Phone 10 still needs to use a high screen refresh rate to refresh the interface. As mentioned earlier, these types of interfaces correspond to high frame rate scenarios.

[0118] S406: Touch driver 251 controls the screen to collect raw capacitance data at a second touch sampling rate.

[0119] For example, the synthesis service 225 can access the file node path exposed by the touch driver 251 in the kernel space, such as " / dev" or " / sys / class / input / ", and use the file system's write interface (API), such as "write", to open the file node and write the currently captured hardware VSYNC refresh rate or the applied VSYNC refresh rate as the adjusted second touch sampling rate for the touch driver 251 into that file node. After writing is complete, the synthesis service 225 can close the file node by calling the file system's close interface (API), such as "close". In this way, when the touch driver 251 works in response to the call command of the touch HAL 241, it can use the file system's access interface (API), such as "read", to read the adjusted second touch sampling rate written in the file node, and generate a sampling control signal using the touch sampling rate to send to the screen (touch screen) to drive the screen to collect the capacitance data corresponding to the user's touch operation.

[0120] It is understandable that the refresh rate of the VSYNC application corresponds to the real-time screen refresh rate. Based on this, as the screen refresh rate decreases, the refresh rate of the VSYNC application provided to the touch driver 251 can also be reduced accordingly. Therefore, it is possible to control the electronic device to reduce the first touch sampling rate to the second touch sampling rate, and use the second touch sampling rate to control the touch screen to collect raw capacitance data.

[0121] As an example, referring to the relevant description in Figure 3b above, the touch sampling rate of mobile phone 10 can be adapted to the reduced screen refresh rate of 60Hz, from the first touch sampling rate of 120Hz to the second touch sampling rate of 60Hz, and the original capacitance data provided by the 8 frames of original capacitance signals S1, S3, S5, S7, S9, S11, S13, and S15 are collected at the second touch sampling rate of 60Hz.

[0122] It is understandable that the above-mentioned raw capacitance data can continue to be reported to the touch HAL241, daemon process 223 and touch coordinate algorithm 222 to continue to perform subsequent data processing and transmission steps.

[0123] S407: The touch driver 251 reports the first capacitance value data to the touch HAL 241. This first capacitance value data can be the raw capacitance value data collected and reported by the touch screen under the control of the sampling control signal sent by the touch driver 251.

[0124] S408: Touch HAL 241 reports the first capacitance value data to daemon 223.

[0125] For example, after receiving the first capacitance value signal initially acquired by the touch panel and obtaining the first capacitance value data, the touch driver 251 can report the first capacitance value data to the daemon process 223 through the touch HAL 241. The touch driver 251 can first cache the data after obtaining it, and then report the cached data frame by frame according to the received data acquisition request. The reported first capacitance value data can be the most recent data at the time of acquisition, without any restrictions.

[0126] S409: Daemon process 223 preprocesses the first capacity data.

[0127] For example, daemon process 223 can execute relevant preprocessing algorithms to preprocess the first tolerance data, such as data cleaning (handling outliers and duplicates) and data transformation (such as standardization and normalization), without limitation. Furthermore, daemon process 223 can continue to execute S410 as described below.

[0128] S410: Daemon process 223 sends the preprocessed first capacitance data to touch coordinate algorithm 222.

[0129] For example, the daemon process 223 can send the preprocessed raw capacitance data to the touch coordinate algorithm 222 module for processing.

[0130] S411: Touch coordinate algorithm 222 processes the preprocessed first capacitance data to obtain the coordinates of the first touch event.

[0131] For example, the touch coordinate algorithm 222 can perform feature extraction, coordinate transformation, and other processing on the preprocessed raw capacitance data provided by the daemon process 223 to obtain reported coordinates. Further, the touch coordinate algorithm 222 can further adjust and calibrate the obtained reported coordinates to obtain the corresponding touch event coordinates, denoted as the first touch event coordinates or first touch event coordinate data. In some embodiments, the daemon process 223 can also call the touch coordinate algorithm 222 via algorithm invocation, using the preprocessed raw capacitance data as input data for calculation; this is not limited.

[0132] Furthermore, the touch event coordinates can be sent to the touch driver 251 by executing the following steps S412, S413 and S414, so that the touch event coordinates can continue to be reported to the input subsystem 224 through the underlying driver (e.g. touch driver 251 and input driver 252), which will not be elaborated here.

[0133] In some embodiments, during the execution of S409, the daemon process 223 may also perform preprocessing on the raw capacitance data, such as feature extraction. Based on this, the raw capacitance data received by the touch coordinate algorithm 222 may be capacitance data after feature extraction. The touch coordinate algorithm 222 may further perform coordinate transformation and calibration on the capacitance data after feature extraction to obtain a second number of touch event coordinates, which is not limited here.

[0134] S412: Touch coordinate algorithm 222 sends the first touch event coordinate data to daemon process 223.

[0135] S413: Daemon process 223 sends the first touch event coordinate data to touch HAL 241.

[0136] For example, the daemon process 223 can send the first touch event coordinate data obtained by the touch coordinate algorithm 222 to the touch HAL 241, so as to report the first touch event coordinate data to the input subsystem 224 through the underlying driver (e.g., touch driver 251 and input driver 352).

[0137] It is understood that the first touch event coordinate data may include the first touch event coordinates obtained based on the processing of the aforementioned first capacitance data, and the number of the first touch event coordinates may correspond to the aforementioned second touch sampling rate. As mentioned above, the second touch sampling rate may correspond to the number of first capacitance data collected, i.e., the second number, and therefore the number of first touch event coordinates included in the aforementioned first touch event coordinate data may also be the second number.

[0138] S414: Touch HAL 241 sends the first touch event coordinate data to touch driver 251.

[0139] As shown in Figure 4b, the specific steps S417 to S425 of this interactive implementation process are as follows:

[0140] S415: Touch driver 251 sends the first touch event coordinate data to input driver 252.

[0141] As mentioned above, after receiving the touch event coordinates, the touch HAL 241 can continue to report to the input subsystem 224 through the underlying driver (such as the touch driver 251 and input driver 252 mentioned above).

[0142] S416: Input driver 252 sends the first touch event coordinate data to input subsystem 224.

[0143] For example, after receiving the above-mentioned touch event coordinates, the input driver 252 can continue to report the touch event coordinates to the input subsystem 224.

[0144] S417: Input subsystem 224 performs interpolation on the coordinate data of the first touch event to obtain the coordinate data of the second touch event.

[0145] For example, the number of the first touch event coordinates can correspond to the number of capacitance data collected by the second touch sampling rate control, i.e., the second number. Similarly, the number of the second touch event coordinates can correspond to the number of capacitance data collected by the first touch sampling rate control, i.e., the first number. By performing interpolation on the first touch event coordinates, the number of the first touch event coordinates (i.e., the second number) can be increased to the number of the second touch event coordinates (i.e., the first number). As an example, referring to Figure 3b above, the interpolation operation can, for example, be processing the original capacitance data at adjacent times to obtain touch event coordinates, such as T1 and T3, T3 and T5, T5 and T7, T7 and T9, T9 and T11, T11 and T13, T13 and T15, etc., and using linear interpolation or other methods to calculate the interpolated coordinates located between or adjacent to them, such as T2', T4', T6', T8', T10', T12', T14', etc.

[0146] As mentioned earlier, the accuracy of touch position related to touch events is associated with the number of touch event coordinates used to determine the touch position. Reducing the touch sampling rate may lead to a decrease in the number of touch event coordinate data obtained from processing the collected capacitance data, which may in turn reduce the accuracy of the touch position determined based on the touch event coordinates. By executing S417, interpolating the first touch coordinate data, the number of touch event coordinate data used to determine the touch position can be increased to the number before the touch sampling rate was reduced. In this way, while reducing system load and device power consumption, it is possible to ensure that the electronic device accurately identifies the touch position and can respond to accurate touch events.

[0147] S418: Input subsystem 224 determines the touch position and generates a touch event based on the second touch event coordinate data.

[0148] For example, the aforementioned second touch event coordinate data includes both the touch event coordinates obtained by processing the first capacitance data and the interpolated coordinates obtained during the interpolation operation, such as T2', T4', T6', T8', T10', T12', and T14' as illustrated in Figure 3b. The input subsystem 224 can add the second touch event coordinates to the event queue, determine the touch position, and generate a touch event. It can be understood that, in order to improve the accuracy of the determined touch position, a touch position can be accurately determined using two or more adjacent coordinates in the second touch event coordinate data, and then a corresponding touch event can be generated based on the determined touch position.

[0149] It is understood that after processing the aforementioned touch event coordinates into interpolated touch event coordinates, the input event consumption (unit) in the input subsystem 224 can add a first number of touch event coordinates, including the interpolated coordinates, to the event queue. The touch event coordinates in the event queue can be resampled and combined in pairs (e.g., T1 and T2', T3 and T4', T5 and T6', T7 and T8', T9 and T10', T11 and T12', T13 and T14, etc., as shown in Figure 3b above) to determine the corresponding touch position and generate the corresponding VSYNC for each of the above applications (e.g., V shown in Figure 3b above). a1 To V a7 Touch events are received and consumed by a specified application process to draw the corresponding image frame.

[0150] S419: Input driver 252 reports touch events to the relevant application in application layer 210.

[0151] For example, the input driver 252 can report the generated touch events to relevant applications, such as the browser application, game application, or other applications of the application layer 210, without limitation.

[0152] S420: The application layer 210 responds to touch events and calls the System UI to control the drawing of image frames for the touch response interface.

[0153] For example, the relevant application of application layer 210 can respond to the received touch event, i.e. input event, and call the System UI to control the system's drawing process to draw an image frame. The image frame can be an image frame of the touch response interface corresponding to the user's touch operation.

[0154] S421: Application layer 210 sends the drawn image frame to composition service 225.

[0155] For example, the application layer 210 can send the drawn image frame generated in the above S422 to the compositing service 225 to continue executing the following S424, which will not be described in detail here.

[0156] S422: The rendering process of the compositing service 225 control system is used to render the completed image frames.

[0157] For example, after receiving the drawn image frame, the compositing service 225 can control the system's rendering process, perform rendering processing on the image frame drawn in the above S420, and generate a rendered image frame.

[0158] S423: Compositing service 225 calls the hardware compositor and display driver to complete the compositing of image frames and sends the composited image frames to the screen for display.

[0159] For example, the compositing service 225 can further invoke the hardware compositor 242 to composite the rendered image frames generated in S424 above, wherein each image frame can be an image frame of each display layer of the touch response interface. Furthermore, the hardware compositor 242 can send the composited image frames to the screen through the display driver 253 to drive the screen to display the touch response interface; details will not be elaborated here.

[0160] Based on the above-described interactive implementation process of S401 to S423, the data processing method provided by this application can reduce the computing power consumption of the electronic device in processing the original capacitance data, thereby reducing the device power consumption, while ensuring that the electronic device can accurately identify the touch position and respond to the touch event accurately.

[0161] Figure 5 illustrates a flowchart of a data processing method according to an embodiment of this application.

[0162] It is understood that the execution subject of the implementation process shown in Figure 5 can be an electronic device such as a mobile phone 10, and the terminal device as the execution subject can have a touch screen. The touch screen can respond to the control commands generated by the processor or controller of the terminal device and execute the implementation process shown in Figure 5 to realize the display method provided in this application.

[0163] It is understood that the electronic device, as the execution subject, can also be equipped with the operating system executor shown in Figure 2 above, and thus be able to execute the interaction process shown in Figures 4a to 4b above based on the operating system, which will not be elaborated here.

[0164] Specifically, as shown in Figure 5, the implementation process may include:

[0165] S501: The screen displays the first content at a first screen refresh rate, and the screen has a first touch sampling rate corresponding to the first screen refresh rate.

[0166] For example, the aforementioned first content can be the interface content displayed by an electronic device such as a mobile phone 10 in a high frame rate scenario. This interface content is, for example, the game interface of a game application running on the mobile phone 10. The interface content changes rapidly, and the user operation frequency is also high, meaning the user operation is relatively frequent. At this time, the screen refresh rate of the electronic device such as the mobile phone 10 is high, that is, the aforementioned first screen refresh rate is high, and the first touch sampling rate configured accordingly is also high.

[0167] S502: Detected that the screen is displaying second content at a second screen refresh rate, wherein the second screen refresh rate is less than the first screen refresh rate.

[0168] For example, the second content mentioned above can be the interface content displayed by electronic devices such as mobile phone 10 in low frame rate scenarios. This interface content is, for example, the web browsing interface of a browser application running on mobile phone 10. The interface content changes at a low rate, and the user operation frequency is also low, that is, the user operation is infrequent. At this time, the screen refresh rate of electronic devices such as mobile phone 10 is reduced, for example, reduced to the second screen refresh rate mentioned above.

[0169] S503: Adjust the touch sampling rate of the screen to the second touch sampling rate corresponding to the second screen refresh rate, wherein the second touch sampling rate is less than the first touch sampling rate.

[0170] For example, the synthesis service 225 of the mobile phone 10 can write the second touch sampling rate corresponding to the second screen refresh rate to the file node exposed in the kernel space corresponding to the touch driver 251 by writing to a file node, so as to reduce the touch sampling rate of the screen to the second touch sampling rate through the touch driver 251. For example, the mobile phone 10 can access the first file node exposed in the kernel space by the synthesis service 225, that is, obtain the first file node corresponding to the touch driver 251, wherein the first file node is used to receive relevant control parameters set for the touch driver; write the second touch sampling rate corresponding to the second screen refresh rate to the first file node; and then obtain the second touch sampling rate in the first file node through the touch driver 251, and control the screen to collect capacitance data with the second touch sampling rate.

[0171] Specifically, the synthesis service 225 can use the write interface provided by the file system in the kernel space to open the first file node; then write the second touch sampling rate to the first file node; the synthesis service 225 then uses the close interface provided by the file system to close the first file node after the second touch sampling rate has been written. Based on this, the touch driver 251 can use the access interface provided by the file system to access the first file node to obtain the second touch sampling rate; then, the touch driver 251 can generate a sampling control signal based on the second touch sampling rate; the touch driver 251 then controls the screen to collect capacitance data based on the sampling control signal, the refresh frequency of which corresponds to the second touch sampling rate.

[0172] It is understandable that the above-mentioned method of writing to file nodes can provide a shorter signaling transmission path for adjusting the screen touch sampling rate, thus improving the timeliness of adjusting the touch sampling rate of electronic devices such as mobile phones 10, and thereby reducing device power consumption in a timely manner according to changes in the display scenario.

[0173] In other embodiments, before adjusting the touch sampling rate of the screen to the second touch sampling rate corresponding to the second screen refresh rate, the electronic device such as the mobile phone 10 may first identify whether the display scene corresponding to the second content displayed on the screen is the target scene; if the display scene corresponding to the second content displayed on the screen is the target scene, the touch sampling rate of the screen is adjusted to the second touch sampling rate, which is not limited here.

[0174] S504: Obtain the first capacitance data corresponding to the second touch sampling rate.

[0175] For example, the first touch sampling rate can correspond to collecting a first quantity of capacitance data within a preset time period, and the second touch sampling rate can correspond to collecting a second quantity of capacitance data within a preset time period, where the second quantity is less than the first quantity. Based on this, the mobile phone 10 can acquire a second quantity of the first capacitance data within a preset time period.

[0176] In some embodiments, the preset time can be one or more screen refresh cycles. For example, corresponding to a 60Hz screen refresh rate, the preset time can be 16.67ms, or 125ms, etc., and is not limited thereto. Correspondingly, the first quantity can be the amount of capacitance data provided by 15 frames of capacitance signals acquired within 125ms at the first touch sampling rate; the second quantity can be the amount of capacitance data provided by 8 frames of capacitance signals acquired within 125ms at the second touch sampling rate.

[0177] S505: Obtain the first coordinate data corresponding to the first capacitance data, wherein the first coordinate data corresponds to the second touch sampling rate.

[0178] S506: Interpolate the first coordinate data to obtain the second coordinate data, wherein the second coordinate data corresponds to the first touch sampling rate.

[0179] For example, mobile phone 10 can perform interpolation on adjacent first coordinate data in a data queue formed by a second quantity of first coordinate data to obtain a third quantity of third coordinate data, where the first quantity is the sum of the second quantity and the third quantity; based on the second quantity of first coordinate data and the third quantity of third coordinate data, a first quantity of second coordinate data is obtained. Mobile phone 10 can process the second quantity of first coordinate data based on the second quantity of first tolerance data to obtain the second quantity of first coordinate data.

[0180] Figure 6 illustrates an implementation flowchart of another data processing method according to an embodiment of this application.

[0181] It is understood that the execution subject of the implementation process shown in Figure 6 can also be a terminal device such as a mobile phone 10, and the terminal device as the execution subject can have a touch screen. The touch screen can respond to the control commands generated by the processor or controller of the terminal device and execute the implementation process shown in Figure 6 to realize the data processing method provided in this application.

[0182] Specifically, as shown in Figure 6, the implementation process may include:

[0183] S601: Identify whether the display scene is a high frame rate scene.

[0184] If the recognition result is negative, then continue to execute S602 to S609 below; wherein, the touch event coordinate data received in S607 may be the first touch event coordinate data obtained by the electronic device processing the first capacitance data collected under the control of the second touch sampling rate.

[0185] If the recognition result is yes, then the following steps S607 and S609 can be executed; wherein, the touch event coordinate data received in S607 can be the second touch event coordinate data obtained by the electronic device processing the collected capacitance data under the control of the first touch sampling rate.

[0186] For example, mobile devices such as smartphones can identify whether the current display scenario is a high frame rate scenario based on data related to the currently displayed interface, such as the content displayed on the interface and the type of application corresponding to the interface. As mentioned earlier, in game scenarios, the interface content usually changes rapidly or the user operation frequency is high, requiring the electronic device to use a higher screen refresh rate; these scenarios can be called high frame rate scenarios. Conversely, in non-game scenarios, the interface content usually changes slowly or the user operation frequency is low, requiring the electronic device to use a lower screen refresh rate; these scenarios can be called low frame rate scenarios.

[0187] S602: Reduce the first touch sampling rate to the second touch sampling rate. The specific execution process can be found in the relevant descriptions in S405 and S406 above, and will not be repeated here.

[0188] S603: Acquires the original capacitance data corresponding to the original capacitance signal. Specifically, the original capacitance data acquired by S603 is the first capacitance data acquired by the touchscreen under the control of the second touch sampling rate.

[0189] S604: Obtain the first capacity value data. The specific execution process can be found in the relevant descriptions in S406 to S408 above, and will not be repeated here.

[0190] S605: Preprocess the first capacitance value data. The specific execution process can be found in the relevant description in S409 above, and will not be repeated here.

[0191] S606: Further process the preprocessed first capacitance data to obtain the first touch event coordinate data. The specific execution process can be found in the relevant description in S411 above, and will not be repeated here.

[0192] S607: Receives input touch event coordinate data. As mentioned earlier, when the scene recognition result is negative, the touch event coordinates received by S607 can be the first touch event coordinate data obtained by the electronic device processing the collected first capacitance data under the control of the second touch sampling rate. When the scene recognition result is positive, the touch event coordinates received by S607 can be the second touch event coordinate data obtained by the electronic device processing the collected capacitance data under the control of the first touch sampling rate.

[0193] S608: Perform interpolation on the coordinate data of the first touch event to obtain the coordinate data of the second touch event. The specific execution process can be found in the relevant content of S417 above, and will not be elaborated upon here.

[0194] S609: Determine the touch position based on the touch event coordinates, generate a touch event and provide it to the application, further perform image frame drawing, rendering, and compositing processing, and send the image frame to the screen for display. The specific execution process can be found in the relevant content of S418 to S423 above, and will not be elaborated here.

[0195] Figure 7 shows a schematic diagram of the hardware structure of a terminal device according to an embodiment of this application.

[0196] It is understood that the terminal device can be the aforementioned mobile phone 10, or other electronic devices with a touch screen, such as tablet computers, laptops, smartwatches, etc., without any restrictions.

[0197] As shown in Figure 7, the terminal device 700 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identity module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.

[0198] It is understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the terminal device 700. In other embodiments of this application, the terminal device 700 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0199] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0200] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0201] In this embodiment, the processor 110 of the terminal device 700 can control the fetching and execution of instructions related to the processes shown in Figures 4a to 4b and 5 through the operation control signals generated by the controller, thereby realizing the data processing method provided in this application.

[0202] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the aforementioned memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0203] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may 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 SIM card interface, and / or a universal serial bus (USB) interface, etc.

[0204] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal device 700. In other embodiments of this application, the terminal device 700 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0205] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the terminal device 700. While charging the battery 142, the charging management module 140 can also supply power to the terminal device via the power management module 141.

[0206] The wireless communication function of the terminal device 700 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.

[0207] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 700 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0208] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the terminal device 700. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.

[0209] The wireless communication module 160 can provide solutions for wireless communication applications on the terminal device 700, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0210] The terminal device 700 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0211] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-LED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, terminal device 700 may include one or N displays 194, where N is a positive integer greater than 1.

[0212] In this embodiment, the display screen 194 can be a touch screen. The display screen 194 may also include a touch screen for collecting raw capacitance data caused by changes in the user's touch operation, and then applying it to the data processing method provided in this application to process it into relevant touch event coordinates, and generate corresponding touch events to trigger relevant applications to respond to the user's touch operation and display the relevant touch response interface, i.e., the first interface mentioned above.

[0213] The terminal device 700 can perform shooting functions through an ISP, camera 193, video codec, GPU, display 194, and application processor.

[0214] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal device 700. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.

[0215] Internal memory 121 can be used to store computer executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of terminal device 700 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of terminal device 700 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.

[0216] The terminal device 700 can implement audio functions, such as music playback and recording, through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor.

[0217] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0218] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Terminal device 700 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, terminal device 700 detects the intensity of the touch operation based on pressure sensor 180A. Terminal device 700 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities may correspond to different operation commands.

[0219] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of terminal device 700, in a different position than display screen 194.

[0220] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Terminal device 700 can receive button input and generate key signal inputs related to user settings and function control of terminal device 700.

[0221] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to different touch operations applied to different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0222] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0223] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the terminal device 700. In some embodiments, the terminal device 700 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 700 and cannot be separated from it.

[0224] This application also provides a computer program product for implementing the data processing methods provided in the above embodiments.

[0225] Various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or combinations of these implementation methods. Embodiments of this application can be implemented as computer program modules or module code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0226] Computer program modules or module code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.

[0227] Module code can be implemented using a high-level modular language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used to implement module code when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0228] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, optical discs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other forms of propagated signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0229] In this specification, the reference to "an embodiment" or "an embodiment" means that a specific feature, structure, or characteristic described in connection with the embodiment is included in at least one exemplary implementation or technology disclosed according to an embodiment of this application. The appearance of the phrase "in an embodiment" in various places in the specification does not necessarily refer to the same embodiment.

[0230] The disclosure of embodiments of this application also relates to means for performing operations in text. This means may be specifically constructed for the claimed purpose or may include a general-purpose computer selectively activated or reconfigured by a computer program stored in a computer. Such a computer program may be stored on a computer-readable medium, such as, but not limited to, any type of disk, including floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), EPROM, EEPROM, magnetic or optical cards, application-specific integrated circuits (ASICs), or any type of medium suitable for storing electronic instructions, and each may be coupled to a computer system bus. Furthermore, the computer mentioned in the specification may include a single processor or may employ an architecture involving multiple processors for increased computing power.

[0231] Furthermore, the language used in this specification has been primarily chosen for readability and instructional purposes and may not have been chosen to depict or limit the disclosed subject matter. Therefore, the embodiments disclosed herein are intended to illustrate, and not limit, the scope of the concepts discussed herein.

Claims

1. A data processing method applied to electronic devices, characterized in that, The electronic device includes a screen, and, The method includes: The screen displays first content at a first screen refresh rate, and the screen has a first touch sampling rate corresponding to the first screen refresh rate; The screen is detected to be displaying second content at a second screen refresh rate, wherein the second screen refresh rate is less than the first screen refresh rate; The touch sampling rate of the screen is adjusted to a second touch sampling rate corresponding to the second screen refresh rate, wherein the second touch sampling rate is less than the first touch sampling rate; Obtain the first capacitance value data corresponding to the second touch sampling rate; Obtain first coordinate data corresponding to the first capacitance data, wherein the first coordinate data corresponds to the second touch sampling rate; The first coordinate data is interpolated to obtain the second coordinate data, wherein the second coordinate data corresponds to the first touch sampling rate.

2. The method according to claim 1, characterized in that, The electronic device includes a touch driver, and, The step of adjusting the touch sampling rate of the screen to a second touch sampling rate corresponding to the second screen refresh rate includes: Obtain a first file node corresponding to the touch driver, wherein the first file node is used to receive relevant control parameters set for the touch driver; Write the second touch sampling rate corresponding to the second screen refresh rate into the first file node; The second touch sampling rate in the first file node is obtained through the touch driver, and the screen captures capacitance data is controlled by the second touch sampling rate.

3. The method according to claim 2, characterized in that, The electronic device includes a synthesis service, and, The step of obtaining the first file node corresponding to the touch driver includes: The synthesis service accesses the first file node exposed in the kernel space by the touch driver.

4. The method according to claim 3, characterized in that, The step of writing the second touch sampling rate corresponding to the second screen refresh rate into the first file node includes: The synthesis service uses the write interface provided by the file system in the kernel space to open the first file node; The synthesis service writes the second touch sampling rate into the first file node; The synthesis service uses the shutdown interface provided by the file system to close the first file node written after the second touch sampling rate.

5. The method according to claim 4, characterized in that, The step of obtaining the second touch sampling rate in the first file node through the touch driver and controlling the screen to collect capacitance data using the second touch sampling rate includes: The touch driver uses the access interface provided by the file system to access the first file node to obtain the second touch sampling rate; The touch driver generates a sampling control signal based on the second touch sampling rate; The touch driver controls the screen to collect capacitance data based on the sampling control signal, wherein the refresh frequency of the sampling control signal corresponds to the second touch sampling rate.

6. The method according to claim 1, characterized in that, The first touch sampling rate corresponds to collecting a first number of capacitance data within a preset time period, and the second touch sampling rate corresponds to collecting a second number of capacitance data within a preset time period, wherein the second number is less than the first number, and... The step of acquiring the first capacitance data corresponding to the second touch sampling rate includes: Acquire the second quantity of first capacity data within a preset time period.

7. The method according to claim 6, characterized in that, The step of obtaining the first coordinate data corresponding to the first capacitance data includes: Based on the second quantity of first capacity data, the second quantity of first coordinate data is obtained through processing.

8. The method according to claim 7, characterized in that, The step of interpolating the first coordinate data to obtain the second coordinate data includes: Interpolation is performed on adjacent first coordinate data in the data queue formed by the second quantity of first coordinate data to obtain a third quantity of third coordinate data, wherein the first quantity is the sum of the second quantity and the third quantity; Based on the second quantity of first coordinate data and the third quantity of third coordinate data, the first quantity of second coordinate data is obtained.

9. The method according to any one of claims 1 to 8, characterized in that, Before adjusting the touch sampling rate of the screen to a second touch sampling rate corresponding to the second screen refresh rate, the method further includes: Identify whether the display scene corresponding to the second content displayed on the screen is the target scene; The target scene is the display scene corresponding to the second content displayed on the screen, and the touch sampling rate of the screen is adjusted to the second touch sampling rate.

10. The method according to claim 9, characterized in that, The step of identifying whether the display scene corresponding to the second content displayed on the screen is the target scene includes: The rate of change of the second content and / or the frequency of user touch operations on the second content are obtained; If the rate of change of the second content is less than a first threshold, and the frequency of touch operations performed by the user on the second content is less than a second threshold, then the display scene is determined to be the target scene. If the frequency of user touch operations on the second content is greater than or equal to the second threshold, it is determined that the display scene is not the target scene.

11. An electronic device, characterized in that, include: One or more processors; One or more memories; the one or more memories storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform the data processing method of any one of claims 1 to 10.

12. A computer-readable medium, characterized in that, The readable medium stores instructions that, when executed on a computer, cause the computer to perform the data processing method according to any one of claims 1 to 10.

13. A computer program product, characterized in that, It includes a computer program / instruction that, when executed by a processor, implements the data processing method according to any one of claims 1 to 10.