Touch method and device, electronic equipment and storage medium

By setting a lock point mode on the touchscreen and detecting the touch coordinate direction, the problem of accidental triggering caused by finger deviation is solved, resulting in more accurate touch recognition and an optimized user experience.

CN121879602APending Publication Date: 2026-04-17SHENZHEN HEYTAP TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN HEYTAP TECHNOLOGY CO LTD
Filing Date
2024-10-15
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Slight finger deviation when a user taps the touchscreen can lead to incorrect recognition and accidental triggering of touch operations, thus reducing the user's touch experience.

Method used

When a touch operation is detected, the system enters lock point mode, maintains the initial touch coordinates, and determines the direction of finger movement by detecting at least three frames of touch coordinates. If the finger moves in the same direction, the lock point mode is deactivated and the touch coordinates are reported normally.

Benefits of technology

This avoids misidentifying clicks as swipes, optimizes the user's swipe touch experience, and improves the recognition accuracy of the touchscreen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121879602A_ABST
    Figure CN121879602A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of touch, and discloses a touch method and device, electronic equipment and a storage medium, the electronic equipment comprises a touch screen, and the method comprises the following steps: when it is detected that the touch screen is touched, obtaining a first touch coordinate, and switching to a lock point mode, the lock point mode is a mode in which a touch coordinate reported by the touch screen is kept as a first touch coordinate under the condition that the touch position is located in the target touch area, and the first touch coordinate is an initial touch coordinate of the first touch operation; detecting a second touch coordinate corresponding to the touch position of the first touch operation in the moving process through the touch screen; if it is determined that the first touch operation moves towards the same direction according to the at least three frames of second touch coordinates, the lock point mode is removed, and under the condition that the lock point mode is removed, the touch coordinates reported by the touch screen are the second touch coordinates corresponding to the touch position. The problems that the click operation is mistakenly recognized as the sliding operation and the sliding operation cannot be recognized in a lock point mode can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of touch technology, specifically to a touch method and device, electronic device, and storage medium. Background Technology

[0002] Electronic devices equipped with touchscreens typically identify corresponding logical operations based on the touch coordinates reported by the touchscreen. For example, when the touchscreen reports one touch coordinate, the electronic device identifies it as a click operation; when the touchscreen reports multiple consecutive touch coordinates, it identifies it as a swipe operation, and so on.

[0003] In practice, it has been found that when users tap the touchscreen, their fingers are prone to slight deviations, causing the touchscreen to report multiple consecutive touch coordinates. This can lead to incorrect recognition and accidental triggering of touch operations, thus reducing the user's touch experience. Summary of the Invention

[0004] This application discloses a touch method, device, electronic device, and storage medium that can avoid the problem of click operations being misidentified as swipe operations and the inability to recognize swipe operations in lock point mode.

[0005] The first aspect of this application discloses a touch control method applied to an electronic device, the electronic device including a touch screen, the method comprising:

[0006] When a touch is detected on the touchscreen, the first touch coordinates are obtained and the system switches to a lock point mode. The lock point mode is a mode in which the touch coordinates reported by the touchscreen remain the first touch coordinates when the touch position is within the target touch area. The first touch coordinates are the initial touch coordinates of the first touch operation.

[0007] The touch screen is used to detect the second touch coordinates corresponding to the touch position of the first touch operation during the movement process;

[0008] If it is determined from at least three frames of the second touch coordinates that the first touch operation moves in the same direction, then the lock point mode is released. When the lock point mode is released, the touch coordinates reported by the touch screen are the second touch coordinates corresponding to the touch position.

[0009] A second aspect of this application discloses a touch device applied to an electronic device, the electronic device including a touch screen, the device comprising:

[0010] The acquisition unit is used to acquire the first touch coordinates when the touch screen is detected to have been touched, and switch to a lock point mode. The lock point mode is a mode in which the touch coordinates reported by the touch screen remain the first touch coordinates when the touch position is within the target touch area. The first touch coordinates are the initial touch coordinates of the first touch operation.

[0011] The detection unit is used to detect the second touch coordinates corresponding to the touch position of the first touch operation during the movement process via the touch screen;

[0012] The release unit is used to release the lock point mode when it is determined from at least three frames of the second touch coordinates that the first touch operation moves in the same direction. When the lock point mode is released, the touch coordinates reported by the touch screen are the second touch coordinates corresponding to the touch position.

[0013] The third aspect of this application discloses an electronic device, including:

[0014] Memory containing executable program code;

[0015] A processor coupled to the memory;

[0016] The processor calls the executable program code stored in the memory to execute the method disclosed in the first aspect of the embodiments of this application.

[0017] A fourth aspect of this application discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to perform the method disclosed in the first aspect of this application.

[0018] The fifth aspect of this application discloses a computer program product that, when run on a computer, causes the computer to perform some or all of the steps of any one of the methods of the first aspect of this application.

[0019] The sixth aspect of this application discloses an application publishing platform for publishing computer program products, wherein when the computer program products are run on a computer, the computer performs some or all of the steps of any one of the methods of the first aspect of this application.

[0020] Compared with related technologies, the embodiments of this application have the following beneficial effects:

[0021] When an electronic device detects a touch on the touchscreen, it can obtain the first touch coordinates and enter a lock-point mode. In lock-point mode, when the touch location is within the target touch area, the touchscreen reports the first touch coordinates, which are the initial touch coordinates of the first touch operation. In lock-point mode, if the touch location of the first touch operation is within the target touch area, the touchscreen will continue to report the first touch coordinates. Therefore, even if the finger slightly shifts, the touchscreen will not report multiple consecutive touch coordinates, thus preventing a click operation from being mistakenly identified as a swipe operation.

[0022] Furthermore, electronic devices can detect the second touch coordinates corresponding to the touch position of the first touch operation during movement via the touchscreen. If the first touch operation is determined to move in the same direction based on at least three frames of second touch coordinates, it indicates that the first touch operation may be a swipe operation actively performed by the user, rather than a touch operation with an unfixed or irregular movement direction caused by slight finger deviation. In this case, the electronic device can deactivate the lock-point mode, allowing subsequent touch coordinates to be reported normally, thereby optimizing the user's swipe touch experience. Attached Figure Description

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

[0024] Figure 1 This is a schematic diagram of a touch area disclosed in an embodiment of this application;

[0025] Figure 2 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application;

[0026] Figure 3 This is a schematic diagram of a locking point mode disclosed in an embodiment of this application;

[0027] Figure 4 This is a schematic diagram of a sliding operation disclosed in an embodiment of this application;

[0028] Figure 5 This is a flowchart illustrating a touch control method disclosed in an embodiment of this application;

[0029] Figure 6 This is a flowchart illustrating another touch control method disclosed in an embodiment of this application;

[0030] Figure 7 This is a schematic diagram of a second touch coordinate disclosed in an embodiment of this application;

[0031] Figure 8 This is a schematic diagram of another second touch coordinate disclosed in an embodiment of this application;

[0032] Figure 9 This is a flowchart illustrating another touch control method disclosed in an embodiment of this application;

