Touch event processing method, device, storage medium and electronic device

By determining the closing point distance threshold based on the usage status of the electronic device and combining the touch points, the problem of misjudgment of the touch screen when identifying the number of touch points is solved, the operation accuracy and user experience are improved, and cost-effective technical improvements are achieved.

CN115033165BActive Publication Date: 2024-12-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210749527.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2024-12-03
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

Existing touch screens are prone to misjudgment when identifying the number of touch points, which affects operation accuracy and user experience. Especially in different usage states and scenarios, it is difficult to accurately identify single-finger or multi-finger operations.

Method used

By determining the joint distance threshold according to the usage status of the electronic device, the positions of multiple touch points in the current touch event are obtained, and when the distance between the two touch points is less than the joint distance threshold, they are merged into one touch point to improve the touch Accuracy of point recognition.

Benefits of technology

This method can accurately identify the number of touch points in different states and scenarios, improve the accuracy of touch event processing, improve user experience, and realize low-cost solutions without hardware modification or improved detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033165B_ABST
    Figure CN115033165B_ABST
Patent Text Reader

Abstract

The present disclosure provides a touch event processing method, device, storage medium and electronic device, which relate to the field of computer technology. The touch event processing method includes: determining a conjunct point distance threshold according to the use status of the electronic device; obtaining the positions of multiple touch points in the current touch event; in response to detecting that the distance between two touch points in the current touch event is less than the conjunct point distance threshold, merging the two touch points into one touch point. The present disclosure improves the problem of misjudgment of the number of touch points, which is conducive to improving the accuracy of touch event processing and enhancing user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] A touch screen is a commonly used operating device on electronic devices. When a user operates on the touch screen with a finger, a stylus or other media, the touch screen can sense changes in capacitance, resistance, etc. and recognize the operation information.

[0003] The touch screen can identify multiple touch points at the same time to meet the needs of users for multi-finger operation. In the related art, there are cases where the number of touch points is misjudged. For example, when a user uses one finger to operate, it is considered as multiple touch points, or when a user uses multiple fingers to operate, it is considered as one touch point, etc., which affects the accuracy of the operation and reduces the user experience. Summary of the invention

[0004] The present disclosure provides a touch event processing method, a touch event processing device, a computer-readable storage medium and an electronic device, thereby improving the problem of misjudgment of the number of touch points at least to a certain extent.

[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0006] According to a first aspect of the present disclosure, a touch event processing method is provided, comprising: determining a convergence point distance threshold according to a usage status of an electronic device; acquiring positions of multiple touch points in a current touch event; and merging the two touch points into one touch point in response to detecting that a distance between two touch points in the current touch event is less than the convergence point distance threshold.

[0007] According to a second aspect of the present disclosure, a touch event processing device is provided, comprising: a conjunction distance threshold determination module, configured to determine a conjunction distance threshold according to a usage state of an electronic device; a touch point position acquisition module, configured to acquire positions of multiple touch points in a current touch event; and a touch point merging module, configured to merge two touch points into one touch point in response to detecting that the distance between the two touch points in the current touch event is less than the conjunction distance threshold.

[0008] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the touch event processing method of the first aspect and possible implementation methods thereof are implemented.

[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor; and a touch screen for sensing a current touch event. The processor is configured to execute the touch event processing method of the first aspect and its possible implementation manner by executing the executable instructions.

[0010] The technical solution disclosed in this disclosure has the following beneficial effects:

[0011] According to the use state of the electronic device, the convergence point distance threshold is determined, and the distance between different touch points in the current touch event is compared with the convergence point distance threshold, so as to determine whether to merge different touch points. On the one hand, the convergence point distance threshold is adapted to the use state of the electronic device, and is determined by fully considering the user's operation mode and operation requirements in different states and scenes, and has high pertinence and flexibility. Moreover, judging whether to merge different touch points in the current touch event in different states and scenes can more accurately meet the user's operation requirements, thereby improving the problem of misjudgment of the number of touch points, which is conducive to improving the accuracy of touch event processing and enhancing user experience. On the other hand, this solution does not require hardware modification of the electronic device, and does not require improvement of the detection accuracy of the touch screen, so it has a lower implementation cost.

[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0014] Figure 1 A schematic diagram showing the structure of a mobile terminal in this exemplary embodiment;

[0015] Figure 2 A flow chart showing a touch event processing method in this exemplary embodiment is shown;

[0016] Figure 3 A schematic diagram showing a horizontal screen state and a vertical screen state in this exemplary embodiment;

[0017] Figure 4 A flow chart for determining a junction distance threshold in this exemplary embodiment is shown;

[0018] Figure 5 A schematic diagram showing acceleration values ​​of each coordinate axis in a horizontal screen state and a vertical screen state in this exemplary embodiment;

[0019] Figure 6 A schematic diagram showing a touch point for determining a touch area in this exemplary embodiment;

[0020] Figure 7 A schematic flow chart showing a touch event processing method in this exemplary embodiment;

[0021] Figure 8 A schematic structural diagram of a touch event processing device in this exemplary embodiment is shown. DETAILED DESCRIPTION

[0022] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0023] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0024] A touch screen, also known as a "touch screen" or "touch panel", is an inductive liquid crystal display device that can be used to receive user input signals. A touch screen usually includes an array of sensing elements. When a user touches an area on the touch screen, the sensing elements in that area generate corresponding signals, thereby determining the user's touch position. The user's touch operation can cause the induction of multiple sensing elements. When the user uses multiple fingers or other media to operate, it may be difficult to identify the number of touch points, resulting in misjudgment of the number of touch points.

