Touch screen control method and apparatus, electronic device, and computer readable medium

By acquiring the device parameters of the electronic device to determine the interference conditions, activating the filtering mode, and identifying the valid touch points, the problem of touch screens being falsely triggered under noise interference is solved, and more accurate touch screen input is achieved.

CN119620910BActive Publication Date: 2026-07-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2023-09-13
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Touchscreen systems are susceptible to interference from display noise or radio frequency interference, leading to false triggering and inaccurate input, and lack effective filtering functions.

Method used

By acquiring device parameters of the electronic device, such as noise signal and charging status, it is determined whether the preset interference conditions are met, the filtering mode is activated, and in the filtering mode, the target touch points that meet the specified conditions are identified as valid touch points, while touch points that do not meet the conditions are filtered out.

Benefits of technology

It effectively reduces the possibility of accidental touchscreen triggering, improves the accuracy and stability of input, and reduces the impact of noise interference on touchscreen operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119620910B_ABST
    Figure CN119620910B_ABST
Patent Text Reader

Abstract

The application discloses a touch screen control method and device, electronic equipment and a computer readable medium, and relates to the technical field of touch screens. The method comprises the following steps: acquiring a device parameter of the electronic equipment, wherein the device parameter comprises at least one of a noise signal detected by a touch screen and a charging state of the electronic equipment; if the device parameter meets a preset interference condition, starting a filtering mode; and in the filtering mode, determining a target touch point sampled by the touch screen and meeting a specified condition as a valid touch point. Therefore, the filtering mode is started by using the device parameter of the electronic equipment, so that the target touch point meeting the specified condition can be determined as the valid touch point, thereby realizing filtering of the touch points that do not meet the specified condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of touch screen technology, and more specifically, to a touch screen control method, apparatus, electronic device, and computer-readable medium. Background Technology

[0002] Currently, touchscreens serve as a crucial channel for human-computer interaction. They are essential components in mobile phones and handheld devices. The basic principle of a touchscreen is capacitive sensing. When a human finger or object touches the sensing material on the touchscreen surface, it causes a change in capacitance. The touchscreen then uses algorithms to calculate the number of fingers or objects pressing on the surface. However, touchscreen systems are susceptible to interference with their self-capacitance / mutual capacitance data and lack necessary filtering functions. Summary of the Invention

[0003] This application proposes a touchscreen control method, apparatus, electronic device, and computer-readable medium to improve the above-mentioned deficiencies.

[0004] In a first aspect, this application provides a touchscreen control method applied to an electronic device, the electronic device including a touchscreen, the method comprising: acquiring device parameters of the electronic device, the device parameters including at least one of a noise signal detected by the touchscreen and a charging state of the electronic device; if the device parameters meet preset interference conditions, then activating a filtering mode; in the filtering mode, determining target touch points sampled by the touchscreen that meet specified conditions as valid touch points.

[0005] Secondly, this application also provides a touchscreen control device applied to an electronic device, the electronic device including a touchscreen, and the device including: an acquisition unit, an activation unit, and a determination unit. The acquisition unit is used to acquire device parameters of the electronic device, the device parameters including at least one of a noise signal detected by the touchscreen and the charging state of the electronic device; the activation unit is used to activate a filtering mode if the device parameters meet preset interference conditions; the determination unit is used to determine target touch points sampled by the touchscreen that meet specified conditions as valid touch points in the filtering mode.

[0006] Thirdly, this application also provides an electronic device, comprising: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to perform the methods described above.

[0007] Fourthly, this application also provides a computer-readable medium storing processor-executable program code that, when executed by the processor, causes the processor to perform the above-described method.

[0008] The touchscreen control method, apparatus, electronic device, and computer-readable medium provided in this application can use at least one of the noise signal detected by the touchscreen of the electronic device and the charging state of the electronic device as device parameters of the electronic device. If the device parameters meet preset interference conditions, a filtering mode is activated. In the filtering mode, target touch points sampled by the touchscreen that meet specified conditions are determined as valid touch points. Therefore, by activating the filtering mode through the device parameters of the electronic device, target touch points that meet specified conditions can be determined as valid touch points, thereby achieving the filtering of touch points that do not meet the specified conditions.

[0009] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart of a touchscreen control method according to an embodiment of this application is shown;

[0012] Figure 2 A flowchart of a touchscreen control method according to another embodiment of this application is shown;

[0013] Figure 3 A flowchart of a touchscreen control method according to another embodiment of this application is shown;

[0014] Figure 4 A block diagram of a touchscreen control device according to an embodiment of this application is shown;

[0015] Figure 5 A structural block diagram of the electronic device provided in an embodiment of this application is shown;

[0016] Figure 6 A storage unit for storing or carrying program code implementing the touch screen control method according to an embodiment of the present application is shown. Detailed Implementation

[0017] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. The components of the embodiments of the present application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without inventive effort are within the scope of protection of the present application.

[0018] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0019] Currently, touchscreens serve as a crucial channel for human-computer interaction. They are essential components in mobile phones and handheld devices. The basic principle of a touchscreen is capacitive sensing. When a human finger or object touches the sensing material on the touchscreen surface, it causes a change in capacitance. The touchscreen then uses algorithms to calculate the number of fingers or objects pressing on the touchscreen surface. The working principle of a touchscreen involves periodically triggering scanning signals of a certain frequency to detect whether objects, including fingers, are pressing on the touchscreen surface, and calculating and reporting the coordinates based on the capacitance signals.