[0033] Figure 10 This is a flowchart illustrating another touch control method disclosed in an embodiment of this application;

[0034] Figure 11 This is a schematic diagram of the structure of a touch device disclosed in an embodiment of this application;

[0035] Figure 12 This is a schematic diagram of the structure of another electronic device disclosed in an embodiment of this application. Detailed Implementation

[0036] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0037] It should be noted that the terms "first," "second," "third," and "fourth," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "having," and any variations thereof, in the embodiments of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0038] This application discloses a touch method, device, electronic device, and storage medium that can avoid the problem of click operations being mistakenly triggered as swipe operations and the inability to recognize swipe operations in lock point mode.

[0039] The technical solution of this application will be described in detail below with reference to specific embodiments.

[0040] To more clearly describe the touch method disclosed in the embodiments of this application, the touch recognition logic in the related technology will be described first.

[0041] Taking the touch logic of capacitive touchscreens as an example, capacitive touchscreen technology works by utilizing the electrical current sensing of the human body. When a finger touches a capacitive touchscreen, the presence of the human body's electric field creates a coupling capacitor between the human body and the surface of the capacitive touchscreen. The finger draws a small current from the contact point, generating a capacitance signal. Besides the finger, other parts of the body such as the cheek and ear also generate capacitance signals when in contact with the capacitive touchscreen, causing a change in the capacitance value of the capacitive sensor in the touch area. In other words, when a user performs a touch operation, the capacitance value of the capacitive sensor in the touch area changes. Therefore, the capacitive touchscreen can detect touch areas with capacitance values ​​different from other areas across the entire screen, thus confirming the user's touch operation.

[0042] like Figure 1 As shown, Figure 1 This is a schematic diagram of a touch area disclosed in an embodiment of this application. Optionally, the capacitive touch screen may include a transmitting channel 110 and a receiving channel 120, wherein the X-axis represents the receiving channel 120 and the Y-axis represents the transmitting channel 110. The capacitance values ​​of the transmitting channel 110 and the receiving channel 120 to ground are self-capacitive data values, and the corresponding data values ​​of the transmitting channel 110 and the receiving channel 120 themselves are mutual-capacitive data values. The mutual-capacitive data values ​​are typically used to determine whether there is a touch operation on the capacitive touch screen (e.g., a press operation or a release operation), while the self-capacitive data values ​​are typically used to determine other auxiliary functions, such as proximity sensing function determination, etc., which are not limited here. Figure 1 The capacitance values ​​in the examples (e.g., 30, 40) can be mutual capacitance data values; wherein the peak points of the first region 130 and the second region 140 where the mutual capacitance data values ​​change can be touch points.

[0043] It should be noted that the embodiment of this application uses a capacitive touch screen as an example to illustrate only one optional implementation method. The touch screen mentioned in the embodiment of this application can also be a resistive touch screen or other types of touch screen, and the method of detecting touch operation can also be other methods, which are not limited here.

[0044] Taking advantage of the fact that touchscreens can detect touch operations, some current applications have corresponding functions for various types of touch operations, making it convenient for users to use the corresponding functions within the application through touch. For example, in reading software, users can trigger the page-turning function by swiping left or right on the touchscreen; while in music or video software, users can adjust the playback progress of multimedia resources by swiping left or right on the touchscreen, or control the playback and pause of multimedia resources by tapping the touchscreen, etc., without further limitation.

[0045] Please see Figure 2, Figure 2 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. The electronic device may include a touchscreen system 210 and a terminal system 220, with a communication connection established between the touchscreen system 210 and the terminal system 220. The touchscreen system 210 stores touch information (e.g., touch coordinates) collected by the touchscreen and reports the data to the terminal system 220. The terminal system 220 may be the operating system of the electronic device (e.g., Android, iOS, etc.), and the operation of the operating system may be supported by the processor of the electronic device. The terminal system 220 is used to perform logical judgments and logical control based on the touch information reported by the touchscreen system 210.

[0046] For example, if the touchscreen system 210 reports "one frame of touch coordinates", the terminal system 220 can recognize it as a "click operation". If the touchscreen system 210 reports "multiple consecutive frames of touch coordinates", the terminal system 220 can recognize it as a "swipe operation". No limitation is made here.

[0047] In practice, it has been found that when users tap the touchscreen, their fingers are prone to slight deviations, causing the touchscreen to report multiple consecutive touch coordinates. This results in the tap operation being misidentified as a swipe operation, reducing the user's touch experience.

[0048] In response, this application provides a touch control method and apparatus, an electronic device, and a computer-readable storage medium to address the technical deficiencies in related technologies.

[0049] Please see Figure 3 , Figure 3 This is a schematic diagram of a locking mode disclosed in an embodiment of this application. Optionally, when a touch is detected on the touch screen, the first touch coordinate 310 can be obtained and the locking mode can be entered. The locking mode is a mode in which the touch coordinates reported by the touch screen remain at the first touch coordinate 310 when the touch position is within the target touch area 320. The first touch coordinate 310 is the initial touch coordinate of the first touch operation.

[0050] As can be seen, in the locked-point mode, as long as the touch position of the first touch operation is within the target touch area 320, the touch screen will continue to report the first touch coordinate 310. Thus, even if the touch finger deviates slightly, the touch screen will not report any other touch coordinates besides the first touch coordinate 310, thereby avoiding the situation where a click operation becomes a swipe operation.

[0051] Further, please refer to Figure 4 , Figure 4This is a schematic diagram of a sliding operation disclosed in an embodiment of this application. In practice, it has been found that sometimes users consciously and actively perform sliding operations (e.g., actively sliding to turn pages). However, when the sliding operation 400 presses the first touch coordinate 310 at a certain touch position on the touch screen, the touch screen will enter a locked-point mode. Even if the touch coordinate of the subsequent touch position of the sliding operation 400 is not the first touch coordinate 310, as long as it is within the target touch area 320, the first touch coordinate 310 will still be continuously reported, thus causing the user's actively performed sliding operation 400 to be unrecognized.

[0052] In this regard, the touch method disclosed in the embodiments of this application allows the electronic device to detect the second touch coordinates corresponding to the touch position of the first touch operation during movement via the touch screen. If it is determined from at least three frames of second touch coordinates that the first touch operation moves in the same direction, it indicates that the first touch operation may be a sliding operation actively performed by the user, rather than a touch operation with an unfixed or irregular movement direction caused by slight finger deviation. In this regard, the electronic device can deactivate the lock-point mode, allowing subsequent touch coordinates to be reported normally, thereby optimizing the user's sliding touch experience.

[0053] Based on this, the touch control method, device, electronic device, and computer-readable storage medium disclosed in the embodiments of this application will be described below.

[0054] Please see Figure 5 , Figure 5 This is a flowchart illustrating a touch control method disclosed in an embodiment of this application. Optionally, this method can be applied to the aforementioned electronic device, which includes a touchscreen. Optionally, the method may include the following steps:

[0055] 502. When a touch is detected on the touch screen, the first touch coordinate is obtained and the touch lock mode is switched to the lock point mode. The lock point mode is a mode in which the touch coordinates reported by the touch screen remain as the first touch coordinate when the touch position is within the target touch area.

