Touch response method, electronic equipment, storage medium and program product

By detecting touch events and screen refresh rate, whether there is a risk of frame loss, and increasing the scanning frequency, the lag problem caused by fluctuations in the scanning cycle of the touch screen is solved, and the continuous display of the touch screen is realized.

CN120335633APending Publication Date: 2025-07-18HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410038822.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The swing of the scanning period of the touch screen leads to frame loss problems, resulting in stuttering of the touch screen and discontinuous display.

Method used

By detecting the application-related information of the target touch event and the current screen refresh rate, we can determine whether there is a risk of frame dropping, and increase the scanning frequency of the touch screen when there is a risk, so that at least one point data is available between the two adjacent frame synchronization signals, ensuring that point data can be retrieved every time.

Benefits of technology

It effectively avoids frame loss problem, ensures that the screen content of the touch screen does not shake continuously, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335633A_ABST
    Figure CN120335633A_ABST
Patent Text Reader

Abstract

The invention provides a touch response method, electronic equipment, a storage medium and a program product, and relates to the technical field of electronic equipment. According to the related information of the application corresponding to the target touch event and / or the current screen refresh rate, whether a frame loss risk exists when the touch screen is scanned at the preset scanning frequency is judged, when it is determined that the frame loss risk exists, the scanning frequency of the touch screen is improved, and the higher the scanning frequency of the touch screen is, the higher the frame loss risk is. And the quantity of the report point data obtained in unit time is more. In the application, the improved scanning frequency (target scanning frequency) is greater than the current screen refresh rate, so that at least one report point data exists between two adjacent frame synchronization signals, even if the scanning period fluctuates, the report point data can be ensured to be obtained every time, and the accuracy of the scanning period is improved. Therefore, the problem of frame loss caused by the fact that the report point data cannot be obtained is avoided, and the screen display content of the touch screen is ensured to be continuous without shaking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic devices, and in particular, to a method for touch response, an electronic device, a storage medium, and a program product. Background Art

[0002] In recent years, an increasing number of electronic devices are equipped with touch screens. When a user touches the touch screen, the touch screen will respond to the user's touch operation and display corresponding screen display content. Among them, the response process of the touch screen includes: the touch screen collects data in each scanning cycle and reports the collected data to the processor of the electronic device, and the processor extracts the data reported by the touch screen for image drawing. Ideally, if the frequency at which the processor extracts data is the same as the frequency at which the touch screen reports data, one frame can be reported and one frame can be drawn.

[0003] In practical applications, due to the limitations of hardware devices, the scanning components of the touch screen last longer in some scanning cycles and shorter in some other scanning cycles, that is, the duration of the scanning cycle is inconsistent, that is, the scanning cycle fluctuates.

[0004] When the duration of a certain scanning cycle is long, it will cause the reporting time of the subsequent frame of data to be later than the time when the processor extracts data. Therefore, the processor cannot extract data and cannot perform image drawing, which leads to the problem of frame loss. The problem of frame loss will cause the touch screen to freeze and the display to be discontinuous. Summary of the Invention

[0005] This application provides a method for touch response, an electronic device, a storage medium, and a program product, which can avoid the problem of frame loss by ensuring that the electronic device can extract reporting point data each time.

[0006] To achieve the above object, this application adopts the following technical solutions:

[0007] In a first aspect, a method for touch response is provided, which is applied to an electronic device. The electronic device includes a touch screen for detecting touch events. The method includes: when a target touch event is detected, obtaining relevant information of the application corresponding to the target touch event and / or the current screen refresh rate; determining whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event and / or the current screen refresh rate; if there is a risk of frame loss, increasing the scanning frequency of the touch screen from the preset scanning frequency to a target scanning frequency, where the target scanning frequency is greater than the current screen refresh rate.

[0008] Based on the above technical solution, when a target touch event is detected, it is determined whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event and / or the current screen refresh rate. When it is determined that there is a risk of frame loss, the scanning frequency of the touch screen is increased. The higher the scanning frequency of the touch screen, the more the number of reported point data obtained per unit time. In this application, by making the increased scanning frequency (target scanning frequency) greater than the current screen refresh rate, there will be at least one reported point data between two adjacent frame synchronization signals, so that even if there is a fluctuation in the scanning period, it can be ensured that the reported point data can be obtained each time, thus avoiding the problem of frame loss caused by not being able to obtain the reported point data and ensuring that the screen display content of the touch screen is continuous and does not shake.

[0009] In a possible implementation manner of the first aspect, the relevant information includes an application identifier. Determining whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event includes: determining whether the identifier of the application corresponding to the target touch event is in a pre-stored white list, and multiple application identifiers are configured in the white list; when the identifier of the application corresponding to the target touch event is in the white list, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0010] In the embodiment of this application, it is determined whether the business scenario of the application corresponding to the target touch event is a high reported point effective scenario through the name of the application corresponding to the target touch event and a preset white list. When the business scenario of the application corresponding to the target touch event is a high reported point effective scenario, it indicates that there is a risk of frame loss in the business executed by the touch screen. Therefore, it is necessary to avoid this situation. By increasing the scanning frequency, the number of reported point data obtained per unit time is increased, so that the electronic device can extract the reported point data each time, thus avoiding the problem of frame loss caused by not being able to obtain the reported point data.

[0011] In a possible implementation manner of the first aspect, when the identifier of the application corresponding to the target touch event is in the white list, determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency includes: when the identifier of the application corresponding to the target touch event is in the white list, detecting whether the current screen refresh rate is greater than or equal to a refresh rate threshold; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0012] In the embodiments of the present application, since the power consumption of the electronic device will be very high after the scanning frequency of the touch screen is increased, it is necessary to be more cautious when deciding whether to increase the scanning frequency. Therefore, in this solution, when it is determined that the identifier of the application corresponding to the target touch event is in the whitelist, the scanning frequency will not be immediately increased. Instead, a further judgment is made based on the current screen refresh rate. A dual judgment is made to ensure that the scanning frequency is increased when necessary, and unnecessary power consumption waste is avoided.

[0013] In a possible implementation manner of the first aspect, the relevant information includes the application type. Determining whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event includes: determining whether the type of the application corresponding to the target touch event is a preset type; if the type of the application corresponding to the target touch event is a preset type, it is determined that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0014] In the embodiments of the present application, the preset type refers to an application type whose business scenario is a high reporting point requirement scenario when the touch screen is executing an application of this type. When the type of the application corresponding to the target touch event is a preset type, it can be directly determined that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency, and then the scanning frequency is increased. This can simplify the detection process and improve efficiency.

[0015] In a possible implementation manner of the first aspect, if the type of the application corresponding to the target touch event is a preset type, determining that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency includes: if the type of the application corresponding to the target touch event is a preset type, detecting whether the current screen refresh rate is greater than or equal to the refresh rate threshold; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0016] In the embodiments of the present application, by combining the preset type with the current screen refresh rate to determine whether there is a risk of frame loss when scanning the touch screen at the preset scanning frequency, the accuracy of the judgment result is improved to ensure that the scanning frequency is increased when necessary, and unnecessary power consumption waste is avoided.

[0017] In a possible implementation manner of the first aspect, the method further includes: if the type of the application corresponding to the target touch event is not a preset type, detecting whether the current screen refresh rate is greater than or equal to the refresh rate threshold; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0018] In the embodiments of the present application, when it is determined that the type of the application corresponding to the target touch event is not the preset type, the determination result of the frame loss risk is not directly given, but further judgment is made in combination with the current screen refresh rate, which improves the accuracy of the judgment result to ensure that the scanning frequency is increased when necessary and unnecessary power consumption waste is avoided.

[0019] In a possible implementation manner of the first aspect, determining whether there is a frame loss risk when scanning the touch screen at a preset scanning frequency according to the current screen refresh rate includes: detecting whether the current screen refresh rate is greater than or equal to the refresh rate threshold; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a frame loss risk when scanning the touch screen at the preset scanning frequency.

[0020] In the embodiments of the present application, the higher the current screen refresh rate, the greater the demand for reporting point data of the service being executed on the touch screen, and the lower the screen refresh rate, the smaller the demand for reporting point data of the service being executed on the touch screen. In a service scenario with a large demand for reporting point data, if the touch screen is still scanned at the preset scanning frequency to report the reporting point data, the possibility of frame loss increases, that is, there is a frame loss risk. The accuracy of the judgment result is improved to ensure that the scanning frequency is increased when necessary and unnecessary power consumption waste is avoided.

[0021] In a possible implementation manner of the first aspect, the relevant information includes the application identifier. If the current screen refresh rate is greater than or equal to the refresh rate threshold, determining that there is a frame loss risk when scanning the touch screen at the preset scanning frequency includes: if the current screen refresh rate is greater than or equal to the refresh rate threshold, determining whether the identifier of the application corresponding to the target touch event is in the pre-stored white list, and multiple application identifiers are configured in the white list; when the identifier of the application corresponding to the target touch event is in the white list, it is determined that there is a frame loss risk when scanning the touch screen at the preset scanning frequency.

[0022] In the embodiments of the present application, first determine whether the current screen refresh rate is a high refresh rate or a low refresh rate, and then determine whether the identifier of the application corresponding to the target touch event is in the pre-stored white list. Considering both factors improves the accuracy of the judgment result to ensure that the scanning frequency is increased when necessary and unnecessary power consumption waste is avoided.

[0023] In a possible implementation manner of the first aspect, the relevant information includes the application type. If the current screen refresh rate is greater than or equal to the refresh rate threshold, determining that there is a frame loss risk when scanning the touch screen at the preset scanning frequency includes: if the current screen refresh rate is greater than or equal to the refresh rate threshold, determining whether the type of the application corresponding to the target touch event is the preset type; if the type of the application corresponding to the target touch event is the preset type, it is determined that there is a frame loss risk when scanning the touch screen at the preset scanning frequency.

[0024] In the embodiments of the present application, first determine whether the current screen refresh rate is a high refresh rate or a low refresh rate, and then determine whether the type of the application corresponding to the target touch event is a preset type. Considering both factors improves the accuracy of the judgment result to ensure that the scanning frequency is increased when necessary and avoid unnecessary power consumption waste.

[0025] In a possible implementation manner of the first aspect, after increasing the scanning frequency of the touch screen from a preset scanning frequency to a target scanning frequency, the method further includes: determining a target sampling interval according to the target scanning frequency, where the target sampling interval indicates the interval between the trigger moment of the frame synchronization signal and the end moment of the target sampling period, and the target sampling period is the reporting point data sampling period that is before the trigger moment of the frame synchronization signal and is the closest to it. Different scanning frequencies correspond to different sampling intervals; when the frame synchronization signal is obtained, determine the start and end moments of the target sampling period according to the target sampling interval and the trigger moment of the frame synchronization signal; draw the display content corresponding to the frame synchronization signal according to the reporting point data falling within the target sampling period.

