Touch position processing method and device and electronic equipment

By accumulating the moving distance in the electronic device and entering the position lock state when the threshold is reached, the output touch position is maintained, and the problem of unstable position output in touch operation is solved, and the control stability is improved.

CN119088251APending Publication Date: 2024-12-06GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411179143.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

During the touch operation, the user's touch position output may still change after actually stopping movement, resulting in insufficient control stability.

Method used

By accumulating the moving distance when there is a touch operation, if the accumulated moving distance meets the threshold condition, it enters the position lock state, and the touch position outputted each time is kept as the touch position closest to the time when the detection time distance enters the lock state.

Benefits of technology

Improves stability during touch control, and avoids the situation where the touch object actually stops moving but the output position still changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088251A_ABST
    Figure CN119088251A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a touch position processing method and device and electronic equipment, in the method, under the condition that a touch operation acts on a screen, an accumulated moving distance obtained by adding a plurality of moving distances obtained in sequence can be obtained, so that the touch position can be processed under the condition that the accumulated moving distance meets a first threshold condition. And entering a position locking state. In this way, in the process that the user performs the touch operation on the screen, the movement distances detected multiple times can be accumulated to obtain the accumulated movement distance, and then under the condition that the accumulated movement distance meets the first threshold condition, it is indicated that the touch object (for example, the finger of the user) currently performing the touch operation stops moving, and the user experience is improved. The position locking state is triggered to keep the touch control position output each time, so that the situation that the touch control object actually stops moving but the output touch control position still changes is avoided, and the stability in the touch control process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and more specifically, to a touch position processing method, device and electronic device. Background Art

[0002] With the development of technology, users can control electronic devices by touching the screen of electronic devices. For example, users can touch the application interface to switch the content currently displayed on the screen. However, in the relevant touch control process, there is still a problem of instability. Summary of the invention

[0003] In view of the above problems, the present application proposes a touch position processing method, device and electronic device to improve the above problems.

[0004] In a first aspect, the present application provides a touch position processing method, which is applied to an electronic device, and the method includes: when a touch operation is applied to the screen, acquiring an accumulated moving distance, wherein the accumulated moving distance is obtained by adding a plurality of moving distances obtained in sequence, wherein each moving distance is obtained based on two adjacent touch positions detected during the touch operation; if the acquired accumulated moving distance meets a first threshold condition, entering a position lock state, wherein in the position lock state, each output touch position is maintained as a target touch position, wherein the target touch position is a touch position whose detection time is closest to the time of entering the position lock state, and the output touch position is used to control the electronic device.

[0005] In a second aspect, the present application provides a device for determining a touch position, which runs on an electronic device, and the device includes: a distance acquisition unit, which is used to acquire an accumulated moving distance when a touch operation is applied to the screen, wherein the accumulated moving distance is obtained by adding a plurality of moving distances obtained in sequence, wherein each moving distance is obtained based on two adjacent touch positions detected during the touch operation; a position determination unit, which is used to enter a position lock state if the accumulated moving distance acquired meets a first threshold condition, wherein in the position lock state, each output touch position is maintained as a target touch position, wherein the target touch position is a touch position whose detection time is closest to the time of entering the position lock state, and the output touch position is used to control the electronic device.

[0006] In a third aspect, the present application provides an electronic device comprising a screen, one or more processors and a memory; 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.

[0007] In a fourth aspect, the present application provides a computer-readable storage medium storing a program code executable by a processor, wherein the computer-readable storage medium includes the stored program code, wherein the above method is executed when the program code is run.

[0008] The present application provides a touch position processing method, device and electronic device, in which, when a touch operation is applied to the screen, a cumulative moving distance can be obtained by adding up multiple moving distances obtained in sequence, so that when the cumulative moving distance meets the first threshold condition, the position lock state is entered, wherein in the position lock state, the electronic device can keep the touch position output each time as the touch position with the closest detection time to the time of entering the position lock state. Thus, through the above method, when the user performs a touch operation on the screen, the moving distance detected multiple times can be accumulated to obtain the cumulative moving distance, and then when the cumulative moving distance meets the first threshold condition, it means that the touch object (for example, the user's finger) currently performing the touch operation has stopped moving, and then the position lock state is entered by triggering to maintain the touch position output each time, thereby avoiding the situation that the touch object has actually stopped moving, but the output touch position is still changing, so as to improve the stability in the touch control process. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] 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.

[0010] Figure 1 A flow chart of a touch position processing method proposed in an embodiment of the present application is shown;

[0011] Figure 2 A schematic diagram showing field of view switching in a game scene in an embodiment of the present application is shown;

[0012] Figure 3 A schematic diagram of obtaining the accumulated moving distance in an embodiment of the present application is shown;

[0013] Figure 4 A schematic diagram showing how to keep the output touch position unchanged in an embodiment of the present application is shown;

[0014] Figure 5 A schematic diagram showing multiple moving directions in an embodiment of the present application;

[0015] Figure 6 A flow chart of a touch position processing method proposed in another embodiment of the present application is shown;

[0016] Figure 7 A schematic diagram of a time window in an embodiment of the present application is shown;

[0017] Figure 8 A flow chart of a touch position processing method proposed in another embodiment of the present application is shown;

[0018] Fig. 9 A schematic diagram of determining the accumulated moving distance in an embodiment of the present application is shown;

[0019] Fig.10 A flow chart of a touch position processing method proposed in another embodiment of the present application is shown;

[0020] Fig.11 A structural block diagram of a touch position processing device proposed in an embodiment of the present application is shown;

[0021] Fig.12 A structural block diagram of an electronic device for executing a touch position processing method according to an embodiment of the present application is shown;

[0022] Fig.13 It is a storage unit of the embodiment of the present application for storing or carrying a program code for implementing the touch position processing method according to the embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 creative work are within the scope of protection of this application.

[0024] With the rapid development of science and technology, touch technology, as a major breakthrough in the field of human-computer interaction, has profoundly changed the way we interact with electronic devices. From the initial resistive touch screen to the widely used capacitive, pressure sensing and even more advanced ultrasonic touch technology, users can not only easily control a variety of electronic devices such as smartphones, tablets, smart wearable devices and even large touch displays through simple touch, slide and even multi-touch gestures, which greatly improves the convenience and intuitiveness of operation.

[0025] In specific application scenarios, users can touch the application interface to switch the content currently displayed on the screen. For example, in a game interface, users can touch the game interface to change the field of view of the game interface currently displayed on the screen. However, although touch technology has brought unprecedented convenience, there are still some stability and reliability issues in actual application.

[0026] Therefore, the inventor proposes a touch position processing method, device and electronic device in the present application, in which, when a touch operation is applied to the screen, a cumulative moving distance can be obtained by adding up multiple moving distances obtained in sequence, so that when the cumulative moving distance meets the first threshold condition, the position lock state is entered, wherein, in the position lock state, the electronic device can keep the touch position output each time as the touch position with the closest detection time to the time of entering the position lock state. Thus, through the above method, during the user's touch operation on the screen, the moving distance detected multiple times can be accumulated to obtain the cumulative moving distance, and then when the cumulative moving distance meets the first threshold condition, it means that the touch object (for example, the user's finger) currently performing the touch operation has stopped moving, and then the position lock state is entered by triggering to maintain the touch position output each time, thereby avoiding the situation that the touch object has actually stopped moving, but the output touch position is still changing, so as to improve the stability in the touch control process.