[0056] The methods for detecting touch operations and obtaining touch coordinates on a touchscreen have already been introduced, so the method for obtaining the first touch coordinates corresponding to the first touch operation will not be repeated here. It should be noted that for other types of touchscreens, electronic devices can obtain the first touch coordinates in other ways, which are not limited here.

[0057] Optionally, the first touch coordinates may include: the starting coordinates corresponding to the first touch operation, which are the touch coordinates when the first touch operation first touches the touch screen, and are not limited here.

[0058] In this embodiment, the lock-point mode refers to a mode in which the touch coordinates reported by the touch screen remain at the first touch coordinate when the touch position is within the target touch area. Optionally, the lock-point mode can be maintained continuously after the first touch operation touches the touch screen without any obvious sliding operation.

[0059] Optionally, the target touch area can be determined based on the first touch coordinates.

[0060] In one embodiment, the target touch area can be a circular area, a fan-shaped area, etc., with the first touch coordinate as the center and the target radius as the radius, and is not limited thereto. The target radius can be set by developers based on extensive development experience, or by users based on actual usage needs; typical values ​​may include 2mm, 3mm, etc., and are not limited thereto.

[0061] In other embodiments, the target touch area may also be a range of other shapes determined according to the first touch coordinates, such as a rectangle, an irregular shape, etc., which are not limited here.

[0062] 504. Detect the second touch coordinates corresponding to the touch position of the first touch operation during the movement process via the touch screen.

[0063] In this embodiment of the application, when the initial touch coordinates of the first touch operation are detected on the touch screen, the touch screen can switch to the lock point mode. Then, during the subsequent movement of the first touch operation, the touch screen can detect the second touch coordinates corresponding to the touch position of the first touch operation during the movement, but does not report the response. During this process, the touch screen still reports the first touch coordinates.

[0064] 506. If it is determined that the first touch operation moves in the same direction based on at least three frames of second touch coordinates, then the lock point mode is released. When the lock point mode is released, the touch coordinates reported by the touch screen are the second touch coordinates corresponding to the touch position.

[0065] As mentioned earlier, "locked-point mode" is mainly to prevent slight finger deviations during click operations from being misidentified as swipe operations. However, "locked-point mode" will also prevent normal swipe operations within the target touch area from being recognized.

[0066] In this application, the embodiments can identify normal swipe operations based on the differences between finger offset and normal swipe operations. Finger offset typically generates multiple touch coordinates that are irregular and in different directions; while normal swipe operations are usually continuous and move in the same direction, such as swiping right or up.

[0067] Optionally, the electronic device can determine that the first touch operation is moving in the same direction based on at least three frames of second touch coordinates during the movement process; if so, it can be determined that the first touch operation is a swipe operation, and the electronic device can deactivate the lock point mode.

[0068] Optionally, the electronic device may call a motion detection function (e.g., the dirMotionDetect function) to determine that the first touch operation is moving in the same direction based on at least three frames of second touch coordinates during the movement process. This is not limited here.

[0069] In this scenario, when the lock-point mode is deactivated, the touchscreen reports the second touch coordinates corresponding to the touch location. That is, after deactivating the lock-point mode, even if the touch location is within the target touch area, the first touch coordinates will no longer be reported; instead, the actual touch coordinates corresponding to the current touch location will be reported. Therefore, after deactivating the lock-point mode, the touch coordinates corresponding to the first touch operation can be accurately reported, and thus, if the first touch operation is a swipe operation, it can be correctly recognized as a swipe operation.

[0070] It should be further clarified that the at least three frames of second touch coordinates used to determine whether the first touch operation moved in the same direction are detected before the lock-point mode is released, so they are not reported normally. However, the electronic device may need to use these unreported second touch coordinates when determining the actual sliding distance or target sliding parameters such as the sliding trajectory of the first touch operation.

[0071] Optionally, when the touchscreen detects the second touch coordinates corresponding to the touch position during the movement of the first touch operation, it can store the second touch coordinates. Subsequently, after the lock-point mode is released, the touchscreen can report at least three frames of second touch coordinates to determine whether the first touch operation moves in the same direction. This allows the electronic device to determine the target sliding parameters of the first touch operation based on these second touch coordinates, or for other purposes, which are not limited here.

[0072] Optionally, before reporting at least three frames of second touch coordinates used to determine whether the first touch operation moves in the same direction, the touch screen can add a no-response flag to at least three frames of second touch coordinates. The no-response flag is used to indicate that the electronic device does not need to respond to these at least three frames of second touch coordinates, so as to avoid the electronic device returning to the response to the detection of these at least three frames of second touch coordinates, which would cause the screen to shake.

[0073] Optionally, before reporting at least three frames of second touch coordinates used to determine whether the first touch operation moves in the same direction, the touch screen can add corresponding detection time points to each of the at least three frames of second touch coordinates. The detection time point is the time point at which the corresponding second touch coordinate is detected by the touch screen.

[0074] It should be noted that "moving in the same direction" as described in the embodiments of this application may include: moving in a straight line in the same direction, moving in a curve in the same direction, etc.

[0075] For example, the first touch operation moving in the same direction could be a straight movement to the right. Another example is a curved movement to the right. For instance, a curved movement to the right followed by a certain distance to the right and then a certain distance to the upper right. It should be further noted that since it is difficult for users to move absolutely in the same direction when performing touch operations, the "movement in the same direction" described in this embodiment may not be absolutely in the same direction; there can be a certain range of deviation, but it is essentially in the same direction (such as the "right" example mentioned above).

[0076] By implementing the methods disclosed in the above embodiments, when an electronic device detects a first touch operation on a touchscreen, it can obtain the first touch coordinates corresponding to the first touch operation and enter a lock-point mode. In lock-point mode, when the touch position is within the target touch area, the touch screen reports the first touch coordinates. In lock-point mode, since the touch position of the first touch operation is within the target touch area, the touch screen will continue to report the first touch coordinates. Therefore, even if the finger slightly shifts, the touch screen will not report multiple consecutive touch coordinates, thereby avoiding the situation where a click operation is mistakenly identified as a swipe operation. Furthermore, electronic devices can detect the second touch coordinates corresponding to the touch position of the first touch operation during movement via the touchscreen. If the first touch operation is determined to move in the same direction based on at least three frames of second touch coordinates, it indicates that the first touch operation may be a swipe operation actively performed by the user, rather than a touch operation with an unfixed or irregular movement direction caused by slight finger deviation. In this case, the electronic device can deactivate the lock-point mode, allowing subsequent touch coordinates to be reported normally, thereby optimizing the user's swipe touch experience.

[0077] Please see Figure 6 , Figure 6 This is a flowchart illustrating another touch control method disclosed in an embodiment of this application. Optionally, this method can be applied to the aforementioned electronic device, which includes a touchscreen. Optionally, the method may include the following steps:

[0078] 602. When a touch is detected on the touch screen, the first touch coordinate is obtained and the touch lock mode is switched to the lock point mode. The lock point mode is a mode in which the touch coordinates reported by the touch screen remain as the first touch coordinate when the touch position is within the target touch area.