[0026] In the embodiments of the present application, by setting the sampling interval, the reporting point data can be filtered to ensure the smoothness when extracting the reporting point data. When the scanning frequency of the touch screen is increased from a preset scanning frequency to a target scanning frequency, the reporting point data is filtered using the target sampling interval corresponding to the target scanning frequency, so that the number of reporting point data extracted each time when responding to the Vsync-app signal for drawing is more balanced, improving the stability and continuity of the screen display content.

[0027] In a possible implementation manner of the first aspect, after increasing the scanning frequency of the touch screen from a preset scanning frequency to a target scanning frequency, the method further includes: if the target touch event is not detected within a preset duration, reducing the scanning frequency of the touch screen to the preset scanning frequency.

[0028] In the embodiments of the present application, after the target touch event ends, reducing the scanning frequency in a timely manner can save power and avoid unnecessary resource waste.

[0029] In a second aspect, an electronic device is provided. The electronic device includes a memory and a processor. The memory is used to store instructions. When the instructions are executed by the processor, the electronic device executes the touch response method in the first aspect or any possible implementation manner in the first aspect.

[0030] In a third aspect, an embodiment of the present application provides a device, which is included in an electronic device and has a function of implementing the behaviors of the electronic device in the above aspects and the possible implementation manners of the above aspects. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions.

[0031] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed, a method for touch response in the first aspect or any one of the possible implementation manners in the first aspect is implemented.

[0032] In a fifth aspect, a computer program product is provided. The computer program product includes computer program code. When the computer program code runs on a computer, the computer is caused to execute the method for touch response in the first aspect or any one of the possible implementation manners in the first aspect.

[0033] Based on the implementation manners provided in the above aspects of the present application, further combinations can be made to provide more implementation manners. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A hardware structure block diagram of an electronic device provided by an embodiment of the present application is shown;

[0035] Figure 2 A software structure block diagram of an electronic device provided by an embodiment of the present application is shown;

[0036] Figure 3 A timing schematic diagram of an image display process is shown;

[0037] Figure 4 A timing schematic diagram of extracting reporting point data in an ideal state is shown;

[0038] Figure 5 A timing schematic diagram of extracting reporting point data when the scan period fluctuates is shown;

[0039] Figure 6 A flowchart schematic diagram of a method for touch response is shown;

[0040] Figure 7 A timing schematic diagram of extracting reporting point data after the scan frequency is increased is shown;

[0041] Figure 8 A timing schematic diagram of a method for touch response is shown;

[0042] Figure 9A timing schematic diagram showing another method of touch response;

[0043] Figure 10 A timing schematic diagram showing another method of touch response;

[0044] Figure 11 A timing schematic diagram showing another method of touch response;

[0045] Figure 12 A schematic diagram showing a sampling interval T;

[0046] Figure 13 A schematic structural diagram of a device provided by an embodiment of the present application. Detailed implementation manners

[0047] Next, the technical solutions in the present application will be described with reference to the accompanying drawings.

[0048] Currently, touch screens are configured on more and more electronic devices. A touch screen is an important tool for realizing human-computer interaction, which can detect and recognize user operations and respond to user operations.

[0049] For example, in an electronic signature scenario, when a user slides an input carrier on a touch screen, it will trigger a touch response process of the touch screen, and the touch screen displays the sliding trajectory of the input carrier in response to the sliding operation. Among them, the input carrier can be an input device. For example, the input carrier can be a mouse, a stylus, etc. In addition, the input carrier can also be a human body. For example, the input carrier can be a finger.

[0050] Next, the above touch response process will be described in conjunction with the electronic device involved in the embodiments of the present application.

[0051] First, please refer to Figure 1 , Figure 1 A hardware structure block diagram of an electronic device provided by an embodiment of the present application is shown.

[0052] The electronic device may include a mobile phone, a tablet computer, a handheld game console, a wearable device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The specific type of the electronic device is not limited in the embodiments of the present application.

[0053] Refer to Figure 1, the electronic device 100 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 interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a touch screen 194, and a subscriber identification 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 acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0054] It can be understood that the structure schematically shown in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0055] As an example, when the electronic device 100 is a mobile phone or a tablet computer, it may include all the components shown in the figure, or only include some of the components shown in the figure.

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

[0057] The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of instruction fetching and execution.

[0058] A memory can also be set in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

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

[0060] It can be understood that the interface connection relationships among the modules illustrated in the embodiments of the present invention are only illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0061] The charging management module 140 is used to receive a charging input from a charger. Among them, the charger can be a wireless charger or a wired charger.

[0062] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the touch screen 194, the camera 193, and the wireless communication module 160, etc.

[0063] The wireless communication function of the electronic device 100 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor, baseband processor, etc.

[0064] Among them, antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0065] The mobile communication module 150 can provide solutions for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100.

[0066] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.

[0067] The wireless communication module 160 can provide solutions for wireless communication 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), infrared technology (IR), etc. applied to the electronic device 100.

[0068] In some embodiments, antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technologies.

[0069] The electronic device 100 implements the display function through the GPU, touch screen 194, and application processor, etc. The GPU is a microprocessor for image processing, connected to the touch screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0070] The touch screen 194 is used to display images, videos, etc. The touch screen 194 includes a display panel. The display panel can adopt 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), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N touch screens 194, where N is a positive integer greater than 1.

[0071] Optionally, the touch screen 194 can be a resistive touch screen, a capacitive touch screen, an infrared touch screen, a surface acoustic wave touch screen, etc.

[0072] The electronic device 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the touch screen 194, and the application processor, etc.

[0073] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera sensor. The optical signal is converted into an electrical signal, and the camera sensor transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye.

[0074] The camera 193 is used to capture static images or videos. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0075] The NPU is a neural-network (NN) computing processor. By learning from the biological neural network structure, such as learning from the transmission mode between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as: image recognition, face recognition, voice recognition, text understanding, etc.

[0076] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.

[0077] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 100.

[0078] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.

[0079] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.

[0080] The speaker 170A, also known as the "loudspeaker", is used to convert an audio electrical signal into a sound signal.

[0081] The receiver 170B, also known as the "earpiece", is used to convert an audio electrical signal into a sound signal.

[0082] The microphone 170C, also known as the "microphone", "transmitter", is used to convert a sound signal into an electrical signal.

[0083] The headphone jack 170D is used to connect a wired headphone.

[0084] The pressure sensor 180A is used to sense a pressure signal and can convert the pressure signal into an electrical signal.

[0085] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100.

[0086] The barometric pressure sensor 180C is used to measure barometric pressure.

[0087] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of a flip leather case.

[0088] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).

[0089] The distance sensor 180F is used to measure distance.

[0090] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The electronic device 100 emits infrared light outward through the light-emitting diode. The electronic device 100 uses the photodiode to detect the infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100.

[0091] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the touch screen 194 according to the sensed ambient light brightness.

[0092] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access to application locks, fingerprint photography, fingerprint answering of incoming calls, etc.

[0093] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.

[0094] The touch sensor 180K, also known as the "touch control device". The touch sensor 180K can be disposed within the touch screen 194. The touch screen 194, also known as the "touch screen", is composed of the touch sensor 180K and the display screen. The touch sensor 180K is used to detect touch operations acting thereon or nearby. 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 the touch screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from the touch screen 194.

[0095] Optionally, the touch sensor 180K can detect the position information of the touch operation on the touch screen (i.e., the position information of the touch event).

[0096] The keys 190 include a power-on key, volume keys, etc. The keys 190 can be mechanical keys. They can also be touch keys.

[0097] The motor 191 can generate a vibration prompt. The motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback.

[0098] The indicator 192 can be an indicator light and can be used to indicate the charging state, battery level change, and can also be used to indicate messages, missed calls, notifications, etc.

[0099] The SIM card interface 195 is used to connect to a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact with and separation from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1.

[0100] In the embodiments of the present application, the operating system of the electronic device 100 may include, but is not limited to, operating systems such as Symbian, Android, Windows, MacOS, iOS, Blackberry, and HarmonyOS. The present application does not make any limitations on the operating system of the electronic device.

[0101] Optionally, in the embodiments of the present application, when the user performs a touch operation on the touch screen 194 through an input carrier, the touch sensor 180K configured in the touch screen 194 can detect the touch operation to determine that a touch event has occurred. Among them, the touch event is, for example, a click event, a swipe event, a drag event, a zoom event, a gesture event, etc.

[0102] Optionally, in the embodiments of the present application, the processor 110 includes an Inputflinger module and a frame rate management module. Among them, after the touch screen detects a touch event, it reports the touch event and the position information of the touch event to the Input module. The Input module determines whether a target touch event is detected according to the touch event, and when it determines that a target touch event is detected, it sends a detection instruction to the frame rate management module. The frame rate management module starts a detection process in response to the detection instruction. The detection process includes determining whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event and / or the current screen refresh rate. When determining whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency, a scanning frequency adjustment instruction is sent to the touch screen. The touch screen responds to the scanning frequency adjustment instruction to increase the scanning frequency of the touch screen from the preset scanning frequency to a target scanning frequency, and the target scanning frequency is greater than the current screen refresh rate.

[0103] Secondly, the software structure of the electronic device involved in the embodiments of the present application will be described. Please refer to Figure 2 , Figure 2 which shows a software structure block diagram of an electronic device provided by the embodiments of the present application.

[0104] As an example, when the touch response method provided by the present application runs on the electronic device 100, the operating system of the electronic device 100 may be Android, and its system structure may refer to Figure 2 .

[0105] Among them, the layered architecture divides software into several layers, and each layer has clear roles and divisions of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime, and the system libraries, and the kernel layer.

[0106] The application layer may include a series of application packages. Such as Figure 1 shown, the application packages may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0107] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.

[0108] Such as Figure 2 shown, the application framework layer may include a window manager, a content provider, a view system, a telephone manager, a resource manager, a notification manager, an Input module, a frame rate management module, etc.

[0109] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0110] The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc.

[0111] The view system includes visible controls, such as controls for displaying characters, controls for displaying pictures, etc. The view system can be used to build applications. The display interface of the touch screen can be composed of one or more views. For example, the display interface including the SMS notification icon may include a view for displaying characters and a view for displaying pictures.

[0112] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.

[0113] The notification manager enables applications to display notification information in the status bar, can be used to convey notification-type messages, and can disappear automatically after a short stay without user interaction.

[0114] Android runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.

[0115] The core library consists of two parts: one is the functional functions that the Java language needs to call, and the other is the core library of Android.