[0020] Touchscreens can be classified according to different technical principles and operating methods. Here are some common touchscreen classifications: Resistive Touchscreen, Capacitive Touchscreen, Surface Acoustic Wave Touchscreen, Surface Capacitive Touchscreen, and SAW Touchscreen. Capacitive touchscreens utilize the capacitive sensing principle to determine whether an object is in contact with the touchscreen and report the object's state, primarily referring to a finger touching an object like a stylus. The state is mainly divided into pressing, releasing, and movement after pressing. Using the capacitive sensing principle, the touchscreen identifies the object's coordinates by calculating the capacitance difference between when the object is in contact with the touchscreen and when it is not. By calculating the area of ​​capacitance difference, finding the peak difference value in that area, and determining whether it falls within a certain preset reporting threshold, the system sends the reported coordinates. Capacitive touchscreens mainly consist of a transmitting channel and a receiving channel. The capacitance data collected by the transmitting and receiving channels relative to ground is self-capacitive data, while the data collected by the transmitting and receiving channels is mutual capacitive data. Currently, mutual capacitive data is used to determine whether a finger is pressed, moving, or released. Capacitive touchscreens utilize self-capacitance data to determine other auxiliary functions, such as proximity sensing and waterproofing. Specifically, capacitive touchscreens are further divided into mutual-capacitance touchscreens and self-capacitance touchscreens.

[0021] However, the inventors discovered during their research that in the presence of display noise or radio frequency interference, or white noise interference, the self-capacitance / mutual capacity data of the touch screen system is easily interfered with, resulting in abnormal data for some frames and the formation of ghost points (referring to automatically triggered touch points or finger trajectories on the screen when there is no user touch or operation), thus causing screen jump points.

[0022] Therefore, in order to overcome the above-mentioned defects, this application provides a touch screen control method that can filter the touch points of the touch screen of an electronic device to reduce the possibility of false triggering.

[0023] Please see Figure 1 , Figure 1 This application illustrates a touchscreen control method provided by an embodiment of the present application, applied to an electronic device, the electronic device including a touchscreen, the method comprising: S101 to S103.

[0024] S101: Obtain device parameters of the electronic device, the device parameters including at least one of the noise signal detected by the touch screen and the charging status of the electronic device.

[0025] It's important to note that touchscreen noise typically refers to unintended or accidental touch signals generated during touchscreen operation. These noise signals can lead to misinterpretations and inaccurate input. Common causes of touchscreen noise include: electromagnetic interference (electromagnetic interference from nearby electronic devices, power lines, and wireless equipment, transmitted to the touchscreen and causing noise); physical vibration (mechanical vibration and looseness of the touchscreen itself can cause false touches or noise); temperature and humidity changes (touchscreens are sensitive to temperature and humidity variations, which can lead to noise); and touchscreen driver or firmware issues (problems with the touchscreen driver or firmware can also cause noise).

[0026] In other words, the factors mentioned above that may trigger noise signals could cause the touchscreen to sense changes in capacitance, thus generating noise signals. Typically, touchscreens have a dedicated module for detecting noise signals. This module uses an independent channel for scanning; that is, this channel is not connected to the ITO sensing material, and finger pressure does not affect its capacitance data. When external noise interferes, this channel can independently detect the capacitance changes caused by the noise.

[0027] Additionally, it is understandable that touchscreens rely on capacitive sensing to detect touch, making them susceptible to electromagnetic interference. Therefore, when an electronic device is charging, the electromagnetic waves emitted by the charger may be transmitted to the touchscreen, causing accidental touches or malfunctions.

[0028] Therefore, at least one of the noise signal detected by the touchscreen and the charging status of the electronic device is used as a device parameter of the electronic device and used as a reference for whether to enable the filtering mode in the future.

[0029] It should be noted that the charging state of the electronic device can include both a charging state and a non-charging state. Although the electronic device may generate noise signals while charging, using the charging state as a device parameter allows the electronic device to determine whether to enable the filtering mode without collecting noise signals. Therefore, compared with the noise signals detected by the touchscreen, the charging state serves as another reference for enabling the filtering mode. The charging state of the electronic device can be determined by the insertion status of the charging port or the charging current, etc., as detailed in subsequent embodiments.

[0030] S102: If the device parameters meet the preset interference conditions, then the filtering mode is activated.

[0031] In one implementation, the device parameters include at least one of the noise signal detected by the touch screen and the charging state of the electronic device. That is, the device parameters can be the noise signal detected by the touch screen, the charging state of the electronic device, or both the noise signal and the charging state.

[0032] It should be noted that this preset interference condition serves as a reference standard for enabling the filtering mode. In other words, if the device parameters of an electronic device meet the preset interference condition, the touchscreen of the electronic device may be at risk of interference. Therefore, the filtering mode can be enabled to reduce the possibility of interference with the touchscreen signal. For example, noise signals and charging status each correspond to their own conditions; that is, the preset interference condition includes a first condition and a second condition. The conditions for enabling the filtering mode will be explained separately for different device parameters later.

[0033] S103: In the filtering mode, the target touch points sampled by the touch screen that meet the specified conditions are determined as valid touch points.

[0034] Understandably, when the device parameters of an electronic device meet preset conditions, the filtering mode is activated. In this mode, the touchscreen system filters the detected touch points to determine valid touch points, which are then reported, while invalid touch points are filtered out and not reported. Conversely, if the device parameters of an electronic device do not meet the preset conditions, the filtering mode is not activated, meaning the electronic device does not filter the touch points detected by the touchscreen. When a touch point is detected, it is reported.

[0035] It should be noted that this filtering method can be to determine the target touch points sampled by the touchscreen that meet specified conditions as valid touch points. The specified conditions can be touch points matching a specified identifier or preset frame number filtering, i.e., setting a specific frame number threshold within which no touch points are generated. In the embodiments of this application, the specified conditions can be at least one of identity matching and preset frame number filtering, and are not limited thereto.