[0079] 604. Detect the second touch coordinates corresponding to the touch position of the first touch operation during the movement process via the touch screen.

[0080] In this embodiment, the touchscreen may periodically detect the second touch coordinates corresponding to the touch position of the first touch operation during movement. Optionally, the second touch coordinates detected in each detection cycle may be one frame or multiple frames, which is not limited here.

[0081] This application uses the example of a second touch coordinate being detected as one frame per detection cycle for illustration, and should not be construed as limiting the scope of this application.

[0082] 606. Based on at least three frames of second touch coordinates, determine the target cumulative number of steps for the first touch operation to move continuously in the same direction.

[0083] In this embodiment of the application, the electronic device can determine that the first touch operation has moved one step when the touch screen detects at least three consecutive second touch coordinates.

[0084] In one embodiment, the electronic device can acquire at least three consecutive frames of second touch coordinates and calculate the relative movement distance between two adjacent frames of second touch coordinates in the at least three consecutive frames of second touch coordinates.

[0085] If, based on multiple relative movement distances, it is determined that the touch positions corresponding to at least three consecutive frames of second touch coordinates move in the same direction, then the current accumulated step count can be incremented by one to become the target accumulated step count. Optionally, the electronic device can use a movement counter to count the accumulated steps, which is not limited here.

[0086] By implementing the above method, the electronic device can determine whether each step of the first touch operation moves in the same direction based on the relative movement distance between each two adjacent second touch coordinates in at least three consecutive second touch coordinate frames. This method is simple and efficient, thereby reducing the difficulty and cost of implementation.

[0087] Optionally, the electronic device may calculate the relative movement distance between two adjacent frames of second touch coordinates in at least three consecutive frames of second touch coordinates by calculating the difference between two adjacent frames of second touch coordinates in the same direction as the relative movement distance between the two adjacent frames of second touch coordinates.

[0088] Optionally, calculating the difference between the second touch coordinates of two adjacent frames in the same direction can be understood as: at least three consecutive frames of second touch coordinates are the second touch coordinates of the previous frame minus the second touch coordinates of the next frame; or, at least three consecutive frames of second touch coordinates are the second touch coordinates of the next frame minus the second touch coordinates of the previous frame, which is not limited here.

[0089] For example, please refer to Figure 7 , Figure 7 This is a schematic diagram of a second touch coordinate disclosed in an embodiment of this application. It is assumed that the second touch coordinates of three consecutive frames include: the second touch coordinate of the current frame 700, the second touch coordinate of the previous frame 710, and the second touch coordinate of the frame before that 720.

[0090] Optionally, the difference between the second touch coordinate 700 in the current frame and the second touch coordinate 710 in the previous frame can be calculated as the relative movement distance between the two; and the difference between the second touch coordinate 710 in the previous frame and the second touch coordinate 720 in the frame before that can be calculated as the relative movement distance between the two.

[0091] Alternatively, the difference between the second touch coordinate 720 of the previous frame and the second touch coordinate 710 of the previous frame can be calculated as the relative movement distance between the two; and the difference between the second touch coordinate 710 of the previous frame and the second touch coordinate 700 of the current frame can be calculated as the relative movement distance between the two. This is not limited here.

[0092] Furthermore, the electronic device can calculate the product of multiple relative movement distances to obtain the first calculation result.

[0093] Optionally, if the first calculation result satisfies the first condition, it can be determined that the touch positions corresponding to at least three consecutive frames of second touch coordinates move in the same direction, and the current cumulative step count is increased by one as the target cumulative step count.

[0094] Optionally, if the first calculation result does not meet the first condition, then it is determined that the touch positions corresponding to at least three consecutive second touch coordinates are not moving in the same direction, and the current accumulated steps can be cleared to zero.

[0095] In one embodiment, the first condition may include: the first calculation result is a positive number; or the first calculation result is a positive number and is greater than or equal to the product threshold, etc., which are not limited here.

[0096] It should be noted that multiplying two positive numbers results in a positive number, multiplying two negative numbers also results in a positive number, and multiplying a positive number by a negative number results in a negative number. All positive numbers or all negative numbers indicate that the movement is in the same direction; the presence of both positive and negative numbers indicates that the movement is not in the same direction.

[0097] Combination Figure 7 For example, the touch position of the second touch coordinates in the three frames moves in the same direction. Suppose that the second touch coordinate 700 of the current frame is (6, 0); the second touch coordinate 710 of the previous frame is (4, 0); and the second touch coordinate 720 of the frame before that is (1, 0).

[0098] The difference between the second touch coordinate 700 in the current frame and the second touch coordinate 710 in the previous frame is "2", which is a positive number; the difference between the second touch coordinate 710 in the previous frame and the second touch coordinate 720 in the frame before that is "3", which is also a positive number. Therefore, the product of "2" and "3" is "6", which is also a positive number. This verifies that when the first calculation result corresponding to the second touch coordinates of the three frames is a positive number, the touch position of the second touch coordinates of the three frames moves in the same direction.

[0099] For example, please refer to Figure 8 , Figure 8 This is a schematic diagram of another second touch coordinate disclosed in the embodiments of this application. The second touch coordinate 710 of the previous frame is to the right of the second touch coordinate 700 of the current frame, while the second touch coordinate 720 of the frame before that is to the left of the second touch coordinate 710 of the previous frame, indicating that the touch position of the three frames of second touch coordinates does not move in the same direction.

[0100] Assume the second touch coordinate 700 in the current frame is (4, 0); the second touch coordinate 710 in the previous frame is (6, 0); and the second touch coordinate 720 in the frame before that is (1, 0).

[0101] The difference between the second touch coordinate 700 in the current frame and the second touch coordinate 710 in the previous frame is -2, which is a negative number. The difference between the second touch coordinate 710 in the previous frame and the second touch coordinate 720 in the frame before that is 5, which is a positive number. Therefore, the product of -2 and 5 is -10, which is not a positive number. This verifies that when the first calculation result corresponding to the second touch coordinates of the three frames is not a positive number, the touch position of the second touch coordinates of the three frames does not move in the same direction.

[0102] By implementing the above method, electronic devices can determine whether the touch position of the three consecutive second touch coordinates moves in the same direction based on whether the product of the multiple relative movement distances corresponding to the three consecutive second touch coordinates satisfies the first condition. This calculation method is simple and efficient, reducing the difficulty and cost of implementing the method.

[0103] Furthermore, in this embodiment of the application, it is considered that the distance between two adjacent touch coordinates caused by finger offset, shaking, etc. is usually short, while the distance between two adjacent touch coordinates in normal swiping operation is usually long.

[0104] In another optional embodiment, if the electronic device determines that the touch positions corresponding to at least three consecutive second touch coordinates move in the same direction based on multiple relative movement distances, it can also determine whether the cumulative distance corresponding to the multiple relative movement distances is greater than or equal to a distance threshold.

[0105] Optionally, the electronic device can calculate the sum of the absolute values ​​corresponding to multiple relative movement distances to obtain a second calculation result, and determine the second calculation result as the cumulative distance corresponding to the multiple relative movement distances.