[0116] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to manage the object life cycle, stack management, thread management, security and exception management, as well as garbage collection and other functions.

[0117] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (such as: OpenGL ES), 2D graphics engine (such as: SGL), SF module, HWC module, etc.

[0118] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0119] The media library supports the playback and recording of various common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0120] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing, etc.

[0121] The 2D graphics engine is a graphics engine for 2D drawing.

[0122] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, a scan driver, etc.

[0123] The following takes the electronic device 100 as a mobile phone as an example to illustrate the implementation process of the above touch response process. Among them, the hardware architecture of the electronic device 100 can refer to Figure 1 , and the software architecture can refer to Figure 2 . Please refer to Figure 3 , Figure 3 shows a timing diagram of an image display process.

[0124] When the user does not perform a touch operation on the touch screen, the scanning component of the electronic device is in an idle state, and the scanning driver is run to scan the screen at a very low scanning frequency, which can save power consumption.

[0125] When the user performs a touch operation on the touch screen, the scanning component switches from the idle state to the active state, runs the scanning driver to scan the touch screen at a preset scanning frequency, and acquires initial data during the scanning process. Combining Figure 2 It can be seen that the initial data is transmitted to the application framework layer, and the Input module in the application framework layer performs algorithm processing on the initial data to obtain reported point data and caches it. Among them, the algorithm processing is, for example, denoising processing, filtering processing, etc. The reported point data includes touch position information when the input carrier contacts the touch screen, such as the horizontal and vertical axis coordinates of the touch position.

[0126] Such as Figure 2 and Figure 3 As shown, when the target application in the application layer obtains a vertical synchronization application (Vsync-app) signal, the target application can obtain the cached reported point data from the application framework layer and perform drawing based on the reported point data, and then transmit the drawn layer to the system library. The Surface Flinger (SF) module in the system library synthesizes the drawn layer, and finally transmits the synthesized layer to the display driver in the kernel layer, and the display driver completes the display sending step.

[0127] Among them, the target application refers to the application involved in the current screen display content of the touch screen. Figure 2 Any application shown in the application layer can be used as the target application. In the embodiments of the present application, the target application can be one application or multiple applications. For example, when the current screen display content is a navigation image, the target application is the navigation application. Another example is that when the current screen display content is the main interface of the electronic device, the target application is the system application. Another example is that when the current screen display content is an interaction interface, the target application is the corresponding interaction application of the interaction interface, such as WeChat, QQ, short message, etc. In some cases, for example, when the current screen display content includes a video picture and a short message window, the target application includes a video application and a short message application.

[0128] In the embodiments of the present application, as Figure 3 shown, the SF module in the system library synthesizing the drawn layer includes: when the SF module obtains a vertical synchronization surface flinger (Vsync-sf) signal, it initially synthesizes the layers drawn by different target applications, and the initially synthesized layer is refreshed to the Hardware Composer (HWC) module for further synthesis. Finally, the synthesized layer is transmitted to the display driver in the kernel layer, and when the hardware TE signal is obtained, the display driver completes the display sending step.

[0129] The Vsync-app signal, Vsync-sf signal, and hardware TE signal involved in the above text will be described below.

[0130] Among them, Vsync is divided into hardware Vsync and software Vsync. The hardware Vsync signal is the hardware TE signal, and the hardware TE signal is the signal that triggers the display on the touch screen. When the finally synthesized layer is given to the touch screen, the touch screen will display the finally synthesized layer on the touch screen when it obtains the next hardware TE signal.

[0131] Software Vsync can be understood as the processor internally simulating hardware Vsync through a set of calculation models. Software Vsync includes the Vsync-app signal and the Vsync-sf signal. The Vsync-app signal is used to notify the target application to start drawing a frame of the picture in its own window "canvas". When a frame of data is drawn, the target application can notify the SF module, and the SF module will synthesize the drawn image when the Vsync-sf signal arrives. The so-called synthesis is to analyze all the "canvases" prepared by the target applications, cut out the parts that can be seen by the user, and finally assemble them into a complete image to obtain the screen display content. Among them, the Vsync-sf signal lags behind the Vsync-app signal, and the two are of the same frequency and have a fixed time difference.

[0132] Among them, the Vsync-app signal is closely related to the refresh rate. For example, the refresh rate of the touch screen is 60HZ, which means that the duration of each refresh rate is 1000 / 60≈16ms. Therefore, the electronic device generates the Vsync-app signal every 16ms, triggering the drawing of the screen display content on the touch screen.

[0133] In an ideal state, for every frame of reported point data obtained, a frame of image is drawn and displayed. Please refer to Figure 4 , Figure 4 shows a timing diagram of extracting reported point data in an ideal state. The target application obtains the reported point data 1 corresponding to time 1 at time 1, the reported point data 2 corresponding to time 2 at time 2, the reported point data 3 corresponding to time 3 at time 3, the reported point data 4 corresponding to time 4 at time 4, and so on.

[0134] However, in reality, due to the limitations of hardware devices, the scanning cycle of the scanning component will fluctuate. As Figure 5 shown, Figure 5A timing schematic diagram for extracting reported point data when the scanning period fluctuates is shown. The scanning frequency of the touch screen is 120HZ, and the average duration of each scanning period is 8.3ms. However, the scanning component cannot ensure that the duration of each scanning period is equal, and there will be some scanning periods with a duration greater than the average duration, such as 8.5ms, and some scanning periods with a duration less than the average duration, such as 8.1ms.

[0135] As Figure 5 shown, when the duration of scanning period 1 is greater than the average duration, it will cause scanning period 2 to be delayed, and the reporting time of reported point data 2 is later than the acquisition time 2. In this way, the target application cannot obtain the reported point data at time 2, that is, a frame loss problem occurs, and the frame loss problem will cause the touch screen to freeze and the display to be discontinuous.

[0136] To solve this technical problem, an embodiment of the present application provides a touch response method. In this method, when a target touch event is detected, it is determined whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event and / or the current screen refresh rate. When it is determined that there is a risk of frame loss, the scanning frequency of the touch screen is increased. The higher the scanning frequency of the touch screen, the more reported point data can be obtained per unit time. In the present application, by making the increased scanning frequency (target scanning frequency) greater than the current screen refresh rate, there will be at least one reported point data between two adjacent frame synchronization signals. In this way, even if the scanning period fluctuates, it can be ensured that the reported point data can be obtained each time, thereby avoiding the problem of frame loss caused by the inability to obtain the reported point data and ensuring that the screen display content of the touch screen is continuous and does not shake.

[0137] The touch response method provided by the embodiment of the present application will be described below with reference to the accompanying drawings. As Figure 6 shown, Figure 6 a flowchart of a touch response method is shown, and this method is applied to Figure 1 the electronic device shown. This method includes steps 601 to 603.

[0138] Step 601, in the case of detecting a target touch event, obtain the relevant information of the application corresponding to the target touch event and / or the current screen refresh rate.

[0139] In an embodiment of the present application, when the user does not perform a touch operation on the touch screen, the scanning component is in an idle state and scans the screen at a very low scanning frequency. When the user performs a touch operation on the touch screen, the touch screen will detect this touch operation based on this very low scanning frequency, that is, a touch event is detected. Then, the scanning component switches from the idle state to the active state and starts scanning the screen at a preset scanning frequency. At the same time, the electronic device determines the type of the detected touch event.

[0140] In an embodiment of the present application, the touch event can be classified into a target touch event or a non-target touch event, where the target touch event is any one of a click event, a slide event, a drag event, and a zoom event.

[0141] Among them, the process by which the electronic device determines the type of the detected touch event includes: obtaining the position information of the touch operation on the touch screen (i.e., the position information of the touch event), and then determining whether a target touch event is detected according to the position information of the touch event. Among them, the position information of the touch event is, for example, the horizontal and vertical axis coordinates. The position information of the touch event includes a plurality of position coordinates obtained within a certain time period. Among them, the plurality of position coordinates can indicate the same position or different positions. For example, if the position of the touch operation on the touch screen does not change, then the plurality of position coordinates obtained within a certain time period indicate the same position, so it is determined that this touch event is a click event. Another example is that if the position of the touch operation on the touch screen changes, then the plurality of position coordinates obtained within a certain time period indicate different positions, so it is determined that the touch event is a slide event, a drag event, or a zoom event. The electronic device can identify the target touch event according to the type of the touch event.

[0142] The following gives an example of the process by which the electronic device obtains the position information of the touch operation on the touch screen.

[0143] For example, the touch screen is a capacitive touch screen, and the capacitive touch screen detects the position information of the touch event by sensing the capacitance change during touch. Among them, when the input carrier touches the capacitive touch screen, the capacitance at the touch position changes, and the capacitance sensor on the capacitive touch screen can detect this change and convert it into the corresponding horizontal and vertical axis coordinates, that is, the position information of the touch event.

[0144] Another example is that the touch screen is a resistive touch screen, and the resistive touch screen uses the resistance change between two conductive films covered thereon to detect the position information of the touch event. When the input carrier touches the resistive touch screen, the two conductive films come into contact, the resistance changes, and the resistive touch screen can detect the position of the touch operation by measuring the change in current and convert it into the corresponding horizontal and vertical axis coordinates, that is, the position information of the touch event.

[0145] It should be noted that in the embodiments of the present application, once a touch event is detected, regardless of whether the touch event is a target touch event, the touch response process of the electronic device will be triggered. Among them, if the touch event is not a target touch event, that is, the target touch event is not detected, there is no need to adjust the scanning frequency of the touch screen.

[0146] If the touch event is a target touch event, it means that the scanning frequency of the touch screen may need to be adjusted. In this case, the electronic device will trigger a detection process to finally determine whether to adjust the scanning frequency of the touch screen. Among them, the detection process includes obtaining relevant information of the application corresponding to the target touch event and / or the current screen refresh rate.

[0147] The application corresponding to the target touch event refers to the application corresponding to the service being executed on the touch screen when the target touch event occurs. For example, when the touch screen is displaying a game interface when the target touch event occurs, the application corresponding to the target touch event refers to the game application. For another example, when the touch screen is displaying a music playback interface when the target touch event occurs, the application corresponding to the target touch event refers to the music playback application.

[0148] In the embodiments of the present application, when the touch screen is executing a service, the processor of the touch screen will cache the relevant information of the application corresponding to the service being executed. The relevant information includes, but is not limited to, application identification, application type, application parameters, application attribute information, etc. When a target touch event is detected, the electronic device can obtain the relevant information of the application corresponding to the target touch event by reading the cache.