[0025] In view of the above problems, an exemplary embodiment of the present disclosure provides a touch event processing method. In order to implement the touch event processing method, an exemplary embodiment of the present disclosure also provides an electronic device.

[0026] Generally, an electronic device may include a processor, a memory and a touch screen. The touch screen is used to sense a current touch event. The memory is used to store executable instructions of the processor and may also store application data; the processor is configured to implement a touch event processing method by executing executable instructions. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA (Personal Digital Assistant), an e-reader, a wearable device or other terminal device.

[0027] Below Figure 1 Taking the mobile terminal 100 in FIG. 1 as an example, the structure of the electronic device is exemplarily described. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 1 The construction in can also be applied to fixed type equipment.

[0028] like Figure 1 As shown, the mobile terminal 100 may include: a processor 101 , a memory 102 , a bus 103 , a communication module 104 , a display screen 105 and a sensor module 106 .

[0029] The processor 101 may include one or more processing units, for example, the processor 101 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.

[0030] In some embodiments, the processor 101 may include one or more interfaces, such as an Inter-Integrated Circuit (I2C) interface, an Inter-Integrated Circuit Sound (I2S) interface, a Serial Peripheral Interface (SPI), a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General-Purpose Input / Output (GPIO) interface, etc. The processor 101 may be connected to other components of the mobile terminal 100 through the bus 103 and the interface. For example, the processor 101 may be connected to the sensor module 106 through the bus 103 and the I2C interface or the SPI interface.

[0031] The memory 102 may be used to store computer executable program codes, which may include instructions. The processor 101 executes various functional applications and data processing of the mobile terminal 100 by running the instructions stored in the memory 102. The memory 102 may also store application data, such as images, videos, and other files.

[0032] The communication module 104 is used to implement the communication function of the mobile terminal 100. For example, it can provide mobile communication solutions such as 2G / 3G / 4G / 5G, or wireless communication solutions such as wireless LAN and Bluetooth.

[0033] The display screen 105 is used to implement display functions, such as displaying user interfaces, images, videos, etc.

[0034] Photo

[0035] The sensor module 106 may include one or more sensors for implementing corresponding sensing detection functions. The sensor module 106 may include a touch sensor 1061 for sensing touch operations. Exemplarily, the touch sensor 1061 may adopt a capacitive sensing method, including a touch panel and a capacitive device, the capacitive device is located on the wiring of the touch panel to form a certain array, and the information of the touch operation is detected by the change of capacitance.

[0036] In this exemplary embodiment, the touch sensor 1061 can be disposed on the display screen 105, and a transparent material is used to form a touchable display screen, i.e., a touch screen. The touch sensor 1061 is a core component of the touch screen. In this document, the control of the touch sensor 1061 can be equivalent to the control of the touch screen, and no strict distinction is made between the two expressions.

[0037] In one embodiment, the touch screen can be a relatively independent system with its own independent memory and processor. The touch screen system can trigger an interrupt signal through a specific pin, such as an INT pin, to obtain data in the touch screen system. The processor 101 of the mobile terminal 100 can set the touch screen system through an I2C interface, an SPI interface, etc. After the touch screen system receives a touch event, it can report it to the processor 101, and the processor 101 executes the touch event processing method in this exemplary embodiment.

[0038] In one embodiment, the sensor module 106 may further include an inertial sensor 1062, such as an accelerometer, a gyroscope, a magnetometer, etc. The accelerometer may be used to sense and collect acceleration data, which may include acceleration values ​​of the mobile terminal 100 on the X, Y, and Z axes. The acceleration data may be used to determine whether the mobile terminal is in a horizontal or vertical state.

[0039] It should be understood that the mobile terminal 100 may also include Figure 1 Components not shown in the figure, such as camera module, audio module, power module, etc.

[0040] Combine the following Figure 2 A touch event processing method in this exemplary embodiment is described. Figure 2 An exemplary process of a touch event processing method is shown, including the following steps S210 to S230:

[0041] Step S210, determining a coincidence distance threshold according to the usage status of the electronic device;

[0042] Step S220, obtaining positions of multiple touch points in the current touch event;

[0043] Step S230: In response to detecting that the distance between two touch points in the current touch event is less than a merge point distance threshold, the two touch points are merged into one touch point.

[0044] Based on the above method, according to the use status of the electronic device, the convergence point distance threshold is determined, and the distance between different touch points in the current touch event is compared with the convergence point distance threshold, so as to determine whether to merge different touch points. On the one hand, the convergence point distance threshold is adapted to the use status of the electronic device, and is a convergence point distance threshold determined by fully considering the user's operation mode and operation requirements in different states and scenes, and has high pertinence and flexibility. Moreover, judging whether to merge different touch points in the current touch event in different states and scenes can more accurately meet the user's operation requirements, thereby improving the problem of misjudgment of the number of touch points, which is conducive to improving the accuracy of touch event processing and enhancing user experience. On the other hand, this solution does not require hardware modification of the electronic device, and does not require improvement of the detection accuracy of the touch screen, so it has a lower implementation cost.