[0036] Therefore, at least one of the noise signal detected by the touchscreen of the electronic device and the charging state of the electronic device can be used as device parameters of the electronic device. If the device parameters meet preset interference conditions, a filtering mode is activated. In the filtering mode, target touch points sampled by the touchscreen that meet specified conditions are determined as valid touch points. Thus, by activating the filtering mode through the device parameters of the electronic device, target touch points that meet specified conditions can be determined as valid touch points, thereby achieving the filtering of touch points that do not meet the specified conditions.

[0037] Please see Figure 2 , Figure 2 This application illustrates a touchscreen control method provided in an embodiment of the present application, applied to an electronic device, the electronic device including a touchscreen. In this embodiment of the application, the device parameters include noise signals detected by the touchscreen, and the method includes steps S201 to S203.

[0038] S201: Acquire the noise signal detected by the touch screen of the electronic device.

[0039] S202: If the noise signal is greater than a preset threshold, then the filtering mode is activated.

[0040] In other words, in the embodiments of this application, the aforementioned implementation of "if the device parameters satisfy the preset interference condition" means "if the noise signal is greater than the preset threshold". It can be understood that, as mentioned above, when the device parameters of the electronic device are noise signals detected by the touchscreen, and the aforementioned preset interference condition is the first condition, then the implementation of "the noise signal satisfies the first condition" means that the noise signal is greater than the preset threshold.

[0041] As one implementation, the touchscreen of the electronic device has a sampling operation to collect touch points on the touchscreen. This sampling operation corresponds to a sampling rate, which refers to the number of times the touchscreen samples touch input per second, representing the frequency at which the touchscreen obtains touch information from the user. One sampling period can be considered as one frame of the touchscreen sampling operation. For example, if the sampling rate of the electronic device's touchscreen is 120Hz, that is, 120 samples per second, then one frame, or one sampling period, is 1 / 120 = 8ms. Typically, within one sampling period, or one frame, the electronic device can sample multiple touch points acting on the touchscreen. These touch points may contain noise signals. Therefore, in this embodiment, the noise signal can be collected. If the collected noise signal is greater than a preset threshold, it is determined that there is significant noise in the environment where the electronic device is currently located, which may interfere with the normal reporting of touch points on the touchscreen, and thus a filtering mode is activated.

[0042] S203: In the filtering mode, the target touch points sampled by the touch screen that meet the specified conditions are determined as valid touch points.

[0043] It should be noted that in filtering mode, after detecting a touch point, the touchscreen determines whether the touch point meets specified conditions. Only when the specified conditions are met will the target touch point be identified as a valid touch point and then reported. Touch points that do not meet the specified conditions are identified as invalid touch points and will not be reported. In other words, in filtering mode, other touch points sampled by the touchscreen that do not meet the specified conditions are identified as invalid touch points.

[0044] It is understandable that each touch point corresponds to attribute information, which may include an identity identifier and duration. The identity identifier characterizes the touch point and can be determined based on at least one of the touch area, touch contour, and other information, such as a fingerprint. For example, if the touch point is a user's hand pressing on the touchscreen, then the touch point's identity information can be called a finger ID. Touchscreens typically use multi-touch technology to identify and track multiple fingers. When multiple fingers simultaneously touch the touchscreen, each finger is assigned a unique finger ID so the system can distinguish and track their positions. In most cases, finger ID identification and tracking are handled by the operating system or device driver; applications do not need to directly process finger IDs. Different operating systems may provide different finger ID identification methods. For Android, the operating system typically uses the MotionEvent object to detect and track finger touch events. In each touch event, the getPointerId(int pointerIndex) method can be used to obtain the unique ID of the finger. The pointerIndex parameter represents the finger index, with 0 representing the first finger, 1 representing the second finger, and so on.

[0045] In addition, the duration mentioned above can characterize the number of scan cycles in which the user's touch point on the touch screen is continuously detected. For example, if a scan cycle is 8ms, then if the touch point is detected in 4 consecutive scan cycles, the duration can be determined to be no less than 32ms.

[0046] Therefore, corresponding filtering methods can be set for the two attributes of touch point identification and duration.

[0047] In the first filtering mode, where the electronic device filters the identity of touch points collected by the touchscreen, S203 is implemented as follows: In the filtering mode, a target touch point sampled by the touchscreen is detected; if the identity of the target touch point is a first designated identifier, then the target touch point is determined to be a valid touch point. Here, the identity of the target touch point is the finger ID corresponding to the target touch point, i.e., the target finger ID, and the first designated identifier can be a pre-set identity identifier. As mentioned earlier, different fingers correspond to different IDs. Through the finger ID, it is possible to know whether the finger corresponding to the touch point currently acting on the touchscreen is the left thumb, the right thumb, or another finger. Therefore, by setting the first designated identifier, the touchscreen of the electronic device can be made to respond only to touches from specific fingers.

[0048] It should be noted that the first designated identifier can be set based on actual usage needs and is not limited here. As one approach, the first designated identifier can be determined based on the current application scenario of the electronic device. This application scenario includes the applications currently running in the foreground of the electronic device. Then, the frequently used finger IDs of the user in this application scenario are determined, and these frequently used finger IDs are used as the first designated identifier. The frequently used finger IDs can be finger IDs whose usage frequency exceeds a specified frequency within a preset time period.