[0149] In the embodiments of the present application, the screen refresh rate can be automatically adapted. The current screen refresh rates corresponding to different services may be different. Among them, when the touch screen is executing a certain service, the processor will automatically adapt the current screen refresh rate and cache the current screen refresh rate. When a target touch event is detected, the electronic device can obtain the current screen refresh rate from the cache.

[0150] Step 602: Determine whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event and / or the current screen refresh rate.

[0151] In the embodiments of the present application, the relevant information of the application corresponding to the target touch event can be used to determine the service scenario being executed on the touch screen.

[0152] For example, when the touch screen executes an electronic signature service, the electronic device needs to obtain a large amount of reporting point data for high-frequency drawing and display to facilitate timely response to the user's off-screen sliding operation.

[0153] If the electronic device cannot obtain a large amount of reporting data, the image will not be drawn in time, and the touch screen will not display any picture. The intuitive manifestation is that the touch screen is stuck and discontinuous. This kind of business scenario that requires a large amount of reporting data to ensure the display continuity of the touch screen is defined as a high reporting effective scenario.

[0154] When the relevant information of the application corresponding to the target touch event indicates that the business scenario being executed by the touch screen is a high-reporting point effective scenario, it is determined whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0155] In the high-reporting point effective scenario, if there is a fluctuation in the scanning cycle, the user will clearly feel the lag of the touch screen, which is unacceptable.

[0156] In the embodiment of the present application, the refresh rate refers to the number of times the screen display content of the touch screen is refreshed per second, that is, how many times the screen display content of the touch screen is redrawn per second. The higher the refresh rate, that is, the higher the frequency of obtaining the reporting point data for drawing, the greater the demand for the reporting point data. This means that the business being executed by the touch screen has a large demand for reporting point data. Therefore, in the embodiment of the present application, the business scenario being executed by the touch screen can be determined based on the screen refresh rate.

[0157] Optionally, in an embodiment of the present application, the electronic device can automatically adapt the screen refresh rate. The current screen refresh rate is the result of automatic adaptation. Among them, the factors that need to be referred to for automatically adapting the screen refresh rate include the business being executed by the touch screen, the power status of the electronic device, the power consumption of the electronic device, whether the electronic device is overheated, the ambient temperature of the electronic device, etc.

[0158] It can be understood that, without considering the influence of the electronic device itself, the higher the current screen refresh rate, the greater the demand for point data for the business being executed by the touch screen, and the lower the screen refresh rate, the lower the demand for point data for the business being executed by the touch screen.

[0159] In an embodiment of the present application, the relevant information of the application corresponding to the target touch event and the current screen refresh rate can be used separately to determine the business scenario being executed by the touch screen, or the two can be combined to determine the business scenario being executed by the touch screen.

[0160] Optionally, in an embodiment of the present application, the electronic device may determine whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency based on relevant information of an application corresponding to the target touch event.

[0161] Optionally, in an embodiment of the present application, the electronic device may determine, based on the current screen refresh rate, whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0162] Optionally, in the embodiments of the present application, the electronic device determines whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event and the current screen refresh rate.

[0163] Step 603, if there is a risk of frame loss, the scanning frequency of the touch screen is increased from the preset scanning frequency to the target scanning frequency.

[0164] In the embodiments of the present application, when it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency, in order to ensure that the touch screen does not freeze or become discontinuous during operation, the electronic device increases the scanning frequency of the touch screen. Among them, increasing the scanning frequency of the touch screen is also increasing the reporting frequency of the reporting data, so that the number of reporting data obtained per unit time is more, which is conducive to obtaining the reporting data every time the Vsync-app signal is received.

[0165] Furthermore, in the embodiments of the present application, the electronic device may first obtain the target scanning frequency, where the target scanning frequency is greater than the current screen refresh rate. Then the electronic device increases the scanning frequency of the touch screen from the preset scanning frequency to the target scanning frequency.

[0166] Optionally, the method for obtaining the target scanning frequency includes: determining the target scanning frequency according to the current screen refresh rate. For example, if the current screen refresh rate is 120HZ and the target scanning frequency is a number greater than the current screen refresh rate, the target scanning frequency can be determined to be 125HZ or other values greater than 120HZ.

[0167] Optionally, the method for obtaining the target scanning frequency includes: a scanning frequency threshold is preset in the electronic device, where the scanning frequency threshold is the maximum scanning frequency supported by the scanning component. The electronic device may determine the scanning frequency threshold as the target scanning frequency, and then increase the scanning frequency of the touch screen from the preset scanning frequency to the target scanning frequency. For example, if the current screen refresh rate is 120HZ and the scanning frequency threshold is 144HZ, the target scanning frequency can be determined to be 144HZ.

[0168] It should be noted that the power consumption of the electronic device when the scanning frequency is 125HZ is lower than that when the scanning frequency is 144HZ. The target scanning frequency is not the larger the better. Therefore, in the embodiments of the present application, when determining the target scanning frequency, not only the fact that it is greater than the current screen refresh rate is considered, but also the business being executed by the touch screen, the power consumption of the electronic device, the remaining battery power of the electronic device, the heating situation of the electronic device, etc. are comprehensively considered.

[0169] In addition, since the current screen refresh rate is adaptively configured and is a variable quantity, a situation may occur where the preset scanning frequency is originally greater than the current screen refresh rate. In this case, the increased scanning frequency (target scanning frequency) not only needs to be greater than the current screen refresh rate but also greater than the preset scanning frequency.

[0170] In the embodiments of the present application, the target scanning frequency is greater than the current screen refresh rate. Among them, the current screen refresh rate is positively correlated with the frequency of the frame synchronization signal. Optionally, the current screen refresh rate is equal to the frequency of the frame synchronization signal. Therefore, it can be known that when the target scanning frequency is greater than the current screen refresh rate, it means that the reporting frequency is greater than the frequency of the frame synchronization signal. In this case, between two adjacent Vsync-app signals, one or more reporting data can be obtained. In this way, even if there are fluctuations in the scanning period, it can be ensured that reporting data can be obtained each time, and there will be no frame loss problem due to the absence of reporting data. This solution eliminates the frame loss problem caused by fluctuations in the scanning period through a redundancy mechanism.

[0171] As Figure 7 shown, Figure 7 shows a timing diagram of extracting reporting data after the scanning frequency is increased. Taking the current screen refresh rate of 120HZ and the target scanning frequency of 125HZ as an example, according to Figure 7 it can be seen that after the scanning frequency is increased, the scanning period becomes shorter, becoming 8ms, while the period corresponding to the current screen refresh rate is 8.3ms. The interval between two corresponding Vsync-app signals is 8.3ms. It can be seen that, as shown by the dotted line in the figure, in the ideal state, there is at least one reporting data between two adjacent Vsync-app signals. As Figure 7 shown by the solid-line one-way arrow in

[0172] Based on the above embodiments, it should be noted that:

[0173] First, after the scanning frequency of the touch screen is increased, data will be continuously collected at the increased scanning frequency for a certain period of time.

[0174] Second, the electronic device changes from not detecting the target touch event to detecting the target touch event. Only when such a change occurs will the electronic device trigger the detection process.

[0175] Thirdly, after the scanning frequency is increased, the power consumption of the electronic device will increase. To save power consumption, in the embodiments of the present application, after the scanning frequency is increased, the electronic device will continuously detect the touch screen. If the electronic device does not detect a target touch event within a preset duration, it can be understood that the target touch event has ended. In this case, the electronic device can reduce the scanning frequency to save power consumption.

[0176] Optionally, the electronic device can reduce the scanning frequency of the touch screen from the target scanning frequency to a preset scanning frequency.

[0177] Optionally, the electronic device can obtain the first refresh rate at the current moment, and then adjust the scanning frequency of the touch screen from the target scanning frequency to the first refresh rate.

[0178] Fourthly, during the process of the electronic device detecting the touch screen after the scanning frequency is increased, if a target touch event is detected within a preset duration, it can be considered that the target touch event is continuously occurring. In this case, although a target touch event is detected, the detection process in the solution of the present application will not be executed, but the scanning will continue directly at the increased scanning frequency.

[0179] Among them, during the continuous detection process, the detected target touch events may not be the same touch event. For example, if the electronic device detects a swipe event A, it will execute the detection process in the solution of the present application and finally increase the scanning frequency of the touch screen from the preset scanning frequency to the target scanning frequency. After the increase, the electronic device detects the touch screen and detects a zoom event B within a preset duration, then the electronic device confirms that the target touch event is continuously detected, and there is no need to re-execute the detection process in the solution of the present application, but the scanning will continue directly at the increased scanning frequency.

[0180] Based on the above embodiments, the embodiments of the present application describe the process of the electronic device determining whether there is a frame drop risk when scanning the touch screen at a preset screen scanning frequency according to the relevant information of the application corresponding to the target touch event and / or the current screen refresh rate.

[0181] In the first implementation manner, as Figure 8 shown, Figure 8 shows a timing diagram of a touch response method. Among them, the electronic device includes a touch screen and a processor, and the processor includes an Input module and a frame rate management module.

[0182] Step 801, the touch screen detects a touch event.

[0183] Step 802, report the touch event and location information.

[0184] Step 803, the Input module determines whether the touch event is a target touch event.

[0185] Step 804, if it is, send a detection instruction to the frame rate management module.

[0186] Step 805, in response to the detection instruction, the frame rate management module obtains the identifier of the application corresponding to the target touch event and determines whether the identifier of the application corresponding to the target touch event is in the pre-stored white list.

[0187] Step 806, when the identifier of the application corresponding to the target touch event is in the white list, send a scanning frequency adjustment instruction to the touch screen.

[0188] Step 807, in response to the scanning frequency adjustment instruction, the touch screen increases the scanning frequency of the touch screen.

[0189] Wherein, the application identifier is, for example, the application package name, the application process name, the application name, the application number, etc.

[0190] Wherein, increasing the scanning frequency of the touch screen includes increasing the scanning frequency of the touch screen from a preset scanning frequency to a target scanning frequency, and the target scanning frequency is greater than the current screen refresh rate.

[0191] In the embodiment of the present application, after detecting a touch event, the electronic device reports the touch event and the position information of the touch event to the Input module. The Input module determines the type of the touch event. If the type of the touch event is a target touch event, that is, it indicates that a target touch event is detected, the Input module sends a detection instruction to the frame rate management module. The frame rate management module obtains the identifier of the application corresponding to the target touch event in response to the detection instruction and determines whether the identifier of the application corresponding to the target touch event is in the pre-stored white list.

[0192] Wherein, a white list can be pre-configured in the electronic device, and multiple application identifiers are configured in the white list. Among them, the business scenarios of the applications corresponding to the application identifiers configured in the white list are high reporting point effective scenarios. For example, electronic signature applications, game applications, video applications, etc.

