Search

CN-121996054-A - Data processing method, electronic device, readable medium, and program product

CN121996054ACN 121996054 ACN121996054 ACN 121996054ACN-121996054-A

Abstract

The present application relates to the field of terminal technologies, and in particular, to a data processing method, an electronic device, a readable medium, and a program product. The method reduces the data volume for processing the original capacitance data by reducing the touch sampling rate in some scenes with lower screen refresh rate, thereby reducing the power consumption of the electronic equipment. And the number of the touch event coordinate data is increased by correspondingly processing the original capacitance value data which is reduced due to the reduction of the touch sampling rate, then performing interpolation processing and other modes, so as to increase the number of the touch event coordinate data which is finally used for determining the touch position to the number before the reduction of the touch sampling rate. Therefore, the power consumption of the electronic equipment can be reduced on the premise that the electronic equipment can accurately identify the touch position and then respond to an accurate touch event.

Inventors

  • Mu Weihu

Assignees

  • 荣耀终端股份有限公司

Dates

Publication Date
20260508
Application Date
20241105

Claims (13)

  1. 1. A data processing method applied to an electronic device, characterized in that the electronic device comprises a screen, and The method comprises the following steps: 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; 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 smaller 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 carrying out interpolation processing on the first coordinate data to obtain second coordinate data, wherein the second coordinate data corresponds to the first touch sampling rate.
  2. 2. The method of claim 1, wherein the electronic device comprises a touch drive, and The adjusting the touch sampling rate of the screen to a second touch sampling rate corresponding to the second screen refresh rate includes: acquiring a first file node corresponding to the touch control driver, wherein the first file node is used for receiving relevant control parameters set for the touch control driver; Writing the second touch sampling rate corresponding to the second screen refresh rate into the first file node; And acquiring the second touch sampling rate in the first file node through the touch drive, and controlling the screen to acquire capacitance data according to the second touch sampling rate.
  3. 3. The method of claim 2, wherein the electronic device comprises a composition service, and The obtaining a first file node corresponding to the touch driver includes: And accessing the first file node exposed in the kernel space by the touch control driver through the synthesis service.
  4. 4. The method of claim 3, wherein writing the second touch sample rate corresponding to the second screen refresh rate to the first file node comprises: the synthesis service opens the first file node by using a write-in interface provided by a file system of the kernel space; the synthesis service writes the second touch sampling rate into the first file node; and the synthesis service uses a closing interface provided by the file system to close the first file node after the second touch sampling rate is written.
  5. 5. The method of claim 4, wherein the obtaining the second touch sample rate in the first file node by the touch driver and controlling the screen to collect capacitance data at the second touch sample rate comprises: The touch control driver accesses the first file node to acquire the second touch control sampling rate by using an access interface provided by the file system; the touch control driver generates a sampling control signal based on the second touch control sampling rate; the touch control 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 control sampling rate.
  6. 6. The method of claim 1, wherein the first touch sampling rate corresponds to a first amount of capacitance data collected over a predetermined time, the second touch sampling rate corresponds to a second amount of capacitance data collected over a predetermined time, the second amount is less than the first amount, and The obtaining the first capacitance value data corresponding to the second touch sampling rate includes: and acquiring the second quantity of first capacity value data in a preset time.
  7. 7. The method of claim 6, wherein the obtaining first coordinate data corresponding to the first capacitance data comprises: and processing to obtain the second quantity of first coordinate data based on the second quantity of first capacity data.
  8. 8. The method of claim 7, wherein interpolating the first coordinate data to obtain second coordinate data comprises: Performing interpolation operation on adjacent first coordinate data in a data queue formed by the second quantity of first coordinate data to obtain third quantity of third coordinate data, wherein the first quantity is the sum of the second quantity and the third quantity; and obtaining the first number of second coordinate data based on the second number of first coordinate data and the third number of third coordinate data.
  9. 9. The method of any of claims 1-8, wherein prior to adjusting the touch sampling rate of the screen to a second touch sampling rate corresponding to the second screen refresh rate, the method further comprises: identifying whether the display scene corresponding to the second content displayed by the screen is a target scene or not; And displaying a display scene corresponding to the second content corresponding to the screen as a target scene, and adjusting the touch sampling rate of the screen to the second touch sampling rate.
  10. 10. The method of claim 9, wherein the identifying whether the display scene corresponding to the second content displayed by the screen is a target scene comprises: Acquiring the change rate of the second content and/or the frequency of the touch operation of a user on the second content; Determining that the display scene is the target scene corresponding to the rate of change of the second content being less than a first threshold and corresponding to the frequency of touch operations by a user on the second content being less than a second threshold; And determining that the display scene is not the target scene according to the fact that the frequency of the touch operation of the user on the second content is greater than or equal to the second threshold value.
  11. 11. An electronic device comprising one or more processors, one or more memories, the one or more memories storing one or more programs that, when executed by the one or more processors, cause the electronic device to perform the data processing method of any of claims 1-10.
  12. 12. A computer readable medium, characterized in that the readable medium has stored thereon instructions, which when executed on a computer, cause the computer to perform the data processing method of any of claims 1 to 10.
  13. 13. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the data processing method of any of claims 1 to 10.