[0027] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0028] See also Figure 1 The present application provides a touch position processing method, which is applied to electronic equipment, and the method includes:

[0029] S110: When a touch operation is applied to the screen, an accumulated moving distance is acquired, where the accumulated moving distance is obtained by adding a plurality of moving distances obtained in sequence, wherein each moving distance is obtained based on two adjacent touch positions detected during the touch operation.

[0030] In an embodiment of the present application, a user can control an electronic device by performing a touch operation on the screen. Among them, the touch operation can be a sliding operation or a dragging operation. For example, when the electronic device currently displays a game interface, the user can change the field of view in the game interface by performing a sliding operation on the game interface. In the field of games, field of view is simply the ability to "see", that is, the range that the player can observe in the game. For example, a game map is displayed in the game interface. In some cases, the game map is usually large, which causes the content in the game map to be unable to be displayed on the screen at one time. In this case, the user can perform a sliding operation on the screen to switch the field of view, and then switch the content in the game map that was not previously displayed on the screen to the screen for display. Correspondingly, when the content in the game map that was not previously displayed on the screen is switched to the screen for display, the display position of the content originally displayed on the screen in the game map will also be moved, or even moved out of the screen. Among them, moving the content out of the screen can be understood as not displaying the content.

[0031] For example, Figure 2 As shown, in Figure 2 In the game interface 10 shown in the figure, a game character 11 is displayed. In this case, the user can switch the field of view by sliding the game interface 10 (the sliding direction is the direction shown by the dotted arrow in the figure) to switch the game character 12 that was not originally displayed on the screen to the screen for display. Figure 2 Comparison between the upper middle image and the lower middle image shows that the position of the game character 11 on the screen changes with the switching of the field of view. For example, the game character 11 moves from the middle position of the screen to the direction indicated by the dotted arrow.

[0032] After the user starts to perform a touch operation, the electronic device can detect the touch position of the touch object (finger or stylus) that performs the touch operation. It should be noted that in an embodiment of the present application, the touch position can be a touch position directly determined by the electronic device through capacitance data and the correspondence between capacitance data and touch position. Alternatively, the touch position can be the touch position obtained after the electronic device performs filtering processing on the directly determined touch position. Among them, in actual use of the touch system, due to various external factors (such as electromagnetic interference, power supply fluctuations, imperfections in hardware manufacturing processes, etc.) and internal factors (such as quantization errors in signal conversion, noise of the sensor itself, etc.), the collected capacitance data may contain certain noise. These noises will cause the calculated touch position to fluctuate, thereby affecting the accuracy and stability of the touch. Therefore, filtering processing is beneficial to improving the stability of the obtained touch position.

[0033] In the embodiment of the present application, the capacitance data may be mutual capacitance or self-capacitance. Mutual capacitance is a physical quantity that describes the electric field interaction and charge accumulation between two conductors. Self-capacitance is a physical quantity that describes the capacitance of a conductor relative to the ground.

[0034] If the screen of the electronic device is a mutual capacitance screen, the electronic device will detect the touch position based on mutual capacitance. If the screen of the electronic device is a self capacitance screen, the electronic device will detect the touch position based on self capacitance.

[0035] Among them, the structure of the self-capacitive screen is to make a horizontal and vertical electrode array on the glass surface with conductive material. These horizontal and vertical electrodes respectively form a capacitor with the ground. This capacitance is what is commonly called self-capacitance, that is, the capacitance of the electrode to the ground. When the touch object (for example, a finger) touches the screen, the capacitance of the touch object will be superimposed on the capacitance of the screen body, increasing the capacitance of the screen body, and the capacitance change caused by the increase in capacitance here can be understood as a capacitance data for touch position detection. The mutual capacitance screen also uses conductive materials to make horizontal electrodes and vertical electrodes on the glass surface, but the difference from the self-capacitance screen is that the two groups of electrodes in the mutual capacitance screen will form a capacitor where they intersect, that is, the two groups of electrodes constitute the two poles of the capacitor respectively. When the touch object touches the capacitive screen, it affects the coupling between the two electrodes near the touch point, thereby changing the capacitance between the two electrodes, and the changed capacitance here can be understood as a capacitance data for touch position detection.