[0106] Optionally, if, based on multiple relative movement distances, it is determined that the touch positions corresponding to at least three consecutive second touch coordinates move in the same direction, and the cumulative distance corresponding to the multiple relative movement distances is greater than or equal to a distance threshold, then the current cumulative step count can be increased by one as the target cumulative step count.

[0107] Optionally, if based on multiple relative movement distances, it is determined that the touch positions corresponding to at least three consecutive second touch coordinates do not move in the same direction, or the cumulative distance corresponding to multiple relative movement distances is less than the distance threshold, it indicates that the current operation is not a normal swipe operation, which may be caused by finger offset or shaking. In this case, the current cumulative step count can be cleared to avoid unlocking the lock point mode later.

[0108] Optionally, the distance threshold can be set by developers based on extensive development experience, or by users based on actual usage needs; this is not limited here. Optionally, the distance threshold can be determined based on the width of the finger. Optionally, the distance threshold can be greater than or equal to the width of the finger; or greater than or equal to half the width of the finger; this is not limited here.

[0109] By implementing the above method, electronic devices can determine that the first touch operation is a normal swipe operation only when the cumulative distance corresponding to multiple relative movement distances is greater than or equal to the distance threshold. This eliminates interference from factors such as finger offset and tremors, thereby avoiding subsequent misunderstandings of the lock-point mode and preventing the lock-point mode's anti-misidentification function from failing to function properly. This improves the user's touch experience.

[0110] 608. If the target cumulative number of steps is greater than or equal to the threshold of the first step, then the first touch operation is determined to move in the same direction, and the lock point mode is released.

[0111] In this embodiment, finger deflection and shaking may also cause the first touch operation to have a short distance of one step, or two steps that move in the same direction.

[0112] To eliminate interference from factors such as finger misalignment and tremors, electronic devices can determine that the first touch operation is a normal swipe operation, rather than a touch operation caused by factors such as finger misalignment or tremors, only if the current cumulative number of steps is greater than or equal to the threshold of the first step. In order to properly recognize swipe operations, electronic devices can deactivate the lock-point mode.

[0113] Optionally, the threshold for the number of steps can be set by developers based on extensive development experience, or by users based on actual usage needs. Typical values ​​may include 4, 5, 6, etc., and are not limited here.

[0114] In one embodiment, before resetting the current accumulated steps to zero, the electronic device can determine whether the current accumulated steps are greater than a second step threshold and less than a first step threshold; if so, the electronic device can further reduce the first step threshold when resetting the current accumulated steps to zero.

[0115] Optionally, the second step threshold is less than the first step threshold, and the difference between the first step threshold and the second step threshold is less than the target difference. That is, the second step threshold is as close as possible to the first step threshold. For example, if the first step threshold is 4, the second step threshold can be 3; if the first step threshold is 6, the second step threshold can be 4, etc., without limitation.

[0116] It should be noted that if the current cumulative number of steps is greater than the second step threshold, it can be determined that the first touch operation moved a certain distance in the same direction. The probability that the first touch operation is a normal swipe operation is relatively high. It may be due to unintentional finger shaking during the swipe or other reasons that caused a brief backward movement.

[0117] To address this, the threshold for the first step can be lowered, making it easier to meet the condition that the first touch operation is a movement in the same direction. This allows the lock-point mode to be released more quickly if the first touch operation is indeed a swipe operation, ensuring that the first touch operation can be recognized normally and improving the user experience.

[0118] Optionally, after lowering the first step threshold, if the first touch operation is detected to have ended, the electronic device can switch the current first step threshold to the initially configured first step threshold. This prevents the next detected touch operation from easily unlocking the lock point mode, which would cause the lock point mode's anti-misidentification function to fail to function properly, thereby improving the user's touch experience.

[0119] For example, assuming the initial first step number threshold is 4 and the reduced first step number threshold is 3, the first step number threshold can be restored to 4 when the first touch operation is detected to have ended, without limitation.

[0120] Implementing the methods disclosed in the above embodiments, the touch position of the first touch operation is within the target touch area, and the touch screen will continue to report the first touch coordinates. Therefore, even if the touch finger slightly shifts, the touch screen will not report multiple consecutive touch coordinates, thereby avoiding the situation where a click operation is mistakenly identified as a swipe operation. Furthermore, the electronic device can detect the second touch coordinates corresponding to the touch position of the first touch operation during its movement through the touch screen. If, based on at least three frames of second touch coordinates, it is determined that the first touch operation moves in the same direction, it indicates that the first touch operation may be a swipe operation actively performed by the user, rather than a touch operation with an unfixed or irregular movement direction caused by slight finger shifts. In this regard, the electronic device can deactivate the lock-point mode, allowing subsequent touch coordinates to be reported normally, thereby optimizing the user's swipe touch experience. Furthermore, this calculation method is simple and efficient, reducing the difficulty and cost of implementation. Additionally, the electronic device can only determine if the first touch operation is a normal swipe operation when the cumulative distance corresponding to multiple relative movement distances is greater than or equal to a distance threshold. This eliminates interference from factors such as finger offset and tremors, thus avoiding subsequent misinterpretations of the lock-point mode and preventing the lock-point mode's anti-misidentification function from failing to function properly, thereby improving the user's touch experience. Moreover, if the current cumulative step count is greater than the second step count threshold, the first step count threshold can be lowered, making it easier to meet the condition that the first touch operation is moving in the same direction. Therefore, if the first touch operation is indeed a swipe operation, the lock-point mode can be deactivated more quickly, allowing the first touch operation to be correctly recognized, thus improving the user experience.

[0121] Please see Figure 9 , Figure 9 This is a flowchart illustrating another touch control method disclosed in an embodiment of this application. Optionally, this method can be applied to the aforementioned electronic device, which includes a touchscreen. Optionally, the method may include the following steps:

[0122] 902. When a touch is detected on the touchscreen, the first touch coordinate is obtained and the touchscreen is switched to lock point mode. Lock point mode is a mode in which the touch coordinates reported by the touchscreen remain the first touch coordinate when the touch position is within the target touch area.

[0123] 904. Detect the second touch coordinates corresponding to the touch position of the first touch operation during the movement process via the touch screen.

[0124] As an alternative implementation, the electronic device can deactivate the lock point mode if, when in a target business scenario, it is determined that the first touch operation moves in the same direction based on at least three frames of second touch coordinates.

[0125] Optionally, the target business scenario can be a business scenario where the operation frequency exceeds a frequency threshold. The frequency threshold can be set by developers based on extensive development experience and is not limited here. It is understandable that business scenarios with an operation frequency exceeding the frequency threshold, due to the need for frequent operations, are prone to the problem of "click operations being misidentified as swipe operations" as described earlier. For example, the target business scenario could be a game scenario.

[0126] In one embodiment, the target business scenario may include: a page browsing scenario.

[0127] Understandably, touch operations that trigger page turning on a touchscreen are usually set as swipe operations. However, in lock point mode, swipe operations are easily recognized as click operations and cannot be used to turn pages.