[0049] Therefore, after determining that the device parameters of the electronic device meet the preset interference conditions and the filtering mode is turned on, the application scenario of the electronic device is obtained, the first designated identifier corresponding to the application scenario is determined, and then the first filtering mode mentioned above is used to determine the valid touch points and filter out the invalid touch points.

[0050] As another implementation, since the fingers used to touch the touchscreen may differ depending on how the user holds the phone, the first designated identifier can be determined based on the way the electronic device is held. This holding method can include left-hand single-hand holding, right-hand single-hand holding, and dual-hand holding. For example, when the electronic device is held with the right hand as the sole hand, fingers other than the right thumb are typically not used to touch the touchscreen. The user usually uses the right thumb and the left thumb, index finger, and middle finger. Therefore, for an electronic device held with the right hand as the sole hand, the first designated identifier is the identifier of the right thumb and the left thumb, index finger, and middle finger. Similarly, when the electronic device is held with the left hand as the sole hand, fingers other than the left thumb are typically not used to touch the touchscreen. The user usually uses the left thumb and the right thumb, index finger, and middle finger. Therefore, for an electronic device held with the left hand as the sole hand, the first designated identifier is the identifier of the left thumb and the right thumb, index finger, and middle finger. For example, when an electronic device is held in a dual-handed manner, the user typically uses the thumbs of both hands to touch the touchscreen. Therefore, for electronic devices held in a dual-handed manner, the first designated identifier is the identification of the left and right thumbs.

[0051] For example, the way an electronic device is held can be detected using its gravity sensor or accelerometer. Taking a mobile phone as an example, the gravity sensor inside the phone can detect the phone's orientation and tilt angle in space. By monitoring the phone's tilt angle, the way it is held can be inferred. Alternatively, the phone's accelerometer can detect changes in the phone's acceleration or linear acceleration. Depending on the way it is held, the phone's dynamic characteristics in the hand will differ. By analyzing the accelerometer data, the way the phone is held can be identified.

[0052] Therefore, after determining that the device parameters of the electronic device meet the preset interference conditions and the filtering mode is turned on, the holding state of the electronic device is obtained, the first designated identifier corresponding to the holding state is determined, and then the first filtering mode mentioned above is used to determine the valid touch points and filter out the invalid touch points.

[0053] The second filtering mode is where the electronic device filters the duration of touch points collected by the touchscreen. In this mode, the implementation of S203 is as follows: In the filtering mode, the target touch point sampled by the touchscreen is detected; if it is determined that the target touch point is collected in a specified number of consecutive touchscreen sampling operations, the target touch point is determined as a valid touch point, wherein the specified number of times is greater than or equal to a preset number of times.

[0054] For example, as described above, the touchscreen of an electronic device collects touch points generated within a sampling period according to a sampling rate. After detecting a touch point, it continues to detect that touch point. If the touch point is detected within a specified number of sampling periods, it can be determined as a valid touch point. If the touch point is detected before the specified number of sampling periods, it will not be determined as a valid touch point, i.e., it will not be reported. If the number of sampling periods in which the touch point is continuously detected is not the specified number, i.e., the number of sampling periods is less than a preset number, the touch point is determined as an invalid touch point, and no reporting operation is performed. Therefore, through this second filtering mode, touch points whose touch duration is less than the preset number of sampling periods can be identified as false touch points, i.e., they will not be identified as valid touch points. The preset number of sampling periods can be determined based on actual usage requirements and is not limited here.

[0055] In the third filtering mode, the electronic device filters both the duration and identity of the touch points collected by the touchscreen. In this mode, S203 is implemented as follows: In the filtering mode, a target touch point sampled by the touchscreen is detected; if the identity of the target touch point is a second designated identifier, and it is determined that the target touch point is collected in a specified number of consecutive touchscreen sampling operations, then the target touch point is determined as a valid touch point, wherein the specified number of times is greater than or equal to a preset number of times.

[0056] As one implementation method, the preset number of times is pre-set for the identity identifier of the target touch point. For example, a first mapping table between identity identifiers and the number of times can be pre-set. This first mapping table includes multiple identity identifiers (e.g., finger IDs) and the number of times corresponding to each identity identifier. The number of times corresponding to each identity identifier can be understood as the minimum number of consecutive times that the touch point corresponding to that identity identifier needs to be continuously collected to be determined as a valid touch. Taking a finger touch as an example, the number of times corresponding to each touch point's finger ID can be different, and the specific number of times can be set based on the actual usage scenario. For example, the touch points with finger IDs 1, 2, and 3 can correspond to 1 time.

[0057] In addition, the third filtering mode can also set a preset number of filtering operations for certain fingers, while not setting a preset number of filtering operations for other fingers. That is, it determines whether the identity of the target touch point is the second specified identity. If it is the second specified identity, it determines whether the target touch point has been collected in the specified number of consecutive touch screen sampling operations. If the target touch point has been collected in the specified number of consecutive touch screen sampling operations, it is determined that the target touch point is a valid touch point. If the identity of the target touch point is not the second specified identity, the operation of determining whether the target touch point has been collected in the specified number of consecutive touch screen sampling operations will not be performed, and it can be directly determined as a valid touch point. Other filtering methods can also be used.

[0058] It should be noted that the second designated identifier may be the same as or different from the aforementioned first designated identifier. In one implementation, if the second designated identifier is the same as the aforementioned first designated identifier, the purpose of this third filtering mode is to verify not only the identity of the touch point but also the number of times the touch point has been continuously sampled. A touch point is only considered a valid touch point if both the identity of the target touch point and the duration of sampling are valid. In this case, if at least one of the following conditions is met—that the identity identifier is not the second designated identifier and that the touch point has not been sampled in the specified number of consecutive touchscreen sampling operations—the touch point is determined to be an invalid touch point and is not reported.