[0036] As a method, during the current touch position detection process, the initial touch position corresponding to the current capacitance data can be obtained first. The initial touch position can also be understood as the touch position directly obtained based on the current capacitance data. Then, the difference between the initial touch position and the touch position detected last time is obtained, and the difference is multiplied by the filter coefficient to obtain an incremental value. The touch position detected last time is then added to the incremental value to obtain the touch position detected this time. For example, the touch position can be calculated based on the following formula, which is:

[0037] Output coordinates = output coordinates calculated last time + filter coefficient × (the increment of this coordinate compared to the previous coordinate)

[0038] The output coordinates are the touch position detected this time, the output coordinates calculated last time are the touch position detected last time, and the current coordinates are the initial touch position corresponding to the current capacitance data.

[0039] After each touch position is detected, the corresponding moving distance can be determined based on the touch position detected this time and the touch position detected last time. The moving distance can represent the distance between two adjacent touch positions detected. After multiple moving distances are obtained in sequence based on the same method, the corresponding cumulative moving distance can be calculated based on the multiple moving distances obtained in sequence. The cumulative moving distance can be obtained by adding the multiple moving distances.

[0040] For example, Figure 3 As shown, while the touch operation remains in effect, the electronic device detects touch position P1, touch position P2, touch position P3, touch position P4, and touch position P5 in sequence. Among them, touch position P1 and touch position P2 are obtained by two adjacent detections, and the corresponding moving distance D1 can be determined. Touch position P2 and touch position P3 are obtained by two adjacent detections, and the corresponding moving distance D2 can be determined. Touch position P3 and touch position P4 are obtained by two adjacent detections, and the corresponding moving distance D3 can be determined. Touch position P4 and touch position P5 are obtained by two adjacent detections, and the corresponding moving distance D4 can be determined. Based on Figure 3 In the case shown, the multiple moving distances obtained in sequence include moving distance D1, moving distance D2, moving distance D3, and moving distance D4. Furthermore, a cumulative moving distance can be obtained based on moving distance D1, moving distance D2, moving distance D3, and moving distance D4.

[0041] S120: If the accumulated moving distance obtained meets the first threshold condition, the position lock state is entered, wherein in the position lock state, the touch position output each time is maintained as the target touch position, the target touch position is the touch position whose detection time is closest to the time of entering the position lock state, and the output touch position is used to control the electronic device.

[0042] In an embodiment of the present application, the accumulated moving distance can be acquired multiple times while the touch operation remains in effect. Optionally, it can be acquired periodically based on a preset time window. Optionally, the accumulated moving distance can also be acquired each time the touch position is detected. After the accumulated moving distance is acquired, it can be detected whether the accumulated moving distance meets the first threshold condition. The first threshold condition is a condition that characterizes that the touch object that acts on the touch operation has stopped moving. When the touch object stops moving, it will still maintain contact with the screen.

[0043] In the embodiment of the present application, there are multiple implementations of the first threshold condition. As one method, the first threshold condition includes: the accumulated moving distance is less than or equal to the first distance threshold. In this method, if it is detected that the accumulated moving distance is less than or equal to the first distance threshold, the position locking state is entered.

[0044] It should be noted that, regardless of whether the position lock state is entered, when there is a touch operation, the electronic device will detect the position of the current user's touch operation, and for each detection, there will be an output of the touch position, wherein the output touch position can be understood as the touch position that the electronic device can actually use to control the device. Then, when the detection of the touch position corresponds to the output of the touch position, the touch position will be output each time the touch position is detected. Among them, when the position lock state is not entered, the electronic device will directly use each detected touch position as the output touch position. Among them, the control of the electronic device can include controlling the application in the electronic device, controlling the electronic device (such as a camera) included in the electronic device, etc.

[0045] After entering the position lock state, the electronic device no longer uses the touch position detected each time as the touch position to be output, but can directly use the target touch position as the touch position to be output each time when the touch position needs to be output, so as to keep the touch position output each time unchanged, and make the touch position output by the electronic device consistent with the position where the touch object actually stops when the touch object actually stops. Among them, the target touch position is the touch position whose detection time is closest to the time of entering the position lock state. Among them, the detection time of the touch position can be understood as the time when the touch position is detected.

[0046] For example, Figure 4 As shown, when the electronic device detects the touch position P7, it may be at the end of the time window, and determines that it has entered the position lock state based on the accumulated movement distance corresponding to the current time window. In this case, because the position lock state is determined to be entered after the touch position P7 is detected, the detection time of the touch position P7 is closest to the time when the position lock state is determined to be entered. Therefore, the touch position P7 can be used as the target touch position. Figure 4As shown, when the position lock state is entered, the touch positions collected include: touch position P8, touch position P9 and touch position P10. Based on the above definition of the position lock state, when the touch position P8 is detected, the actual corresponding output is the touch position P7. Similarly, when the touch position P9 is detected, the actual corresponding output is the touch position P7. When the touch position P10 is detected, the actual corresponding output is the touch position P7, so as to achieve that after entering the position lock state, the output touch position remains unchanged.

[0047] It should be noted that, when the electronic device itself defines multiple directions for the movement of the touch object, each time the touch object moves, there may be corresponding movement distances in multiple directions. Figure 5 As shown, the electronic device can define the movement of the touch object in the X-axis direction and the Y-axis direction. In this case, if the touch object moves from the touch position P1 to the touch position P2, the touch object will have a corresponding movement distance in the X-axis direction and a corresponding movement distance in the Y-axis direction. Optionally, the electronic device can obtain the accumulated movement distance in multiple directions respectively, and detect the accumulated movement distance in each direction.

[0048] As a method, the accumulated moving distance includes the accumulated moving distance in the first direction and the accumulated moving distance in the second direction, the accumulated moving distance in the first direction is obtained according to the multiple moving distances in the first direction obtained in sequence, and the accumulated moving distance in the second direction is obtained according to the multiple moving distances in the second direction obtained in sequence; in this case, if the accumulated moving distance in the first direction satisfies the first threshold condition, and the accumulated moving distance in the second direction satisfies the first threshold condition, then the position locking state is entered. Optionally, the first direction can be the aforementioned X-axis direction, and the second direction can be the aforementioned Y-axis direction, or the first direction can be the aforementioned Y-axis direction, and the second direction can be the aforementioned X-axis direction.