[0128] Optionally, if it is determined that the current page browsing scenario is in progress, and the first touch operation is moved in the same direction based on at least three frames of second touch coordinates, the lock point mode can be deactivated. This is to avoid the situation where the swipe operation is always identified as a click operation and page turning cannot be performed, thus improving the page turning experience in the page browsing scenario.

[0129] Understandably, in the logical design of page turning functions, there are usually corresponding page turning areas set up on the page. Page turning can only be achieved by triggering a swipe operation in the page turning area. This is to avoid accidental page turning and to allow other function trigger areas to be designed in other areas left on the page.

[0130] Optionally, if the target business scenario is a page browsing scenario, and the first touch coordinate is located in the page turning area corresponding to the target page, then the lock point mode can be deactivated if it is determined that the first touch operation moves in the same direction based on at least three frames of second touch coordinates.

[0131] By implementing the above method, when it is determined that the current target business scenario is a game scenario, a page browsing scenario, or other similar scenarios, the touch method provided in this application embodiment can be implemented to optimize the user's touch experience in these target business scenarios.

[0132] 906. Based on at least three frames of second touch coordinates, determine the target cumulative number of steps that the first touch operation moves continuously in the same direction.

[0133] In one embodiment, at least three consecutive frames of second touch coordinates may include: the second touch coordinates corresponding to the current touch position, and the second touch coordinates corresponding to at least two touch positions before the current touch position;

[0134] Optionally, the frame difference between the second touch coordinate corresponding to the current touch position and the first touch coordinate is greater than or equal to a difference threshold. This difference threshold can be set by developers based on extensive development experience, or by users based on actual usage needs; typical values ​​may include 2 frames, 3 frames, etc., and are not limited here.

[0135] For example, assuming the first touch coordinate is the first frame, the second touch coordinate corresponding to the current touch position can be the third frame, the fourth frame, etc., without limitation.

[0136] In this study, it is considered that the touch coordinates in the initial few frames of the first touch operation are unstable and may affect the judgment result. To address this, the above method ensures that the second touch coordinates in the multiple frames used to determine whether the first touch operation moves in the same direction are not the touch coordinates in the initial few frames of the first touch operation, thereby improving the accuracy of subsequent determinations of whether the first touch operation moves in the same direction.

[0137] 908. If the target cumulative number of steps is greater than or equal to the threshold of the first step, then the first touch operation is determined to move in the same direction, and the lock point mode is released.

[0138] 910. When the electronic device is unlocked, the cumulative number of steps of the target that is currently moving continuously in the same direction during the first touch operation is cleared to zero.

[0139] In this embodiment, the electronic device can, under any circumstances, if it detects that the lock-point mode has been unlocked, reset the cumulative number of steps of the target continuously moving in the same direction during the first touch operation to zero. This can prevent the next detected touch operation from easily unlocking the lock-point mode, thus preventing the lock-point mode's anti-misidentification function from failing to function properly, thereby improving the user's touch experience.

[0140] Implementing the methods disclosed in the above embodiments, the touch position of the first touch operation is within the target touch area, and the touch screen will continue to report the first touch coordinates. Therefore, even if the touch finger slightly shifts, the touch screen will not report multiple consecutive touch coordinates, thereby avoiding the situation where a click operation is mistakenly identified as a swipe operation. Furthermore, the electronic device can detect the second touch coordinates corresponding to the touch position of the first touch operation during its movement through the touch screen. If, based on at least three frames of second touch coordinates, it is determined that the first touch operation moves in the same direction, it indicates that the first touch operation may be a swipe operation actively performed by the user, rather than a touch operation with an unfixed or irregular movement direction caused by slight finger shifts. In this regard, the electronic device can deactivate the lock-point mode, allowing subsequent touch coordinates to be reported normally, thereby optimizing the user's swipe operation. The touch experience is improved; and, when it is determined that the current target business scenario is a game scenario, a page browsing scenario, etc., the touch method provided in this application embodiment can be implemented to optimize the user's touch experience in these target business scenarios; and, it can ensure that at least three frames of second touch coordinates used to determine whether the first touch operation moves in the same direction are not the touch coordinates of the first touch operation in the initial stage, thereby improving the accuracy of subsequent determination of whether the first touch operation moves in the same direction; and, if the unlocking mode is detected, the target cumulative steps of the first touch operation moving continuously in the same direction are cleared to zero, thereby avoiding the situation where the next detected touch operation easily unlocks the lock mode, resulting in the lock mode's anti-misidentification function failing to function properly, thereby improving the user's touch experience.

[0141] Please see Figure 10 , Figure 10 This is a flowchart illustrating another touch control method disclosed in an embodiment of this application. Wherein:

[0142] 1000. When a touch is detected on the touch screen, the first touch coordinates are obtained and the lock point mode is entered. The first touch coordinates are the initial touch coordinates of the first touch operation.

[0143] 1002. Has the lock-point mode been deactivated? If yes, proceed to step 1004; if no, proceed to step 1006.

[0144] 1004. Reset the current accumulated steps.

[0145] 1006. Is the current touch position the second touch coordinate of the previous two frames? If yes, end the process; otherwise, proceed to step 1008.

[0146] 1008. Calculate the first relative movement distance between the current frame and the previous frame.

[0147] 1010. Calculate the second relative movement distance between the previous frame and the frame before that.

[0148] 1012. Calculate the target sum of the first relative movement distance and the second relative movement distance.

[0149] 1014. Based on the product of the first relative movement distance and the second relative movement distance, determine whether the two movements are in the same direction; if yes, proceed to step 1016; if no, proceed to step 1004.

[0150] 1016. Determine if the target sum is greater than the distance threshold; if yes, proceed to step 1018; if no, proceed to step 1004.

[0151] 1018. Increase the current cumulative steps by 1, which will be used as the target cumulative steps.

[0152] 1020. Determine if the cumulative number of steps to the target is greater than the threshold for the first step; if yes, proceed to step 1022; otherwise, end the process.

[0153] 1022. Unlock the lock point mode.

[0154] By implementing the above method, when an electronic device detects a first touch operation on the touchscreen, it can obtain the first touch coordinates corresponding to the first touch operation and enter a lock-point mode. In lock-point mode, when the touch position is within the target touch area, the touch screen reports the first touch coordinates. In lock-point mode, since the touch position of the first touch operation is within the target touch area, the touchscreen will continue to report the first touch coordinates. Therefore, even if the finger slightly shifts, the touchscreen will not report multiple consecutive touch coordinates, thus avoiding the misidentification of a click operation as a swipe operation. Furthermore, the electronic device can detect the second touch coordinates corresponding to the touch position during the movement of the first touch operation. If, based on at least three frames of second touch coordinates, it is determined that the first touch operation moves in the same direction, it indicates that the first touch operation is likely a swipe operation actively performed by the user, rather than a touch operation with an unfixed or irregular movement direction caused by slight finger shifts. In this case, the electronic device can deactivate the lock-point mode, allowing subsequent touch coordinates to be reported normally, thereby optimizing the user's swipe touch experience.

