Touch operation processing method and device, electronic equipment, and storage medium
By adjusting the contact point distance threshold and setting a smaller contact point distance based on the user's posture, the problem of poor touch operation sensitivity of electronic devices in a lying position is solved, and the operation accuracy is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2023-09-13
- Publication Date
- 2026-04-28
AI Technical Summary
When the user is lying down, multiple touch points are prone to merging incorrectly, resulting in poor touch sensitivity.
Adjust the contact point distance threshold according to the user's posture, and set a smaller contact point distance threshold for lying posture to reduce the probability of touch point merging.
It improves the touch operation sensitivity of electronic devices in a lying position and reduces the occurrence of incorrect touch points.
Smart Images

Figure CN119620851B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic device technology, and more specifically, to a touch operation processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of science and technology, electronic devices are becoming increasingly widespread and feature-rich, becoming an essential part of people's daily lives. Currently, electronic devices are generally designed with touchscreens for users to operate. However, during touchscreen operations, multiple touch points may exist simultaneously (such as both hands touching at the same time), causing the electronic device to fail to respond accurately to touch operations, resulting in poor touch sensitivity. Summary of the Invention
[0003] In view of the above problems, this application proposes a touch operation processing method, apparatus, electronic device, and storage medium to solve the above problems.
[0004] In a first aspect, embodiments of this application provide a touch operation processing method applied to an electronic device, the electronic device including a touch screen, the method comprising: when the electronic device is in a holding state, acquiring the user posture corresponding to the holder of the electronic device; if it is determined based on the user posture that the holder is in a non-reclining posture, then determining a merging distance threshold of the electronic device as a first merging distance threshold, wherein the merging distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points acting on the touch screen that need to be merged into a single touch point; or if it is determined based on the user posture that the holder is in a reclining posture, then determining the merging distance threshold of the electronic device as a second merging distance threshold, wherein the first merging distance threshold is greater than the second merging distance threshold.
[0005] Secondly, embodiments of this application provide a touch operation processing device applied to an electronic device, the electronic device including a touch screen, the device including: a user posture acquisition module, used to acquire the user posture corresponding to the holder of the electronic device when the electronic device is in a holding state; a first merging point distance threshold determination module, used to determine the merging point distance threshold of the electronic device as a first merging point distance threshold if it is determined based on the user posture that the holder is in a non-lying posture, wherein the merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into a single touch point acting on the touch screen; or a second merging point distance threshold determination module, used to determine the merging point distance threshold of the electronic device as a second merging point distance threshold if it is determined based on the user posture that the holder is in a lying posture, wherein the first merging point threshold is greater than the second merging point distance threshold.
[0006] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor performs the above-described method.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, which can be invoked by a processor to execute the above-described method.
[0008] The touch operation processing method, apparatus, electronic device, and storage medium provided in this application embodiment, when the electronic device is in a holding state, acquires the user posture corresponding to the holder of the electronic device. If it is determined based on the user posture that the holder is not in a lying position, then the merging point distance threshold of the electronic device is determined as a first merging point distance threshold. The merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen. Alternatively, if it is determined based on the user posture that the holder is in a lying position, then the merging point distance threshold of the electronic device is determined as a second merging point distance threshold that is smaller than the first merging point distance threshold. That is, by setting the electronic device to a smaller merging point distance threshold when the holder of the electronic device is holding and operating the electronic device in a lying position, the difficulty of merging the points is increased, thereby improving the sensitivity of holding and operating the electronic device in a lying position. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0010] Figure 1 A flowchart illustrating a touch operation processing method according to an embodiment of this application is shown;
[0011] Figure 2 This illustration shows a diagram of the electronic device provided in this application, where the user is in a non-lying position.
[0012] Figure 3 This illustration shows a diagram of a user holding the electronic device provided in an embodiment of this application in a lying position;
[0013] Figure 4 A flowchart illustrating a touch operation processing method according to an embodiment of this application is shown;
[0014] Figure 5 A flowchart illustrating a touch operation processing method according to an embodiment of this application is shown;
[0015] Figure 6 This application shows Figure 5 The flowchart of step S320 of the touch operation processing method is shown.
[0016] Figure 7 This application shows Figure 6 The flowchart of step S321 of the touch operation processing method is shown.
[0017] Figure 8 This application shows Figure 6 The flowchart of step S322 of the touch operation processing method is shown.
[0018] Figure 9 A flowchart illustrating a touch operation processing method according to an embodiment of this application is shown;
[0019] Figure 10 A flowchart illustrating a touch operation processing method according to an embodiment of this application is shown;
[0020] Figure 11 A block diagram of a touch operation processing device according to an embodiment of this application is shown;
[0021] Figure 12A block diagram of an electronic device for performing a touch operation processing method according to an embodiment of the present application is shown;
[0022] Figure 13 A storage unit for storing or carrying program code implementing a touch operation processing method according to an embodiment of the present application is shown. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0024] Currently, with the increasing weight of electronic devices (such as smartphones), when a user holds an electronic device in a lying position, the device is prone to slipping and falling from their hand due to the user's posture and the device's weight. Therefore, to prevent this, users often grip the device tightly. In this situation, when operating the device (e.g., using both hands), one hand often needs to grip the edge of the screen while the other hand performs touch operations on the touchscreen. At this time, there may be multiple touch points on the touchscreen, and the distance between these touch points is generally small. In this case, the electronic device will recognize the current touch point as a single touch point, thus merging multiple touch points, resulting in a mismatch with the user's actual touch operation needs and causing poor touch sensitivity.
[0025] To address the aforementioned problems, the inventors, through extensive research, discovered and proposed the touch operation processing method, apparatus, electronic device, and storage medium provided in the embodiments of this application. By reducing the contact point distance threshold of the electronic device when the user is in a lying position, the difficulty of touching the contact point is increased, thereby improving the sensitivity of the electronic device when held in a lying position. The specific touch operation processing method will be described in detail in the subsequent embodiments.
[0026] Please see Figure 1 , Figure 1 A flowchart illustrating a touch operation processing method according to an embodiment of this application is shown. This method improves the sensitivity of operating the electronic device while in a lying position by setting a smaller contact distance threshold, thereby increasing the difficulty of contact and enhancing the sensitivity of operation. In specific embodiments, this touch operation processing method is applied to, for example... Figure 11 The touch operation processing device 200 and the electronic device 100 equipped with the touch operation processing device 200 are shown. Figure 12The following will use an electronic device as an example to illustrate the specific process of this embodiment. Of course, it is understood that the electronic device used in this embodiment may include smartphones, tablets, wearable electronic devices, etc., and is not limited thereto. In this embodiment, the electronic device includes a touchscreen. The following will focus on... Figure 1 The process shown is described in detail. The touch operation processing method may specifically include the following steps:
[0027] Step S110: When the electronic device is in a holding state, obtain the user posture corresponding to the person holding the electronic device.
[0028] In this embodiment, it is possible to detect whether the electronic device is being held. If the electronic device is detected to be held, the user posture corresponding to the person holding the device can be obtained; if the electronic device is detected not to be held (e.g., the electronic device is placed on a table, or the electronic device is placed in a pocket), the user posture corresponding to the person holding the device does not need to be obtained.
[0029] In some implementations, the detection can be performed using sensors built into the electronic device, such as capacitive sensors or pressure sensors built into the electronic device to detect the gripping state of the electronic device.
[0030] Taking capacitive sensors as an example, capacitive sensors can be placed around the mid-frame of the electronic device. Specifically, the mid-frame of the electronic device includes two long mid-frames and two short mid-frames. The short sides can be the bottom and the top, respectively, and the long sides are the sides. For example, four capacitive sensors can be placed on the two short mid-frames and the long mid-frames respectively. When the user is not holding the electronic device, the capacitance value detected by the four capacitive sensors is 0. When the capacitive sensors detect that the capacitance value on one side mid-frame reaches a preset value, it is determined that the electronic device is currently held with one hand; when the capacitance values on both side mid-frames reach the preset values, it is determined that the electronic device is currently held with both hands; when the capacitance values on the bottom mid-frame and the top mid-frame reach the preset values, it is determined that the electronic device is currently held with both hands.
[0031] Taking a pressure sensor as an example, when a user holds an electronic device, they apply force to the edge touch area. Different gripping methods result in different touch operation locations. Therefore, the current gripping state can be determined by detecting the current touch position within the edge touch area. The edge touch area can be either the left or right side of the electronic device, or the left or right edge of the front touchscreen. This embodiment uses the left and right side of the electronic device as an example. In this case, touch areas need to be provided on both the left and right sides of the electronic device to detect touch operations on those sides. These touch areas can be any type of touchscreen, such as pressure-sensitive touchscreens, resistive touchscreens, capacitive touchscreens, infrared touchscreens, or surface acoustic wave touchscreens. Optionally, the touch areas on the left and right sides can be pressure-sensitive touchscreens, i.e., pressure-sensitive touchscreens, which can sense the pressure applied, thereby detecting the gripping state of the electronic device.
[0032] Of course, the specific method for detecting the holding state of the electronic device is not limited in this embodiment.
[0033] As an feasible approach, the device posture of the electronic device can be obtained, and based on the device posture, the user posture of the person holding the electronic device can be obtained.
[0034] As another feasible approach, images captured by electronic devices can be obtained, and based on these images, the user posture corresponding to the holder of the electronic device can be determined.
[0035] As another feasible approach, the grip information of the electronic device can be obtained, and based on this grip information, the user posture corresponding to the gripper of the electronic device can be obtained. The grip information may include one or a combination of grip position, grip width, and grip angle.
[0036] In some implementations, once the user's posture is obtained, it can be determined whether the person holding the electronic device is in a lying or non-lying posture. Optionally, a non-lying posture may include walking, running, standing, sitting, etc., and is not limited thereto.
[0037] As one feasible approach, the electronic device can pre-acquire and store posture information corresponding to a lying posture. Upon acquiring a user's posture, it can then acquire the corresponding posture information and compare it with the posture information corresponding to the lying posture. If the comparison result indicates a match between the user's posture and the lying posture, it can be determined that the user is in a lying posture. If the comparison result indicates a mismatch, it can be determined that the user is in a non-lying posture.
[0038] Step S120: If it is determined that the user is in a non-reclining posture based on the user's posture, then the merging point distance threshold of the electronic device is determined as the first merging point distance threshold, wherein the merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen.
[0039] The electronic device may be configured with a merging distance threshold. Optionally, this merging distance threshold is used to characterize the maximum distance between at least two touch points on the touchscreen that need to be merged into one touch point. That is, based on the merging distance threshold set by the electronic device, if at least two touch points are detected on the touchscreen, the distance between the at least two touch points can be obtained. If the distance between the at least two touch points is less than or equal to the merging distance threshold set by the electronic device, it can be determined that the at least two touch points need to be merged into one touch point; if the distance between the at least two touch points is greater than the merging distance threshold set by the electronic device, it can be determined that the at least two touch points do not need to be merged into one touch point.
[0040] In this embodiment, if the user's posture determines that the user is not in a reclining position, the contact distance threshold of the electronic device can be determined as the first contact distance threshold. Specifically, if the user's posture indicates that the user is not in a reclining position, it means that the user is not gripping the electronic device deeply to prevent it from slipping and falling. Therefore, in this case, the probability of multiple touch points being incorrectly merged due to small spacing when the user operates the electronic device with multiple fingers of one or both hands is low. Based on this, for the case where the user is not in a reclining position, the contact distance threshold of the electronic device can be determined as a larger first contact distance threshold. In this case, if the spacing between multiple touch points is within the first contact distance threshold, it can be considered a normal accidental touch or active multi-finger triggering by the user, and the multiple touch points can be merged into one touch point. If the spacing between multiple touch points is outside the first contact distance threshold, it can be considered as multiple different touch points, and each of the multiple touch points can be determined as a single touch point.
[0041] In some implementations, the first merging point distance threshold can be the merging point distance threshold set by default for the electronic device.
[0042] As one possible approach, the first merging point distance threshold may include 10mm, that is, when the distance between multiple touch points is within 10mm, the multiple touch points are merged into one touch point, and when the distance between multiple touch points is more than 10mm, the multiple touch points are each determined as one touch point (the multiple touch points are not merged into one touch point).
[0043] Please see Figure 2 , Figure 2 This illustration shows a schematic diagram of the electronic device provided in an embodiment of this application, where the user is in a non-lying position. Figure 2 As shown, the electronic device 100 is in a holding state, and the person holding the electronic device 100 is in a non-lying posture (sitting posture).
[0044] Step S130: If it is determined that the holder is in a lying position based on the user's posture, then the fusion point distance threshold of the electronic device is determined as the second fusion point distance threshold, wherein the first fusion point threshold is greater than the second fusion point distance threshold.
[0045] In this embodiment, if the user's posture determines that the user is in a lying position, the contact point distance threshold of the electronic device can be determined as a second contact point distance threshold. This second contact point distance threshold is smaller than the first contact point distance threshold. It is understood that because the contact point distance threshold of the electronic device is smaller, it is more difficult for multiple touch points to merge into one touch point, thus avoiding erroneous merging of multiple touch points in a lying position and improving the sensitivity of holding and operating the electronic device in a lying position. Specifically, if the user's posture determines that the user is in a lying position, it indicates that the user will grip the electronic device deeply to prevent it from slipping and falling. Therefore, in this situation, when the user operates the electronic device with multiple fingers of one hand or both hands, the probability of multiple touch points being too close together and erroneously merging is higher. Based on this, when the user is in a lying position, the contact distance threshold of the electronic device can be set to a smaller second contact distance threshold. In this case, if the distance between multiple touch points is within the second contact distance threshold, it can be considered as a normal accidental touch or a user actively triggering the touch with multiple fingers, and multiple touch points can be merged into one touch point. If the distance between multiple touch points is outside the second contact distance threshold, it can be considered as multiple different touch points, and each of the multiple touch points can be determined as one touch point.
[0046] In some implementations, the second joint distance threshold is less than the first joint distance threshold. The first joint distance threshold can be the joint distance threshold set by default for the electronic device. In this case, the second joint distance threshold can be obtained by subtracting a certain value from the default joint distance threshold of the electronic device.
[0047] As one possible approach, the second merging point distance threshold may include 8mm, that is, when the distance between multiple touch points is within 8mm, the multiple touch points are merged into one touch point, and when the distance between multiple touch points is outside 8mm, the multiple touch points are each determined as one touch point (the multiple touch points are not merged into one touch point).
[0048] Please see Figure 3 , Figure 3 This illustration shows a diagram of a user holding the electronic device provided in an embodiment of this application in a lying position. Figure 3 As shown, the electronic device 100 is in a holding state, and the person holding the electronic device 100 is in a lying position.
[0049] One embodiment of this application provides a touch operation processing method. When the electronic device is in a holding state, the user posture corresponding to the holder of the electronic device is obtained. If it is determined based on the user posture that the holder is not in a lying position, the merging point distance threshold of the electronic device is determined as a first merging point distance threshold. The merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen. Alternatively, if it is determined based on the user posture that the holder is in a lying position, the merging point distance threshold of the electronic device is determined as a second merging point distance threshold that is smaller than the first merging point distance threshold. That is, by setting the electronic device to a smaller merging point distance threshold when the holder of the electronic device is in a lying position, the difficulty of merging the points is increased, thereby improving the sensitivity of holding and operating the electronic device in a lying position.
[0050] Please see Figure 4 , Figure 4 A schematic flowchart of a touch operation processing method according to an embodiment of this application is shown. This method is applied to the aforementioned electronic device, which includes a touchscreen. The following will focus on... Figure 4 The process shown is described in detail. The touch operation processing method may specifically include the following steps:
[0051] Step S210: When the electronic device is in a holding state, obtain the user posture corresponding to the person holding the electronic device.
[0052] Step S220: If it is determined based on the user's posture that the holder is in a non-reclining posture, then the merging point distance threshold of the electronic device is determined as the first merging point distance threshold, wherein the merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen.
[0053] For a detailed description of steps S210-S220, please refer to steps S110-S120, which will not be repeated here.
[0054] Step S230: If at least two touch points acting on the touch screen are detected, then determine the first touch position corresponding to each of the at least two touch points.
[0055] In this embodiment, when it is determined that the user is not in a reclining posture and the contact point distance threshold of the electronic device is determined as the first contact point distance threshold, touch operations applied to the touchscreen can be detected. Specifically, if at least two touch points applied to the touchscreen are detected, the touch positions corresponding to each of the at least two touch points can be determined as the first touch positions. Optionally, the at least two touch points can each correspond to at least two touch operations applied to the touchscreen. These at least two touch operations can be triggered simultaneously by multiple fingers of one hand of the user, or by one or more fingers of both hands of the user; no limitation is imposed here.
[0056] In some implementations, the touchscreen of the electronic device can be a capacitive touchscreen. Specifically, the touch position corresponding to a touch point on the touchscreen can be determined using the capacitive sensing principle of the touchscreen. Specifically, the touchscreen identifies the coordinates of at least two touch points by calculating the capacitance difference between at least two touch operations that are in contact with and not in contact with the touchscreen. By calculating the area of capacitance difference, finding the peak difference value in that area, and determining whether it falls within a certain preset reporting threshold, the reporting coordinates of at least two touch points can be determined as the first touch position.
[0057] Step S240: Determine the first distance between the at least two touch points based on the first touch position corresponding to each of the at least two touch points.
[0058] In this embodiment, if the first touch position corresponding to each of the at least two touch points is determined, the distance between the at least two touch points can be determined as the first distance based on the first touch position corresponding to each of the at least two touch points.
[0059] In some implementations, when the first touch position corresponding to each of the at least two touch points is determined, the first touch position corresponding to each of the at least two touch points can be calculated by a distance algorithm to determine the first distance between the at least two touch points.
[0060] Step S250: If the first spacing is less than or equal to the first merging point distance threshold, then the at least two touch points are merged into one touch point.
[0061] In some implementations, once a first spacing is obtained, the first spacing can be compared with a first merging point distance threshold to determine the relationship between the first spacing and the first merging point distance threshold. Optionally, the relationship between the first spacing and the first merging point distance threshold may include: the first spacing is less than the first merging point distance threshold, the first spacing is equal to the first merging point distance threshold, or the first spacing is greater than the first merging point distance threshold.
[0062] In this embodiment, if the first spacing is determined to be less than or equal to the first merging point distance threshold based on the relationship between the first spacing and the first merging point distance threshold, then it can be considered that the spacing between at least two touch points is small, satisfying the merging point condition, and thus at least two touch points can be merged into one touch point. It is understood that after merging into one touch point, the peak reporting points of the capacitance data of at least two touch points can be calculated as one reporting point data.
[0063] In this embodiment, if, based on the relationship between the first spacing and the first merging point distance threshold, it is determined that the first spacing is greater than the first merging point distance threshold, then it can be considered that the spacing between at least two touch points is too large and does not meet the merging point condition. Therefore, the at least two touch points will not be merged into one touch point, and each of the at least two touch points will be determined as a separate touch point. It is understood that, without merging them into one touch point, the peak reporting points of the capacitance data of the at least two touch points can be calculated as different reporting point data.
[0064] Step S260: If it is determined that the holder is in a lying position based on the user's posture, then the fusion point distance threshold of the electronic device is determined as the second fusion point distance threshold, wherein the first fusion point threshold is greater than the second fusion point distance threshold.
[0065] For a detailed description of step S260, please refer to step S130, which will not be repeated here.
[0066] Step S270: If at least two touch points acting on the touch screen are detected, then determine the second touch position corresponding to each of the at least two touch points.
[0067] In this embodiment, when it is determined that the user is in a lying position and the contact point distance threshold of the electronic device is determined as the second contact point distance threshold, touch operations applied to the touchscreen can be detected. Specifically, if at least two touch points applied to the touchscreen are detected, the touch positions corresponding to each of the at least two touch points can be determined as the second touch positions. Optionally, the at least two touch points can each correspond to at least two touch operations applied to the touchscreen. These at least two touch operations can be triggered simultaneously by multiple fingers of one hand of the user, or by one or more fingers of both hands of the user; no limitation is imposed here.
[0068] In some implementations, the touchscreen of the electronic device can be a capacitive touchscreen. Specifically, the touch position corresponding to a touch point on the touchscreen can be determined using the capacitive sensing principle of the touchscreen. Specifically, the touchscreen identifies the coordinates of at least two touch points by calculating the capacitance difference between at least two touch operations that are in contact with and not in contact with the touchscreen. By calculating the area of capacitance difference, finding the peak difference value in that area, and determining whether it falls within a certain preset reporting threshold, the reporting coordinates of at least two touch points can be determined as the second touch position.
[0069] Step S280: Determine the second distance between the at least two touch points based on the second touch positions corresponding to each of the at least two touch points.
[0070] In this embodiment, if the second touch position corresponding to each of the at least two touch points is determined, the distance between the at least two touch points can be determined as the second distance based on the second touch position corresponding to each of the at least two touch points.
[0071] In some implementations, when the second touch position corresponding to each of the at least two touch points is determined, the second touch position corresponding to each of the at least two touch points can be calculated by a distance algorithm to determine the second distance between the at least two touch points.
[0072] Step S290: If the second spacing is less than or equal to the second merging point distance threshold, then the at least two touch points are merged into one touch point.
[0073] In some implementations, once a second spacing is obtained, it can be compared with a second merging point distance threshold to determine the relationship between the second spacing and the second merging point distance threshold. Optionally, the relationship between the second spacing and the second merging point distance threshold may include: the second spacing is less than the second merging point distance threshold, the second spacing is equal to the second merging point distance threshold, or the second spacing is greater than the second merging point distance threshold.
[0074] In this embodiment, if the second distance is determined to be less than or equal to the second merging point distance threshold based on the relationship between the second distance and the second merging point distance threshold, then it can be considered that the distance between at least two touch points is small, satisfying the merging point condition, and thus at least two touch points can be merged into one touch point. It is understood that after merging into one touch point, the peak reporting points of the capacitance data of at least two touch points can be calculated as one reporting point data.
[0075] In this embodiment, if the second distance is determined to be greater than the second merging point distance threshold based on the relationship between the second distance and the second merging point distance threshold, then it can be considered that the distance between at least two touch points is too large and does not meet the merging point condition. Therefore, the at least two touch points will not be merged into one touch point, and each of the at least two touch points will be determined as a separate touch point. It is understood that if they are not merged into one touch point, the peak reporting points of the capacitance data of the at least two touch points can be calculated as different reporting point data.
[0076] The touch operation processing method provided in one embodiment of this application is compared to... Figure 1 The touch operation processing method shown in this embodiment further includes the following steps: If the electronic device's point-of-contact distance threshold is set to a first point-of-contact distance threshold, and at least two touch points acting on the touchscreen are detected, then the first touch position corresponding to each of the at least two touch points is determined. Based on the first touch positions corresponding to each of the at least two touch points, a first distance between the at least two touch points is determined. If the first distance is less than the first point-of-contact distance threshold, then the at least two touch points are merged into one touch point. If the electronic device's point-of-contact distance threshold is set to a second point-of-contact distance threshold, and at least two touch points acting on the touchscreen are detected, then the second touch position corresponding to each of the at least two touch points is determined. Based on the second touch positions corresponding to each of the at least two touch points, a second distance between the at least two touch points is determined. If the second distance is less than the second point-of-contact distance threshold, then the at least two touch points are merged into one touch point. This allows for setting different point-of-contact thresholds based on the user's posture, and using different point-of-contact distance thresholds to determine the distance between at least two touch points in different scenarios. This effectively reduces the probability of point-of-contact when the user is holding and operating the electronic device in a lying position, thereby reducing the error rate of holding and operating the electronic device while lying down.
[0077] Please see Figure 5 , Figure 5 A schematic flowchart of a touch operation processing method according to an embodiment of this application is shown. This method is applied to the aforementioned electronic device, which includes a touchscreen and an accelerometer. The following will focus on... Figure 5 The process shown is described in detail. The touch operation processing method may specifically include the following steps:
[0078] Step S310: When the electronic device is in a holding state, acquire the three-axis acceleration data of the electronic device collected by the acceleration sensor, wherein the three-axis acceleration data includes the X-axis acceleration component, the Y-axis acceleration component and the Z-axis acceleration component.
[0079] Optionally, the electronic device may include an acceleration sensor.
[0080] In this embodiment, when the electronic device is determined to be in a gripped state, the accelerometer can be controlled to detect the three-axis acceleration data of the electronic device and acquire the three-axis acceleration data of the electronic device collected by the accelerometer. This three-axis acceleration data may include X-axis acceleration components, Y-axis acceleration components, and Z-axis acceleration components. The X, Y, and Z directions can be determined according to the posture of the electronic device.
[0081] In some implementations, the accelerometer can be controlled to detect the triaxial acceleration data of the electronic device in real time; the accelerometer can be controlled to detect the triaxial acceleration data of the electronic device at preset time intervals; the accelerometer can be controlled to detect the triaxial acceleration data of the electronic device at preset time points; or the accelerometer can be controlled to detect the triaxial acceleration data of the electronic device according to other preset rules, etc., without limitation.
[0082] Step S320: Based on the triaxial acceleration data, obtain the user posture corresponding to the holder of the electronic device.
[0083] In this embodiment, when the three-axis acceleration data of the electronic device is obtained, the user posture corresponding to the holder of the electronic device can be obtained based on the three-axis acceleration data. That is, when the three-axis acceleration data of the electronic device is obtained, it can be determined that the holder of the electronic device is in a lying position, or that the holder of the electronic device is in a non-lying position.
[0084] In some implementations, the electronic device may have pre-set and stored triaxial acceleration data corresponding to the user's lying posture as preset triaxial acceleration data. Based on this, when the triaxial acceleration data of the electronic device is obtained, it can be compared with the preset triaxial acceleration data. If the triaxial acceleration data matches the preset triaxial acceleration data, it is determined that the user is in a lying posture; if the triaxial acceleration data does not match the preset triaxial acceleration data, it is determined that the user is in a non-lying posture.
[0085] Please see Figure 6 , Figure 6This application shows Figure 5 The flowchart shown illustrates step S320 of the touch operation processing method. The following will focus on... Figure 6 The process shown will be described in detail, and the method may specifically include the following steps:
[0086] Step S321: If the touch screen is determined to be facing downwards based on the Z-axis acceleration component, and the angle between the touch screen and the horizontal plane is determined to be within a preset angle range based on the X-axis acceleration component and the Z-axis acceleration component or based on the Y-axis acceleration component and the Z-axis acceleration component, then it is determined that the person holding the electronic device is in a lying posture.
[0087] In some implementations, when the three-axis acceleration data (X-axis acceleration component, Y-axis acceleration component, and Z-axis acceleration component) of the electronic device are obtained, the orientation of the electronic device can be determined by the Z-axis acceleration component, and the angle between the electronic device and the horizontal plane can be determined by the X-axis acceleration component and the Z-axis acceleration component or the Y-axis acceleration component and the Z-axis acceleration component.
[0088] In this embodiment, if the touch screen of the electronic device is determined to be facing downwards based on the Z-axis acceleration component, and the angle between the touch screen of the electronic device and the horizontal plane is determined to be within a preset angle range based on the X-axis acceleration component and the Z-axis acceleration component or based on the Y-axis acceleration component and the Z-axis acceleration component, then it can be determined that the person holding the electronic device is in a lying posture.
[0089] As an implementable approach, given the X-axis acceleration components, Y-axis acceleration components, and Z-axis acceleration components, if the touchscreen of the electronic device is determined to be facing downwards based on the Z-axis acceleration component, and the angle between the touchscreen of the electronic device and the horizontal plane is determined to be between 30° and 90° based on the X-axis and Z-axis acceleration components or the Y-axis and Z-axis acceleration components, then it can be determined that the person holding the electronic device is in a lying position.
[0090] In this embodiment, if it is determined based on the Z-axis acceleration component that the touch screen of the electronic device is not facing downwards, or if it is determined based on the X-axis acceleration component and the Z-axis acceleration component or based on the Y-axis acceleration component and the Z-axis acceleration component that the angle between the touch screen of the electronic device and the horizontal plane is not within a preset angle range, then it can be determined that the person holding the electronic device is in a non-lying posture.
[0091] As an feasible approach, given the X-axis acceleration components, Y-axis acceleration components, and Z-axis acceleration components, if it is determined based on the Z-axis acceleration component that the touchscreen of the electronic device is not facing downwards (e.g., facing upwards, facing diagonally downwards, facing diagonally upwards, etc.), and it is determined based on the X-axis and Z-axis acceleration components or the Y-axis and Z-axis acceleration components that the angle between the touchscreen of the electronic device and the horizontal plane is not between 30° and 90° (e.g., the angle is 120°), then it can be determined that the person holding the electronic device is in a non-lying posture.
[0092] Please see Figure 7 , Figure 7 This application shows Figure 6 The flowchart shown illustrates step S321 of the touch operation processing method. The following will focus on... Figure 7 The process shown will be described in detail, and the method may specifically include the following steps:
[0093] Step S3211: If it is determined that the touch screen is facing downwards based on the Z-axis acceleration component, and it is determined that the angle between the touch screen and the horizontal plane is within a preset angle range based on the X-axis acceleration component and the Z-axis acceleration component or based on the Y-axis acceleration component and the Z-axis acceleration component, then determine a first duration for which the touch screen remains facing downwards and the angle between it and the horizontal plane is within the preset angle range.
[0094] In some implementations, if it is determined that the touchscreen of the electronic device is facing downwards based on the Z-axis acceleration component, and it is determined that the angle between the touchscreen and the horizontal plane is within a preset angle range based on the X-axis and Z-axis acceleration components or based on the Y-axis and Z-axis acceleration components, the duration for which the touchscreen remains facing downwards and within the preset angle range can be determined as a first duration. Optionally, the electronic device may include a timer, which can be used to determine the first duration for which the touchscreen remains facing downwards and within the preset angle range.
[0095] As one feasible approach, during the process of counting the time the touchscreen of the electronic device remains facing downwards and the angle between it and the horizontal plane is within a preset angle range, if the electronic device always remains facing downwards and the angle between it and the horizontal plane remains unchanged or changes within a preset angle range, then the duration can be accumulated.
[0096] Step S3212: If the first duration reaches the first duration threshold, it is determined that the person holding the electronic device is in a lying position.
[0097] In some implementations, the electronic device may pre-set and store a first duration threshold, which serves as the basis for determining the first duration. Therefore, in this embodiment, upon obtaining the first duration, it can be compared with the first duration threshold to determine whether the first duration has reached the threshold. If it is determined that the first duration has reached the first duration threshold, it can be determined that the user holding the electronic device is in a lying position. If it is determined that the first duration has not reached the first duration threshold, the duration can continue to accumulate until the first duration reaches the first duration threshold, at which point it can be determined that the user holding the electronic device is in a lying position. Based on this, by adding the duration determination, the accuracy of the lying position determination can be improved.
[0098] Optionally, the first duration threshold may include 10 seconds.
[0099] Step S322: If the touch screen switches from facing downwards to not facing downwards, and / or switches from having an angle with the horizontal plane within a preset angle range to having an angle with the horizontal plane outside the preset angle range, then it is determined that the person holding the electronic device has switched from a lying posture to a non-lying posture.
[0100] In this embodiment, when it is determined that the user holding the electronic device is in a lying position, the system can detect whether the user's posture has changed to determine whether the user has switched from a lying position to a non-lying position. Optionally, the system can detect whether the user's posture has changed in real time; it can detect whether the user's posture has changed at preset time intervals; it can detect whether the user's posture has changed at preset time points; or it can detect whether the user's posture has changed according to other preset rules, etc., which are not limited here.
[0101] In some implementations, when it is determined that the user holding the electronic device is in a lying position, the system can check whether the touchscreen of the electronic device changes from facing downwards to not facing downwards, and whether the angle between the touchscreen and the horizontal plane changes from within a preset angle range to outside a preset angle range. Specifically, if it is determined that the touchscreen changes from facing downwards to not facing downwards, and / or the angle between the touchscreen and the horizontal plane changes from within a preset angle range to outside a preset angle range, then the user holding the electronic device can change from a lying position to a non-lying position.
[0102] Please see Figure 8 , Figure 8 This application shows Figure 6The flowchart shown illustrates step S322 of the touch operation processing method. The following will focus on... Figure 8 The process shown will be described in detail, and the method may specifically include the following steps:
[0103] Step S3221: If the touch screen switches from facing downwards to not facing downwards, and / or switches from having an angle with the horizontal plane within a preset angle range to having an angle with the horizontal plane outside the preset angle range, then determine a second duration for which the touch screen remains not facing downwards and / or has an angle with the horizontal plane outside the preset angle range.
[0104] In some implementations, if it is determined based on the Z-axis acceleration component that the touchscreen of the electronic device is not facing downwards, and / or, based on the X-axis and Z-axis acceleration components or based on the Y-axis and Z-axis acceleration components, the angle between the touchscreen of the electronic device and the horizontal plane is not within a preset angle range, the duration for which the touchscreen of the electronic device remains not facing downwards and / or whose angle with the horizontal plane is not within the preset angle range can be determined as a second duration. Optionally, the electronic device may include a timer, which can be used to determine the second duration for which the touchscreen of the electronic device remains not facing downwards and / or whose angle with the horizontal plane is not within the preset angle range.
[0105] As an implementable approach, during the process of counting the time when the touch screen of the electronic device remains not facing downwards and the angle between it and the horizontal plane is not within a preset angle range, if the electronic device always remains not facing downwards and / or the angle between it and the horizontal plane remains unchanged or changes outside the preset angle range, then the duration can be accumulated.
[0106] Step S3222: If the second duration reaches the second duration threshold, then determine that the person holding the electronic device has switched from a lying posture to a non-lying posture.
[0107] In some implementations, the electronic device may pre-set and store a second duration threshold, which serves as the basis for determining the second duration. Therefore, in this embodiment, upon obtaining the second duration, it can be compared with the second duration threshold to determine whether the second duration has reached the threshold. Specifically, if the second duration reaches the threshold, it can be determined that the user holding the electronic device has switched from a lying position to a non-lying position. If the second duration has not reached the threshold, the duration can continue to accumulate until it reaches the threshold, at which point the user is determined to have switched from a lying position to a non-lying position. Based on this, by adding a duration determination, the accuracy of determining the lying position switch can be improved.
[0108] Optionally, the second duration threshold may include 3 seconds.
[0109] Step S323: Switch the junction distance threshold of the electronic device from the second junction distance threshold to the first junction distance threshold.
[0110] In this embodiment, when it is determined that the holder of the electronic device changes from a lying posture to a non-lying posture, the contact point distance threshold of the electronic device can be switched from the second contact point distance threshold to the first contact point distance threshold, so that the contact point distance threshold set by the electronic device is adapted to the posture of the holder of the electronic device, thereby improving the accuracy of contact point judgment.
[0111] Step S330: If it is determined that the user is in a non-lying posture based on the user's posture, then the merging point distance threshold of the electronic device is determined as the first merging point distance threshold, wherein the merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen.
[0112] Step S340: If it is determined that the holder is in a lying position based on the user's posture, then the fusion point distance threshold of the electronic device is determined as the second fusion point distance threshold, wherein the first fusion point threshold is greater than the second fusion point distance threshold.
[0113] For a detailed description of steps S330-S340, please refer to steps S120-S130, which will not be repeated here.
[0114] The touch operation processing method provided in one embodiment of this application is compared to... Figure 1 The touch operation processing method shown in this embodiment also collects the three-axis acceleration data of the electronic device through the accelerometer of the electronic device, and obtains the user posture corresponding to the holder of the electronic device based on the three-axis acceleration data, which can improve the accuracy of the obtained user posture.
[0115] Please see Figure 9 , Figure 9 A flowchart illustrating a touch operation processing method according to an embodiment of this application is shown. This method is applied to the aforementioned electronic device, which includes a touchscreen and a front-facing camera. The following will focus on... Figure 9 The process shown is described in detail. The touch operation processing method may specifically include the following steps:
[0116] Step S410: While the electronic device is in a holding state, acquire the image captured by the front-facing camera.
[0117] Optionally, the electronic device may include a front-facing camera. This front-facing camera may be fixedly mounted on one side of the electronic device's touchscreen, or it may be moved to the side of the touchscreen by rotating, sliding, or other means; no limitation is made here.
[0118] In this embodiment, when it is determined that the electronic device is in a holding state, the front-facing camera can be controlled to capture images and obtain the images captured by the front-facing camera.
[0119] In some implementations, the front-facing camera can be controlled to capture images in real time; the front-facing camera can be controlled to capture images at preset time intervals; the front-facing camera can be controlled to capture images at preset time points; the front-facing camera can be controlled to capture images according to other preset rules, etc., without limitation.
[0120] Step S420: Based on the image, obtain the user posture corresponding to the person holding the electronic device.
[0121] In this embodiment, when the image captured by the front-facing camera is obtained, the user posture corresponding to the person holding the electronic device can be obtained based on the image.
[0122] In some implementations, the electronic device can pre-acquire and store an image of the user in a lying position as a preset image. When an image captured by the front-facing camera is acquired, this image can be compared with the preset image to determine whether they match. If the image matches the preset image, it can be determined that the user holding the electronic device is in a lying position; if the image does not match the preset image, it can be determined that the user holding the electronic device is not in a lying position.
[0123] Step S430: If it is determined that the user is in a non-lying posture based on the user's posture, then the merging point distance threshold of the electronic device is determined as the first merging point distance threshold, wherein the merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen.
[0124] Step S440: If it is determined that the holder is in a lying position based on the user's posture, then the fusion point distance threshold of the electronic device is determined as the second fusion point distance threshold, wherein the first fusion point threshold is greater than the second fusion point distance threshold.
[0125] For a detailed description of steps S430-S440, please refer to steps S120-S130, which will not be repeated here.
[0126] The touch operation processing method provided in one embodiment of this application is compared to... Figure 1 The touch operation processing method shown in this embodiment also uses the front-facing camera of the electronic device to capture images, and obtains the user posture corresponding to the holder of the electronic device based on the images, which can improve the accuracy of the obtained user posture.
[0127] Please see Figure 10 , Figure 10 A schematic flowchart of a touch operation processing method according to an embodiment of this application is shown. This method is applied to the aforementioned electronic device, which includes a touchscreen. The following will focus on... Figure 10 The process shown is described in detail. The touch operation processing method may specifically include the following steps:
[0128] Step S510: When the electronic device is in a holding state, periodically acquire the user posture corresponding to the person holding the electronic device.
[0129] In this embodiment, when the electronic device is in a holding state, the user posture corresponding to the holder of the electronic device can be acquired at regular intervals, thereby balancing the power consumption of the electronic device and the accuracy of the haptic detection.
[0130] In some implementations, the timing can be set by the electronic device by default, or it can be set by the user of the electronic device according to their needs. When the user sets the timing according to their needs, it can be based on age, gender, time period, or personal preference, etc., and is not limited here.
[0131] Step S520: If it is determined that the user is in a non-reclining posture based on the user's posture, then the merging point distance threshold of the electronic device is determined as the first merging point distance threshold, wherein the merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen.
[0132] Step S530: If it is determined that the holder is in a lying position based on the user's posture, then the fusion point distance threshold of the electronic device is determined as the second fusion point distance threshold, wherein the first fusion point threshold is greater than the second fusion point distance threshold.
[0133] For a detailed description of steps S520-S530, please refer to steps S120-S130, which will not be repeated here.
[0134] One embodiment of this application provides a method for obtaining touch operations, compared to Figure 1The touch operation processing method shown in this embodiment also periodically acquires the user posture corresponding to the person holding the electronic device when the electronic device is in a holding state, thereby balancing the power consumption of the electronic device and the accuracy of the contact detection.
[0135] Please see Figure 11 , Figure 11 A block diagram of a touch operation processing apparatus according to an embodiment of this application is shown. This touch operation processing apparatus 200 is applied to the aforementioned electronic device, which includes a touchscreen. The following will focus on... Figure 11 The block diagram shown illustrates that the touch operation processing device 200 includes: a user posture acquisition module 210, a first merging point distance threshold determination module 220, and a second merging point distance threshold determination module 230, wherein:
[0136] The user posture acquisition module 210 is used to acquire the user posture corresponding to the holder of the electronic device when the electronic device is in a holding state.
[0137] Furthermore, the electronic device includes an acceleration sensor, and the user attitude acquisition module 210 includes: a three-axis acceleration data acquisition submodule and a first user attitude acquisition submodule, wherein:
[0138] The triaxial acceleration data acquisition submodule is used to acquire triaxial acceleration data of the electronic device collected by the acceleration sensor, wherein the triaxial acceleration data includes X-axis acceleration components, Y-axis acceleration components and Z-axis acceleration components.
[0139] The first user posture acquisition submodule is used to acquire the user posture corresponding to the holder of the electronic device based on the triaxial acceleration data.
[0140] Furthermore, the first user posture acquisition submodule includes: a lying posture determination unit and a non-lying posture determination unit, wherein:
[0141] The lying posture determination unit is used to determine that the user holding the electronic device is in a lying posture if the touch screen is facing downwards based on the Z-axis acceleration component, and the angle between the touch screen and the horizontal plane is within a preset angle range based on the X-axis acceleration component and the Z-axis acceleration component or based on the Y-axis acceleration component and the Z-axis acceleration component.
[0142] Furthermore, the lying posture determination unit includes: a first duration determination subunit and a lying posture determination subunit, wherein:
[0143] The first duration determination subunit is used to determine a first duration for which the touchscreen remains facing downwards and the angle between the touchscreen and the horizontal plane is within a preset angle range, if the touchscreen is determined to be facing downwards based on the Z-axis acceleration component and the angle between the touchscreen and the horizontal plane is determined to be within a preset angle range based on the X-axis acceleration component and the Z-axis acceleration component or based on the Y-axis acceleration component and the Z-axis acceleration component.
[0144] The lying posture determination subunit is used to determine that the person holding the electronic device is in a lying posture if the first duration reaches a first duration threshold.
[0145] Furthermore, the lying posture determination unit also includes: a posture switching determination subunit and a merging point distance threshold switching subunit, wherein:
[0146] The posture switching determination subunit is used to determine that the person holding the electronic device has switched from a lying posture to a non-lying posture if the touch screen switches from facing downwards to not facing downwards, and / or switches from having an angle with the horizontal plane within a preset angle range to having an angle with the horizontal plane outside a preset angle range.
[0147] Furthermore, the attitude switching determination subunit includes: a second duration determination subunit and an attitude switching subunit, wherein:
[0148] The second duration determination sub-unit is used to determine a second duration for which the touchscreen remains not facing down and / or whose angle with the horizontal plane is not within the preset angle range if the touchscreen switches from facing down to not facing down, and / or switches from having an angle with the horizontal plane within a preset angle range to having an angle with the horizontal plane outside the preset angle range.
[0149] The posture switching sub-unit is used to determine that the person holding the electronic device changes from a lying posture to a non-lying posture if the second duration reaches the second duration threshold.
[0150] The junction distance threshold switching subunit is used to switch the junction distance threshold of the electronic device from the second junction distance threshold to the first junction distance threshold.
[0151] The non-lying posture determination unit is used to determine that the user holding the electronic device is in a non-lying posture if it is determined based on the Z-axis acceleration component that the touch screen is not facing downwards, or if it is determined based on the X-axis acceleration component and the Z-axis acceleration component or the Y-axis acceleration component and the Z-axis acceleration component that the angle between the touch screen and the horizontal plane is not within a preset angle range.
[0152] Furthermore, the electronic device includes a front-facing camera, and the user posture acquisition module 210 includes: an image acquisition submodule and a second user posture acquisition submodule, wherein:
[0153] The image acquisition submodule is used to acquire images captured by the front-facing camera.
[0154] The second user posture acquisition submodule is used to acquire the user posture corresponding to the holder of the electronic device based on the image.
[0155] Furthermore, the user pose acquisition module 210 includes: a third user pose acquisition submodule, wherein:
[0156] The third user posture acquisition submodule is used to periodically acquire the user posture corresponding to the holder of the electronic device when the electronic device is in a holding state.
[0157] The first merging point distance threshold determination module 220 is used to determine the merging point distance threshold of the electronic device as the first merging point distance threshold if it is determined based on the user posture that the holder is in a non-lying posture. The merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen.
[0158] The second mortise distance threshold determination module 230 is used to determine the mortise distance threshold of the electronic device as the second mortise distance threshold if it is determined based on the user's posture that the holder is in a lying posture, wherein the first mortise distance threshold is greater than the second mortise distance threshold.
[0159] Furthermore, the touch operation processing device 200 further includes: a first touch position determination module, a first spacing determination module, and a first touch point merging module, wherein:
[0160] The first touch position determination module is used to determine the first touch position corresponding to each of the at least two touch points if at least two touch points acting on the touch screen are detected.
[0161] The first spacing determination module is used to determine the first spacing between the at least two touch points based on the first touch positions corresponding to each of the at least two touch points.
[0162] The first touch point merging module is used to merge the at least two touch points into one touch point if the first spacing is less than or equal to the first merging point distance threshold.
[0163] Furthermore, the touch operation processing device 200 further includes: a second touch position determination module, a second spacing determination module, and a second touch point merging module, wherein:
[0164] The second touch position determination module is used to determine the second touch position corresponding to each of the at least two touch points if at least two touch points acting on the touch screen are detected.
[0165] The second spacing determination module is used to determine the second spacing between the at least two touch points based on the second touch positions corresponding to each of the at least two touch points.
[0166] The second touch point merging module is used to merge the at least two touch points into one touch point if the second spacing is less than or equal to the second merging point distance threshold.
[0167] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0168] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.
[0169] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0170] Please see Figure 12 This diagram illustrates a structural block diagram of an electronic device 100 provided in an embodiment of this application. The electronic device 100 can be a smartphone, tablet computer, e-reader, or other electronic device capable of running applications. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a touchscreen 130, and one or more applications. The one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110. The one or more applications are configured to perform the methods described in the foregoing method embodiments.
[0171] The processor 110 may include one or more processing cores. The processor 110 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and by calling data stored in the memory 120. Optionally, the processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 110 and may be implemented separately using a communication chip.
[0172] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing functions (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0173] The touchscreen 130 is used to display information input by the user, information provided to the user, and various graphical user interfaces of the electronic device 100. These graphical user interfaces can be composed of graphics, text, icons, numbers, video, and any combination thereof. In one example, the touchscreen 130 can be a liquid crystal display (LCD) or an organic light-emitting diode (OLED), without limitation.
[0174] Please see Figure 13This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 300 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0175] The computer-readable storage medium 300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 300 has storage space for program code 310 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 310 may be compressed, for example, in a suitable form.
[0176] In summary, the touch operation processing method, apparatus, electronic device, and storage medium provided in this application, when the electronic device is in a holding state, acquire the user posture corresponding to the holder of the electronic device. If it is determined based on the user posture that the holder is not in a lying position, then the merging point distance threshold of the electronic device is determined as a first merging point distance threshold. The merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen. Alternatively, if it is determined based on the user posture that the holder is in a lying position, then the merging point distance threshold of the electronic device is determined as a second merging point distance threshold that is smaller than the first merging point distance threshold. That is, by setting the electronic device to a smaller merging point distance threshold when the holder of the electronic device is in a lying position, the difficulty of merging the points is increased, thereby improving the sensitivity of holding and operating the electronic device in a lying position.
[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for processing touch operations, characterized in that, Applied to an electronic device, the electronic device including a touchscreen, the method includes: When the electronic device is held in a one-handed state, the user posture corresponding to the person holding the electronic device is obtained; If it is determined that the user is in a non-lying posture based on the user's posture, then the merging point distance threshold of the electronic device is determined as the first merging point distance threshold, wherein the merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen, wherein the non-lying posture includes walking posture and running posture. If it is determined that the user is in a lying position based on the user's posture, then the mortise distance threshold of the electronic device is determined as the second mortise distance threshold, wherein the first mortise threshold is greater than the second mortise distance threshold; When the user is in the lying position, if at least two touch points acting on the touch screen are detected, the second touch position corresponding to each of the at least two touch points is determined, wherein the at least two touch points are triggered simultaneously by the user's two hands; Based on the second touch position corresponding to each of the at least two touch points, a second spacing between the at least two touch points is determined; If the second spacing is less than or equal to the second merging point distance threshold, then the at least two touch points are merged into one touch point.
2. The method according to claim 1, characterized in that, After determining the first mortise distance threshold as the mortise distance threshold if the user's posture indicates that the user is not in a reclining position, the method further includes: If at least two touch points acting on the touch screen are detected, then the first touch position corresponding to each of the at least two touch points is determined; Based on the first touch position corresponding to each of the at least two touch points, a first spacing between the at least two touch points is determined; If the first spacing is less than or equal to the first merging point distance threshold, then the at least two touch points are merged into one touch point.
3. The method according to claim 1 or 2, characterized in that, The electronic device includes an accelerometer, and the step of acquiring the user posture corresponding to the holder of the electronic device includes: The three-axis acceleration data of the electronic device are acquired through the acceleration sensor, wherein the three-axis acceleration data includes an X-axis acceleration component, a Y-axis acceleration component, and a Z-axis acceleration component; Based on the triaxial acceleration data, the user posture corresponding to the holder of the electronic device is obtained.
4. The method according to claim 3, characterized in that, The step of obtaining the user posture corresponding to the holder of the electronic device based on the triaxial acceleration data includes: If the touchscreen is determined to be facing downwards based on the Z-axis acceleration component, and the angle between the touchscreen and the horizontal plane is determined to be within a preset angle range based on the X-axis acceleration component and the Z-axis acceleration component, or based on the Y-axis acceleration component and the Z-axis acceleration component, then the user holding the electronic device is determined to be in a lying position; or If it is determined based on the Z-axis acceleration component that the touchscreen is not facing downwards, or if it is determined based on the X-axis acceleration component and the Z-axis acceleration component or the Y-axis acceleration component and the Z-axis acceleration component that the angle between the touchscreen and the horizontal plane is not within a preset angle range, then it is determined that the person holding the electronic device is in a non-lying posture.
5. The method according to claim 4, characterized in that, If the touchscreen is determined to be facing downwards based on the Z-axis acceleration component, and the angle between the touchscreen and the horizontal plane is determined to be within a preset angle range based on the X-axis acceleration component and the Z-axis acceleration component or based on the Y-axis acceleration component and the Z-axis acceleration component, then determining that the user holding the electronic device is in a lying position includes: If the touchscreen is determined to be facing downwards based on the Z-axis acceleration component, and the angle between the touchscreen and the horizontal plane is determined to be within a preset angle range based on the X-axis acceleration component and the Z-axis acceleration component or based on the Y-axis acceleration component and the Z-axis acceleration component, then a first duration is determined in which the touchscreen remains facing downwards and the angle between it and the horizontal plane is within the preset angle range. If the first duration reaches the first duration threshold, it is determined that the person holding the electronic device is in a lying position.
6. The method according to claim 4, characterized in that, After determining that the user holding the electronic device is in a lying position, the method further includes: If the touchscreen switches from facing downwards to not facing downwards, and / or switches from having an angle with the horizontal plane within a preset angle range to having an angle with the horizontal plane outside a preset angle range, then it is determined that the person holding the electronic device has switched from a lying posture to a non-lying posture. Switch the junction distance threshold of the electronic device from the second junction distance threshold to the first junction distance threshold.
7. The method according to claim 6, characterized in that, If the touchscreen switches from facing downwards to not facing downwards, and / or switches from having an angle with the horizontal plane within a preset angle range to having an angle with the horizontal plane outside a preset angle range, then determining that the user holding the electronic device has switched from a lying posture to a non-lying posture includes: If the touchscreen switches from facing downwards to not facing downwards, and / or switches from having an angle with the horizontal plane within a preset angle range to having an angle with the horizontal plane outside the preset angle range, then a second duration is determined for the touchscreen to remain not facing downwards and / or having an angle with the horizontal plane outside the preset angle range. If the second duration reaches the second duration threshold, it is determined that the person holding the electronic device has switched from a lying posture to a non-lying posture.
8. The method according to claim 1 or 2, characterized in that, The electronic device includes a front-facing camera, and the step of acquiring the user posture corresponding to the holder of the electronic device includes: Acquire images captured by the front-facing camera; Based on the image, obtain the user posture corresponding to the person holding the electronic device.
9. The method according to claim 1 or 2, characterized in that, The step of obtaining the user posture corresponding to the person holding the electronic device when the electronic device is in a holding state includes: When the electronic device is in a holding state, the user posture corresponding to the person holding the electronic device is acquired periodically.
10. A touch-operated processing device, characterized in that, Applied to an electronic device, the electronic device including a touch screen, the device includes: The user posture acquisition module is used to acquire the user posture corresponding to the holder of the electronic device when the electronic device is held in a one-handed state. The first merging point distance threshold determination module is used to determine the merging point distance threshold of the electronic device as the first merging point distance threshold if it is determined based on the user posture that the holder is in a non-lying posture. The merging point distance threshold of the electronic device is used to characterize the maximum distance between at least two touch points that need to be merged into one touch point on the touch screen. The non-lying posture includes walking posture and running posture. The second joint distance threshold determination module is used to determine the joint distance threshold of the electronic device as the second joint distance threshold if it is determined based on the user posture that the holder is in a lying posture, wherein the first joint distance threshold is greater than the second joint distance threshold. The second touch position determination module is used to determine the second touch position corresponding to each of the at least two touch points when the user is in the lying posture and at least two touch points acting on the touch screen are detected, wherein the at least two touch points are triggered simultaneously by the user's two hands. The second spacing determination module is used to determine the second spacing between the at least two touch points based on the second touch positions corresponding to each of the at least two touch points. The second touch point merging module is used to merge the at least two touch points into one touch point if the second spacing is less than or equal to the second merging point distance threshold.
11. An electronic device, characterized in that, The method includes a memory and a processor, the memory being coupled to the processor, the memory storing instructions, and the processor performing the method as described in any one of claims 1-9 when the instructions are executed by the processor.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Mistaken touch recognition method and mobile terminal
CN107450778A
Touch event processing method and device, storage medium and electronic equipment
CN115033165A
Edge mistaken touch prevention method and device, electronic equipment and computer readable storage medium
CN116069178A