[0059] In another implementation, the second designated identifier differs from the aforementioned first designated identifier. The purpose of this third filtering mode is to consider that a preset number of filters can be set for some fingers, while no preset number of filters can be set for others. Therefore, the ID of the finger that needs to be filtered for a preset number of times can be set as the second designated identifier. In this case, the purpose of determining whether the identifier of the target touch point is the second designated identifier is to determine whether the touch point needs to perform a subsequent duration verification operation. The duration verification operation is to determine whether the target touch point is collected in a specified number of consecutive touch screen sampling operations. If the identifier of the target touch point is the second designated identifier, the duration verification operation is performed. If the identifier of the target touch point is not the second designated identifier, the touch point can be directly determined as a valid touch point or an invalid touch point. Alternatively, if the identifier of the target touch point is determined not to be the second designated identifier, it can be determined whether the identifier of the target touch point is the first designated identifier. If it is the first designated identifier, the target touch point is determined to be a valid touch point; if it is not the first designated identifier, the target touch point is determined to be an invalid touch point. In other words, for target touch points located at the second designated identifier, a continuous duration verification operation is performed; for target touch points outside the second designated identifier, an authentication operation is performed based on the first designated identifier.

[0060] Therefore, in this embodiment of the application, when the noise signal is greater than a preset threshold, the filtering mode is activated, causing the electronic device to enter a noise mode. By determining the touch points under specified conditions, the interference of accidental touch points on the touch operation of the touch screen can be effectively reduced.

[0061] Please see Figure 3 , Figure 3 This application illustrates a touchscreen control method provided in an embodiment of the present application, applied to an electronic device, the electronic device including a touchscreen. In this embodiment, the device parameters include the charging state of the electronic device, and the method includes steps S301 to S303.

[0062] S301: Obtain the charging status of the electronic device.

[0063] It should be noted that the charging state can include a charging state and a not-charging state. The charging state indicates that the electronic device believes there is an external power source currently charging or about to charge it, while the not-charging state indicates that the electronic device believes there is no external power source currently charging or about to charge it. It is understood that the charging state is a subjective judgment by the electronic device and does not depend on whether there is an objective charging device. For example, if the electronic device is connected to a charging device but is not charging it, as long as preset conditions are met, the electronic device will subjectively believe that the charging device is about to charge it, and can then set the charging state to the charging state, thus entering a filtering mode in advance before charging. Therefore, the electronic device can obtain the insertion status of the charging interface and can determine the charging state by combining it with the electrical signal of the charging interface, or it can determine the charging state independently of the electrical signal of the charging interface.

[0064] For example, an electronic device obtains the usage status of its charging port, which may include a charger plugged in or unplugged state. Typically, electronic devices (e.g., smartphones) have a charging detection chip or integrated circuit that can monitor whether a charger is plugged into a USB port or Type-C port. These chips usually send information about charger insertion and removal to the main processor, which then processes it. The operating system typically provides corresponding interfaces or APIs to capture interrupt events generated by the insertion and removal of the USB or Type-C port. By listening to these interrupt events, the usage status of the charging port can be determined. For example, this listening method can be implemented through relevant APIs or system calls. For instance, in the Android system, APIs provided by the Android Development Kit (SDK) can be used to read the usage status of the charging port. By registering a broadcast receiver to listen for changes in the charging status, information such as the charging port's connection status and battery level can be obtained.

[0065] As one implementation method, if the electronic device determines that the charging port is in the charger plugged-in state, it directly determines that the electronic device is in a charging state. In this case, the electronic device can enter a filtering mode in advance before charging begins.

[0066] Furthermore, considering that users typically charge their electronic devices during certain time periods, for example, the charging time periods—the time periods during which the electronic device is charged while in use—can be pre-calculated. These charging time periods are defined as the time periods during which the number of times the electronic device is charged while in use exceeds a specified number; that is, the electronic device is more likely to be charged during these time periods. Therefore, if the electronic device detects that the charging port is plugged in and the current time period is a charging time period, then the electronic device is determined to be charging; otherwise, it is determined to be not charging.

[0067] Furthermore, when the electronic device detects that the charging port is inserted, it can obtain the remaining battery level of the electronic device. If the remaining battery level is less than a specified battery level threshold, the electronic device is determined to be charging; otherwise, it is determined to be not charging. The specified battery level threshold can be pre-calculated, based on the electronic device's historical charging operation records. The remaining battery level before each charging operation is recorded and named the charging capacity. The specified battery level threshold is obtained based on each charging capacity recorded in the historical charging operation records. For example, the minimum charging capacity, the maximum charging capacity, the average of all charging capacities, or the most frequently occurring charging capacity can all be used as the specified battery level threshold; the specific method is not limited here.

[0068] As another implementation, when the charging interface is determined to be in a charger-inserted state, the electronic device also needs to determine its charging state by combining the electrical signal of the charging interface. For example, the usage state of the charging interface of the electronic device is obtained; if the usage state is charger-inserted, the electrical signal of the charging interface is obtained; if the electrical signal meets a preset condition, the charging state of the electronic device is determined to be charging. The electrical signal can be a voltage value or a current value, and meeting the preset condition can be a voltage value greater than a specified voltage value or a current value greater than a specified current value. Typically, when an external power source charges the electronic device through the charging interface, the charging device has a high potential, and the phone has a low potential; therefore, the voltage and current values ​​of the charging signal are usually greater than a certain value. The charging voltage and current of the charging interface can be obtained using the BatteryManager class in the Android system.