[0049] Among them, after entering the position lock state, in order to further adapt to the actual operation of the touch operation performed by the user, the electronic device can also compare the touch position detected each time with the target touch position to obtain the difference between the touch position detected each time and the target touch position. If the difference meets the second threshold condition, the position lock state is exited. Correspondingly, if the difference does not meet the second threshold condition, the position lock state is maintained. Among them, the second threshold condition represents the condition that the touch object has moved over a large range.

[0050] In addition, in the embodiment of the present application, the mechanism for the electronic device to exit the position lock state is not limited to the above-mentioned method. For example, as a method, the electronic device can determine whether to exit the position lock state according to the duration of being in the position lock state. It should be noted that in the process of the user controlling the electronic device through touch operation, the same touch position is usually not stayed for a long time. For example, especially when the user needs to pay attention to the changes in the content on the screen in real time. For example, when the electronic device displays the game interface, the user needs to pay attention to the situation of the game interface in real time (for example, the position change of the game character and the refresh of the game props, etc.), so the user usually only switches the field of view by sliding operation in a short time. Based on the foregoing content, when the electronic device enters the position lock state, the timing can be started synchronously, and if the timing reaches the preset duration, the position lock state can be directly exited. Among them, the preset duration represents the duration from the stop of the touch object to the resumption of movement, or it can represent the duration from the stop of the touch object to the departure from the screen.

[0051] In the embodiment of the present application, there may be multiple ways to determine the preset duration.

[0052] As a method, the aforementioned preset duration can be determined based on the target dwell duration obtained by historical statistics. In this method, the electronic device can count the duration of each dwell when a dwell occurs during the process of detecting the touch operation. Then, the average dwell duration over a period of time is obtained as the target dwell duration. Among them, by counting the dwell duration over a period of time, the user's operating habits in the recent period of time can be understood, and then the preset duration can be determined adaptively according to the user's recent operating habits.

[0053] Optionally, the electronic device can also configure the corresponding target stay time for each application separately. It should be noted that when the user performs touch operation on each application, the corresponding operation situation may be different. For example, when the user uses the game program, he may need to pay more attention to the progress of the game in real time, and then when performing touch operation, the touch object of the touch operation will not stay in the same position for a long time. For example, in the game battle scene, the user may use the sliding operation in the small map to switch the field of view, but because of the needs of the game battle, the user needs to pay more attention to the dynamics of other game characters (for example, the position of other game characters or the skills released by other game characters) in a more timely manner. Therefore, the finger of the sliding operation will not stay in one position for a long time. For another example, when the user uses the video program, because the video can be played back, it may not be too concerned about the real-time display of the video, and then when the user performs the touch operation, the touch object of the touch operation may stay in one position for a long time.

[0054] In this way, a correspondence between an application and a target stay time can be established. Further, when it is necessary to determine the target stay time, the corresponding target stay time can be determined according to the currently controlled application. For example, as shown in the following table:

[0055] ID app Duration 1 Application A1 T1 2 Application A2 T2

[0056] As shown in the table above, the target dwell time corresponding to application A1 is duration T1, and the target dwell time corresponding to application A2 is duration T2. ​​If the electronic device detects that the touch operation is to control application A1, then the preset duration determined is T1. Correspondingly, if the electronic device detects that the touch operation is to control application A2, then the preset duration determined is T2.

[0057] As another approach, the aforementioned preset duration may also be pre-configured by a developer.