[0045] Below Figure 2 The steps in are described in detail.

[0046] refer to Figure 2 In step S210, a coincidence distance threshold is determined according to the usage status of the electronic device.

[0047] The convergence point distance threshold is used to measure the distance between different touch points to determine whether to merge different touch points. Generally, if the distance between two touch points is less than the convergence point distance threshold, the two touch points can be merged into one touch point; otherwise, the two touch points can still be identified as two touch points. If the adopted convergence point distance threshold is inappropriate, it will affect the user's operation accuracy and experience. For example, when the convergence point distance threshold is too small, the system may identify multiple touch points when the user performs a single-finger operation. When the convergence point distance threshold is too large, the system may identify one touch point when the user performs a multi-finger operation, making it impossible for the user to perform accurate operations.

[0048] In this exemplary embodiment, different usage states of the electronic device result in different user operation scenarios and different requirements for whether to merge touch points, so different merge point distance thresholds can be determined accordingly. The merge point distance threshold can change to adapt to changes in the usage state of the electronic device.

[0049] The following uses several specific implementations to exemplify the use status of the electronic device and its relationship with the coincidence point distance threshold:

[0050] ① The use state of the electronic device may include: whether the electronic device is in landscape mode or portrait mode. In this exemplary embodiment, the landscape mode and portrait mode of the electronic device may include two meanings: first, the landscape mode and portrait mode refer to the placement state of the electronic device. Figure 3As shown, the horizontal screen state can be a state in which the long side of the display plane of the electronic device is parallel or nearly parallel to the horizontal direction, and the vertical screen state can be a state in which the short side of the display plane of the electronic device is parallel or nearly parallel to the horizontal direction. On the second aspect, the horizontal screen state and the vertical screen state refer to the display state of the electronic device. The horizontal screen state refers to a display state with the long side of the display plane as the width direction and the short side as the height direction. For example, when a user watches videos or plays some games on a mobile phone, it is usually in the horizontal screen state. The vertical screen state refers to a display state with the short side of the display plane as the width direction and the long side as the height direction. For example, the default display state of a mobile phone is usually the vertical screen state. In some cases, the above-mentioned placement state of the electronic device may be equivalent to the above-mentioned display state. For example, when the rotation function of the display screen is turned on, the display state may change with the change of the placement state. When the electronic device switches from the placement state of the vertical screen to the placement state of the horizontal screen, its display screen may switch from the vertical screen display to the horizontal screen display.

[0051] In the landscape state and the portrait state, the user's operation method is generally different. For example, in the landscape state, if the user needs to perform multi-finger operation, he may use the fingers of the left and right hands to operate at the same time, and usually the operation method is to cover the touch screen with multiple fingers, and the contact area between the fingers and the touch screen is usually larger. In the portrait state, there are more click and slide operations. If the user needs to perform multi-finger operation, he may use two or more fingers of one hand to operate, and the multiple fingers are usually close in distance (such as the case of sliding operation with two fingers together). Therefore, the corresponding convergence point distance threshold can be determined according to whether the electronic device is in the landscape state or the portrait state. That is, different convergence point distance thresholds can be set in the landscape state and the portrait state.

[0052] ② The use status of the electronic device may include: the electronic device is in the screen-off state or the screen-locked state. In the screen-off state, the operation performed by the user is usually the operation of waking up the screen, and generally no multi-finger operation is required. In the screen-locked state, the operation performed by the user is usually the unlocking operation. If the correct unlocking method set by the system includes multi-finger operation, the user has the need for multi-finger operation in the screen-locked state, otherwise there is no need for multi-finger operation. It can be seen that in the screen-off state or the screen-locked state, the user's operation method and operation requirements are usually relatively fixed, and are different from the operation method and operation requirements in the normal display state of the screen. Therefore, a corresponding point-of-conclusion distance threshold can be set for the screen-off state or the screen-locked state. For example, the point-of-conclusion distance threshold in the screen-off state can be larger. If the correct unlocking method in the screen-locked state includes multi-finger operation, the point-of-conclusion distance threshold can be smaller. If it does not include multi-finger operation, the point-of-conclusion distance threshold can be larger.

[0053] ③The usage status of the electronic device may include: the screen resolution of the electronic device. Under different screen resolutions, the user's operation requirements are usually different. For example, the lower the screen resolution, the more the user may tend to use a larger area of ​​the medium for touch operation, and the lower the demand for multi-finger operation. Therefore, different convergence distance thresholds can be set for different screen resolutions. Generally, the convergence distance threshold and the screen resolution may be negatively correlated. For example, when the screen resolution is lower than a set resolution threshold, a larger convergence distance threshold is used, and when the screen resolution is higher than the resolution threshold, a smaller convergence distance threshold is used; or, the convergence distance threshold and the screen resolution have a negative linear relationship.

