Touch screen control method, touch chip and electronic equipment
By generating virtual interactive events in noisy environments to keep the touchscreen on, the problem of touch chips turning off the screen in noisy environments is solved, thus improving touch performance and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FOCALTECH ELECTRONICS (SHENZHEN) CO LTD
- Filing Date
- 2026-01-19
- Publication Date
- 2026-04-28
AI Technical Summary
In noisy environments, the touch screen's touch chip will activate a noise suppression mechanism, causing the screen to turn off, resulting in decreased touch performance and affecting user operation.
When there is touch noise in the electronic device and no touch operation is detected, virtual interactive events are generated to keep the touch screen on, avoiding the decision to turn off the screen and keeping the touch firmware stable.
It effectively improves touch performance, enhances the user experience, and avoids the problem of the touch chip firmware being cleared.
Smart Images

Figure CN121934732A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of touch technology, and in particular to a touch screen control method, a touch chip, and an electronic device. Background Technology
[0002] Touchscreens are widely used in smart electronic devices such as smartphones, tablets, and wearable devices. To save power, these devices typically have an automatic screen-off mechanism. This mechanism means that if no interactive event is detected for a certain period while the screen is on, the touchscreen automatically turns off. However, in noisy environments such as those with water droplets, power supply crosstalk, or electromagnetic interference, the touchscreen's chip activates a noise suppression mechanism, treating noise as invalid input and entering screen-off mode. Screen-off in noisy environments causes critical data such as the touch firmware baseline, noise flags, and filtering status to be cleared. As a result, the electronic device needs to rebuild the baseline after the screen is on again, leading to a significant decrease in touchscreen performance. Summary of the Invention
[0003] This application provides a touch screen control method, a touch chip, and an electronic device, which solves the problem that in noisy environments, the touch chip of the touch screen will activate a noise suppression mechanism, and the touch performance of the touch screen will decrease when the screen is turned off in noisy environments.
[0004] In a first aspect, embodiments of this application provide a touchscreen control method applied to an electronic device, the method comprising: In the event of touch noise in the electronic device, detect whether the touch screen of the electronic device receives a touch operation; If no touch operation is detected on the touch screen, the timeout period of the screen-off timer of the electronic device is obtained; If the timeout period is less than or equal to a preset time, a virtual interaction event is generated, and the touch screen is kept on based on the virtual interaction event.
[0005] In one possible implementation, the method further includes: Obtain the touch noise flag of the electronic device. If the touch noise flag is a first preset value, determine that the electronic device has the touch noise.
[0006] In one possible implementation, the method further includes: The touch capacitance value of the touch screen is collected at preset intervals; Based on the collected multiple touch capacitance values, the change in touch capacitance is calculated; If the change in touch capacitance is greater than or equal to a preset threshold, the touch noise flag is set to the first preset value. If the change in touch capacitance is less than the preset threshold, the touch noise flag is set to a second preset value.
[0007] In one possible implementation, detecting whether the touchscreen of the electronic device receives a touch operation includes: If the touch screen does not generate a touch signal, it is determined that the touch screen has not received the touch operation; When the touch screen generates a touch signal, the features of the touch signal are extracted; If the characteristics of the touch signal do not match the preset characteristics, it is determined that the touch screen has not received the touch operation.
[0008] In one possible implementation, the features of the touch signal include at least one of touch capacitance value, touch shape, and touch duration, and the extraction of the features of the touch signal includes: When the touch screen generates a touch signal, the touch capacitance value of the touch screen is collected; Based on the touch signal, a touch signal area is determined, and the touch signal area is fitted to obtain the touch shape; The duration of the touch signal is timed to obtain the touch duration.
[0009] In one possible implementation, the method further includes: If at least one of the following conditions is not met: the touch capacitance value is greater than or equal to a dynamic threshold, the touch shape matches a preset model, and the touch duration is greater than or equal to a preset duration threshold, it is determined that the features of the touch signal do not match the preset features.
[0010] In one possible implementation, generating virtual interactive events includes: A virtual input device is enabled at the system service layer of the electronic device, and virtual input events are injected through the virtual input device.
[0011] In one possible implementation, controlling the touchscreen to remain on based on the virtual interaction event includes: A reset command is generated, and in response to the reset command, the timer duration of the always-on display timer is reset.
[0012] Secondly, embodiments of this application provide a touch chip for executing the above-described touch screen control method.
[0013] Thirdly, embodiments of this application provide an electronic device, including a touch chip, for executing the above-described touch screen control method.
[0014] Fourthly, embodiments of this application provide a computer storage medium storing program instructions that, when executed on an electronic device, cause the touch chip of the electronic device to perform the aforementioned touch screen control method.
[0015] The touch screen control method, touch chip, and electronic device provided in this application can control the touch screen to remain lit by generating virtual interactive events when there is touch noise in the electronic device and no touch operation is detected, thereby preventing the firmware state of the touch chip from being cleared and effectively improving the touch performance of the touch screen. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 This is a flowchart of a touch screen control method provided in an embodiment of this application.
[0018] Figure 2 This is a schematic diagram of the structure of a touch screen provided in one embodiment of this application.
[0019] Figure 3 This is a flowchart of a touch screen control method provided in another embodiment of this application.
[0020] Figure 4 This is a schematic diagram of the structure of a touch screen control device provided in an embodiment of this application.
[0021] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0022] The terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to limit the application. It should be understood that, unless otherwise stated, " / " in this application means "or". For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. "At least one" refers to one or more. "More than one" refers to two or more. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, and a, b, and c. Where there is no conflict, the following embodiments and features described herein can be combined with each other.
[0024] For ease of understanding, the following examples provide explanations of some concepts related to the embodiments of this application for reference: Touch firmware: Low-level system software that cannot be lost and is stored in the microcontroller (MCU) or application-specific integrated circuit (ASIC) inside the touch screen.
[0025] Touch noise refers to noise present in electronic devices that may affect touch detection on the touchscreen. Examples of touch noise include screen noise (periodic noise generated during screen refresh and PWM dimming), charger noise, radio frequency interference, power supply noise, and external physical noise (water droplets or mist on the screen). Touch noise can be represented by noise status, which can include a noise indicator and a noise level. The noise indicator indicates the presence of touch noise, while the noise level indicates the intensity of the noise when it is present.
[0026] Baseline: A dynamic reference value for the raw capacitance reading of a touch sensor when there is no finger or conductor touching it. The baseline is a tracked value that changes slowly with factors such as ambient temperature, humidity, power supply voltage, and display noise.
[0027] Filtering status: The touch firmware dynamically selects a combination of signal processing parameters and algorithms based on the current noise flag and other system states.
[0028] Historical noise model: A set of methods for touch firmware to characterize, predict and respond to current and future noise conditions using noise data from a past period.
[0029] Touchscreens are widely used in smart electronic devices such as smartphones, tablets, and wearable devices. To save power, these devices typically have an automatic screen-off mechanism. This mechanism means that if no interactive event is detected for a certain period while the screen is on, the touchscreen automatically turns off. However, in noisy environments such as those with water droplets, power supply crosstalk, or electromagnetic interference, the touchscreen's chip activates a noise suppression mechanism, treating noise as invalid input and turning off the screen to prevent accidental touches. In this scenario, although the system "has no reported points," there are still some differences compared to a truly inactive user. The main difference is that the touch system is in a "noise recognition and suppression state." When entering a screen-off state in a noisy environment, the touch firmware's baseline, noise flags, and filtering status are cleared. After the screen is turned back on, these firmware states need to be rebuilt. During this rebuilding phase, touch performance is very poor, easily causing touch anomalies and preventing the user from operating the electronic device normally, thus affecting the user experience.
[0030] To address the issue that in noisy environments, the touch chip of a touchscreen will activate a noise suppression mechanism, leading to screen shutdown and consequently a decrease in touch performance, this application provides a touchscreen control method. This method can control the touchscreen to remain on when touch noise is present and no touch operation is detected, by generating virtual interactive events. This prevents the electronic device from making a screen-off decision in noisy environments, thus avoiding the firmware state of the touch chip being cleared. Maintaining the stability of the touch firmware in noisy environments effectively improves touch performance and enhances the user experience.
[0031] See Figure 1 The diagram shown is a flowchart of a touchscreen control method provided in an embodiment of this application. The method is applied in an electronic device, and the touchscreen control method includes: S101, In the presence of touch noise in the electronic device, detect whether the touch screen of the electronic device receives a touch operation. If no touch operation is detected, proceed to S102; if a touch operation is detected, proceed to S105.
[0032] In one embodiment of this application, the touch noise flag of the electronic device can be a first preset value or a second preset value. The first preset value indicates that touch noise exists in the electronic device, and the second preset value indicates that touch noise does not exist in the electronic device. For example, the first preset value is true or 1, and the second preset value is false or 0. The touch noise flag of the electronic device is obtained. If the touch noise flag is the first preset value, it is determined that the electronic device has touch noise. The touch noise can be detected by firmware.
[0033] In one embodiment of this application, the touch operation is a genuine user touch operation. A genuine user touch operation refers to a contact event applied to the touchscreen by a user's finger or a conductive object (such as a stylus) that conforms to expected physical and physiological characteristics and can be reliably distinguished from environmental noise by the system through multiple feature verifications. The system detects whether the touchscreen generates a touch signal. If the touchscreen does not generate a touch signal, it determines that the touchscreen has not received the touch operation. If the touchscreen generates a touch signal, the features of the touch signal are extracted. If the features of the touch signal do not match preset features, it determines that the touchscreen has not received the touch operation. If the features of the touch signal match preset features, it determines that the touchscreen has received the touch operation.
[0034] In one embodiment of this application, if the capacitance value of the touch screen does not change, it is determined that no touch signal has been generated; if the capacitance value of the touch screen changes, it is determined that the screen has generated a touch signal. If the touch screen does not generate a touch signal, it is determined that the touch screen has neither generated a real user touch operation nor a touch operation caused by environmental noise.
[0035] In one embodiment of this application, the touch signal is characterized by at least one of touch capacitance value, touch shape, and touch duration. When the touch screen generates a touch signal, the touch capacitance value of the touch screen is acquired.
[0036] See Figure 2 The diagram shown is a schematic representation of a touchscreen according to an embodiment of this application. The touchscreen 140 of the electronic device includes a touch layer 141, which forms multiple sensing points through touch electrodes. When the electronic device is powered on, it collects sensing data based on a preset sampling rate, which is the number of times sensing data is collected per second. For example, the preset sampling rate may be 60Hz, 120Hz, 240Hz, or other frequency values. When a user touches the touchscreen with a finger or conductive object, the finger or conductive object generates a sensing capacitance with the touch electrodes. The touchscreen determines sensing data based on the location of the generated sensing capacitance and the changes in the sensing capacitance. The sensing data includes the location of the sensing point and the sensing value. For example, the location of the generated sensing capacitance is determined as the location of the sensing point, and the change in the sensing capacitance or the sensing capacitance itself is converted into a digital signal via analog-to-digital conversion to obtain the touch capacitance value of the sensing point. The sensing points are distributed in an array; therefore, the collected sensing data is also distributed in an array.
[0037] In one embodiment of this application, a touch signal region is determined based on the touch signal, and the touch signal region is fitted to obtain the touch shape. Specifically, a finger, stylus, or other touch object is a hemispherical conductor, and the signal it generates exhibits a two-dimensional Gaussian distribution (i.e., a bell-shaped surface) on the sensor grid, with the strongest signal at the center and smoothly attenuating towards the edges. The detected signal region is fitted with a two-dimensional surface to obtain the touch shape.
[0038] In one embodiment of this application, the duration of the touch signal is timed to obtain the touch duration. The duration of the touch signal can be the duration during which the value of the sensing capacitance changes.
[0039] In one embodiment of this application, the preset features include a dynamic threshold, a preset model, and a preset duration threshold. The dynamic threshold corresponds to the sensing capacitance value. The preset model may include at least one of a preset finger model, a preset stylus model, or other touch object models, corresponding to the touch shape. The preset duration threshold corresponds to the duration of the touch signal. If at least one of the following conditions is not met: the touch capacitance value is greater than or equal to the dynamic threshold, the touch shape matches the preset model, and the touch duration is greater than or equal to the preset duration threshold, it is determined that the features of the touch signal do not match the preset features. In this case, it is determined that the touchscreen has not received the touch operation, that is, no real user touch operation has been received. If all conditions are met: the touch capacitance value is greater than or equal to the dynamic threshold, the touch shape matches the preset model, and the touch duration is greater than or equal to the preset duration threshold, it is determined that the features of the touch signal match the preset features. In this case, it is determined that the touchscreen has received the touch operation, that is, a real user touch operation has been received.
[0040] S102: Obtain the countdown timer of the electronic device's screen-off timer and determine whether the countdown time is less than or equal to a preset time. If the countdown time is less than or equal to the preset time, proceed to S103; if the countdown time is greater than the preset time, return to S101. The countdown time is a countdown, for example, the preset time is 2 seconds, 1 second, or another time.
[0041] In one embodiment of this application, if no touch operation is detected on the touchscreen, the system creates a screen-off timer to count down the screen-off time. For example, the countdown time is 5 seconds. During the countdown, if the electronic device does not generate an input event, a screen-off command is generated after the countdown ends to control the touchscreen to turn off. If the electronic device generates an input event during the countdown, the screen-off timer is reset, and the touchscreen remains on.
[0042] S103, generate virtual interactive events.
[0043] In one embodiment of this application, if the timing period is less than or equal to a preset time, it is determined that the screen-off countdown is about to be triggered, and the touchscreen is close to turning off. To prevent the touchscreen from turning off, the virtual interaction event is generated.
[0044] In one embodiment of this application, a virtual input device is enabled at the system service layer of the electronic device, and a virtual input event is injected through the virtual input device. For example, the code for injecting a virtual input event is: PowerManager powerManager=(PowerManager) getSystemService(Context.POWER_SERVICE); powerManager.userActivity(SystemClock.uptimeMillis(), false); PowerManager.WakeLock wakeLock = powerManager.newWakeLock( PowerManager.SCREEN_DIM_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, "MyApp:KeepScreenAlive" ); wakeLock.acquire(30 * 1000); wakeLock.release().
[0045] S104, based on virtual interactive events, controls the touchscreen to remain on.
[0046] In one embodiment of this application, a reset command is generated based on the virtual input event, and in response to the reset command, the screen-off timer's timing is reset. Thus, the screen-off timer's timing will not expire, the system will not generate a screen-off command, and therefore will not control the touchscreen to turn off.
[0047] S105 executes the normal screen-off logic.
[0048] In one embodiment of this application, if a touch operation is detected on the touchscreen, the system executes normal screen-off logic. If no interaction event is detected within a specific time, the system will trigger a screen-off action.
[0049] The above embodiments of this application, when there is touch noise in the electronic device and no touch operation is detected, control the touch screen to remain on by generating virtual interactive events, avoid the electronic device to make a screen-off decision in a noisy environment, avoid the firmware state of the touch chip being cleared, effectively improve touch performance, and thus improve the user experience.
[0050] See Figure 3 The diagram shown is a flowchart of a touchscreen control method provided in another embodiment of this application. The method is applied in an electronic device, and the touchscreen control method includes: S201, determine whether the electronic device has touch noise. If the electronic device has touch noise, proceed to S202; if the electronic device does not have touch noise, proceed to S206.
[0051] In one embodiment of this application, the touch capacitance value of the touch screen is collected at preset intervals. Based on the collected multiple touch capacitance values, the touch capacitance change value is calculated. If the touch capacitance change value is greater than or equal to a preset threshold, the touch noise flag is set to the first preset value. If the touch capacitance change value is less than the preset threshold, the touch noise flag is set to the second preset value.
[0052] The first preset value indicates the presence of touch noise in the electronic device, and the second preset value indicates the absence of touch noise. For example, the first preset value is true or 1, and the second preset value is false or 0. The touch noise flag of the electronic device is obtained; if the touch noise flag is the first preset value, it is determined that the electronic device exhibits touch noise.
[0053] S202, In the presence of touch noise in the electronic device, detect whether the touch screen of the electronic device receives a touch operation. If no touch operation is detected, proceed to S203; if a touch operation is detected, proceed to S206.
[0054] S203: Obtain the timeout duration of the screen-off timer on the electronic device and determine whether the timeout duration is less than or equal to a preset time. If the timeout duration is less than or equal to the preset time, proceed to S204; if the timeout duration is greater than the preset time, return to S201.
[0055] S204, Generate virtual interactive events.
[0056] S205, based on virtual interactive events, controls the touchscreen to keep it on.
[0057] S206 executes the normal screen-off logic.
[0058] The specific implementation methods of S202-S206 are the same as those of S101-S105, and will not be described in detail here.
[0059] See Figure 4 The diagram shown is a structural schematic of a touchscreen control device according to an embodiment of this application. In one embodiment of this application, the touchscreen control device 200 may include multiple functional modules composed of computer program segments. The computer program segments in the touchscreen control device 200 may be stored in the memory of the electronic device and executed by at least one processor to perform touchscreen control functions.
[0060] In one embodiment of this application, the touchscreen control device 200 can be divided into multiple functional modules according to the functions it performs. The functional modules of the touchscreen control device 200 may include: a detection module 201, an acquisition module 202, a generation module 203, and a control module 204. In this embodiment, a module refers to a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory.
[0061] The detection module 201 is used to detect whether the touch screen of the electronic device receives a touch operation when touch noise is present. Simultaneously, the detection module 201 can also be used to perform touch noise detection.
[0062] The acquisition module 202 is used to acquire the timing time of the screen-off timer of the electronic device when no touch operation is detected on the touch screen.
[0063] The generation module 203 is used to generate virtual interactive events when the timing time is less than or equal to a preset time.
[0064] The control module 204 is used to control the touch screen to remain on based on the virtual interactive event.
[0065] This application also provides an electronic device 1. (See attached document.) Figure 5As shown, the electronic device 1 can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. The specific type of electronic device 1 is not specifically limited in the embodiments of this application.
[0066] In one embodiment of this application, the electronic device 1 includes, but is not limited to, a touch chip 110, a memory 120, and a touch screen 140 connected via a communication bus 130. The touch chip 110 may be a processor or a chip for processing touch data. Figure 5 This is merely an example of an electronic device and does not constitute a limitation thereof. In other embodiments, the electronic device may include more components than those shown in the figure.
[0067] The memory 120 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 110 and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0068] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct read and write operations by the processor. Non-volatile memory can include disk storage devices and flash memory.
[0069] The memory 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the touch chip 110. The one or more computer programs include multiple instructions, which, when executed by the touch chip 110, enable a touch screen control method to be executed on the electronic device 1.
[0070] In other embodiments, the electronic device 1 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 1.
[0071] A processor may include one or more processing units, such as 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). Different processing units may be independent devices or integrated into one or more processors.
[0072] The touch chip 110 provides computing and control capabilities. For example, the touch chip 110 is used to execute computer programs stored in the memory 120 to implement the touch screen control method described above.
[0073] The communication bus 130 is used to provide a channel for communication between the memory 120 and the touch chip 110 in the electronic device 1.
[0074] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 1. In other embodiments of this application, the electronic device 1 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0075] This application also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned related method steps to realize the touch screen control method in the above embodiments.
[0076] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the touch screen control method described in the above embodiments.
[0077] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein, the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the touch screen control method in the above method embodiments.
[0078] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.
[0079] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0080] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0081] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0082] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0083] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts or all or part of the technical solutions that contribute to the prior art, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A touchscreen control method, applied to electronic devices, characterized in that, The method includes: In the event of touch noise in the electronic device, detect whether the touch screen of the electronic device receives a touch operation; If no touch operation is detected on the touch screen, the timeout period of the screen-off timer of the electronic device is obtained; If the timeout period is less than or equal to a preset time, a virtual interaction event is generated, and the touch screen is kept on based on the virtual interaction event.
2. The touchscreen control method as described in claim 1, characterized in that, The method further includes: Obtain the touch noise flag of the electronic device. If the touch noise flag is a first preset value, determine that the electronic device has the touch noise.
3. The touchscreen control method as described in claim 2, characterized in that, The method further includes: The touch capacitance value of the touch screen is collected at preset intervals; Based on the collected multiple touch capacitance values, the change in touch capacitance is calculated; If the change in touch capacitance is greater than or equal to a preset threshold, the touch noise flag is set to the first preset value. If the change in touch capacitance is less than the preset threshold, the touch noise flag is set to a second preset value.
4. The touchscreen control method as described in claim 1, characterized in that, The detection of whether the touch screen of the electronic device receives a touch operation includes: If the touch screen does not generate a touch signal, it is determined that the touch screen has not received the touch operation; When the touch screen generates a touch signal, the features of the touch signal are extracted; If the characteristics of the touch signal do not match the preset characteristics, it is determined that the touch screen has not received the touch operation.
5. The touchscreen control method as described in claim 4, characterized in that, The features of the touch signal include at least one of touch capacitance value, touch shape, and touch duration, and the extraction of the features of the touch signal includes: When the touch screen generates a touch signal, the touch capacitance value of the touch screen is collected; Based on the touch signal, a touch signal area is determined, and the touch signal area is fitted to obtain the touch shape; The duration of the touch signal is timed to obtain the touch duration.
6. The touchscreen control method as described in claim 5, characterized in that, The method further includes: If at least one of the following conditions is not met: the touch capacitance value is greater than or equal to a dynamic threshold, the touch shape matches a preset model, and the touch duration is greater than or equal to a preset duration threshold, it is determined that the features of the touch signal do not match the preset features.
7. The touchscreen control method as described in claim 1, characterized in that, The generation of virtual interactive events includes: A virtual input device is enabled at the system service layer of the electronic device, and virtual input events are injected through the virtual input device.
8. The touchscreen control method as described in claim 1, characterized in that, The step of controlling the touchscreen to remain on based on the virtual interaction event includes: A reset command is generated, and in response to the reset command, the timer duration of the always-on display timer is reset.
9. A touch chip, characterized in that, The touch chip is used to execute the touch screen control method as described in any one of claims 1 to 8.
10. An electronic device, characterized in that, Includes a touch chip for performing the touch screen control method as described in any one of claims 1 to 8.