Touch point positioning method and device, electronic equipment and storage medium
By obtaining the maximum capacitance change value in the capacitance touch screen and determining the target detection point, the problem of inaccurate positioning of touch points under the influence of environmental factors is solved, and the accuracy of user operations and the reliability of touch screen are improved.
Patent Information
- Application Number
- CN202310659016.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-05
- Publication Date
- 2024-12-06
AI Technical Summary
Under the influence of environmental factors such as humidity, dust and electric field changes, existing capacitive touch screens lead to inaccurate positioning of touch points, affecting the accuracy of user operations.
When a touch event is detected, the maximum capacitance change value is obtained from the multiple capacitance change values as the target capacitance value, and the target detection point caused by the capacitance change value is determined, and the exact position of the touch point is calculated based on these points. Filter out detection points close to the touch point to improve positioning accuracy.
It improves the accuracy of touch point positioning and user operation accuracy, reduces errors caused by environmental factors, and enhances the operation reliability of the touch screen.
Smart Images

Figure CN119088250A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of touch screen technology, and in particular to a touch point positioning method, device, electronic device and storage medium. Background Art
[0002] The event generated by the user touching the touch screen of the terminal is called a touch event, also known as a touch control event. Under normal circumstances, the event processor directly sends the received touch event to the current interface, that is, the user interface of the application running in the foreground, and the application uses the corresponding processing method to process the touch event.
[0003] In the related art, more and more mobile phones and tablets use capacitive touch screens. Capacitive touch screen technology uses the induction effect of human body current to operate the device. When the human body touches the capacitive touch screen, the capacitance here will change. The capacitance on the capacitive touch screen will not only change due to human touch, but also due to changes in the environment (such as humidity, dust, electric field, etc.). Therefore, directly determining the position of the touch point based on the capacitance node with capacitance change on the touch screen will be inaccurate, which will lead to problems such as inaccurate touch.
[0004] Therefore, how to improve the accuracy of touch screen operation becomes a problem that needs to be solved urgently. Summary of the invention
[0005] The present application proposes a touch point positioning method, device, electronic device and storage medium to improve the accuracy of touch point positioning.
[0006] In a first aspect, an embodiment of the present application provides a touch point positioning method, which is applied to an electronic device, wherein the electronic device includes a touch screen, and a plurality of touch detection points are distributed in the touch screen, the method comprising: if a touch event is detected, obtaining a capacitance change value with the largest value from a plurality of capacitance change values as a target capacitance value, the plurality of capacitance change values including a capacitance change value detected by each of the touch detection points when the touch event is detected; based on the target capacitance value, determining a plurality of target detection points from the plurality of touch detection points at which the capacitance change values are detected due to the touch event; and determining a target position of the touch point corresponding to the touch event on the touch screen according to the positions of the plurality of target detection points on the touch screen.
[0007] In a second aspect, an embodiment of the present application provides a touch point positioning device, which is applied to an electronic device, wherein the electronic device includes a touch screen, and a plurality of touch detection points are distributed in the touch screen, and the device includes: a capacitance value acquisition module, a detection point determination module, and a touch point position determination module. The capacitance value acquisition module is used to obtain the capacitance change value with the largest value from a plurality of capacitance change values as a target capacitance value if a touch event is detected, and the plurality of capacitance change values include the capacitance change value detected by each of the touch detection points when the touch event is detected; the detection point determination module is used to determine, based on the target capacitance value, a plurality of target detection points from a plurality of touch detection points where the capacitance change value is detected due to the touch event; and the touch point position determination module is used to determine the target position of the touch point corresponding to the touch event on the touch screen according to the positions of the plurality of target detection points on the touch screen.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method.
[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the above method.
[0010] In the solution provided in the present application, if a touch event is detected, a capacitance change value with the largest value is obtained from multiple capacitance change values as a target capacitance value, and the multiple capacitance change values include the capacitance change value detected by each touch detection point when the touch event is detected; based on the target capacitance value, multiple target detection points where capacitance change values are detected due to the touch event are determined from the multiple touch detection points; and based on the positions of the multiple target detection points on the touch screen, the target position of the touch point corresponding to the touch event on the touch screen is determined. Because when a touch event occurs, the closer the capacitance change value is to the touch point position, the greater the capacitance change value will be, and because the capacitance change values detected by different touch detection points near the touch point will follow certain rules in actual applications; based on this, by obtaining the maximum capacitance change value, after determining the touch detection point closest to the touch point, it is possible to further screen out multiple target detection points from all touch detection points that detect capacitance change values caused by the touch event based on the maximum capacitance change value, that is, multiple target detection points that are closer to the touch point, and then calculate the target position of the touch point on the touch screen only based on the multiple target detection points that are closer to the touch point, which can avoid other irrelevant detection points that are far away from the touch point from participating in the calculation, resulting in a gap between the final calculated position of the touch point and the actual position, and other problems, that is, improve the accuracy of touch point positioning, and thus improve the accuracy of user touch operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown.
[0013] Figure 2 A schematic diagram of a flow chart of a touch point positioning method provided in an embodiment of the present application is shown.
[0014] Figure 3 A schematic flow chart of a touch point positioning method provided in another embodiment of the present application is shown.
[0015] Figure 4 Shows Figure 3 A flowchart of the sub-steps of step S330 in one implementation manner.
[0016] Figure 5 A schematic diagram showing the distribution of capacitance change values of a touch detection point provided by an embodiment of the present application is shown.
[0017] Figure 6 A schematic diagram showing the distribution of capacitance differences of a touch detection point provided by an embodiment of the present application is shown.
[0018] Figure 7 A schematic diagram showing the distribution of capacitance differences of another touch detection point provided by an embodiment of the present application is shown.
[0019] Figure 8 A schematic diagram showing the distribution of capacitance differences of another touch detection point provided by an embodiment of the present application is shown.
[0020] Fig. 9 A schematic diagram of a broken line showing the uniformity of touch point positioning provided by an embodiment of the present application is shown.
[0021] Fig.10 A schematic flow chart of a touch point positioning method provided in yet another embodiment of the present application is shown.
[0022] Fig.11 A schematic flow chart of a touch point positioning method provided in yet another embodiment of the present application is shown.
[0023] Fig.12 A schematic diagram of a region corresponding to a target region of a touch point provided in an embodiment of the present application is shown.
[0024] Fig.13 Detailed description is a block diagram of an electronic device for executing a touch point positioning method according to an embodiment of the present application.
[0025] Fig.14 It is a storage unit of the embodiment of the present application for storing or carrying a program code for implementing the touch point positioning method according to the embodiment of the present application. DETAILED DESCRIPTION
[0026] In order 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 in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0027] It should be noted that in some processes described in the specification, claims and the above-mentioned drawings of the present application, multiple operations that appear in a specific order are included, and these operations may not be executed or executed in parallel in the order in which they appear in this article. The sequence numbers of operations such as S110, S120, etc. are only used to distinguish different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or less operations, and these operations may be executed in sequence or in parallel. And, the terms "first", "second", etc. in the specification, claims and the above-mentioned drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or sub-modules is not necessarily limited to those steps or sub-modules explicitly listed, but may include other steps or sub-modules that are not explicitly listed or that are inherent to these processes, methods, products, or devices.
[0028] The inventor proposes a touch point positioning method, device, electronic device and storage medium, which determine multiple target detection points where capacitance change values are detected due to a touch event from multiple touch detection points according to the detected maximum capacitance change value; and accurately calculate the target position of the touch point corresponding to the touch event on the touch screen according to the positions of the multiple target detection points on the touch screen. The touch point positioning method provided in the embodiment of the present application is described in detail below.
[0029] See also Figure 1 The present application embodiment provides an electronic device 100, which includes but is not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, and an MP4 (Moving Picture Experts Group Audio Layer IV) player. The electronic device 100 of this embodiment is described by taking a mobile phone as an example.
[0030] Among them, the electronic device 10 includes a touch screen 110, a housing 120 and electronic components. The touch screen 110 is a touch display screen with a display function to display the relevant interface or information of the electronic device 10 for users to watch and a channel for human-computer interaction. The touch screen 110 can be a capacitive touch screen. In this case, a plurality of touch detection points (i.e., capacitor nodes) are distributed in the touch screen 110, and the plurality of touch detection points can be arranged in an array. The housing 120 and the touch screen 110 together form a receiving space, and the electronic components are accommodated in the receiving space. The housing 120 can provide protection for the electronic components to prevent the electronic components from being dislocated or damaged due to external force impact, thereby extending the service life of the electronic device 100. The electronic components may include at least one of a receiver, a microphone, a camera module, a battery, a central processing unit, a sensor, etc., to realize the relevant functions of the electronic device 100.
[0031] In this embodiment, the principle of detecting capacitance change at the touch detection point can be understood as follows: when a touch occurs, the capacitance values of the touch point and the capacitance nodes near the touch point will change accordingly. Specifically, a drive signal is generated, and the drive signal can be converted into an analog receiving signal, and converted into a digital signal through an analog-to-digital converter, that is, a capacitance value. Based on this, if the electronic device 10 detects a touch event, the capacitance change value with the largest value is obtained from multiple capacitance change values as the target capacitance value, and the multiple capacitance change values include the capacitance change value detected by each of the touch detection points when the touch event is detected; based on the target capacitance value, multiple target detection points are determined from multiple touch detection points where capacitance change values are detected due to the touch event; according to the positions of the multiple target detection points on the touch screen 110, the target position of the touch point corresponding to the touch event on the touch screen 110 is determined.
[0032] Please refer to Figure 2 , Figure 2 A schematic diagram of a touch point positioning method provided in an embodiment of the present application is applied to an electronic device, wherein the electronic device includes a touch screen having multiple touch detection points distributed therein. Figure 2 The touch point positioning method provided in the embodiment of the present application is described in detail. The touch point positioning method may include the following steps:
[0033] Step S210: if a touch event is detected, obtaining a capacitance change value with a maximum value from a plurality of capacitance change values as a target capacitance value, wherein the plurality of capacitance change values include a capacitance change value detected at each touch detection point when the touch event is detected.
[0034] In this embodiment, the touch detection point can be understood as a capacitance node, and each touch detection point can detect a capacitance value at a preset frame rate, wherein each touch detection point corresponds to a reference capacitance value. During the operation of the capacitive touch screen, when the touch detection point is touched by a conductive object, the capacitance of the touch detection point will change, and the conductive object may include water mist or other conductive substances in the air in addition to the user's hand. Based on this, the electronic device can obtain the difference between the sampled capacitance value and the reference capacitance value detected by the touch detection point as the above-mentioned capacitance change value; and judge whether a touch event is detected based on the capacitance change value. For example, when the capacitance change value is greater than the preset threshold value, it is determined that a touch event is detected, so that the occurrence of false detection of touch events can be avoided to a certain extent.
[0035] It is understandable that the capacitance change value detected by the touch detection point closer to the touch point is obviously larger. Therefore, in the case of determining that a touch event is detected, the capacitance change value with the largest value can be obtained from multiple capacitance change values as the target capacitance value; that is, the position of the touch detection point corresponding to the target capacitance value on the touch screen is obviously very close to the position of the touch point on the touch screen. However, directly using the position of the touch detection point corresponding to the target capacitance value on the touch screen as the position of the touch point is not accurate enough. Therefore, based on the target capacitance value, the touch detection point that is closer to the touch point can be screened out from multiple touch detection points to assist in determining the specific position of the touch point on the touch screen, so as to improve the accuracy of touch point positioning.
[0036] Step S220: Based on the target capacitance value, determine, from the plurality of touch detection points, a plurality of target detection points at which the capacitance change value is detected due to the touch event.
[0037] When the touch detection point is touched by a conductive object, the touch detection point near the contact will detect a change in capacitance, and the conductive object can include not only the user's hand but also water mist in the air. If the water mist adheres to the touch screen, it will also cause the capacitance value of the touch detection point near the attachment position to change, but it is obvious that the value of the change is different from the value of the capacitance change caused by the user pressing the touch screen with a certain force; and the value of the capacitance change near the touch point caused by the user's hand touching the screen is generally not much different, or follows a certain rule. Therefore, after screening out the touch detection points that are closer to the touch point, according to the target capacitance value detected by it, and combined with the aforementioned certain rules of capacitance change, multiple target detection points whose capacitance change values are detected by the touch event can be screened out from all the touch detection points (i.e., multiple touch detection points) on the touch screen.
[0038] Among them, multiple target detection points can be understood as touch detection points located near the touch point that are affected by the touch event and cause voltage changes; naturally, other touch detection points among the multiple touch detection points except the aforementioned multiple target detection points can be regarded as irrelevant detection points for calculating the touch point position of the current touch event, that is, the capacitance change values detected by these irrelevant detection points have nothing to do with the touch event, or the relationship is small, which may be caused by contact with other conductive objects, or the capacitance fluctuates around the baseline capacitance value due to hardware reasons, etc. These irrelevant detection points are generally far away from the touch point.
[0039] Step S230: determining a target position of the touch point corresponding to the touch event on the touch screen according to the positions of the multiple target detection points on the touch screen.
[0040] Furthermore, after determining multiple target detection points near the touch point, the preset touch point algorithm can be used to calculate the target position of the touch point on the touch screen corresponding to the touch event according to the positions of the multiple target detection points on the touch screen. The position of the target detection point on the touch screen can be the coordinate information of the target detection point on the screen coordinate system, and correspondingly, the calculated target position of the touch point on the touch screen is also the coordinate information on the aforementioned screen coordinate system; wherein the screen coordinate system can be a two-dimensional coordinate system established based on the touch screen, and the two-dimensional coordinate system and the touch screen are in the same plane, for example, the lower left corner of the touch screen can be used as the origin, the y-axis can be established in the direction of the length of the touch screen, and the x-axis can be established in the direction of the width of the touch screen. Of course, the present application is not limited to the coordinate system in this example. In actual applications, the screen coordinate system can be established with any point in the touch screen as the origin.
[0041] Optionally, the preset touch point algorithm may be a centroid algorithm, or other algorithms. Any other algorithms for calculating the position of touch points on the touch screen are within the protection scope of the present application and will not be described in detail here.
[0042] In this way, multiple target detection points near the touch point are screened out from all the touch detection points on the touch screen, and then the target position of the touch point on the touch screen is calculated based on the positions of the multiple target detection points on the touch screen. This can avoid other irrelevant detection points that are far away from the touch point from participating in the calculation, resulting in a gap between the final calculated position of the touch point and the actual position. This improves the accuracy of touch point positioning, thereby improving the accuracy of user touch operations.
[0043] In some embodiments, multiple target applications may be pre-set in the electronic device, and the target applications have high requirements for the accuracy of the user's touch operation, for example, game applications such as Gobang or Go. Only when the target application is in the foreground running state, the touch point positioning method in this embodiment is executed. That is to say, if the touch event is detected, and the application currently in the foreground running state is any of the multiple target applications, the contents in step S210 to step S230 are executed again. If the touch event is detected, and the application currently in the foreground running state is not any of the multiple target applications, the target position of the touch point corresponding to the touch event on the touch screen is determined according to the positions of the multiple touch detection points on the touch screen. In this way, when the application with high requirements for the accuracy of the touch operation is in the foreground running, the higher-precision touch point positioning method provided by this application is used to meet the accuracy requirements of the user when using the target application; and when the application with general requirements for the accuracy of the touch operation is in the foreground running, the position of the touch point is directly calculated based on the positions of all the touch detection points on the touch screen, which can also achieve more accurate and faster positioning of the touch point.
[0044] In other embodiments, the electronic device provides the user with a first touch function, and a function control of the first touch function is correspondingly provided, and the user can input a control operation based on the function control to adjust the function state of the first touch function, and the function state includes an on state and an off state. Among them, the first touch function can be generally understood as a high-precision touch response function, and the positioning accuracy of the touch point when the first touch function is in the on state is greater than the positioning accuracy of the touch point when the first touch function is in the off state. Specifically, if the touch event is detected and the function state of the first touch function is in the on state, the contents of step S210 to step S230 are executed.
[0045] In this manner, if the touch event is detected and the functional state of the first touch function is off, the target position of the touch point corresponding to the touch event on the touch screen is determined according to the positions of the multiple touch detection points on the touch screen. In this way, when the user has high-precision requirements for touch operations, the higher-precision touch point positioning method provided by the present application is used to meet the user's high-precision requirements; and when the user does not have high-precision requirements for touch operations, the position of the touch point is directly calculated based on the positions of all touch detection points on the touch screen, which can also achieve more accurate and faster positioning of the touch point.
[0046] In this embodiment, from all the touch detection points on the touch screen, multiple target detection points near the touch point are screened out according to the maximum capacitance change value, and then the target position of the touch point on the touch screen is calculated according to the positions of the multiple target detection points on the touch screen. This can avoid other irrelevant detection points far away from the touch point from participating in the calculation, resulting in a gap between the final calculated position of the touch point and the actual position, and other problems. This improves the accuracy of touch point positioning, thereby improving the accuracy of user touch operations.
[0047] Please refer to Figure 3 , Figure 3 A schematic flow chart of a touch point positioning method provided in another embodiment of the present application is applied to an electronic device, wherein the electronic device includes a touch screen, and a plurality of touch detection points are distributed in the touch screen. Figure 3 The touch point positioning method provided in the embodiment of the present application is described in detail. The touch point positioning method may include the following steps:
[0048] Step S310: if a touch event is detected, obtaining a capacitance change value with a maximum value from a plurality of capacitance change values as a target capacitance value, wherein the plurality of capacitance change values include a capacitance change value detected at each touch detection point when the touch event is detected.
[0049] In this embodiment, the specific implementation of step S310 can refer to the content of the above-mentioned embodiment, which will not be repeated here.
[0050] Step S320: Obtain the product of the target capacitance value and a preset coefficient to obtain a first capacitance threshold, where the preset coefficient is a positive number less than 1.
[0051] Among them, the first capacitance threshold can be regarded as the cancellation amount of the capacitance value corresponding to the detected touch event, and the preset coefficient is a pre-set value, for example, 0.1 or 0.15. The preset coefficient can be based on multiple historical touch events, and the statistical analysis can be used to calculate the most suitable cancellation amount.
[0052] Step S330: based on the first capacitance threshold, acquiring touch detection points that meet the target threshold condition from the multiple touch detection points as the multiple target detection points.
[0053] In some embodiments, see Figure 4 , step S330 may include the following contents from step S331 to step S332:
[0054] Step S331: obtaining a difference between each of the capacitance change values and the first capacitance threshold value to obtain a plurality of capacitance difference values, wherein the plurality of capacitance difference values correspond one-to-one to the plurality of touch detection points.
[0055] Furthermore, the first capacitance threshold may be subtracted from the capacitance change value detected at each touch detection point, that is, multiple capacitance change values may be canceled to the same extent by subtracting the same cancellation amount.
[0056] For example, taking the first capacitance threshold as 90, Figure 5 shows a location distribution diagram of multiple touch detection points, Figure 5 Each data in represents the capacitance change value corresponding to the touch detection point at that position. Figure 5 After subtracting the first capacitance threshold 90 from each capacitance change value in , the capacitance difference corresponding to each touch detection point can be found in Figure 6 .
[0057] Step S332: obtaining a target capacitance difference greater than a second capacitance threshold from the multiple capacitance differences, and obtaining a touch detection point corresponding to the target capacitance difference to obtain the multiple target detection points, wherein the second capacitance threshold is less than the first capacitance threshold.
[0058] Among them, the second capacitance threshold can be a preset value, for example, 0. Generally, the second capacitance threshold is less than the bottoming amount obtained by the above calculation, that is, less than the first capacitance threshold. Based on this, a target capacitance difference greater than the second capacitance threshold can be obtained from multiple capacitance differences, and the touch detection point corresponding to the target capacitance difference can be obtained to obtain multiple target detection points. In other words, the touch detection points corresponding to the capacitance difference less than the second capacitance threshold are all far away from the location of the touch point, and can be regarded as irrelevant detection points. Therefore, these irrelevant detection points can be filtered out to avoid affecting the accuracy of the calculation of the coordinate information of the touch point.
[0059] In order to more intuitively reflect the obtained multiple target detection points, taking the second capacitance threshold as 0 as an example, Figure 6 All data less than 0 in the table are reset to zero. The capacitance difference corresponding to each touch detection point after the reset can be found in Figure 7 , Figure 7 The touch detection points corresponding to the non-zero values in are the multiple target detection points obtained above.
[0060] Step S340: determining a target position of the touch point corresponding to the touch event on the touch screen according to the positions of the multiple target detection points on the touch screen.
[0061] exist Figure 4In the illustrated implementation, the target position of the touch point corresponding to the touch event on the touch screen can be determined according to the position of each target detection point on the touch screen and the capacitance difference corresponding to each target detection point. Specifically, the sum of the capacitance difference corresponding to each target detection point can be obtained, and then the ratio of the capacitance difference of each target detection point to the sum can be obtained, and then the weight parameter corresponding to each target detection point can be determined based on the ratio. Obviously, the closer the target detection point is to the touch point, the larger the weight parameter corresponding to the target detection point is; wherein the sum of the weight parameters corresponding to all target detection points is 1. Further, based on the weight parameter, the two-dimensional coordinate information of all target detection points on the touch screen is weighted and summed to obtain the target coordinate information as the target position of the touch point corresponding to the touch event on the touch screen. In this way, the target position of the touch point on the touch screen is not calculated based on the positions of multiple target detection points on the touch screen, but the capacitance difference corresponding to each target detection point is combined to determine the weight parameter for weighted summation of the coordinate information, so that the target coordinate information of the touch point finally calculated is more accurate.
[0062] In some other implementations, the multiple target detection points may be obtained by directly obtaining a target capacitance difference greater than the first capacitance threshold value among the multiple capacitance change values and obtaining a touch detection point corresponding to the target capacitance difference. Figure 5 For example, if the first capacitance threshold is 90, then directly obtain Figure 5 The touch detection points at the positions where the values greater than 90 are located are used as multiple target detection points. Obviously, the multiple target detection points obtained by this embodiment are different from those in the above embodiment. Figure 7 The multiple target detection points obtained in are the same.
[0063] In this way, the target position of the touch point corresponding to the touch event on the touch screen is determined according to the position of each target detection point on the touch screen and the capacitance change value corresponding to each target detection point. At this time, the sum of the capacitance change values corresponding to each target detection point is obtained, and then the ratio of the capacitance change value of each target detection point to the sum is obtained, and then the weight parameter corresponding to each target detection point is determined based on the ratio. Obviously, the closer the target detection point is to the touch point, the larger the weight parameter corresponding to the target detection point is; wherein, the sum of the weight parameters corresponding to all target detection points is 1. Further, based on the weight parameter, the two-dimensional coordinate information of all target detection points on the touch screen is weighted and summed to obtain the target coordinate information as the target position of the touch point corresponding to the touch event on the touch screen.
[0064] For example, in the related art, the touch point positioning method provided by the present application is not used to directly obtain Figure 5The touch detection point corresponding to the capacitance change value greater than 0 in is used as the target detection point for calculating the position of the touch point on the touch screen. In order to more intuitively reflect the multiple target detection points obtained, Figure 5 All data less than 0 in the table are reset to zero. The capacitance difference corresponding to each touch detection point after the reset can be found in Figure 8 , Figure 8 The touch detection points corresponding to the non-zero values in are the multiple target detection points obtained by the relevant technology. Obviously, there are 28 target detection points obtained by the relevant technology, but the irrelevant detection points far away from the touch point among these 28 target detection points, for example, Figure 8 If the irrelevant detection points are included in the calculation of the coordinate information of the touch points, the calculated coordinate information will obviously be different from the actual coordinate information of the touch points, which will result in low accuracy in the touch point positioning. However, the touch point positioning method provided by the present application obtains 11 target detection points, that is, the irrelevant detection points far from the touch points are filtered out. For example, Figure 7 The touch detection points in the first row and the touch detection points in the last row in the image are calculated by only using the touch detection points near the touch points to calculate the coordinate information of the touch points. This not only reduces the amount of calculation in the coordinate information calculation process and improves the response speed, but also improves the calculation accuracy of the coordinate information of the touch points, that is, improves the accuracy of touch point positioning.
[0065] Moreover, after statistical analysis, the touch positioning method provided by the present application can not only improve the accuracy of touch coordinate positioning, but also improve the linearity of touch coordinates. Fig. 9 , Fig. 9 Series 1 is a line graph of the uniformity of touch point positioning during a sliding touch using the touch point positioning method provided in the statistical related art; Series 2 is a line graph of the uniformity of touch point positioning during a sliding touch using the touch point positioning method provided in the present application. Fig. 9 The horizontal axis represents the number of touch point positioning during the sliding touch process, and the vertical axis represents the distance between the position of each touch point positioning and the position of the last touch point positioning. Obviously, through the touch point positioning method provided by the present application, the touch point positioning jitter is small during the sliding touch process, that is, the linearity of the touch point coordinate positioning is improved.
[0066] In this embodiment, for each touch event, the corresponding first capacitance threshold, i.e., the elimination amount, can be determined based on the maximum capacitance change value of this time, and after eliminating the multiple capacitance change values using the first capacitance threshold, multiple target detection points near the touch point can be accurately screened out from multiple touch detection points based on the multiple capacitance differences after the elimination, and then the touch point can be more accurately located based on the positions of the multiple target detection points on the touch screen. In addition, the first capacitance threshold is not constant, but will be dynamically adjusted with the maximum capacitance change value of each touch event, so as to obtain a first capacitance threshold that is more matched to each touch event, thereby enhancing the accuracy of screening the target detection points, thereby further improving the accuracy of touch point location.
[0067] Please refer to Fig.10 , Fig.10 A schematic diagram of a touch point positioning method provided in another embodiment of the present application is applied to an electronic device, wherein the electronic device includes a touch screen, and a plurality of touch detection points are distributed in the touch screen. Fig.10 The touch point positioning method provided in the embodiment of the present application is described in detail. The touch point positioning method may include the following steps:
[0068] Step S410: if a touch event is detected, obtaining a capacitance change value with a maximum value from a plurality of capacitance change values as a target capacitance value, wherein the plurality of capacitance change values include a capacitance change value detected at each touch detection point when the touch event is detected.
[0069] In this embodiment, the specific implementation of step S410 can refer to the content of the above-mentioned embodiment, which will not be repeated here.
[0070] Step S420: determining a distance threshold corresponding to the target capacitance value, wherein the distance threshold is positively correlated with the target capacitance value.
[0071] In this embodiment, a mapping relationship between a capacitance value and a distance threshold value may be preset, and the mapping relationship may be a linear formula or a distance table, wherein the distance table includes a plurality of capacitance value ranges and a plurality of distance threshold values, wherein the plurality of capacitance value ranges correspond to the plurality of distance threshold values one by one. It can be understood that the greater the change in capacitance value, the greater the touch force of the touch point, and therefore, the more touch detection points affected by the touch event triggered by the touch point will also be, that is, more touch detection points nearby will detect a change in capacitance. Therefore, the distance threshold value is positively correlated with the capacitance value, that is, the greater the capacitance value, the greater the distance threshold value corresponding to the capacitance value.
[0072] Based on this, the distance threshold corresponding to the target capacitance value can be determined based on the aforementioned mapping relationship. For example, if the target capacitance value is 600, the determined distance threshold can be Fig.11 As shown in d1; if the target capacitance value is 800, the distance threshold can be determined as Fig.11 d2 is shown. Where d1 is smaller than d2.
[0073] Step S430: acquiring the distance between each of the touch detection points and the target touch detection point to obtain a plurality of distances, wherein the target touch detection point is a touch detection point for detecting the target capacitance value, and the plurality of distances correspond one-to-one to the plurality of touch detection points.
[0074] Step S440: acquiring a target distance that is less than the distance threshold from the multiple distances, and acquiring a touch detection point corresponding to the target distance to obtain the multiple target detection points.
[0075] That is to say, from the multiple touch detection points, the detection points located in the target area are selected as the above-mentioned target detection points; wherein the target area can be as follows: Fig.11 The circular area shown has the target touch detection point as the center and the distance threshold as the radius. Of course, it can also be a rectangular area with the target touch detection point as the center and the distance threshold as the side length, which is not limited in this embodiment.
[0076] Step S450: determining a target position of a touch point corresponding to the touch event on the touch screen according to the positions of the multiple target detection points on the touch screen.
[0077] In this embodiment, the specific implementation of step S450 can refer to the content of the above-mentioned embodiment, which will not be repeated here.
[0078] In this embodiment, considering that the greater the change in capacitance value, the greater the touch force of the touch point, the more touch detection points will be affected by the touch event triggered by the touch point, that is, more touch detection points nearby will detect the change in capacitance. Based on this, the target area is divided by the maximum capacitance change value, and only the multiple target detection points contained in the target area are used to calculate the position of the touch point. It can also avoid other irrelevant detection points far from the touch point from participating in the calculation, resulting in the difference between the final calculated position of the touch point and the actual position. The problem occurs, that is, the accuracy of touch point positioning is improved, and then the accuracy of user touch operation is improved.
[0079] Please refer to Fig.12, which shows a structural block diagram of a touch point positioning device 500 provided in an embodiment of the present application. The device 500 may include: a capacitance value acquisition module 510, a detection point determination module 520 and a touch point position determination module 530.
[0080] The capacitance value acquisition module 510 is used to obtain the capacitance change value with the largest value from multiple capacitance change values as the target capacitance value if a touch event is detected. The multiple capacitance change values include the capacitance change value detected at each touch detection point when the touch event is detected.
[0081] The detection point determination module 520 is used to determine, based on the target capacitance value, from the plurality of touch detection points, a plurality of target detection points at which the capacitance change value is detected due to the touch event.
[0082] The touch point position determination module 530 is used to determine the target position of the touch point corresponding to the touch event on the touch screen according to the positions of the multiple target detection points on the touch screen.
[0083] In some embodiments, the detection point determination module 520 may include: a first threshold value acquisition unit and a detection point determination unit. The first threshold value acquisition unit may be used to obtain the product of the target capacitance value and a preset coefficient to obtain a first capacitance threshold, and the preset coefficient is a positive number less than 1. The detection point determination unit may be used to obtain, based on the first capacitance threshold, a touch detection point that meets the target threshold condition from the multiple touch detection points as the multiple target detection points.
[0084] In this manner, the detection point determination unit can be specifically used to: obtain the difference between each of the capacitance change values and the first capacitance threshold to obtain multiple capacitance differences, and the multiple capacitance differences correspond one-to-one to the multiple touch detection points; obtain a target capacitance difference greater than a second capacitance threshold from the multiple capacitance differences, and obtain the touch detection point corresponding to the target capacitance difference to obtain the multiple target detection points, and the second capacitance threshold is less than the first capacitance threshold.
[0085] In this manner, the touch point position determination module 530 can be specifically used to determine the target position of the touch point corresponding to the touch event on the touch screen based on the position of each target detection point on the touch screen and the capacitance difference corresponding to each target detection point.
[0086] In this manner, the detection point determination unit may also be specifically used to: obtain a target capacitance difference greater than the first capacitance threshold value among the multiple capacitance change values, and obtain a touch detection point corresponding to the target capacitance difference to obtain the multiple target detection points.
[0087] In other embodiments, the detection point determination module 520 may include: a distance threshold determination unit, a distance acquisition unit, and a detection point determination unit. Among them, the distance threshold determination unit can be used to determine a distance threshold corresponding to the target capacitance value, and the distance threshold is positively correlated with the target capacitance value. The distance acquisition unit can be used to obtain the distance between each of the touch detection points and the target touch detection point to obtain multiple distances, the target touch detection point is a touch detection point for detecting the target capacitance value, and the multiple distances correspond one-to-one to the multiple touch detection points. The detection point determination unit can be used to obtain a target distance less than the distance threshold from the multiple distances, and obtain the touch detection point corresponding to the target distance to obtain the multiple target detection points.
[0088] In some embodiments, the capacitance value acquisition module 510 can be specifically used to obtain the capacitance change value with the largest value from the multiple capacitance change values as the target capacitance value if the touch event is detected and the application currently in the foreground running state is any target application among multiple target applications.
[0089] In other embodiments, the capacitance value acquisition module 510 may be specifically configured to acquire a capacitance change value with the largest value from multiple capacitance change values as a target capacitance value if the touch event is detected and the functional state of the first touch function is on.
[0090] In this manner, the touch point position determination module 530 can also be specifically used to determine the target position of the touch point corresponding to the touch event on the touch screen based on the positions of the multiple touch detection points on the touch screen if the touch event is detected and the functional state of the first touch function is off.
[0091] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0092] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0093] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0094] To summarize, if a touch event is detected, the capacitance change value with the largest value is obtained from multiple capacitance change values as the target capacitance value, and the multiple capacitance change values include the capacitance change value detected by each touch detection point when the touch event is detected; based on the target capacitance value, multiple target detection points where capacitance change values are detected due to the touch event are determined from the multiple touch detection points; and according to the positions of the multiple target detection points on the touch screen, the target position of the touch point corresponding to the touch event on the touch screen is determined. Because when a touch event occurs, the closer the capacitance change value is to the touch point position, the greater the capacitance change value will be, and because the capacitance change values detected by different touch detection points near the touch point will follow certain rules in actual applications; based on this, by obtaining the maximum capacitance change value, after determining the touch detection point closest to the touch point, it is possible to further screen out multiple target detection points from all touch detection points that detect capacitance change values caused by the touch event based on the maximum capacitance change value, that is, multiple target detection points that are closer to the touch point, and then calculate the target position of the touch point on the touch screen only based on the multiple target detection points that are closer to the touch point, which can avoid other irrelevant detection points that are far away from the touch point from participating in the calculation, resulting in a gap between the final calculated position of the touch point and the actual position, and other problems, that is, improve the accuracy of touch point positioning, and thus improve the accuracy of user touch operations.
[0095] The following will be combined Fig.13 An electronic device provided by the present application is described.
[0096] Reference Fig.13 , Fig.13 The structural block diagram of an electronic device 600 provided in an embodiment of the present application is shown, and the above method provided in an embodiment of the present application can be executed by the electronic device 600. The electronic device can be an electronic terminal with a data processing function, and the electronic terminal includes but is not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3) player, and an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) player, etc.
[0097] The electronic device 600 in the embodiment of the present application may include one or more of the following components: a processor 601, a memory 602, and one or more applications, wherein the one or more applications may be stored in the memory 602 and configured to be executed by one or more processors 601, and the one or more programs are configured to execute the method described in the aforementioned method embodiment.
[0098] The processor 601 may include one or more processing cores. The processor 601 uses various interfaces and lines to connect the various parts of the entire electronic device 600, and executes various functions and processes data of the electronic device 600 by running or executing instructions, programs, code sets or instruction sets stored in the memory 602, and calling data stored in the memory 602. Optionally, the processor 601 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 601 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem can also be integrated into the processor 601 and implemented separately through a communication chip.
[0099] The memory 602 may include a random access memory (RAM) or a read-only memory (ROM). The memory 602 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as the various corresponding relationships described above) created by the electronic device 600 during use.
[0100] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0101] In several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or modules, which may be electrical, mechanical or other forms.
[0102] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0103] Please refer to Fig.14 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 700 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0104] The computer readable storage medium 700 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 700 includes a non-transitory computer-readable storage medium. The computer readable storage medium 700 has storage space for program code 710 that performs any method step of the above method. These program codes can be read from or written to one or more computer program products. The program code 710 can be compressed, for example, in an appropriate form.
[0105] In some embodiments, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the steps in the above-mentioned method embodiments.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A touch point positioning method, characterized in that: Applied to an electronic device, the electronic device includes a touch screen, and a plurality of touch detection points are distributed in the touch screen. The method includes: If a touch event is detected, obtaining a capacitance change value with a maximum value from a plurality of capacitance change values as a target capacitance value, wherein the plurality of capacitance change values include a capacitance change value detected at each of the touch detection points when the touch event is detected; Based on the target capacitance value, determining, from the plurality of touch detection points, a plurality of target detection points where the capacitance change value is detected due to the touch event; According to the positions of the multiple target detection points on the touch screen, a target position of the touch point corresponding to the touch event on the touch screen is determined.
2. The method according to claim 1, characterized in that The step of determining, based on the target capacitance value, from the plurality of touch detection points, a plurality of target detection points where the capacitance change value is detected due to the touch event, comprises: Obtaining the product of the target capacitance value and a preset coefficient to obtain a first capacitance threshold, wherein the preset coefficient is a positive number less than 1; Based on the first capacitance threshold, touch detection points meeting a target threshold condition are acquired from the plurality of touch detection points as the plurality of target detection points.
3. The method according to claim 2, characterized in that The acquiring, based on the first capacitance threshold, touch detection points meeting a target threshold condition from the plurality of touch detection points as the plurality of target detection points comprises: Obtaining a difference between each of the capacitance change values and the first capacitance threshold value to obtain a plurality of capacitance difference values, wherein the plurality of capacitance difference values correspond one-to-one to the plurality of touch detection points; A target capacitance difference greater than a second capacitance threshold is obtained from the multiple capacitance differences, and a touch detection point corresponding to the target capacitance difference is obtained to obtain the multiple target detection points, wherein the second capacitance threshold is less than the first capacitance threshold.
4. The method according to claim 3, characterized in that The determining, according to the positions of the multiple target detection points on the touch screen, the target position of the touch point corresponding to the touch event on the touch screen comprises: The target position of the touch point corresponding to the touch event on the touch screen is determined according to the position of each target detection point on the touch screen and the capacitance difference corresponding to each target detection point.
5. The method according to claim 2, characterized in that: The acquiring, based on the first capacitance threshold, touch detection points meeting a target threshold condition from the plurality of touch detection points as the plurality of target detection points comprises: A target capacitance difference value greater than the first capacitance threshold value among the multiple capacitance change values is obtained, and a touch detection point corresponding to the target capacitance difference value is obtained to obtain the multiple target detection points.
6. The method according to claim 1, characterized in that The step of determining, based on the target capacitance value, from the plurality of touch detection points, a plurality of target detection points where the capacitance change value is detected due to the touch event, comprises: Determining a distance threshold corresponding to the target capacitance value, wherein the distance threshold is positively correlated with the target capacitance value; Acquire the distance between each of the touch detection points and the target touch detection point to obtain a plurality of distances, wherein the target touch detection point is a touch detection point for detecting the target capacitance value, and the plurality of distances correspond one-to-one to the plurality of touch detection points; A target distance that is less than the distance threshold is acquired from the multiple distances, and a touch detection point corresponding to the target distance is acquired to obtain the multiple target detection points.
7. The method according to any one of claims 1 to 6, characterized in that: If a touch event is detected, obtaining a capacitance change value with the largest value from a plurality of capacitance change values as a target capacitance value includes: If the touch event is detected and the application currently in the foreground running state is any target application among the multiple target applications, a capacitance change value with the largest value is obtained from the multiple capacitance change values as the target capacitance value.
8. The method according to any one of claims 1 to 6, characterized in that: If a touch event is detected, obtaining a capacitance change value with the largest value from a plurality of capacitance change values as a target capacitance value includes: If the touch event is detected and the functional state of the first touch function is on, obtaining a capacitance change value with the largest value from the multiple capacitance change values as a target capacitance value; The method further comprises: If the touch event is detected and the functional state of the first touch function is off, the target position of the touch point corresponding to the touch event on the touch screen is determined according to the positions of the multiple touch detection points on the touch screen.
9. A touch point positioning device, characterized in that: Applied to an electronic device, the electronic device includes a touch screen, and a plurality of touch detection points are distributed in the touch screen. The device includes: a capacitance value acquisition module, configured to acquire a capacitance change value with a maximum value from a plurality of capacitance change values as a target capacitance value if a touch event is detected, wherein the plurality of capacitance change values include a capacitance change value detected at each of the touch detection points when the touch event is detected; a detection point determination module, configured to determine, based on the target capacitance value, from the plurality of touch detection points, a plurality of target detection points where the capacitance change value is detected due to the touch event; The touch point position determination module is used to determine the target position of the touch point corresponding to the touch event on the touch screen according to the positions of the multiple target detection points on the touch screen.
10. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 8.