[0054] ④ The usage status of the electronic device may include: APP (Application) running status or file loading status. APP running status refers to which type of APP is currently running, such as social APP, video APP, game APP, map APP, etc.; file loading status refers to which type of file is currently loaded, such as pictures, videos, music, etc. When running different types of APPs or loading different types of files, the user's operation methods and operation requirements are usually different. For example, when running a social APP, multi-finger operation is usually not required; when running a game APP or a map APP, multi-finger operation is usually required. When loading pictures, multi-finger operation is usually required; when loading music, multi-finger operation is usually not required. For situations where multi-finger operation is required, a smaller convergence distance threshold can be set, and for situations where multi-finger operation is not required, a smaller convergence distance threshold can be set. Therefore, different convergence distance thresholds can be set for different APP running states or file loading states.

[0055] The above several specific implementations illustrate that the corresponding coincidence distance thresholds can be set for different usage states of the electronic device. The usage state of the electronic device disclosed in the present disclosure is not limited to the above four usage states.

[0056] The following further describes the convergence point distance thresholds in the horizontal and vertical screen states.

[0057] In one embodiment, reference Figure 4 As shown, the above-mentioned determination of the coincidence distance threshold according to the use status of the electronic device may include the following steps S410 and S420:

[0058] Step S410: if the use state of the electronic device is the horizontal screen state, the conjunction distance threshold is determined as the first conjunction distance threshold;

[0059] Step S420: If the usage state of the electronic device is the portrait state, the conjunction distance threshold is determined as the second conjunction distance threshold.

[0060] The above-mentioned horizontal screen state and vertical screen state may refer to the placement state of the electronic device or the display state of the electronic device.

[0061] The first converging point distance threshold may be a converging point distance threshold corresponding to the horizontal screen state, and the second converging point distance threshold may be a converging point distance threshold corresponding to the vertical screen state. The first converging point distance threshold is greater than the second converging point distance threshold, that is, a larger converging point distance threshold is used in the horizontal screen state, and a smaller converging point distance threshold is used in the vertical screen state. In the horizontal screen state, different touch points are more likely to be merged, and in the vertical screen state, different touch points are more likely not to be merged.

[0062] In particular, when the user uses multiple fingers that are close to each other to operate in the horizontal screen state (such as using the index finger and middle finger of one hand to operate at the same time), single-point operation is usually required, and the distance between the touch points of the multiple fingers is likely to be less than the first closing point distance threshold, so that the multiple fingers are identified as one touch point for operation processing, and the operation result expected by the user is obtained. When the user uses multiple fingers that are close to each other to operate in the vertical screen state, multi-point operation is usually required, and the distance between the touch points of the multiple fingers is likely to be greater than the second closing point distance threshold, so that the multiple fingers are identified as multiple touch points for operation processing, and the operation result expected by the user is obtained. In this way, the user's operation needs in the horizontal and vertical screen states can be met more accurately, and the problem of misjudgment of the number of touch points can be improved.

[0063] Regarding how to determine whether the electronic device is in the horizontal screen state or the vertical screen state, the following is an exemplary description:

[0064] In one embodiment, whether the electronic device is in landscape or portrait mode can be determined by the display state of the electronic device. The display screen of the electronic device can record whether the current display state is landscape or portrait, and the processor or touch screen can obtain this information to determine whether the electronic device is in landscape or portrait mode. Exemplarily, the display state can be determined according to the rotation state of the display screen, such as the display screen defaults to a portrait display state, and if it has been rotated once, it is a landscape display state. The display state can also be determined according to the APP currently running on the electronic device, such as some APPs (especially game APPs) need to use a landscape screen to run. When the electronic device runs the APP in the foreground, it can be determined to be a landscape display state.

[0065] In one implementation, the placement state of the electronic device may be used to determine whether the device is in a landscape or portrait state. Exemplarily, the touch event processing method may further include the following steps:

[0066] If it is detected that the acceleration value of the first coordinate axis of the electronic device is in the first value interval, it is determined that the electronic device is in the horizontal screen state;

[0067] If it is detected that the acceleration value of the second coordinate axis of the electronic device is in the second value interval, it is determined that the electronic device is in the portrait state.

[0068] The first coordinate axis may be an X-axis, and the second coordinate axis may be a Y-axis; or the first coordinate axis may be a Y-axis, and the second coordinate axis may be an X-axis. The X-axis may be an axis along the short side of the display plane of the electronic device, the Y-axis may be an axis along the long side of the display plane of the electronic device, and the Z-axis may be an axis perpendicular to the display plane of the electronic device. The acceleration value of each coordinate axis may be detected by an accelerometer, and the acceleration value detected by the accelerometer may be a superposition of a gravity acceleration value and a running acceleration value, which can reflect the absolute direction of the coordinate axis.

[0069] The first numerical interval is the numerical interval where the acceleration value of the first coordinate axis of the electronic device in the horizontal screen state should be located, and the second numerical interval is the numerical interval where the acceleration value of the second coordinate axis of the electronic device in the vertical screen state should be located. The first numerical interval and the second numerical interval can be determined based on experience, actual usage scenarios or user operating habits, and this disclosure does not limit this. The first numerical interval and the second numerical interval can be the same or different.