[0193] In addition, for some applications, their business scenarios are different when implementing different functions. For example, when an interactive application implements a text interaction function, the requirement for the response latency of the touch screen is not high, so the demand for reporting point data per unit time is not large. However, when implementing functions such as short video playback and video call connection, the requirement for the immediate response of the touch screen is relatively high. In this case, the demand for reporting point data per unit time is very large, that is, a high reporting point effective scenario. Such an application will also be configured in the white list.

[0194] The electronic device can detect whether the identifier of the application corresponding to the target touch event is in the whitelist. Optionally, in the embodiments of the present application, the electronic device can traverse the whitelist to determine whether the identifier of the application corresponding to the target touch event is in the pre-stored whitelist.

[0195] In the embodiments of the present application, if the identifier of the application corresponding to the target touch event is in the whitelist, it means that the business scenario of the application corresponding to the target touch event is a high-reporting point effective scenario, that is, it is determined that there is a risk of frame loss. In this case, the frame rate management module sends a scanning frequency adjustment instruction to the touch screen. After receiving the scanning frequency adjustment instruction, the touch screen increases the scanning frequency.

[0196] Optionally, the scanning frequency adjustment instruction carries control parameters corresponding to the target scanning frequency, and the touch screen can increase the scanning frequency of the touch screen from the preset scanning frequency to the target scanning frequency according to the control parameters corresponding to the target scanning frequency.

[0197] In the embodiments of the present application, if the identifier of the application corresponding to the target touch event is not in the whitelist, it means that the business scenario of the application corresponding to the target touch event is not a high-reporting point effective scenario. Therefore, it is determined that there is no risk of frame loss when scanning the touch screen at the preset screen scanning frequency, and the detection ends.

[0198] In the embodiments of the present application, it is determined whether the business scenario of the application corresponding to the target touch event is a high-reporting point effective scenario through the name of the application corresponding to the target touch event and the preset whitelist. When the business scenario of the application corresponding to the target touch event is a high-reporting point effective scenario, it indicates that there is a risk of frame loss in the business executed by the touch screen. Therefore, it is necessary to avoid this situation. By increasing the scanning frequency, the number of reporting point data obtained per unit time is increased, so that the electronic device can extract the reporting point data each time, thereby avoiding the frame loss problem caused by the inability to obtain the reporting point data.

[0199] Optionally, in order to ensure the smoothness of the reporting point data while improving the response latency, in the embodiments of the present application, while increasing the scanning frequency, the sampling interval of the Input module is synchronously modified. In this way, when the Vsync-app signal is obtained, the electronic device determines the start and end times of the target sampling period according to the modified sampling interval and the trigger time of the Vsync-app signal, and extracts the reporting point data falling within the target sampling period for drawing.

[0200] As Figure 8 shown, the method for touch response further includes step 808 and step 809.

[0201] Step 808, when the identifier of the application corresponding to the target touch event is in the whitelist, the frame rate management module sends a sampling interval adjustment instruction to the Input module.

[0202] It should be noted that step 808 and step 806 can be carried out simultaneously or in a sequential order. The embodiments of the present application do not limit the sequential order between step 808 and step 806.

[0203] Step 809, the Input module updates the target sampling interval according to the target scanning frequency in response to the sampling interval adjustment instruction.

[0204] Among them, different scanning frequencies correspond to different sampling intervals. The sampling interval refers to the duration between the trigger moment of the frame synchronization signal and the end moment of the target sampling period, and the target sampling period is the reporting point data sampling period that is located before the trigger moment of the frame synchronization signal and is the closest to it. In the embodiments of the present application, the content regarding the sampling interval is described below.

[0205] Optionally, in the embodiments of the present application, as Figure 9 shown, Figure 9 shows a timing schematic diagram of another touch response method. Among them, the electronic device includes a touch screen and a processor, and the processor includes an Input module and a frame rate management module.

[0206] Step 901, the touch screen detects a touch event.

[0207] Step 902, report the touch event and location information.

[0208] Step 903, the Input module determines whether the touch event is a target touch event.

[0209] Step 904, if so, send a detection instruction to the frame rate management module.

[0210] Step 905, the frame rate management module obtains the identifier of the application corresponding to the target touch event in response to the detection instruction, and determines whether the identifier of the application corresponding to the target touch event is in the pre-stored white list.

[0211] Step 906, if it is in the white list, detect whether the current screen refresh rate is greater than or equal to the refresh rate threshold.

[0212] Step 907, if the current screen refresh rate is greater than or equal to the refresh rate threshold, send a scanning frequency adjustment instruction to the touch screen.

[0213] Step 908, the touch screen increases the scanning frequency of the touch screen in response to the scanning frequency adjustment instruction.

[0214] Among them, increasing the scanning frequency of the touch screen includes increasing the scanning frequency of the touch screen from a preset scanning frequency to a target scanning frequency, and the target scanning frequency is greater than the current screen refresh rate.

[0215] Among them, if the current screen refresh rate is less than the refresh rate threshold, it is determined that there is no risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0216] In the embodiments of the present application, after detecting a touch event, the electronic device reports the touch event and the position information of the touch event to the Input module. The Input module determines the type of the touch event. If the type of the touch event is a target touch event, that is, it indicates that a target touch event is detected, the Input module sends a detection instruction to the frame rate management module. The frame rate management module responds to the detection instruction to obtain the identifier of the application corresponding to the target touch event, and determines whether the identifier of the application corresponding to the target touch event is in the pre-stored whitelist.

[0217] As can be seen from the foregoing, the whitelist contains a type of application, and the business scenarios of this type of application are different when implementing different functions. That is to say, when the touch screen executes the service corresponding to this type of application, it is not always in the high reporting point effective scenario. Therefore, if only whether the application identifier is in the whitelist is used as the only judgment condition, the judgment result may be inaccurate, so that the scanning frequency is increased in the non-high reporting point effective scenario, resulting in unnecessary power consumption waste.

[0218] Among them, in order to accurately judge the current situation of this type of application, in the embodiments of the present application, after determining that the identifier of the application corresponding to the target touch event is in the whitelist, it is also necessary to continue to judge in combination with the current screen refresh rate.

[0219] In the embodiments of the present application, the current screen refresh rate is greater than or equal to the refresh rate threshold, that is, the current screen refresh rate is a high refresh rate, indicating that the service being executed by the touch screen has a large demand for reporting point data. It can also be understood that the service scenario being executed by the touch screen is a high reporting point demand scenario, and there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0220] The current screen refresh rate is less than the refresh rate threshold, that is, the current screen refresh rate is a low refresh rate, indicating that the service being executed by the touch screen has a small demand for reporting point data, and the service scenario being executed by the touch screen is a non-high reporting point demand scenario, and there is no risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0221] The present application first determines whether the identifier of the application corresponding to the target touch event is in the whitelist, and then determines whether the current screen refresh rate is greater than or equal to the refresh rate threshold. On the one hand, the two have a progressive judgment relationship, and on the other hand, the two are combined for double judgment, improving the accuracy of the judgment result to ensure that the scanning frequency is increased in necessary cases and avoid unnecessary power consumption waste.

[0222] Optionally, in order to improve the response latency while ensuring the smoothness of the reported point data, in the embodiments of the present application, while increasing the scanning frequency, the sampling interval of the Input module will be modified synchronously. In this way, when the Vsync-app signal is obtained, the electronic device determines the start and end times of the target sampling period according to the modified sampling interval and the trigger time of the Vsync-app signal, and extracts the reported point data falling within the target sampling period for drawing.

[0223] As Figure 9 shown, the method for touch response further includes step 909 and step 910.

[0224] Step 909, if the current screen refresh rate is greater than or equal to the refresh rate threshold, send a sampling interval adjustment instruction to the Input module.

[0225] It should be noted that step 909 and step 907 can be carried out simultaneously or in sequence. The embodiments of the present application do not limit the sequence between step 909 and step 907.

[0226] Step 910, in response to the sampling interval adjustment instruction, the Input module updates the target sampling interval according to the target scanning frequency.

[0227] Among them, different scanning frequencies correspond to different sampling intervals. The sampling interval refers to the duration between the trigger time of the frame synchronization signal and the end time of the target sampling period. The target sampling period is the reported point data sampling period that is before the trigger time of the frame synchronization signal and is the closest to it. In the embodiments of the present application, the content about the sampling interval is described below.

[0228] Optionally, on the basis of the above embodiments, in the embodiments of the present application, step 906 may further include the following implementation manners:

[0229] When the identifier of the application corresponding to the target touch event is in the white list, determine whether the type of the application corresponding to the target touch event is a preset type; if the type of the application corresponding to the target touch event is a preset type, it is determined that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0230] In the embodiments of the present application, the preset type refers to an application type whose business scenario is a high reported point requirement scenario when the touch screen executes this type of application. For example, game type, video type, electronic signature type, live broadcast type, etc. The present application does not list them all.

[0231] When the type of the application corresponding to the target touch event is a preset type, it means that the business scenario being executed on the touch screen is a high reported point requirement scenario. Therefore, it is determined that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0232] In the embodiment of the present application, after determining that the identifier of the application corresponding to the target touch event is in the whitelist, the type of the application is further determined to be a preset type to determine whether there is a risk of frame loss. The dual judgment improves the accuracy of the judgment result to ensure that the scanning frequency is increased when necessary and unnecessary power consumption waste is avoided.

[0233] Optionally, in one embodiment, if the identifier of the application corresponding to the target touch event is in the whitelist, but the type of the application corresponding to the target touch event is not the preset type, it can be determined that there is no risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0234] Optionally, in another embodiment, if the identifier of the application corresponding to the target touch event is in the whitelist, but the type of the application corresponding to the target touch event is not the preset type, the electronic device does not directly determine whether there is a risk of frame loss, but further judgment is required.

[0235] In the embodiment of the present application, the electronic device continues to detect whether the current screen refresh rate is greater than or equal to the refresh rate threshold; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency. If the current screen refresh rate is less than the refresh rate threshold, it is determined that there is no risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0236] For example, for a certain audio playback application, its application type is audio type. The audio playback application is in the whitelist and its type is not the preset type. However, since the audio playback application may also support video playback functions, the present application further combines the current screen refresh rate to determine whether the audio playback application is implementing the video playback function. Among them, if the current screen refresh rate is a high refresh rate, it means that the audio playback application is implementing the video playback function, and its service scenario is a high reporting point effective scenario, and there is a risk of frame loss. If the current screen refresh rate is a low refresh rate, it means that the audio playback application is not implementing the video playback function, and its service scenario is a non-high reporting point effective scenario, and there is no risk of frame loss.