Description

Data processing method, electronic device, readable medium, and program product Technical Field The present invention relates to the field of terminal technologies, and in particular, to a data processing method, an electronic device, a readable medium, and a program product. Background In the using process of the electronic equipment, the screen refresh rate can be adjusted in real time corresponding to different display scenes. For example, in order to meet the screen smoothness requirement in a game scenario, the screen refresh rate of the electronic device is higher, for example 120 hertz (Hz) or 144Hz or even higher, whereas in a display scenario such as a web browsing interface of a browser application, a lower screen refresh rate may be set for the screen due to the web browsing interface of the browser application. It can be appreciated that for an electronic device having a Touch Panel (TP), the higher the screen refresh rate, the higher the touch sample rate of the desired configuration, the lower the screen refresh rate, and the lower the touch sample rate of the desired configuration. However, in the software system of the electronic device, when the screen refresh rate changes, the touch sampling rate needs to be adjusted through a longer signaling transmission path. Thus, to accommodate different screen refresh rates, the electronic device will typically configure the touch sample rate to correspond to the highest screen refresh rate, and the touch sample rate remains unchanged as the screen refresh rate changes. Namely, the electronic equipment samples at the same touch sampling rate under all display scenes. Thus, the electronic device still adopts a higher touch sampling rate when the screen refresh rate is reduced, but the higher touch sampling rate can lead to higher power consumption of the electronic device. Disclosure of Invention The embodiment of the application provides a data processing method, electronic equipment, a readable medium and a program product. The method can reduce the power consumption of the electronic equipment on the premise of ensuring that the electronic equipment accurately identifies the touch position and then can respond to an accurate touch event. In a first aspect, an embodiment of the application provides a data processing method, which is applied to electronic equipment, wherein the electronic equipment comprises a screen, the screen displays first content at a first screen refresh rate, the screen has a first touch sampling rate corresponding to the first screen refresh rate, the screen is detected to display second content at a second screen refresh rate, the second screen refresh rate is smaller than the first screen refresh rate, the touch sampling rate of the screen is adjusted to be a second touch sampling rate corresponding to the second screen refresh rate, the second touch sampling rate is smaller than the first touch sampling rate, first capacitance data corresponding to the second touch sampling rate are acquired, first coordinate data corresponding to the first capacitance data are acquired, the first coordinate data correspond to the second touch sampling rate, interpolation processing is conducted on the first coordinate data, and second coordinate data are acquired, wherein the second coordinate data correspond to the first touch sampling rate. For example, the electronic device may be an electronic device such as a mobile phone, which has a screen and supports touch operation, and the first content may be game interface content correspondingly displayed by a game application running on the mobile phone, or may be video playing interface content correspondingly displayed by a video application running on the mobile phone. It can be appreciated that, by adjusting the touch sampling rate of the screen to the smaller second touch sampling rate corresponding to the second screen refresh rate, the amount of data for processing the original capacitance data can be reduced by reducing the touch sampling rate in some scenes with lower screen refresh rate, so as to reduce the power consumption of the electronic device. And the number of the touch event coordinate data is increased by correspondingly processing the original capacitance value data which is reduced due to the reduction of the touch sampling rate, then performing interpolation processing and other modes, so as to increase the number of the touch event coordinate data which is finally used for determining the touch position to the number before the reduction of the touch sampling rate. Therefore, the power consumption of the electronic equipment can be reduced on the premise that the electronic equipment can accurately identify the touch position and then respond to an accurate touch event. In one possible implementation of the first aspect, the electronic device includes a touch driver, and the adjusting the touch sampling rate of the screen to a second touch sampling rate corresponding