[0070] by Figure 5 Take this as an example to illustrate: Figure 5 The acceleration values ​​of each coordinate axis output by the accelerometer in the horizontal and vertical states are shown. Exemplarily, the first coordinate axis may be the X-axis, the second coordinate axis may be the Y-axis, and the first numerical interval and the second numerical interval are both [-11,-8]∪[8,11]. In the left figure, the Y-axis acceleration value is 9.38537, which is in the second numerical interval, so it can be determined that the electronic device is in the vertical state at this time. In fact, the Y-axis acceleration value is close to 9.8 (that is, the value of the standard gravity acceleration), indicating that the Y-axis is close to the vertical direction, and the electronic device is in the vertical screen placement state. In the right figure, the X-axis acceleration value is -10.217751, which is in the first numerical interval, so it can be determined that the electronic device is in the horizontal state at this time. In fact, the X-axis acceleration value is close to -9.8, and the electronic device is in the horizontal screen placement state.

[0071] Alternatively, the first coordinate axis may be the Y axis, the second coordinate axis may be the X axis, and the first numerical interval and the second numerical interval are both [-2,2]. In the left figure, the X-axis acceleration value is -0.08293202, which is in the second numerical interval, so it can be determined that the electronic device is in the portrait mode at this time. In the right figure, the Y-axis acceleration value is 0.596035, which is in the first numerical interval, so it can be determined that the electronic device is in the landscape mode at this time.

[0072] It should be added that the acceleration value of the X-axis, Y-axis or Z-axis may be the result of the superposition of the acceleration of gravity and the acceleration of the shaking of the electronic device. Figure 5 In the right figure, the X-axis acceleration value is less than -9.8 (that is, the absolute value exceeds 9.8), which means that the electronic device may be shaking to a certain extent.

[0073] In one embodiment, in order to reduce the impact of shaking, the acceleration value of the first coordinate axis in the first numerical interval may include: the time length of the acceleration value of the first coordinate axis in the first numerical interval exceeds a preset time length, that is, the acceleration value of the first coordinate axis is stably in the first numerical interval. The acceleration value of the second coordinate axis in the second numerical interval may include: the time length of the acceleration value of the second coordinate axis in the second numerical interval exceeds a preset time length, that is, the acceleration value of the second coordinate axis is stably in the second numerical interval. The preset time length can be determined based on experience or actual usage requirements, for example, it can be 2 seconds, 5 seconds, etc. Figure 5 For example, the acceleration value of the X-axis or Y-axis can be detected in real time. When the acceleration value of the X-axis enters the interval [-11,-8]∪[8,11] (as shown in the right figure) and the duration maintained in this interval exceeds the preset duration, it can be determined that the electronic device is in the horizontal screen state. When the acceleration value of the Y-axis enters the interval [-11,-8]∪[8,11] and the duration maintained in this interval exceeds the preset duration, it can be determined that the electronic device is in the vertical screen state. Therefore, when it is determined that the electronic device is in the horizontal screen state or the vertical screen state, it means that the electronic device can be stably in the horizontal screen state or the vertical screen state.

[0074] In one embodiment, the above-mentioned detection of the acceleration value of the first coordinate axis or the acceleration value of the second coordinate axis of the electronic device can be performed when the timer is turned on, and the acceleration value of the first coordinate axis or the acceleration value of the second coordinate axis can be periodically detected based on the timer, or the time length that the acceleration value of the first coordinate axis is in the first numerical interval and the time length that the acceleration value of the second coordinate axis is in the second numerical interval can be detected by the timer.

[0075] In one embodiment, the placement state and display state of the electronic device can be combined to determine whether it is in the landscape state or the portrait state. For example, if it is detected that the acceleration value of the first coordinate axis of the electronic device is in the first numerical interval, and the electronic device is in the landscape display state, it is determined that the electronic device is in the landscape state, and then the corresponding first convergence distance threshold can be used; if it is detected that the acceleration value of the second coordinate axis of the electronic device is in the second numerical interval, and the electronic device is in the portrait display state, it is determined that the electronic device is in the portrait state, and then the corresponding second convergence distance threshold can be used. Alternatively, it is preferred to determine whether the electronic device is in the landscape state or the portrait state based on the display state. If it cannot be determined based on the display state (such as when the rotation function of the display screen is turned off), it is then determined based on the placement state of the electronic device. As a result, the accuracy of the judgment of the landscape state and the portrait state is further improved, and it is convenient to use a suitable convergence distance threshold.

[0076] In one embodiment, corresponding conjunct distance thresholds may be preset according to different use states of the electronic device. For example, a first conjunct distance threshold may be preset for the horizontal screen state, and a second conjunct distance threshold may be preset for the vertical screen state, and stored. During the use of the electronic device, the corresponding different conjunct distance thresholds may be read according to the change of its use state for subsequent processing.

[0077] In one embodiment, the closing point distance thresholds corresponding to different usage states can be determined by statistically analyzing the user's operation history data. For example, the user's touch operation history data in the horizontal screen state can be obtained, and divided into single-point operation data and multi-point operation data according to the operation results, and the touch point spacing in the single-point operation data and the touch point spacing in the multi-point operation data are statistically analyzed respectively, and the first closing point distance threshold corresponding to the horizontal screen state is determined according to the statistical results, such as the maximum value of the touch point spacing in the single-point operation data or the minimum value of the touch point spacing in the multi-point operation data can be used as the first closing point distance threshold. Similarly, the touch point spacing in the single-point operation data and the touch point spacing in the multi-point operation data in the touch operation history data in the vertical screen state can be statistically analyzed, and the second closing point distance threshold corresponding to the vertical screen state can be determined according to the statistical results, such as the maximum value of the touch point spacing in the single-point operation data or the minimum value of the touch point spacing in the multi-point operation data can be used as the second closing point distance threshold.