[0237] The embodiment of the present application combines three factors in a progressive manner to determine whether there is a risk of frame loss, improving the accuracy of the judgment result to ensure that the scanning frequency is increased when necessary and unnecessary power consumption waste is avoided.

[0238] In the second implementation manner, as Figure 10 shown, Figure 10 shows a timing diagram of another touch response method, where the electronic device includes a touch screen and a processor, and the processor includes an Input module and a frame rate management module.

[0239] Step 1001, the touch screen detects a touch event.

[0240] Step 1002, report the touch event and location information.

[0241] Step 1003, the Input module determines whether the touch event is a target touch event.

[0242] Step 1004, if so, send a detection instruction to the frame rate management module.

[0243] Step 1005, in response to the detection instruction, the frame rate management module obtains the type of the application corresponding to the target touch event and determines whether the type of the application corresponding to the target touch event is a preset type.

[0244] Step 1006, if the type of the application corresponding to the target touch event is a preset type, send a scanning frequency adjustment instruction to the touch screen.

[0245] Step 1007, in response to the scanning frequency adjustment instruction, the touch screen increases the scanning frequency of the touch screen.

[0246] In the embodiment of the present application, after detecting a touch event, the electronic device reports the touch event and the location information of the touch event to the Input module. The Input module determines the type of the touch event. If the type of the touch event is a target touch event, that is, it indicates that a target touch event is detected, the Input module sends a detection instruction to the frame rate management module. The frame rate management module obtains the type of the application corresponding to the target touch event in response to the detection instruction and determines whether the type of the application corresponding to the target touch event is a preset type.

[0247] Among them, the types of applications include, for example, game types, video types, word processing types, image processing types, audio types, electronic signature types, etc. Among them, the game type includes various game applications, the video type includes video applications, the word processing type includes interactive applications, document conversion applications, etc., the image processing type includes applications such as cameras and beauty cameras, and the audio type includes various player applications and audio processing applications.

[0248] Among them, the preset type can be pre-configured by the electronic device. In the embodiment of the present application, the electronic device can obtain the type of the application corresponding to the target touch event, and then traverse the configured preset types to determine whether the type of the application corresponding to the target touch event corresponds to the configured preset type.

[0249] In the embodiment of the present application, when the type of the application corresponding to the target touch event is a preset type, it means that the business scenario being executed by the touch screen is a high reporting point demand scenario. Therefore, it is directly determined that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0250] When the type of the application corresponding to the target touch event is not the preset type, it indicates that the business scenario being executed on the touch screen is a non-high reporting point demand scenario. Then it is determined that there is no frame loss risk when scanning the touch screen at the preset screen scanning frequency, and the scanning frequency of the touch screen is not increased.

[0251] In the embodiments of the present application, when the type of the application is the preset type, it can be directly determined that there is a frame loss risk when scanning the touch screen at the preset scanning frequency, and then the scanning frequency is increased. This can simplify the detection process and improve efficiency.

[0252] In the embodiments of the present application, it is directly determined whether there is a frame loss risk according to the type of the application corresponding to the target touch event, without judging the current screen refresh rate or whether it is in the whitelist, which simplifies the detection process and improves efficiency.

[0253] In the embodiments of the present application, it is determined whether the business scenario is a high reporting point effective scenario according to the type of the application corresponding to the target touch event, and then it is judged whether there is a frame loss risk. When there is a frame loss risk, the scanning frequency of the touch screen is increased to increase the number of reporting point data per unit time, so as to form redundancy of the reporting point data. Through this redundancy mechanism, it is ensured that reporting point data can be extracted each time.

[0254] In addition, the increased scanning frequency of the touch screen is greater than the current screen refresh rate, indicating that the reporting point frequency is greater than the frequency of the frame synchronization signal. In this way, it can be ensured that at least one reporting point data can be extracted when each frame synchronization signal arrives. Even if there are fluctuations in the scanning period, there will always be reporting point data that can be extracted among the at least one reporting point data.

[0255] Optionally, based on the embodiments shown in the second implementation manner, the embodiments of the present application further include: if the type of the application corresponding to the target touch event is not the preset type, then detect whether the current screen refresh rate is greater than or equal to the refresh rate threshold; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a frame loss risk when scanning the touch screen at the preset scanning frequency. If the current screen refresh rate is less than the refresh rate threshold, it is determined that there is no frame loss risk when scanning the touch screen at the preset scanning frequency.

[0256] In practice, for some applications, the business scenarios of such applications are different when implementing different functions. It can be seen that only judging whether there is a frame loss risk from the application type may result in inaccurate judgment results. Therefore, the embodiments of the present application combine the current screen refresh rate for joint judgment.

[0257] For example, for a certain audio playback application, its application type is audio. This audio playback application is not a preset type. However, since the audio playback application may also support video playback functions, therefore, in this application, the current screen refresh rate is further combined to determine whether the audio playback application is implementing a video playback function. Among them, if the current screen refresh rate is a high refresh rate, it means that the audio playback application is implementing a video playback function, and its service scenario is a high reporting point effective scenario, with a risk of frame loss. If the current screen refresh rate is a low refresh rate, it means that the audio playback application is not implementing a video playback function, and its service scenario is a non-high reporting point effective scenario, without a risk of frame loss.

[0258] By determining that the current screen refresh rate is a high refresh rate or a low refresh rate in the implementation of this application, it is thus determined whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency. This can improve the accuracy of the judgment result to ensure that the scanning frequency is increased when necessary and avoid unnecessary power consumption waste.

[0259] Optionally, in order to improve the response latency while ensuring the smoothness of the reported point data, in the embodiments of this application, while increasing the scanning frequency, the sampling interval of the Input module will be modified synchronously. In this way, when the Vsync-app signal is obtained, the electronic device determines the start and end times of the target sampling period according to the modified sampling interval and the trigger time of the Vsync-app signal, and extracts the reported point data falling within the target sampling period for drawing.

[0260] As Figure 10 shown, the method for touch response further includes step 1008 and step 1009.

[0261] Step 1008, if the type of the application corresponding to the target touch event is a preset type, send a sampling interval adjustment instruction to the Input module.

[0262] It should be noted that step 1006 and step 1008 can be carried out simultaneously or in a sequential order. The embodiments of this application do not limit the sequential order between step 1006 and step 1008.

[0263] Step 1009, in response to the sampling interval adjustment instruction, the Input module updates the target sampling interval according to the target scanning frequency.

[0264] Among them, different scanning frequencies correspond to different sampling intervals. The sampling interval refers to the duration between the trigger time of the frame synchronization signal and the end time of the target sampling period. The target sampling period is the reporting point data sampling period that is before the trigger time of the frame synchronization signal and is the closest to it. In the embodiments of this application, the content about the sampling interval is described below.

[0265] In the third implementation, as Figure 11 shown, Figure 11 FIG. shows a timing diagram of another touch response method. The electronic device includes a touch screen and a processor. The processor includes an Input module and a frame rate management module.

[0266] Step 1101, the touch screen detects a touch event.

[0267] Step 1102, report the touch event and location information.

[0268] Step 1103, the Input module determines whether the touch event is a target touch event.

[0269] Step 1104, if so, send a detection instruction to the frame rate management module.

[0270] Step 1105, the frame rate management module responds to the detection instruction, obtains the current screen refresh rate, and detects whether the current screen refresh rate is greater than or equal to the refresh rate threshold.

[0271] Step 1106, if the current screen refresh rate is greater than or equal to the refresh rate threshold, send a scan frequency adjustment instruction to the touch screen.

[0272] Step 1107, the touch screen responds to the scan frequency adjustment instruction and increases the scan frequency of the touch screen.

[0273] In the embodiment of the present application, after detecting a touch event, the electronic device reports the touch event and the location information of the touch event to the Input module. The Input module determines the type of the touch event. If the type of the touch event is a target touch event, that is, it indicates that a target touch event is detected, the Input module sends a detection instruction to the frame rate management module. The frame rate management module responds to the detection instruction to obtain the current screen refresh rate and detects whether the current screen refresh rate is greater than or equal to the refresh rate threshold.

[0274] According to the foregoing content, in the embodiment of the present application, the current screen refresh rate is the result of automatic adaptation. Among them, when the touch screen executes different services, the current screen refresh rate may be different.

[0275] In the embodiment of the present application, when the touch screen executes a service, the processor automatically adapts the current screen refresh rate and caches the current screen refresh rate. When a target touch event is detected, the electronic device can obtain the current screen refresh rate from the cache.

[0276] In the embodiment of the present application, the refresh rate threshold is pre-configured. For example, the refresh rate threshold is 120HZ, or for example, the refresh rate threshold is 90HZ. Among them, the user can manually modify the refresh rate threshold based on requirements.

[0277] The electronic device can compare the current screen refresh rate with the refresh rate threshold to determine whether the current screen refresh rate is a high refresh rate or a low refresh rate.

[0278] In the embodiments of the present application, when the current screen refresh rate is greater than or equal to the refresh rate threshold, it indicates that the current screen refresh rate is a high refresh rate, which also means that the scenario of the service being executed on the touch screen is a high reporting point effective scenario. In this case, it is determined that there is a risk of frame loss when scanning the touch screen at the preset screen scanning frequency.

[0279] When the current screen refresh rate is less than the refresh rate threshold, it indicates that the current screen refresh rate is a low refresh rate, which also means that the scenario of the service being executed on the touch screen is a non-high reporting point effective scenario. In this case, it is determined that there is no risk of frame loss when scanning the touch screen at the preset screen scanning frequency.

[0280] In the embodiments of the present application, when it is determined that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency, in order to ensure that the touch screen does not shake or become discontinuous when executing the service, the electronic device increases the scanning frequency of the touch screen. Among them, increasing the scanning frequency of the touch screen is also increasing the reporting frequency of the reporting point data, so that the number of reporting point data obtained per unit time is more, which is conducive to obtaining the reporting point data every time the Vsync-app signal is received.

[0281] Optionally, in order to ensure the smoothness of the reporting point data while reducing the response latency, in the embodiments of the present application, while increasing the scanning frequency, the sampling interval of the Input module is synchronously modified. In this way, when the Vsync-app signal is obtained, the electronic device determines the start and end times of the target sampling period according to the modified sampling interval and the trigger time of the Vsync-app signal, and extracts the reporting point data falling within the target sampling period for drawing.

[0282] As Figure 11 shown, the method for touch response further includes step 1108 and step 1109.

[0283] Step 1108, if the current screen refresh rate is greater than or equal to the refresh rate threshold, the frame rate management module sends a sampling interval adjustment instruction to the Input module.

[0284] It should be noted that step 1106 and step 1108 can be carried out simultaneously or in a sequential order. The embodiments of the present application do not limit the sequential order between step 1106 and step 1108.