[0069] In addition, if the electrical signal does not meet the preset conditions, the charging status of the electronic device can be directly determined as not charging. Alternatively, the charging status of the electronic device can be determined by combining other information of the electronic device.

[0070] The following describes an implementation method for determining the charging status of an electronic device by combining other information from the electronic device when the electrical signal does not meet preset conditions.

[0071] The first approach considers that when an electronic device's charging port is plugged in, if a charging device is connected, it may not be connected to an external power source. For example, if a user plugs a charger into a phone's charging port but connects it to AC power without plugging it into a wall socket, the device's location information can be used to determine whether it is charging before the user connects the charger to an external power source. In other words, the aforementioned other information can be the electronic device's location information. When the charging port is plugged in and the electrical signal from the charging port does not meet preset conditions, the device's location information is obtained. If this location information is within a preset range, the device is determined to be charging; otherwise, it is determined to be not charging. The preset location range refers to the locations where the user frequently charges the device. In other words, it involves counting the historical charging locations of the electronic device each time it is charged within a preset historical time period, thereby obtaining the number of times each historical charging location is charged. The preset location range is determined based on the cumulative number of times each historical charging location is charged. For example, the historical charging locations can be sorted according to the cumulative number of times, and the top N locations in the sorted list can be used as target locations. The preset range of each target location can be used as the preset location range of the target location. Here, N can be an integer not less than 1.

[0072] It is understandable that users typically charge their electronic devices at their residential address or workplace. Therefore, the aforementioned preset location range determined by the cumulative number of historical charging locations likely includes that residential address or workplace. When a user plugs their electronic device into the charger at that address or workplace, there is a significant need or intention to charge. Although there may be reasons why the electrical signal at the charging port may not meet the preset conditions, this failure to meet the preset conditions may only be temporary. Therefore, in this case, it is still determined that the charging port is in a charging state. This not only allows the filtering mode to be entered in advance, but also avoids interference with the touch screen's touch point reporting operation when the charging signal meets the preset conditions later due to the electronic device's untimely detection.

[0073] The second approach considers that the charging interface of electronic devices is often integrated with the headphone jack into the same interface. Usually, this interface is a multi-functional interface, that is, it integrates a charging pin and a headphone pin, and has at least the functions of charging and audio transmission. For example, this multi-functional interface is a USB port or a Type C port. In the embodiments of this application, for the sake of convenience, this multi-functional interface is named a charging interface, but it is not limited to the interface being used only for charging.

[0074] When the charging port of an electronic device is plugged in, if wired headphones are connected to the charging port, the electrical signal of the charging port may not meet the preset conditions. This is because when a charging device is charging an electronic device through its charging port, the charging current is typically between several hundred milliamps (mA) and several amps (A). However, when headphones are connected, the current of the charging port is usually very small, generally in the range of several milliamps (mA) to tens of milliamps (mA). Therefore, although the charging port is plugged in when headphones are connected, its electrical signal does not meet the preset conditions.

[0075] Therefore, in the second method, when the charging port is in the plugged-in state, if the electrical signal of the charging port does not meet the preset conditions, it can be determined whether the data cable connected to the charging port is a charging cable or an earphone cable. For example, in the Android system, in the onReceive() method, by checking the values ​​of connected and audioAccessoryConnected, it can be determined whether the connected cable is a charging cable or an earphone cable. If the data cable connected to the charging port is a charging cable, then even if the electrical signal of the charging port does not meet the preset conditions, the charging state of the electronic device is still determined to be charging. If it is determined that the data cable connected to the charging port is an earphone cable, then the charging state of the electronic device is determined to be not charging.

[0076] It should be noted that, after confirming that the charging port is in the charger plugged-in state, it is also possible to determine whether the data cable connected to the charging port is a charging cable or an earphone cable. In this case, it is unnecessary to obtain the electrical signal from the charging port; instead, the charging status of the electronic device can be determined directly by whether the data cable connected to the charging port is a charging cable or an earphone cable. Specifically, if the data cable connected to the charging port is a charging cable, the charging status of the electronic device is determined to be charging; if the data cable connected to the charging port is an earphone cable, the charging status of the electronic device is determined to be not charging. Alternatively, after confirming that the data cable connected to the charging port is a charging cable, the electrical signal from the charging port can be obtained. If the electrical signal meets a preset condition, the charging status of the electronic device is determined to be charging; if the preset condition is not met, the charging status can be directly determined to be not charging. Alternatively, the charging status can be determined by combining the first method described above, which will not be elaborated further.

[0077] S302: If the electronic device is in a charging state, then the filtering mode is activated.

[0078] In other words, in this embodiment of the application, the aforementioned implementation of "if the device parameters meet the preset interference conditions" means "if the electronic device is in a charging state." Therefore, after determining the charging state of the electronic device in the above manner, if the determined charging state is indeed in a charging state, then the filtering mode is activated.

[0079] This application embodiment considers that after a charger is plugged in, noise interference from the charger can cause the touchscreen system's capacitance data to fluctuate, leading to an increased probability that the same touch gesture will result in a swipe operation instead of a tap. Therefore, when the electronic device's battery management system service determines that the electronic device is charging, it can notify the touchscreen driver to activate a filtering mode. Specifically, the electronic device's battery management system service obtains the charging status. If the charging status is "charging in progress," the system service sets a first mode instruction function for the touchscreen driver; if the charging status is "not charging," the system service sets a second mode instruction function for the touchscreen driver.