[0058] A touch position processing method provided in this embodiment allows, through the above-mentioned method, during the process of the user performing a touch operation on the screen, to accumulate the movement distances detected multiple times to obtain the accumulated movement distance, and then, when the accumulated movement distance satisfies the first threshold condition, it means that the touch object (for example, the user's finger) currently performing the touch operation has stopped moving, and then, by triggering to enter the position locking state, the touch position output each time is maintained, thereby avoiding the situation where the touch object has actually stopped moving, but the output touch position is still changing, so as to improve the stability of the touch control process.

[0059] See also Figure 6 The present application provides a touch position processing method, which is applied to electronic equipment, and the method includes:

[0060] S210: When a touch operation is performed on the screen, if the end time of the current time window is reached, the accumulated moving distance in the current time window is obtained, and the accumulated moving distance is obtained by adding up multiple moving distances obtained in sequence in the current time window, wherein each moving distance is obtained based on two adjacent touch positions detected during the touch operation.

[0061] In the embodiment of the present application, the electronic device can periodically acquire the accumulated moving distance, wherein each detection period can be understood as a time window. When the end time of the current time window is reached, it means that the current detection period is over, and then the multiple moving distances obtained in the current time window can be acquired, so as to obtain the corresponding accumulated moving distance according to the multiple moving distances obtained in the current time window. For example, Figure 7As shown, within the time window W1, the multiple moving distances sequentially acquired by the electronic device include: moving distance D5, moving distance D6, moving distance D7, moving distance D8, and moving distance D9. Then, when the end time of the time window W1 is reached, the moving distances D5, D6, D7, D8, and D9 can be added together to obtain the cumulative moving distance corresponding to the time window W1. Correspondingly, the moving distances D10 to D14 acquired sequentially can be added together to obtain the cumulative moving distance corresponding to the time window W2, and the moving distances D15 to D19 acquired sequentially can be added together to obtain the cumulative moving distance corresponding to the time window W3.

[0062] In an embodiment of the present application, the length of the time window determines the frequency of acquiring the cumulative moving distance, and also determines the frequency of the electronic device detecting whether the touch object has stopped. For example, when the time window is shorter, the frequency of the electronic device detecting whether the touch object has stopped will be higher, and the relative detection will be more timely. For example, when the length of the time window is 2400ms, it is equivalent to that the electronic device will acquire the cumulative moving distance once at least 2400ms to detect whether the touch object has stopped. For another example, when the length of the time window is 250ms, the electronic device can acquire the cumulative moving distance once every 250ms. Therefore, the electronic device can change the frequency of the electronic device detecting whether the touch object has stopped by changing the length of the time window.

[0063] In the embodiment of the present application, the electronic device can determine the length of the time window in a variety of ways.

[0064] As a method, the length of the time window is determined based on the target application, which is an application controlled based on the touch operation. For example, if the electronic device controls the currently running game program through a touch operation, the length of the time window can be determined based on the game program. It should be noted that if the electronic device currently runs only one application, the electronic device can use the running application as the application controlled by the touch operation. If the electronic device runs multiple applications at the same time, the application directly affected by the touch operation can be used as the controlled application.

[0065] Optionally, in this way, after acquiring the target application, the electronic device can first detect whether the target application is an application in the whitelist. Among them, the application in the whitelist can be understood as an application that can be used to determine the length of the time window. If the target application is an application in the whitelist, the length of the time window can be determined based on the target application. If the target application is not an application in the whitelist, the default time window length can be used. Among them, the time window length corresponding to the application in the whitelist can be shorter than the default time window length. Exemplarily, the default time window length is 2400ms, and the time window length corresponding to the application in the whitelist can be 250ms.

[0066] As another approach, the length of the time window may be determined based on the current operating state of the electronic device.

[0067] It should be noted that when the time window is relatively short, the frequency of the electronic device acquiring the accumulated moving distance will be higher, and the resource consumption of the electronic device will be greater. In an embodiment of the present application, the electronic device can divide the time into a low-task time period and a high-task time period based on the operation of the electronic device. Among them, the low-task time period can be understood as a time period with relatively fewer tasks to be processed by the electronic device, and the high-task time period can be understood as a time period with relatively more tasks to be processed by the electronic device.

[0068] In the embodiment of the present application, the low task time period and the high task time period can be divided according to the historical operation of the electronic device. As a way, the low task time period and the high task time period can be divided according to the number of programs running on the electronic device.

[0069] Optionally, multiple time periods may be pre-divided, and then the number of programs running in each time period may be counted, and each time period may be further divided into a low-task time period or a high-task time period according to the number of programs running in each time period. For example, a time period in which the number of programs running is less than a first quantity threshold may be determined as a low-task time period, and a time period in which the number of programs running is not less than the first quantity threshold may be determined as a high-task time period. For another example, a time period in which the processor occupancy rate is less than a first occupancy threshold may be determined as a low-task time period, and a time period in which the processor occupancy rate is not less than the first occupancy threshold may be determined as a high-task time period.

[0070] The length of each pre-divided time period may be of various types, for example, the length of each time period may be 1 hour, 2 hours, or 3 hours.

[0071] Optionally, the time period can be divided by counting the running conditions of the programs in the electronic device, and the time period divided can be determined synchronously to be a low task time period or a high task time period. In this way, the moment when the number of running programs changes compared to the first number threshold can be used as the moment when the low task time period and the high task time period intersect. After the electronic device is started, the number of currently running programs can be detected, and the moment of startup can be used as the starting moment of the low task time period. If the number of running programs is detected to be greater than the first number threshold, the moment when the number of programs is detected to be greater than the first number threshold can be used as the starting moment of the high task time period, and the starting moment is also the end time of a low task time period before the high task time period. If after detecting that the number of running programs is greater than the first number threshold, it is detected that the number of programs is not greater than the first number threshold, the moment when the number of programs is detected to be less than the first number threshold will be used as the end time of the current high task time period, and the end time is also the start time of a new low task time period entered. In this way, the electronic device does not need to divide multiple time periods in advance, and thus has better flexibility.

[0072] Optionally, the time period can be divided by counting the occupancy of the processor in the electronic device, and synchronously determining whether the divided time period is a low task time period or a high task time period. In this way, the moment when the current occupancy of the processor changes compared to the first occupancy threshold can be used as the moment when the low task time period and the high task time period intersect. Among them, after the electronic device is started, the current occupancy of the processor can be detected, and the moment when it is started can be used as the starting moment of the low task time period. If the occupancy of the processor is detected to be greater than the first occupancy threshold, the moment when the occupancy is detected to be greater than the first occupancy threshold can be used as the starting moment of the high task time period, and the starting moment is also the end time of a low task time period before the high task time period. If after detecting that the occupancy is greater than the first occupancy threshold, it is detected that the occupancy is not greater than the first occupancy threshold, the moment when the occupancy is detected to be less than the first occupancy threshold will be used as the end time of the current high task time period, and the end time is also the start time of a new low task time period entered.

[0073] In the case where there are multiple ways to divide the low-task time period and the high-task time period, the electronic device can flexibly determine which specific division method is currently used.

[0074] As a determination method, the user of the electronic device may determine the specific method of dividing the low task time period and the high task time period. As another method, the electronic device may determine the specific method of dividing the low task time period and the high task time period according to actual conditions.

[0075] Optionally, the method of dividing the low task time period and the high task time period can be determined according to the total running time of the electronic device after the first startup. In addition, different division methods will result in different low task time periods and high task time periods.

[0076] It should be noted that in the early stage of using electronic devices, the user's program usage habits are relatively unstable. If the time periods are divided directly by counting the running status of the programs in the electronic device, and the divided time periods are simultaneously determined to be low-task time periods or high-task time periods, the divided low-task time periods and high-task time periods may be inaccurate. Correspondingly, after the user has used the electronic device for a period of time, the running rules of the programs in the electronic device will be relatively fixed. In this case, it will be relatively more accurate to divide the low-task time periods or high-task time periods in real time based on the running status.

[0077] Furthermore, in the case that the total running time of the electronic device after the first startup is less than the first specified time, multiple time periods can be pre-divided, and then the number of programs running in each time period can be counted, and then each time period can be divided into a low-task time period or a high-task time period according to the number of programs running in each time period. Correspondingly, in the case that the total running time of the electronic device after the first startup is not less than the first specified time, the time period can be divided by counting the running status of the programs in the electronic device, and simultaneously determining whether the divided time period is a low-task time period or a high-task time period.

[0078] S220: If the accumulated moving distance obtained meets the first threshold condition, the position lock state is entered, wherein in the position lock state, the touch position output each time is maintained as the target touch position, the target touch position is the touch position whose detection time is closest to the time of entering the position lock state, and the output touch position is used to control the electronic device.

[0079] S230: If the accumulated moving distance does not meet the first threshold condition, enter the next time window.

[0080] The present embodiment provides a touch position processing method, so that in the process of the user performing a touch operation on the screen, the cumulative movement distance of the touch object performing the touch operation can be detected in a predetermined time window, and then when the cumulative movement distance in the current time window meets the first threshold condition, it means that the touch object (for example, the user's finger) currently performing the touch operation has stopped moving, and then the position locking state is triggered to maintain the touch position output each time, so as to avoid the situation where the touch object has actually stopped moving, but the output touch position is still changing, so as to improve the stability of the touch control process. In addition, in the present embodiment, the setting of the length of the time window can be dynamically changed, thereby further improving the flexibility of the solution.

[0081] See also Figure 8 The present application provides a touch position processing method, which is applied to electronic equipment, and the method includes:

[0082] S310: When a touch operation is applied to the screen, in response to obtaining the moving distance of the currently detected touch position, a cumulative moving distance is obtained, wherein the cumulative moving distance is obtained by adding the moving distance of the touch position detected this time to a preset number of moving distances obtained in sequence previously, wherein each moving distance is obtained based on two adjacent touch positions detected during the touch operation.

[0083] In this embodiment, when the touch position is detected once, the moving distance will be obtained correspondingly. Correspondingly, when the moving distance of the touch position detected at that time is obtained, it is not necessary to wait for the end of the current time window as shown in the aforementioned embodiment, but the cumulative distance can be directly obtained, so that the acquisition of the cumulative moving distance has better timeliness. It should be noted that each time the electronic device acquires the cumulative moving distance, it is necessary to accumulate multiple moving distances. Therefore, after the electronic device starts to acquire the moving distance, if enough moving distances have been acquired, the acquisition of the cumulative moving distance can be performed. The enough moving distance can be understood as: the moving distance of the touch position detected at that time, and the moving distance of the preset number obtained in sequence before satisfy the number required for the calculation of the cumulative moving distance. Among them, among the moving distances of the preset number obtained in sequence before, the most recently detected moving distance is adjacent to the moving distance of the touch position detected at that time.

[0084] For example, Fig. 9As shown, the number of moving distances involved in the acquisition of the cumulative moving distance is 5. In this case, when the moving distances D5, D6, D7 and D8 are acquired, the number of moving distances that have been acquired is not sufficient, so the acquisition of the cumulative moving distance will not be performed. When the moving distance D9 is acquired, the number of moving distances currently acquired is already 5 (moving distances D5 to D9), and then the acquisition of the cumulative moving distance can be performed to add the moving distances D5 to D9 to obtain the cumulative moving distance L1. After the moving distance D9 is acquired, each time the moving distance is acquired, there is a sufficient number of moving distances. For example, when the moving distance D10 is acquired, the moving distances D6 to D10 can be added to obtain the cumulative moving distance L2. When the moving distance D11 is acquired, the moving distances D7 to D11 can be added to obtain the cumulative moving distance L3.

[0085] S320: If the accumulated moving distance obtained meets the first threshold condition, the position lock state is entered, wherein in the position lock state, the touch position output each time is maintained as the target touch position, the target touch position is the touch position whose detection time is closest to the time of entering the position lock state, and the output touch position is used to control the electronic device.

[0086] It should be noted that, in this embodiment, the preset number is not specifically limited. For example, the number of moving distances for each cumulative moving distance calculation may be 11, and the preset number may be 10.

[0087] In this embodiment, there may be multiple ways to configure the preset number. As one way, the preset number may be preconfigured by a developer. As another way, the preset number may also be determined based on the current time period (low task time period or high task time period). Wherein, if the current time period is a low task time period, the preset number determined may be relatively higher, and if the current time period is a high task time period, the preset number determined may be relatively lower.

[0088] The present embodiment provides a touch position processing method, so that the above method can avoid the situation that the touch object has actually stopped moving, but the output touch position is still changing, so as to improve the stability of the touch control process. In addition, in the present embodiment, the accumulated moving distance can be obtained in response to the movement distance corresponding to the touch position detected at that time, so that the accumulated moving distance can be detected once each time the touch position is detected, so that the determination of the touch object state (for example, the touch object has stopped) is more timely.

[0089] Next, pass Fig.10 A touch position processing method involved in an embodiment of the present application is described below.

[0090] like Fig.10 As shown, the electronic device can detect touch coordinates (a form of expression of touch position) at a predetermined frequency. During each detection process, the electronic device will first collect the capacitance data of the screen, and then calculate the corresponding touch coordinates (that is, the touch position detected at that time) based on the capacitance data and the touch algorithm. And accumulate time. In addition, based on the calculated touch coordinates, the accumulated movement distance in the X-axis direction (the accumulated movement distance in the first direction) and the accumulated movement distance in the Y-axis direction (the accumulated movement distance in the second direction) are calculated respectively. Among them, the X-axis and the Y-axis can be understood as two axes that characterize the horizontal and vertical directions of the screen.

[0091] After each touch coordinate detection, the electronic device can detect whether the cumulative time has reached the time threshold 1. If it is less than the time threshold 1, it indicates that the end time of the current time window has not been reached, and the movement distance can be continued to be accumulated. If the cumulative time has reached the time threshold 1, it means that the end time of the time window has been reached, and the current cumulative movement distance can be compared with the distance threshold 1. Among them, the duration corresponding to the time threshold 1 can be understood as the length of the time window. Among them, if the cumulative movement distance in the first direction and the cumulative movement distance in the second direction are both less than the distance threshold 1 (that is, the first threshold condition is met), the position lock state is entered. In the case of entering the position lock state, the output touch coordinates will remain unchanged. Correspondingly, if one of the cumulative movement distance in the first direction and the cumulative movement distance in the second direction is greater than the distance threshold 1, the next time window is entered, and the current cumulative time and the current cumulative movement distance are cleared. And the touch coordinates at this time are recorded as reference coordinates. The reference coordinates can be used as the starting coordinates of the next time window.

[0092] When entering the position lock state, the electronic device will still detect the touch coordinates, and after detecting the touch coordinates, compare the detected touch coordinates with the currently held touch coordinates (that is, the aforementioned target touch position). If the distance between the detected touch coordinates and the currently held touch coordinates is greater than the distance threshold 2 (that is, the second threshold condition is met), the position lock state is exited. When exiting the position lock state, the detected touch coordinates will be directly used as the output touch coordinates.

[0093] See also Fig.11 The present application provides a device 400 for determining a touch position, which runs on an electronic device. The device 400 includes:

[0094] The distance acquisition unit 410 is used to acquire the accumulated moving distance when a touch operation is applied to the screen. The accumulated moving distance is obtained by adding up multiple moving distances obtained in sequence, wherein each moving distance is obtained based on two adjacent touch positions detected during the touch operation.

[0095] As a method, the distance acquisition unit 410 is specifically used to obtain the second touch position detected this time, where the second touch position is determined based on the capacitance data; obtain the difference between the second touch position and the touch position detected last time; multiply the difference with the filter coefficient to obtain an incremental value; add the touch position detected last time and the incremental value to obtain the touch position detected this time.

[0096] The position determination unit 420 is used to enter a position lock state if the accumulated moving distance obtained meets a first threshold condition, wherein in the position lock state, each touch position output is maintained as a target touch position, and the target touch position is a touch position whose detection time is closest to the time of entering the position lock state, and the output touch position is used to control the electronic device.

[0097] As a method, the distance acquisition unit 410 is specifically used to acquire the accumulated moving distance in the current time window if the end time of the current time window is reached. The position determination unit is also used to enter the next time window if the accumulated moving distance does not meet the first threshold condition.

[0098] As a method, the distance acquisition unit 410 is specifically used to obtain the cumulative moving distance in response to obtaining the moving distance corresponding to the touch position detected this time. The cumulative moving distance is obtained by adding the moving distance of the touch position detected this time to the preset number of moving distances obtained in sequence before.

[0099] As a mode, the accumulated moving distance includes the accumulated moving distance in the first direction and the accumulated moving distance in the second direction, the accumulated moving distance in the first direction is obtained according to the multiple moving distances in the first direction obtained in sequence, and the accumulated moving distance in the second direction is obtained according to the multiple moving distances in the second direction obtained in sequence. In this mode, the position determination unit 420 is specifically used to enter the position locking state if the accumulated moving distance in the first direction satisfies the first threshold condition and the accumulated moving distance in the second direction satisfies the first threshold condition.

[0100] As a method, the position determination unit 420 is also used to obtain the difference between the touch position determined based on the capacitance data and the target touch position in the position lock state; if the difference meets the second threshold condition, the position lock state is exited.

[0101] The present application provides a device for determining a touch position, so that through the above device, during the process of a user performing a touch operation on a screen, the movement distances detected multiple times can be accumulated to obtain a cumulative movement distance, and then, when the cumulative movement distance satisfies a first threshold condition, it means that the touch object (for example, the user's finger) currently performing the touch operation has stopped moving, and then the position locking state is triggered to maintain the touch position output each time, thereby avoiding the situation where the touch object has actually stopped moving, but the output touch position is still changing, so as to improve the stability of the touch control process.

[0102] It should be noted that the device embodiments in the present application correspond to the aforementioned method embodiments, and the specific implementation principles of each unit in the device embodiments are similar to the principles in the aforementioned method embodiments. The specific contents in the device embodiments can be found in the method embodiments, and will not be repeated in the device embodiments.

[0103] The following will be combined Fig.12 An electronic device provided by the present application is described.

[0104] See also Fig.12 Based on the above-mentioned touch position information and device, the embodiment of the present application also provides an electronic device 1000 that can execute the above-mentioned touch position processing method. The electronic device 1000 includes one or more (only one is shown in the figure) processors 105, a memory 104, an audio playback module 106 and an audio acquisition device 108 that are coupled to each other. Among them, the memory 104 stores a program that can execute the content of the above-mentioned embodiment, and the processor 105 can execute the program stored in the memory 104.

[0105] Among them, the processor 105 may include one or more processing cores. The processor 105 uses various interfaces and lines to connect various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 104, and calling data stored in the memory 104. Optionally, the processor 105 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 105 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 may not be integrated into the processor 105, but may be implemented separately through a communication chip.

[0106] The memory 104 may include a random access memory (RAM) or a read-only memory (ROM). The memory 104 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 104 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.

[0107] Furthermore, in addition to the aforementioned components, the electronic device 1000 may also include a network module 110 , a sensor module 112 , a touch screen system 114 , and a touch-enabled screen.

[0108] The network module 110 is used to realize information interaction between the electronic device 1000 and other devices. For example, a connection can be established with other audio playback devices or other electronic devices, and information interaction is performed based on the established connection. As a way, the network module 110 of the electronic device 1000 is a radio frequency module, which is used to receive and send electromagnetic waves, realize the mutual conversion of electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The radio frequency module may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM) cards, memories, etc. For example, the radio frequency module can interact with external devices through electromagnetic waves sent or received.

[0109] The sensor module 112 may include at least one sensor. Specifically, the sensor module 112 may include but is not limited to: a pressure sensor, a motion sensor, an acceleration sensor, and other sensors.

[0110] Among them, the pressure sensor may be a sensor that detects the pressure generated by pressing on the electronic device 1000. That is, the pressure sensor detects the pressure generated by contact or pressing between the user and the electronic device 1000, for example, the pressure generated by contact or pressing between the user's ear and the electronic device 1000. Therefore, the pressure sensor can be used to determine whether contact or pressing occurs between the user and the electronic device 1000, and the magnitude of the pressure.

[0111] Among them, the acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that recognize the posture of the electronic device 1000 (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. In addition, the electronic device 1000 can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, etc., which will not be repeated here.

[0112] The touch screen system 114 is used to display content and respond to touch operations performed by the user. For example, the touch screen system can detect multi-touch operations. The touch screen system 114 communicates with the processor 105 via SPI (Serial Peripheral interface). For example, the touch screen system 114 can send the detected touch position to the processor 105.

[0113] The audio collection device 108 is used to collect audio signals. Optionally, the audio collection device 108 includes a plurality of audio collection devices, which may be microphones.

[0114] Please refer to Fig.13 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 1100 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0115] The computer readable storage medium 1100 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 1100 includes a non-transitory computer-readable storage medium. The computer readable storage medium 1100 has storage space for program code 1110 that executes any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 1110 can be compressed, for example, in an appropriate form.

[0116] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0117] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0118] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0119] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0120] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0121] In summary, the present application provides a touch position processing method, device and electronic device, in which, when a touch operation is applied to the screen, a cumulative moving distance can be obtained by adding up multiple moving distances obtained in sequence, so that when the cumulative moving distance meets the first threshold condition, the position lock state is entered, wherein, in the position lock state, the electronic device can keep the touch position output each time as the touch position with the closest detection time to the time of entering the position lock state. Thus, through the above method, during the user's touch operation on the screen, the moving distance detected multiple times can be accumulated to obtain the cumulative moving distance, and then when the cumulative moving distance meets the first threshold condition, it means that the touch object (for example, the user's finger) currently performing the touch operation has stopped moving, and then the position lock state is triggered to maintain the touch position output each time, thereby avoiding the situation that the touch object has actually stopped moving, but the output touch position is still changing, so as to improve the stability of the touch control process.