[0285] Step 1109, in response to the sampling interval adjustment instruction, the Input module updates the target sampling interval according to the target scanning frequency.

[0286] Among them, different scanning frequencies correspond to different sampling intervals. The sampling interval refers to the duration between the triggering moment of the frame synchronization signal and the end moment of the target sampling period, and the target sampling period is the reporting point data sampling period that is before the triggering moment of the frame synchronization signal and is the closest to it. In the embodiments of the present application, the content regarding the sampling interval is described below.

[0287] Based on the above embodiments, in order to improve the response latency while ensuring the smoothness of the reporting point data, in the embodiments of the present application, while increasing the scanning frequency, the sampling interval of the Input module will be modified synchronously. In this way, when the Vsync-app signal is obtained, the electronic device determines the start and end moments of the target sampling period according to the modified sampling interval and the triggering moment of the Vsync-app signal, and extracts the reporting point data falling within the target sampling period for drawing. Among them, the content regarding the sampling interval is described below.

[0288] Optionally, in the embodiments of the present application, step 1106 may further include the following implementation manners:

[0289] If the current screen refresh rate is greater than or equal to the refresh rate threshold, determine whether the identifier of the application corresponding to the target touch event is in the pre-stored white list, and multiple application identifiers are configured in the white list; when the identifier of the application corresponding to the target touch event is in the white list, determine that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0290] Among them, if the identifier of the application corresponding to the target touch event is not in the white list, determine that there is no risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0291] The present application first judges the current screen refresh rate, and then judges whether the identifier of the application corresponding to the target touch event is in the pre-stored white list, and combines the two for judgment, improving the accuracy of the judgment result to ensure that the scanning frequency is increased when necessary and avoid unnecessary power consumption waste.

[0292] Optionally, in the embodiments of the present application, step 1106 may further include the following implementation manners:

[0293] If the current screen refresh rate is greater than or equal to the refresh rate threshold, determine whether the type of the application corresponding to the target touch event is a preset type; if the type of the application corresponding to the target touch event is a preset type, determine that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0294] This application first determines the current screen refresh rate, then determines whether the type of the application corresponding to the target touch event is a preset type, and combines the two for judgment, improving the accuracy of the judgment result to ensure that the scanning frequency is increased when necessary and avoid unnecessary power consumption waste.

[0295] Optionally, in the embodiment of this application, step 1106 may further include the following implementation manners:

[0296] If the current screen refresh rate is greater than or equal to the refresh rate threshold, determine whether the identifier of the application corresponding to the target touch event is in the pre-stored white list. When the identifier of the application corresponding to the target touch event is in the white list, determine whether the type of the application corresponding to the target touch event is a preset type. If the type of the application corresponding to the target touch event is a preset type, determine that there is a risk of frame loss when scanning the touch screen at the preset scanning frequency.

[0297] It should be noted that in the above third implementation manner and optional implementation manners, two or three factors can be combined in parallel to determine whether there is a risk of frame loss when scanning the touch screen at the preset scanning frequency, or two or three factors can be combined serially to determine whether there is a risk of frame loss when scanning the touch screen at the preset scanning frequency. The combination manner of the three factors in the embodiment of this application is not limited.

[0298] On the basis of the above embodiments, after the electronic device increases the scanning frequency, it will perform scanning based on the increased scanning frequency to obtain reporting point data, and then extract the reporting point data for drawing when the Vsync-app signal is obtained. Among them, a sampling interval T needs to be set during the process of extracting the reporting point data to facilitate determining which reporting point data to extract. Please refer to Figure 12 , Figure 12 shows a schematic diagram of a sampling interval T. The following will describe the drawing process after the scanning frequency is increased in the embodiment of this application in conjunction with Figure 12 。

[0299] Step S1, the electronic device determines a target sampling interval according to the target scanning frequency.

[0300] In the embodiment of this application, the target sampling interval indicates the interval between the trigger moment of the frame synchronization signal and the end moment of the target sampling period, and the target sampling period is the reporting point data sampling period that is before the trigger moment of the frame synchronization signal and is the closest to it.

[0301] See Figure 12 , Figure 12 The vertical solid line in it represents the trigger moment of the frame synchronization signal, and the vertical dotted line represents the start and end moments of the sampling period. The double-arrow solid line represents the sampling interval T, and the double-arrow dotted line represents the period t of the frame synchronization signal.

[0302] In the embodiments of the present application, different scanning frequencies correspond to different sampling intervals. For example, when the scanning frequency is 120 HZ, the corresponding sampling interval is 5 ms; when the scanning frequency is 125 HZ, the corresponding sampling interval is 4 ms; when the scanning frequency is 131 HZ, the corresponding sampling interval is 3 ms; when the scanning frequency is 144 HZ, the corresponding sampling interval is 2 ms. The present application does not exhaustively list the corresponding relationship between the scanning frequency and the sampling interval.

[0303] Optionally, in the embodiments of the present application, the electronic device pre-stores the corresponding relationship between multiple scanning frequencies and multiple sampling intervals, and then can determine the target sampling interval corresponding to the target scanning frequency according to the target scanning frequency and the pre-stored corresponding relationship.

[0304] For example, when the target scanning frequency is 125 HZ, according to the target scanning frequency and the foregoing corresponding relationship, it can be determined that the corresponding sampling interval is 4 ms, so the target sampling interval can be determined to be 4 ms. Another example, when the target scanning frequency is 131 HZ, according to the target scanning frequency and the foregoing corresponding relationship, it can be determined that the corresponding sampling interval is 3 ms, so the target sampling interval can be determined to be 3 ms.

[0305] Optionally, in the embodiments of the present application, after the electronic device increases the scanning frequency, it determines the target sampling interval according to the increased scanning frequency (i.e., the target scanning frequency), and extracts the reported point data based on the target sampling interval during the extraction process. The detailed content of the extraction process can be found in the descriptions of step S2 and step S3.

[0306] Optionally, in the embodiments of the present application, the electronic device pre-stores two sampling intervals. One sampling interval corresponds to a preset scanning frequency and is called the first sampling interval, and the other sampling interval corresponds to the increased scanning frequency and is called the second sampling interval. Among them, the second sampling interval is the target sampling interval. After the electronic device increases the scanning frequency, the electronic device automatically switches the first sampling interval to the second sampling interval. After the electronic device decreases the scanning frequency, the electronic device automatically switches the second sampling interval to the first sampling interval.

[0307] Optionally, in the embodiments of the present application, when the electronic device scans the touch screen at a preset scanning frequency, it configures the first sampling interval for the preset scanning frequency, and during the process of collecting data at the preset scanning frequency, it extracts the reported point data based on the first sampling interval. When the scanning frequency of the touch screen increases from the preset scanning frequency to the target scanning frequency, the electronic device determines the target sampling interval based on the target scanning frequency, then updates the first sampling interval with the target sampling interval, and extracts the reported point data based on the updated target sampling interval.

[0308] Step S2, when the frame synchronization signal is obtained, determine the start and end times of the target sampling period according to the target sampling interval and the trigger time of the frame synchronization signal.

[0309] In the embodiment of the present application, when the Vsync-app signal is obtained, the electronic device can obtain the trigger time of the Vsync-app signal, and then determine the start and end times of the target sampling period according to the trigger time of the Vsync-app signal and the target sampling interval.

[0310] As Figure 12 shown, for example, the duration t of the target sampling period is 8 ms, the target sampling interval T is 5 ms, and the trigger time of the Vsync-app signal is 29 ms. Then, the start and end times of the target sampling period can be determined to be 16 ms and 24 ms, as shown by the rectangular box on the time axis in the figure. Among them, the duration of the target sampling period is equal to the duration between two adjacent Vsync-app signals.

[0311] Step S3, draw the display content corresponding to the frame synchronization signal according to the reported point data falling within the target sampling period.

[0312] In the embodiment of the present application, the touch control component collects initial data at the target scanning frequency, processes the initial data to obtain reported point data, and the reporting frequency of the reported point data is equal to the target scanning frequency. The electronic device can obtain the reporting time of the reported point data, that is, the time when the reported point data is obtained.

[0313] Among them, the reported point data falling within the target sampling period refers to the reported point data whose reporting time falls between the start and end times of the target sampling period.

[0314] Continuing with the above example, in the embodiment of the present application, when the electronic device obtains the Vsync-app signal at the 29 ms position, the reported point data falling between 16 ms and 24 ms is extracted for drawing.

[0315] It should be noted that when extracting the reported point data in response to this frame synchronization signal, the electronic device cannot extract the reported point data outside the target sampling period.

[0316] For example Figure 12 in, the triangles represent the reported point data, Figure 12 exemplarily shows 6 reported point data, represented by ABCDEF respectively. Among them, for frame synchronization signal 1, there is 1 reported point data A within its corresponding target sampling period, and the remaining 5 reported point data do not fall within the target sampling period corresponding to frame synchronization signal 1. Therefore, when drawing in response to frame synchronization signal 1, the reported point data other than reported point data A cannot be extracted.

[0317] For frame synchronization signal 3, according toFigure 12 It can be seen that there are fluctuations in the scanning period within the duration of the target sampling period corresponding to the frame synchronization signal 3 (between 16 ms and 24 ms). However, it can be seen that after increasing the scanning frequency based on this solution, even in the case of fluctuations in the scanning period, there will still be at least one reported point data falling within this target sampling period.

[0318] In addition, in the embodiments of the present application, according to Figure 12 It can be seen that for the frame synchronization signal 2, there are 2 reported point data within its corresponding target sampling period, namely B and C. That is to say, when drawing in response to the frame synchronization signal 2, 2 reported point data can be extracted. In this case, it is necessary to resample the 2 reported point data B and C extracted to obtain a reported point data H for drawing. Similarly, there are 2 reported point data within the target sampling period corresponding to the frame synchronization signal 4, namely E and F. When responding to the frame synchronization signal 4, it is necessary to resample the 2 reported point data E and F extracted to obtain a reported point data K for drawing. Among them, the present application does not limit the implementation process of resampling.

[0319] In the embodiments of the present application, by setting the sampling interval T, the reported point data can be filtered to ensure the smoothness when extracting the reported point data. When the scanning frequency of the touch screen is increased from the preset scanning frequency to the target scanning frequency, the reported point data is filtered using the target sampling interval corresponding to the target scanning frequency, so that the number of reported point data extracted each time when drawing in response to the Vsync-app signal is more balanced, improving the stability and continuity of the screen display content.

[0320] As described above in conjunction with Figures 1 to 12 , the method for touch response provided by the embodiments of the present application has been described. Next, the device for executing the above method provided by the embodiments of the present application will be described. It should be understood that the device in the embodiments of the present application can execute various methods of the foregoing embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the foregoing method embodiments.