[0080] When the touchscreen driver receives the corresponding instruction, it sets and sends the corresponding open or close instruction to the touchscreen hardware system. The Android system is divided into different software layers. The battery management system service is responsible for monitoring the insertion and removal of the charger to determine the charging status and whether the filtering function needs to be enabled. The touchscreen driver is responsible for receiving instructions from upper-layer system services (e.g., the battery management system service) and communicating with the hardware device, the touchscreen system. The touchscreen system receives instructions from the terminal system (e.g., the battery management system service) and sets the touchscreen system registers through the interface. The touchscreen system typically uses registers to record and manage touch event information. These typically include data registers, control registers, status registers, and interrupt registers. The touchscreen controller stores touch event coordinates, pressure, and other data in the data registers. The control register is used to configure and control various parameters and operating modes of the touchscreen controller. It contains various control bits; setting different bits enables or disables touch detection, sets touch sensitivity, and sets touch modes. The status register reflects the current state of the touchscreen controller. It records whether the touchscreen has been touched and whether the touch state has changed. The interrupt register is used to send an interrupt signal to the processor to notify that a touch event has occurred. When a touch event meets certain specific conditions, the touchscreen controller writes an interrupt signal to the interrupt register, thereby waking up the processor to execute the corresponding interrupt handler.

[0081] The terminal system configures the touchscreen system. This means that the interaction between the terminal system and the touchscreen system primarily occurs through I2C, SPI, or I3C interfaces to configure the registers within the touchscreen system. The touchscreen system disables filtering mode based on the second mode command issued by the terminal system, and enables filtering mode based on the first mode command issued by the terminal system.

[0082] S303: In the filtering mode, the target touch points sampled by the touch screen that meet the specified conditions are determined as valid touch points.

[0083] For the specific filtering operations in this filtering mode, please refer to the aforementioned embodiments, which will not be repeated here.

[0084] It should be noted that in filtering mode, not only are touch points filtered, but the device parameters of the electronic device can also be monitored in real time. If the device meets or does not meet the preset interference conditions, the filtering mode will be exited.

[0085] It should be noted that in some cases, even if the device parameters of an electronic device meet preset interference conditions, the filtering mode may not need to be enabled. For example, when it is determined that the device parameters meet the preset interference conditions, the display interface of the electronic device is acquired. If the display interface meets a first condition, the filtering mode is disabled; if the display interface does not meet the first condition, the filtering mode is enabled. The display interface meeting the first condition may be that the total area of ​​the touch area of ​​the display interface is relatively small. For example, all touch areas of the display interface are acquired, and the sum of the areas of all touch areas is determined as the total area of ​​the touch area of ​​the display interface. If this total area is less than a specified area, the total area of ​​the touch area of ​​the display interface is determined to be relatively small, i.e., the display interface meets the first condition; otherwise, the display interface is determined not to meet the first condition. Therefore, when the total area of ​​the touch area of ​​the current display interface is relatively small, it indicates that most areas of the display interface are not touchable. In this case, the filtering mode does not need to be enabled, thereby reducing the power consumption of the electronic device. For example, if the device parameters meet the preset interference conditions, the current time period is obtained, and it is determined whether the current time period is a preset time period. If the current time period is a preset time period, the filtering mode is turned off; if the current time period is not a preset time period, the filtering mode is turned on. The preset time period can be a pre-statistically calculated period during which the user does not use the electronic device for an extended period and is in a charging state. For example, the preset time period can be the user's nighttime sleep period, such as from 11 PM to 8 AM the next day.

[0086] Therefore, this application embodiment determines whether to enable the filtering mode by the charging state of the electronic device, thereby reducing the interference of the charging signal of the charging device on the touch point during the charging state.

[0087] It is understood that the above-mentioned device parameters satisfying the preset interference conditions can be that the noise signal is greater than the preset threshold, or that the electronic device is in the charging state, or that the noise signal is greater than the preset threshold and the charging state is in the charging state; there are no restrictions on this.

[0088] Please see Figure 4 The diagram shows a structural block diagram of a touch screen control device 400 provided in an embodiment of this application. The device is applied to an electronic device, which includes a touch screen. The device may include: an acquisition unit 401, an activation unit 402, and a determination unit 403.

[0089] The acquisition unit 401 is used to acquire device parameters of the electronic device, the device parameters including at least one of the noise signal detected by the touch screen and the charging status of the electronic device.

[0090] The activation unit 402 is used to activate the filtering mode if the device parameters meet the preset interference conditions.

[0091] Furthermore, the device parameters include noise signals detected by the touchscreen, and the activation unit 402 is also used to activate the filtering mode if the noise signal is greater than a preset threshold.

[0092] Furthermore, the device parameters include the charging status of the electronic device, and the activation unit 402 is also used to activate the filtering mode if the charging status of the electronic device is charging.

[0093] Furthermore, the activation unit 402 is also used to obtain the usage status of the charging interface of the electronic device; if the usage status is that the charger is inserted, then the charging status of the electronic device is determined to be that it is charging; otherwise, the charging status of the electronic device is determined to be that it is not charging.

[0094] Furthermore, the activation unit 402 is also used to acquire the electrical signal of the charging interface if the usage state is the charger insertion state; and to determine that the charging state of the electronic device is the charging state if the electrical signal meets the preset conditions.

[0095] The determining unit 403 is used to determine the target touch points sampled by the touch screen that meet the specified conditions as valid touch points in the filtering mode.

[0096] Furthermore, the determining unit 403 is also configured to detect the target touch point sampled by the touch screen in the filtering mode; if the identity of the target touch point is a first designated identity, then the target touch point is determined to be a valid touch point.

[0097] Furthermore, the determining unit 403 is also configured to detect the target touch point sampled by the touch screen in the filtering mode; if it is determined that the target touch point is collected in a specified number of consecutive touch screen sampling operations, the target touch point is determined as a valid touch point, wherein the specified number is greater than or equal to a preset number.