[0078] Continue to refer Figure 2 , in step S220, the positions of multiple touch points in the current touch event are obtained.

[0079] Among them, a touch event refers to an operation event in which a user contacts the touch screen, such as an event in which a user clicks, presses, slides, or long presses on the touch screen. The user can operate with a finger, stylus, or other touchable media. The current touch event is the touch event currently sensed by the touch screen and to be processed.

[0080] A touch point is a point where the operating medium contacts the touch screen during a touch event. When a user touches the touch screen, a sensing point (a sensing point is a location where a touch screen element is located, such as a capacitor) at the contact location generates a sensing signal, thereby determining the location of the touch point. The location of the touch point can be the location coordinates of the touch point on the touch screen, or the location coordinates of the touch point mapped to a graphical user interface.

[0081] Generally, when a user's finger touches the touch screen, all touch screen elements in an area will generate sensing signals. In one implementation, all points generating sensing signals can be regarded as touch points.

[0082] In one implementation, the touch point may also be determined according to the area. Specifically, the above-mentioned acquisition of the positions of multiple touch points in the current touch event may include the following steps:

[0083] Get multiple touch areas in the current touch event;

[0084] Determine a touch point in each touch area and get the position of the touch point.

[0085] The touch area can be the sensing area of ​​a single touch medium (such as a single finger, a single stylus) recognized by the system. For example, when a user uses two fingers to perform a touch operation, the contact area of ​​each finger can be a touch area.

[0086] In one implementation, the touch area may be an area where continuous sensing signal values ​​are generated in a touch event. For a capacitive touch screen, the sensing signal value is the sensing capacitance value. Figure 6 The figure shows a schematic diagram of the sensing capacitance values ​​of different sensing points collected by the touch screen in a list composed of a transmitting channel (TX) and a receiving channel (RX) after the touch screen receives the current touch event. In the touch area S, the sensing capacitance values ​​of different sensing points continuously change from 20 to 50 until they are 0 at the boundary, so these sensing points can be identified as a touch area, thereby determining the touch area S. Similarly, the touch area P can be determined. The sensing capacitance value of the sensing points between the touch areas S and P is 0, indicating a non-touch area.

[0087] In one embodiment, considering the possibility of adhesion between different touch areas, for example, when two fingers are close together to touch, there is adhesion between the two fingers, resulting in no obvious 0 sensing point (i.e., a point with a sensing signal value of 0) between the two touch areas, making it difficult to divide the touch areas. In this regard, the 0 sensing point can be used as a boundary to divide the touch area, and then it is determined whether the peak point (the peak point can be a sensing point with a sensing signal value greater than that of all its neighboring points) in each touch area is unique. If the peak point in a touch area is not unique, the valley point between different peak points in the touch area (the peak point can be a sensing point with a sensing signal value less than that of all its neighboring points) can be used as a boundary to further divide the touch area until the peak point in each touch area is unique. This solves the problem of touch area adhesion.

[0088] After determining the touch area, a touch point can be determined in each touch area, that is, each touch area is equivalent to a touch point. Although the contact area of ​​a single finger (or other touch media) is large and includes multiple sensing points, the user expects to perform single-point operation. By determining a touch point in each touch area to represent the entire touch area, the number of valid touch points can be reduced, the amount of calculation required for subsequent judgment and merging of touch points can be reduced, and processing efficiency can be improved.

[0089] The touch point of each touch area can be determined in a variety of ways. For example, the touch point can be any point (such as a random point) or a center point in the touch area.

[0090] In one implementation, determining a touch point in each touch area may include the following steps:

[0091] The point with the highest sensing signal value in each touch area is determined as the touch point of the touch area.

[0092] refer to Figure 6 For example, the sensing points included in the touch area S and the touch area P have different sensing capacitance values ​​(i.e., sensing signal values), while the sensing capacitance values ​​of other areas are basically 0, so it can be considered that the user has not performed any touch operations in other areas. The maximum value of the sensing capacitance value in the touch area S is 50, so the point 50 can be determined as the touch point of the touch area S. The maximum value of the sensing capacitance value in the touch area P is also 50, so the point 50 can be determined as the touch point of the touch area P. It should be noted that the peak values ​​of the sensing capacitance values ​​in different touch areas may be different, which can be determined based on actual conditions. Figure 6 This is for illustrative purposes only.

[0093] After obtaining the position of the touch points in each touch area, you can further determine whether to merge these touch points. Figure 2In step S230, in response to detecting that the distance between two touch points in the current touch event is less than a merge point distance threshold, the two touch points are merged into one touch point.

[0094] In this exemplary embodiment, the distance between the two touch points in the current touch event can be determined by the following method: first, obtain the first distance between the two touch points in the direction of the first coordinate axis and the second distance in the direction of the second coordinate axis, wherein the first coordinate axis direction is perpendicular to the second coordinate axis direction, for example, the first coordinate axis direction can be the horizontal direction, and the second coordinate axis direction can be the vertical direction, and further, calculate based on the first distance and the second distance based on the Pythagorean theorem to determine the straight-line path distance of the two touch points. In addition, other methods that can calculate the distance between two touch points should also fall within the scope of protection of the present disclosure.