[0122] 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 feature diagrams 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 position processing method, characterized in that: Applied to electronic equipment, the method comprises: When a touch operation is applied to the screen, an accumulated moving distance is acquired, wherein the accumulated moving distance is obtained by adding a plurality of moving distances obtained in sequence, wherein each moving distance is obtained based on two adjacent touch positions detected during the touch operation; If the accumulated moving distance obtained meets the first threshold condition, the position lock state is entered, wherein in the position lock state, the touch position output each time is maintained as the target touch position, and the target touch position is the touch position whose detection time is closest to the time of entering the position lock state, and the output touch position is used to control the electronic device.

2. The method according to claim 1, characterized in that The obtaining of the accumulated moving distance includes: if the end time of the current time window is reached, obtaining the accumulated moving distance within the current time window; The method further comprises: If the accumulated moving distance does not meet the first threshold condition, then enter the next time window.

3. The method according to claim 2, characterized in that The length of the time window is determined based on a target application, where the target application is an application controlled based on the touch operation.

4. The method according to claim 1, characterized in that: The step of obtaining the accumulated moving distance includes: In response to obtaining the movement distance corresponding to the touch position detected this time, the accumulated movement distance is obtained, where the accumulated movement distance is obtained by adding the movement distance of the touch position detected this time to the preset number of movement distances obtained in sequence previously.