[0098] Furthermore, the determining unit 403 is also used to detect the target touch point sampled by the touch screen in the filtering mode; if the identity of the target touch point is a second designated identifier, and it is determined that the target touch point is collected in a specified number of consecutive touch screen sampling operations, then the target touch point is determined as a valid touch point, wherein the specified number of times is greater than or equal to a preset number of times.

[0099] Furthermore, the preset number of times is pre-set based on the identity identifier of the target touch point.

[0100] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0101] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.

[0102] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0103] Please refer to Figure 5 This document illustrates a structural block diagram of an electronic device according to an embodiment of this application. The electronic device 100 can be a smartphone, tablet computer, e-reader, or other electronic device capable of running applications. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a touchscreen 130, and one or more applications. The one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110. The one or more applications are configured to perform the methods described in the foregoing method embodiments.

[0104] Processor 110 may include one or more processing cores. Processor 110 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately using a communication chip.

[0105] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).

[0106] Please refer to Figure 6 This diagram illustrates a structural block diagram of a computer-readable medium provided in an embodiment of this application. The computer-readable medium 600 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0107] The computer-readable medium 600 may be an electronic storage device such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable medium 600 includes a non-transitory computer-readable storage medium. The computer-readable medium 600 has storage space for program code 610 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 610 may be compressed, for example, in a suitable form.

[0108] In summary, the embodiments of this application can use at least one of the noise signal detected by the touchscreen of the electronic device and the charging state of the electronic device as device parameters. If the device parameters meet preset interference conditions, a filtering mode is activated. In the filtering mode, target touch points sampled by the touchscreen that meet specified conditions are determined as valid touch points. Therefore, by activating the filtering mode through the device parameters of the electronic device, target touch points that meet specified conditions can be determined as valid touch points, thereby achieving the filtering of touch points that do not meet the specified conditions.

[0109] 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 them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A touchscreen control method, characterized in that, Applied to an electronic device, the electronic device including a touchscreen, the method includes: Obtain the usage status of the charging interface of the electronic device; If the usage state is that the charger is plugged in, obtain the electrical signal of the charging interface; If the electrical signal meets the preset conditions, the charging state of the electronic device is determined to be charging state, wherein the electrical signal meets the preset conditions including the voltage value being greater than a specified voltage value or the current value being greater than a specified current value. If the electronic device is in a charging state, determine the total area of ​​all touchable areas of the display interface of the electronic device; If the total area of ​​all touch areas on the display interface is less than the specified area, the filtering mode is turned off. If the total area of ​​all touch areas on the display interface is not less than the specified area, then the filtering mode is enabled. In the filtering mode, target touch points that meet specified conditions and are sampled by the touchscreen are determined as valid touch points. In the filtering mode, the electronic device filters the identity identifiers of the touch points collected by the touchscreen, and the identity identifiers are determined based on the touch area of ​​the touch points.

2. The method according to claim 1, characterized in that, In the filtering mode, determining target touch points that meet specified conditions sampled by the touchscreen as valid touch points includes: In the filtering mode, the target touch point sampled by the touchscreen is detected; If the identity identifier of the target touch point is the first designated identifier, then the target touch point is determined to be a valid touch point.

3. The method according to claim 1, characterized in that, In the filtering mode, determining target touch points that meet specified conditions sampled by the touchscreen as valid touch points includes: In the filtering mode, the target touch point sampled by the touchscreen is detected; If the target touch point is detected in a specified number of consecutive touchscreen sampling operations, the target touch point is determined as a valid touch point, wherein the specified number of times is greater than or equal to a preset number.

4. The method according to claim 1, characterized in that, In the filtering mode, determining target touch points that meet specified conditions sampled by the touchscreen as valid touch points includes: In the filtering mode, the target touch point sampled by the touchscreen is detected; If the identity of the target touch point is the second designated identifier, and it is determined that the target touch point is collected in a specified number of consecutive touch screen sampling operations, then the target touch point is determined as a valid touch point, wherein the specified number of times is greater than or equal to a preset number of times.

5. The method according to claim 4, characterized in that, The preset number of times is set in advance based on the identity identifier of the target touch point.

6. A touchscreen control device, characterized in that, Applied to an electronic device, the electronic device including a touch screen, the device includes: The acquisition unit is used to acquire the usage status of the charging interface of the electronic device; if the usage status is that the charger is inserted, the unit acquires the electrical signal of the charging interface; if the electrical signal meets a preset condition, the unit determines that the charging status of the electronic device is that it is charging, wherein the preset condition for the electrical signal to meet the preset condition includes a voltage value greater than a specified voltage value or a current value greater than a specified current value. An activation unit is configured to: if the electronic device is in a charging state, determine the total area of ​​all touchable areas of the display interface of the electronic device; if the total area of ​​all touchable areas of the display interface is less than a specified area, disable the filtering mode; if the total area of ​​all touchable areas of the display interface is not less than the specified area, enable the filtering mode. A determining unit is configured to determine target touch points that meet specified conditions sampled by the touchscreen as valid touch points in the filtering mode, wherein, in the filtering mode, the electronic device filters the identity identifiers of the touch points collected by the touchscreen, and the identity identifiers are determined based on the touch area of ​​the touch points.

7. An electronic device, characterized in that, include: One or more processors; Memory; touchscreen; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to perform the method as described in any one of claims 1-5.

8. A computer-readable medium, characterized in that, The computer-readable medium stores processor-executable program code, which, when executed by the processor, causes the processor to perform the method according to any one of claims 1-5.