[0155] Please see Figure 11 , Figure 11 This is a schematic diagram of the structure of a touch device disclosed in an embodiment of this application. Optionally, this device can be applied to the aforementioned electronic device, which includes a touch screen. Optionally, the device may include an acquisition unit 1102, a detection unit 1104, and a release unit 1106, wherein:

[0156] The acquisition unit 1102 is used to acquire the first touch coordinates when a touch is detected on the touch screen, and switch to the lock point mode. The lock point mode is a mode in which the touch coordinates reported by the touch screen remain as the first touch coordinates when the touch position is within the target touch area.

[0157] The detection unit 1104 is used to detect the second touch coordinates corresponding to the touch position of the first touch operation during the movement process via the touch screen;

[0158] The release unit 1106 is used to release the lock point mode when it is determined that the first touch operation moves in the same direction based on at least three frames of second touch coordinates. When the lock point mode is released, the touch coordinates reported by the touch screen are the second touch coordinates corresponding to the touch position.

[0159] By implementing the above device, when an electronic device detects a first touch operation on the touchscreen, it can obtain the first touch coordinates corresponding to the first touch operation and enter a lock-point mode. In lock-point mode, when the touch position is within the target touch area, the touch screen reports the first touch coordinates. In lock-point mode, since the touch position of the first touch operation is within the target touch area, the touchscreen will continue to report the first touch coordinates. Therefore, even if the finger slightly shifts, the touchscreen will not report multiple consecutive touch coordinates, thus avoiding the misidentification of a click operation as a swipe operation. Furthermore, the electronic device can detect the second touch coordinates corresponding to the touch position during the movement of the first touch operation. If, based on at least three frames of second touch coordinates, it is determined that the first touch operation moves in the same direction, it indicates that the first touch operation is likely a swipe operation actively performed by the user, rather than a touch operation with an unfixed or irregular movement direction caused by slight finger deviation. In this case, the electronic device can deactivate the lock-point mode, allowing subsequent touch coordinates to be reported normally, thereby optimizing the user's swipe touch experience.

[0160] In an optional embodiment, the release unit 1106 is further configured to determine the target cumulative number of steps for the first touch operation to move continuously in the same direction based on at least three frames of second touch coordinates; and if the target cumulative number of steps is greater than or equal to the first step number threshold, then determine that the first touch operation moves in the same direction and release the lock point mode.

[0161] By implementing the above device, the electronic device can determine that the first touch operation is moving in the same direction only when the current cumulative number of steps is greater than or equal to the threshold of the first step. This is likely a normal swipe operation, rather than a touch operation caused by factors such as finger deviation or tremor. This eliminates the interference of factors such as finger deviation and tremor, and improves the accuracy of determination.

[0162] In an optional embodiment, the release unit 1106 is further configured to acquire at least three consecutive second touch coordinates, and calculate the relative movement distance between two adjacent second touch coordinates in the at least three consecutive second touch coordinates; and if, based on the multiple relative movement distances, it is determined that the touch positions corresponding to the at least three consecutive second touch coordinates move in the same direction, then the current accumulated step count is increased by one as the target accumulated step count.

[0163] By implementing the above device, the electronic device can determine whether each step of the first touch operation moves in the same direction based on the relative movement distance between each two adjacent second touch coordinates in at least three consecutive second touch coordinate frames. This method is simple and efficient, thereby reducing the difficulty and cost of implementation.

[0164] In an optional embodiment, the release unit 1106 is further configured to calculate the product of multiple relative moving distances to obtain a first calculation result; and if the first calculation result satisfies a first condition, determine that the touch positions corresponding to at least three consecutive second touch coordinates move in the same direction, and increase the current accumulated step count by one as the target accumulated step count.

[0165] By implementing the above device, the electronic device can determine whether the touch position of the three consecutive second touch coordinates moves in the same direction based on whether the product of the multiple relative movement distances corresponding to the three consecutive second touch coordinates satisfies the first condition. This calculation method is simple and efficient, reducing the difficulty and cost of implementing the method.

[0166] In an optional embodiment, the release unit 1106 is further configured to increment the current cumulative step count by one as the target cumulative step count when, based on multiple relative movement distances, it is determined that the touch positions corresponding to at least three consecutive second touch coordinates move in the same direction, and the cumulative distance corresponding to the multiple relative movement distances is greater than or equal to a distance threshold.

[0167] In one alternative embodiment, Figure 11 The apparatus shown may further include a first reset unit (not shown), wherein:

[0168] The first reset unit is used to reset the current accumulated steps to zero when it is determined, based on multiple relative movement distances, that the touch positions corresponding to the second touch coordinates of at least three frames of targets are not moving in the same direction.

[0169] By implementing the above device, the electronic device can determine that the first touch operation is a normal swipe operation only when the cumulative distance corresponding to multiple relative movement distances is greater than or equal to the distance threshold. This eliminates interference from factors such as finger offset and tremors, thereby avoiding subsequent misunderstandings of the lock-point mode and preventing the lock-point mode's anti-misidentification function from failing to function properly. This improves the user's touch experience.

[0170] In one optional embodiment, the first zeroing unit is used to zero out the current accumulated step count and lower the first step count threshold when the current accumulated step count is greater than the second step count threshold and less than the first step count threshold.

[0171] By implementing the above device, if the current cumulative number of steps is greater than the second step threshold, the first step threshold can be reduced, making it easier to meet the condition that the first touch operation is moving in the same direction. Thus, if the first touch operation is indeed a swipe operation, the lock point mode can be released more quickly, allowing the first touch operation to be recognized normally, thereby improving the user experience.

[0172] In one alternative embodiment, Figure 11 The illustrated device may also include a switching unit (not shown), wherein:

[0173] The switching unit is used to switch the current first step number threshold back to the initially configured first step number threshold after the first touch operation is detected to have ended, after lowering the first step number threshold.

[0174] By implementing the above device, after lowering the first step number threshold, if the first touch operation is detected to have ended, the electronic device can switch the current first step number threshold to the initially configured first step number threshold. This avoids the situation where the next detected touch operation easily unlocks the lock point mode, thus preventing the lock point mode's anti-misidentification function from failing to function properly, thereby improving the user's touch experience.

[0175] In one optional embodiment, the second touch coordinates of at least three consecutive frames include: the second touch coordinates corresponding to the current touch position, and the second touch coordinates corresponding to at least two touch positions before the current touch position;

[0176] The frame difference between the second touch coordinate corresponding to the current touch position and the first touch coordinate is greater than or equal to the difference threshold.

[0177] Considering that the touch coordinates in the initial few frames of the first touch operation are unstable and may affect the judgment result, the above-mentioned device ensures that the at least three frames of second touch coordinates used to determine whether the first touch operation moves in the same direction are not the touch coordinates in the initial few frames of the first touch operation, thereby improving the accuracy of subsequent determinations of whether the first touch operation moves in the same direction.

[0178] In one alternative embodiment, Figure 11 The apparatus shown may further include a second reset unit (not shown), wherein:

[0179] The second reset unit is used to reset the cumulative number of steps of the target that is currently moving continuously in the same direction when the electronic device is unlocked.