5. The method according to claim 1, characterized in that The accumulated moving distance includes an accumulated moving distance in a first direction and an accumulated moving distance in a second direction, wherein the accumulated moving distance in the first direction is obtained according to a plurality of moving distances in the first direction obtained in sequence, and the accumulated moving distance in the second direction is obtained according to a plurality of moving distances in the second direction obtained in sequence; If the acquired accumulated moving distance meets the first threshold condition, entering the position locking state includes: If the accumulated moving distance in the first direction meets the first threshold condition, and the accumulated moving distance in the second direction meets the first threshold condition, the position locking state is entered.

6. The method according to claim 1, characterized in that The method further comprises: During the current touch position detection process, an initial touch position corresponding to the current capacitance data is obtained; Obtaining a difference between the initial touch position and the touch position detected last time; multiplying the difference value by a filter coefficient to obtain an incremental value; The touch position detected last time is added to the incremental value to obtain the touch position detected this time.

7. The method according to claim 1, characterized in that The method further comprises: In the position locking state, comparing the difference between the touch position detected this time and the target touch position; If the difference meets a second threshold condition, the position locking state is exited.

8. The method according to any one of claims 1 to 7, characterized in that: The first threshold condition includes: The accumulated moving distance is less than or equal to the first distance threshold.

9. A device for determining a touch position, characterized in that: Running on an electronic device, the device comprises: A distance acquisition unit, used for acquiring an accumulated moving distance when a touch operation is applied to the screen, wherein the accumulated moving distance is obtained by adding a plurality of moving distances obtained in sequence, wherein each moving distance is obtained based on two adjacent touch positions detected during the process of the touch operation; A position determination unit is used to enter a position lock state if the accumulated moving distance obtained meets a first threshold condition, wherein in the position lock state, each touch position output is maintained as a target touch position, and the target touch position is a touch position whose detection time is closest to the time of entering the position lock state, and the output touch position is used to control the electronic device.

10. An electronic device, characterized in that: including a screen, one or more processors and memory; 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 storing a program code executable by a processor, characterized in that: The computer-readable storage medium includes stored program code, wherein when the program code is executed, the method according to any one of claims 1 to 8 is executed.

Citation Information

Cited By

  • Display method, electronic equipment and system

    CN122044448A