[0095] By comparing the distance between the two touch points with the merge point distance threshold, it is determined whether to merge the two touch points. In other words, it can also be considered that based on the distance between the two touch points, it is determined whether to merge the touch areas corresponding to the two touch points, so that the electronic device believes that the current area is one touch area. For example, when the user uses the thumb to press, two touch points are detected, but in fact the user only needs to perform a single-finger touch. At this time, based on the above-mentioned judgment process for touch point merging, if the merging requirements are met, the two touch points can be merged into one touch point to ensure that the electronic device currently accurately recognizes the user's single-finger operation.

[0096] After the two touch areas are merged into one touch area, the touch point corresponding to the touch area can be determined in a variety of ways. For example, one of the touch points before the merge can be used as the touch point after the merge, or the two touch points before the merge can be used for calculation to determine the touch point after the merge, such as the midpoint position of the two touch points before the merge can be used as the position of the touch point after the merge, etc. The present disclosure does not make specific limitations on this.

[0097] In addition, if it is detected that the distance between two touch points in the current touch event is greater than the merge point distance threshold, the two touch points are still identified as two touch points and are not merged.

[0098] It should be added that if the distance between the two touch points is equal to the junction distance threshold, it can be regarded as satisfying the condition of step S230 and performing junction processing, or it can be regarded as not satisfying the condition of step S230 and not performing junction processing.

[0099] In an exemplary embodiment, the above step S230 may include the following steps:

[0100] In response to detecting that the distance between any two touch points in the n touch points in the current touch event is less than the merged point distance threshold, the n touch points are merged into one touch point; n is a positive integer not less than 3.

[0101] In actual applications, three or more touch points may be detected, and it is necessary to determine whether to merge them into one touch point. In this exemplary embodiment, the distance between n touch points can be determined for each other. When the distance between any two touch points is less than the merge point distance threshold, it means that the distance between the current n touch points is relatively close, so they can be merged into one touch point. This achieves more efficient touch point merging processing and further reduces the number of touch points.

[0102] Figure 7 A schematic flow chart of a touch event processing method according to this exemplary embodiment is shown, which may include the following steps:

[0103] Step S701, presetting a first intersection distance threshold for the horizontal screen state of the electronic device, and presetting a second intersection distance threshold for the vertical screen state;

[0104] Step S702, regularly acquiring data detected by the accelerometer;

[0105] Step S703, determining the usage state of the electronic device according to the acceleration value of the coordinate axis of the electronic device;

[0106] Step S704: if the use state is the horizontal screen state, the display service of the system sends a horizontal screen command to the touch screen driver;

[0107] Step S705: If the usage state is the vertical screen state, the display service of the system sends a vertical screen command to the touch screen driver;

[0108] Step S706, the touch screen driver receives the horizontal screen instruction or the vertical screen instruction, and performs corresponding settings on the hardware system of the touch screen;

[0109] Step S707: the touch screen system responds to the horizontal screen instruction and obtains the first junction distance threshold as the current junction distance threshold, or responds to the vertical screen instruction and obtains the second junction distance threshold as the current junction distance threshold;

[0110] Step S708, obtaining the sensing signal values ​​of different touch areas in the current touch event, taking the peak point of the sensing signal value as the touch point of each touch area, and calculating the distance between different touch points;

[0111] Step S709, determining whether the distance between different touch points is greater than a touch point distance threshold;

[0112] Step S710, if the distance between different touch points is greater than the merge distance threshold, the different touch points are not merged;

[0113] Step S711: If the distance between different touch points is less than the merge distance threshold, merge the different touch points.

[0114] The exemplary embodiment of the present disclosure also provides a touch event processing device. Figure 8 As shown, the touch event processing device 800 may include:

[0115] The conjunction distance threshold determination module 810 is configured to determine the conjunction distance threshold according to the usage status of the electronic device;

[0116] A touch point position acquisition module 820 is configured to acquire positions of multiple touch points in a current touch event;

[0117] The touch point merging module 830 is configured to merge the two touch points into one touch point in response to detecting that the distance between the two touch points in the current touch event is less than a merge point distance threshold.

[0118] In one implementation, determining the coincidence distance threshold according to the usage status of the electronic device includes:

[0119] If the usage state of the electronic device is the horizontal screen state, the conjunction distance threshold is determined as the first conjunction distance threshold;

[0120] If the usage state of the electronic device is the vertical screen state, the conjunction distance threshold is determined as the second conjunction distance threshold;

[0121] The first conjunction distance threshold is greater than the second conjunction distance threshold.

[0122] In one implementation, the touch event processing device 800 may further include a usage state control module configured to:

[0123] If it is detected that the acceleration value of the first coordinate axis of the electronic device is in the first value interval, it is determined that the electronic device is in the horizontal screen state;

[0124] If it is detected that the acceleration value of the second coordinate axis of the electronic device is in the second value interval, it is determined that the electronic device is in the portrait state.