[0321] As Figure 13 shown, Figure 13 is a schematic structural diagram of a device provided by an embodiment of the present application. The device 1300 is included in an electronic device, and the device 1300 can be a chip or a chip system within the electronic device of the embodiment of the present application. As Figure 13As shown, the device 1300 may include: a detection module 1301, a determination module 1302, and an adjustment module 1303. Among them, the detection module 1301 is used to obtain relevant information of the application corresponding to the target touch event and / or the current screen refresh rate when the target touch event is detected; the determination module 1302 is used to determine whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event and / or the current screen refresh rate; the adjustment module 1303 is used to increase the scanning frequency of the touch screen from the preset scanning frequency to the target scanning frequency if there is a risk of frame loss, and the target scanning frequency is greater than the current screen refresh rate.

[0322] Optionally, in some embodiments, the relevant information includes an application identifier, and the determination module 1302 is specifically configured to determine whether the identifier of the application corresponding to the target touch event is in a pre-stored whitelist, and multiple application identifiers are configured in the whitelist; when the identifier of the application corresponding to the target touch event is in the whitelist, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0323] Optionally, in some embodiments, the determination module 1302 is specifically configured to detect whether the current screen refresh rate is greater than or equal to a refresh rate threshold when the identifier of the application corresponding to the target touch event is in the whitelist; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0324] Optionally, in some embodiments, the relevant information includes an application type, and the determination module 1302 is specifically configured to determine whether the type of the application corresponding to the target touch event is a preset type; if the type of the application corresponding to the target touch event is a preset type, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0325] Optionally, in some embodiments, the determination module 1302 is specifically configured to detect whether the current screen refresh rate is greater than or equal to a refresh rate threshold if the type of the application corresponding to the target touch event is a preset type; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0326] Optionally, in some embodiments, the determination module 1302 is specifically configured to detect whether the current screen refresh rate is greater than or equal to a refresh rate threshold if the type of the application corresponding to the target touch event is not a preset type; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0327] Optionally, in some embodiments, the determining module 1302 is specifically configured to detect whether the current screen refresh rate is greater than or equal to a refresh rate threshold; if the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0328] Optionally, in some embodiments, the relevant information includes an application identifier. The determining module 1302 is specifically configured to, if the current screen refresh rate is greater than or equal to the refresh rate threshold, determine whether the identifier of the application corresponding to the target touch event is in a pre-stored whitelist, and multiple application identifiers are configured in the whitelist; when the identifier of the application corresponding to the target touch event is in the whitelist, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0329] Optionally, in some embodiments, the relevant information includes an application type. The determining module 1302 is specifically configured to, if the current screen refresh rate is greater than or equal to the refresh rate threshold, determine whether the type of the application corresponding to the target touch event is a preset type; if the type of the application corresponding to the target touch event is the preset type, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

[0330] Optionally, in some embodiments, the adjusting module 1303 is further configured to determine a target sampling interval according to the target scanning frequency, where the target sampling interval indicates the interval between the trigger moment of the frame synchronization signal and the end moment of the target sampling period, and the target sampling period is the sampling period of the reporting point data that is located before the trigger moment of the frame synchronization signal and is the closest to it. Different scanning frequencies correspond to different sampling intervals; when the frame synchronization signal is obtained, determine the start and end moments of the target sampling period according to the target sampling interval and the trigger moment of the frame synchronization signal; draw the display content corresponding to the frame synchronization signal according to the reporting point data falling within the target sampling period.

[0331] Optionally, in some embodiments, the adjusting module 1303 is further configured to reduce the scanning frequency of the touch screen to a preset scanning frequency if the target touch event is not detected within a preset duration.

[0332] An embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.

[0333] In the embodiments provided in the present application, it should be understood that the disclosed device / electronic device and method can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms. In addition, in each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0334] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented. The computer-readable storage medium stores a computer program or instruction. When the computer program or instruction is executed by a processor, the above-mentioned method is implemented. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. The computer-readable medium can include a computer storage medium and a communication medium, and can also include any medium that can transmit a computer program from one place to another place. The storage medium can be any target medium accessible by a computer.

[0335] As a possible design, a computer-readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; the computer-readable medium may include magnetic disk storage or other magnetic disk storage devices. Moreover, any connecting wire may also be appropriately referred to as a computer-readable medium. For example, if software is transmitted using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave from a website, server, or other remote source, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. As used herein, magnetic disks and optical discs include optical discs (CDs), laser discs, optical discs, DVDs, floppy disks, and Blu-ray discs, where magnetic disks typically reproduce data magnetically, while optical discs use lasers to optically reproduce data. Combinations of the above should also be included within the scope of computer-readable media.

[0336] Embodiments of the present application also provide a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, fiber optic, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that a computer can store, or a data storage device such as a server, data center, etc. that includes one or more available media integrated. For example, the available medium may include magnetic media (such as floppy disks, hard disks, or magnetic tapes), optical media (such as digital versatile discs (DVDs)), or semiconductor media (such as solid state disks (SSDs)), etc.

[0337] Embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processing unit of the computer or other programmable data processing devices generate a means for implementing the functions specified in one flow Figure One one flow or multiple flows and / or blocks Figure One a means for implementing the functions specified in one block or multiple blocks.

[0338] In the above description, for the purpose of illustration rather than limitation, specific details such as specific system architectures and technologies are presented to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0339] It should be understood that when used in the specification of the present application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0340] It should also be understood that the "plurality" mentioned in the specification of the present application and the appended claims refers to two or more. In the description of the present application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B; herein, "and / or" is merely a description of the association relationship of associated objects, which means any combination and all possible combinations of one or more of the associated listed items, and includes these combinations. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone, these three situations.

[0341] As used in the specification of the present application and the appended claims, the term "if" can be interpreted as "when...", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" according to the context.

[0342] In addition, for the convenience of clearly describing the technical solutions of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, cannot be construed as indicating or implying relative importance, and terms such as "first" and "second" do not necessarily limit to being different.

[0343] The reference to "one embodiment" or "some embodiments" etc. described in the specification of the present application means that specific features, structures or characteristics described in connection with that embodiment are included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprise", "include", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0344] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.

Claims

1. A method for touch response, characterized in that, Applied to an electronic device, the electronic device includes a touch screen for detecting touch events, and the method includes: When a target touch event is detected, obtaining relevant information of the application corresponding to the target touch event and / or the current screen refresh rate; Determining whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event and / or the current screen refresh rate; If there is a risk of frame loss, increasing the scanning frequency of the touch screen from the preset scanning frequency to a target scanning frequency, where the target scanning frequency is greater than the current screen refresh rate.

2. The method according to claim 1, wherein The relevant information includes an application identifier. Determining whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event includes: Determining whether the identifier of the application corresponding to the target touch event is in a pre-stored white list, and multiple application identifiers are configured in the white list; When the identifier of the application corresponding to the target touch event is in the white list, determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

3. The method according to claim 2, wherein The determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency when the identifier of the application corresponding to the target touch event is in the white list includes: When the identifier of the application corresponding to the target touch event is in the white list, detecting whether the current screen refresh rate is greater than or equal to a refresh rate threshold; If the current screen refresh rate is greater than or equal to the refresh rate threshold, determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

4. The method according to any one of claims 1 to 3, characterized in that The relevant information includes an application type. Determining whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the relevant information of the application corresponding to the target touch event includes: Determining whether the type of the application corresponding to the target touch event is a preset type; If the type of the application corresponding to the target touch event is a preset type, determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

5. The method according to claim 4, wherein The determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency if the type of the application corresponding to the target touch event is a preset type includes: If the type of the application corresponding to the target touch event is a preset type, detecting whether the current screen refresh rate is greater than or equal to a refresh rate threshold; If the current screen refresh rate is greater than or equal to the refresh rate threshold, determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

6. The method according to claim 4, wherein The method further includes: If the type of the application corresponding to the target touch event is not a preset type, detecting whether the current screen refresh rate is greater than or equal to a refresh rate threshold; If the current screen refresh rate is greater than or equal to the refresh rate threshold, determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

7. The method according to claim 1, characterized in that Determining whether there is a risk of frame loss when scanning the touch screen at a preset scanning frequency according to the current screen refresh rate includes: Detect whether the current screen refresh rate is greater than or equal to the refresh rate threshold; If the current screen refresh rate is greater than or equal to the refresh rate threshold, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

8. The method according to claim 7, wherein The relevant information includes an application identifier. The step of, if the current screen refresh rate is greater than or equal to the refresh rate threshold, determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency includes: If the current screen refresh rate is greater than or equal to the refresh rate threshold, determine whether the identifier of the application corresponding to the target touch event is in a pre-stored white list, and multiple application identifiers are configured in the white list; When the identifier of the application corresponding to the target touch event is in the white list, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

9. The method according to claim 7 or 8, characterized in that, The relevant information includes an application type. The step of, if the current screen refresh rate is greater than or equal to the refresh rate threshold, determining that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency includes: If the current screen refresh rate is greater than or equal to the refresh rate threshold, determine whether the type of the application corresponding to the target touch event is a preset type; If the type of the application corresponding to the target touch event is a preset type, it is determined that there is a risk of frame loss when scanning the touch screen at a preset scanning frequency.

10. The method according to any one of claims 1 to 9, characterized in that After raising the scanning frequency of the touch screen from the preset scanning frequency to a target scanning frequency, the method further includes: Determine a target sampling interval according to the target scanning frequency. The target sampling interval indicates the interval between the trigger moment of the frame synchronization signal and the end moment of the target sampling period. The target sampling period is the sampling period of the reported point data that is before the trigger moment of the frame synchronization signal and closest to it. Among them, different scanning frequencies correspond to different sampling intervals; When a frame synchronization signal is obtained, determine the start and end moments of the target sampling period according to the target sampling interval and the trigger moment of the frame synchronization signal; Draw the display content corresponding to the frame synchronization signal according to the reported point data falling within the target sampling period.

11. The method according to any one of claims 1 to 10, characterized in that, After raising the scanning frequency of the touch screen from the preset scanning frequency to a target scanning frequency, the method further includes: If the target touch event is not detected within a preset duration, lower the scanning frequency of the touch screen to the preset scanning frequency.

12. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory is used to store instructions. When the instructions are executed by the processor, the electronic device executes the touch response method according to any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program. The computer program includes program instructions. When the program instructions are executed, the touch response method according to any one of claims 1 to 11 is implemented.

14. A computer program product, characterized in that, The computer program product includes: computer program code. When the computer program code runs on a computer, the computer executes the touch response method according to any one of claims 1 to 11.