[0180] By implementing the above device, if the unlocking mode is detected, the cumulative number of steps of the target moving continuously in the same direction during the first touch operation is cleared to zero. This can prevent the next detected touch operation from easily unlocking the lock mode, which would cause the lock mode's anti-misidentification function to fail to function properly, thereby improving the user's touch experience.

[0181] In an optional embodiment, the release unit 1106 is further configured to release the lock point mode if, when the electronic device is in a target business scenario, it is determined that the first touch operation moves in the same direction based on at least three frames of second touch coordinates. The target business scenario includes: a game scenario or a web browsing scenario.

[0182] By implementing the above-described device, when it is determined that the current target business scenario is a game scenario, a web page browsing scenario, or other similar scenarios, the touch method provided in the embodiments of this application can be implemented to optimize the user's touch experience in these target business scenarios.

[0183] Please see Figure 12 , Figure 12 This is a schematic diagram of the structure of another electronic device disclosed in an embodiment of this application. For example... Figure 12 As shown, the electronic device may include:

[0184] Memory 1201 storing executable program code;

[0185] Processor 1202 coupled to memory 1201;

[0186] The processor 1202 calls the executable program code stored in the memory 1201 to execute the touch method disclosed in the above embodiments.

[0187] This application discloses a computer-readable storage medium storing a computer program that causes a computer to execute the touch methods disclosed in the above embodiments.

[0188] This application also discloses an application publishing platform, which is used to publish computer program products. When the computer program products are run on a computer, the computer performs some or all of the steps of the methods described in the above method embodiments.

[0189] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0190] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0191] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0192] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0193] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-accessible memory. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several requests to cause a computer device (which can be a personal computer, server, or network device, specifically a processor in the computer device) to execute some or all of the steps of the methods described in the various embodiments of this application.

[0194] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0195] The touch control method, device, electronic device, and storage medium disclosed in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A touch method, characterized in that, Applied to an electronic device, the electronic device including a touch screen, the method includes: When a touch is detected on the touchscreen, the first touch coordinates are obtained and the system switches to a lock point mode. The lock point mode is a mode in which the touch coordinates reported by the touchscreen remain the first touch coordinates when the touch position is within the target touch area. The first touch coordinates are the initial touch coordinates of the first touch operation. The touch screen is used to detect the second touch coordinates corresponding to the touch position of the first touch operation during the movement process; If it is determined from at least three frames of the second touch coordinates that the first touch operation moves in the same direction, then the lock point mode is released. When the lock point mode is released, the touch coordinates reported by the touch screen are the second touch coordinates corresponding to the touch position.

2. The method of claim 1, wherein, The step of deactivating the lock point mode if it is determined from at least three frames of the second touch coordinates that the first touch operation moves in the same direction includes: Based on at least three frames of the second touch coordinates, determine the target cumulative number of steps that the first touch operation moves continuously in the same direction; If the target cumulative number of steps is greater than or equal to the first step number threshold, then it is determined that the first touch operation moves in the same direction, and the lock point mode is released.

3. The method of claim 2, wherein, Determining the target cumulative number of steps for the first touch operation to move continuously in the same direction based on at least three frames of the second touch coordinates includes: Obtain at least three consecutive frames of second touch coordinates, and calculate the relative movement distance between two adjacent frames of second touch coordinates in the at least three consecutive frames of second touch coordinates; If, based on the multiple relative movement distances, it is determined that the touch positions corresponding to the at least three consecutive second touch coordinates move in the same direction, then the current cumulative step count is increased by one as the target cumulative step count.

4. The method of claim 3, wherein, If, based on multiple relative movement distances, it is determined that the touch positions corresponding to the at least three consecutive second touch coordinates move in the same direction, then the current accumulated step count is incremented by one as the target accumulated step count, including: Calculate the product of the multiple relative movement distances to obtain a first calculation result; If the first calculation result satisfies the first condition, then the touch positions corresponding to the at least three consecutive second touch coordinates are determined to move in the same direction, and the current cumulative step count is increased by one as the target cumulative step count.

5. The method of claim 3, wherein, If, based on multiple relative movement distances, it is determined that the touch positions corresponding to the at least three consecutive second touch coordinates move in the same direction, then the current accumulated step count is incremented by one as the target accumulated step count, including: If, based on the multiple relative movement distances, it is determined that the touch positions corresponding to the at least three consecutive second touch coordinates move in the same direction, and the cumulative distance corresponding to the multiple relative movement distances is greater than or equal to a distance threshold, then the current cumulative step count is incremented by one as the target cumulative step count.

6. The method according to any one of claims 3 to 5, characterized in that, The method further includes: If, based on the multiple relative movement distances, it is determined that the touch positions corresponding to the second touch coordinates of the at least three target frames are not moving in the same direction, then the current accumulated step count is reset to zero.

7. The method according to claim 6, characterized in that, The step count reset to zero includes: If the current cumulative step count is greater than the second step count threshold but less than the first step count threshold, then the current cumulative step count is reset to zero and the first step count threshold is lowered.

8. The method according to claim 7, characterized in that, After reducing the threshold for the first step number, the method further includes: If the first touch operation is detected to have ended, the current first step count threshold is switched to the initially configured first step count threshold.

9. The method according to claim 2, characterized in that, The at least three consecutive second touch coordinates include: the second touch coordinates corresponding to the current touch position, and the second touch coordinates corresponding to at least two touch positions before the current touch position; The frame difference between the second touch coordinate corresponding to the current touch position and the first touch coordinate is greater than or equal to the difference threshold.

10. The method according to claim 2, characterized in that, The method further includes: When the electronic device releases the lock point mode, the cumulative number of steps of the target continuously moving in the same direction during the first touch operation is reset to zero.

11. The method according to claim 1, characterized in that, The step of deactivating the lock point mode if it is determined from at least three frames of the second touch coordinates that the first touch operation moves in the same direction includes: When the electronic device is in a target business scenario, if it is determined from at least three frames of the second touch coordinates that the first touch operation moves in the same direction, the lock point mode is released. The target business scenario includes: a game scenario or a web browsing scenario.

12. A touch device, characterized in that, Applied to an electronic device, the electronic device including a touch screen, the device includes: The acquisition unit is used to acquire the first touch coordinates when the touch screen is detected to have been touched, and switch to a lock point mode. The lock point mode is a mode in which the touch coordinates reported by the touch screen remain the first touch coordinates when the touch position is within the target touch area. The first touch coordinates are the initial touch coordinates of the first touch operation. The detection unit is used to detect the second touch coordinates corresponding to the touch position of the first touch operation during the movement process via the touch screen; The release unit is used to release the lock point mode when it is determined from at least three frames of the second touch coordinates that the first touch operation moves in the same direction. When the lock point mode is released, the touch coordinates reported by the touch screen are the second touch coordinates corresponding to the touch position.

13. An electronic device, characterized in that, The method includes a memory storing executable program code and a processor coupled to the memory; wherein the processor invokes the executable program code stored in the memory to perform the method as described in any one of claims 1 to 11.

14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 11.