[0125] In one embodiment, the above detection that the acceleration value of the first coordinate axis of the electronic device is in the first numerical interval includes: detecting that the acceleration value of the first coordinate axis of the electronic device is in the first numerical interval for a period exceeding a preset period. The above detection that the acceleration value of the second coordinate axis of the electronic device is in the second numerical interval includes: detecting that the acceleration value of the second coordinate axis of the electronic device is in the second numerical interval for a period exceeding a preset period.

[0126] In one implementation, the above-mentioned obtaining the positions of multiple touch points in the current touch event includes:

[0127] Get multiple touch areas in the current touch event;

[0128] Determine a touch point in each touch area and get the position of the touch point.

[0129] In one implementation, determining a touch point in each touch area includes:

[0130] The point with the highest sensing signal value in each touch area is determined as the touch point of the touch area.

[0131] In one implementation, in response to detecting that the distance between two touch points in the current touch event is less than a merge point distance threshold, merging the two touch points into one touch point includes:

[0132] In response to detecting that the distance between any two touch points among the n touch points in the current touch event is less than a merge point distance threshold, the n touch points are merged into one touch point; n is a positive integer not less than 3.

[0133] The specific details of each part of the above device have been described in detail in the implementation method part, so they will not be repeated here.

[0134] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which can be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. In an optional embodiment, the program product can be implemented as a portable compact disk read-only memory (CD-ROM) and includes program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.

[0135] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0136] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0137] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0138] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0139] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0140] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or implementations combining hardware and software aspects, which may be collectively referred to herein as "circuit", "module" or "system". Those skilled in the art will readily think of other implementations of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0141] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A touch event processing method, characterized in that: include: Determine a point-of-confluence distance threshold according to a usage status of the electronic device; Get the positions of multiple touch points in the current touch event; In response to detecting that a distance between two touch points in the current touch event is less than the merge point distance threshold, merging the two touch points into one touch point; The usage status of the electronic device includes one or more of the following: The electronic device is in a horizontal screen state or a vertical screen state; The electronic device is in a screen-off state or a screen-locked state; The screen resolution of the electronic device; The running state of the application or the file loading state in the electronic device; The step of determining the point-of-confluence distance threshold according to the usage status of the electronic device includes: If the use state of the electronic device is a horizontal screen state, determining the conjunction distance threshold as a first conjunction distance threshold; If the usage state of the electronic device is a portrait state, determining the conjunction distance threshold as a second conjunction distance threshold; The first conjunction distance threshold is greater than the second conjunction distance threshold.

2. The method according to claim 1, characterized in that The method further comprises: If it is detected that the acceleration value of the first coordinate axis of the electronic device is in a first value interval, it is determined that the electronic device is in a horizontal screen state; If it is detected that the acceleration value of the second coordinate axis of the electronic device is in a second value interval, it is determined that the electronic device is in a portrait state.

3. The method according to claim 2, characterized in that The detecting that the acceleration value of the first coordinate axis of the electronic device is in the first numerical interval includes: detecting that the duration of the acceleration value of the first coordinate axis of the electronic device being in the first numerical interval exceeds a preset duration; The detecting that the acceleration value of the second coordinate axis of the electronic device is in the second numerical interval includes: detecting that the duration of the acceleration value of the second coordinate axis of the electronic device being in the second numerical interval exceeds the preset duration.

4. The method according to claim 1, characterized in that: The obtaining of the positions of multiple touch points in the current touch event includes: Get multiple touch areas in the current touch event; A touch point is determined in each touch area, and the position of the touch point is obtained.

5. The method according to claim 4, characterized in that The step of determining a touch point in each touch area includes: The point with the highest sensing signal value in each touch area is determined as the touch point of the touch area.

6. The method according to claim 1, characterized in that In response to detecting that the distance between the two touch points in the current touch event is less than the merge point distance threshold, merging the two touch points into one touch point includes: In response to detecting that the distance between any two touch points in the n touch points in the current touch event is less than the merged point distance threshold, the n touch points are merged into one touch point; n is a positive integer not less than 3.

7. A touch event processing device, characterized in that: include: A coincidence distance threshold determination module is configured to determine a coincidence distance threshold according to a usage state of the electronic device; A touch point position acquisition module is configured to acquire positions of multiple touch points in a current touch event; a touch point merging module, configured to merge the two touch points into one touch point in response to detecting that the distance between the two touch points in the current touch event is less than the merge point distance threshold; The usage status of the electronic device includes one or more of the following: The electronic device is in a horizontal screen state or a vertical screen state; The electronic device is in a screen-off state or a screen-locked state; The screen resolution of the electronic device; The running state of the application or the file loading state in the electronic device; The junction distance threshold determination module is configured as follows: If the use state of the electronic device is a horizontal screen state, determining the conjunction distance threshold as a first conjunction distance threshold; If the usage state of the electronic device is a portrait state, determining the conjunction distance threshold as a second conjunction distance threshold; The first conjunction distance threshold is greater than the second conjunction distance threshold.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; A touch screen, used to sense current touch events; The processor is configured to perform the method of any one of claims 1 to 6 by executing the executable instructions.

Citation Information

Patent Citations

  • Adjusting method, terminal and computer storage medium

    CN112445358A

  • Touch sensing processing method, touch sensing processing device, medium and electronic equipment

    CN113204293A