CN-121996101-A - Touch processing method and device and electronic equipment
Abstract
The embodiment of the application discloses a touch processing method, a touch processing device and electronic equipment, wherein in the method, an initial touch point of touch can be obtained in response to touch of a screen and based on capacitance data of the screen, the initial touch point can be moved towards the target side of the screen under the condition that the initial touch point is located in a preset edge area of the screen, so that the moved touch point is obtained, and the moved touch point is further used as a target touch point of touch. Therefore, under the condition that the calculated initial touch point is located in the preset edge area of the screen, the initial touch point can be moved towards the target side edge, so that the moved touch point can be closer to the target side edge of the screen relative to the initial touch point, and the problem that when a user touches the edge of the screen, the calculated touch point of the electronic equipment is closer to the inner side of the screen relative to the actual touch position of the user, and the touch of the user cannot be responded is solved.
Inventors
- WANG TAO
- WEI HAIJUN
- PANG XIANGYUN
Assignees
- 深圳市欢太科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241105
Claims (11)
- 1. A touch processing method, which is applied to an electronic device, the method comprising: responding to touch of a screen, and acquiring an initial touch point of the touch based on capacitance data of the screen; If the initial touch point is located in a preset edge area of the screen, moving the initial touch point towards a target side edge of the screen to obtain a moved touch point, wherein the target side edge is a side edge of the screen corresponding to the preset edge area; and taking the moved touch point as the target touch point of the touch.
- 2. The method of claim 1, wherein moving the initial touch point toward the target side of the screen to obtain the moved touch point comprises: And moving the initial touch point towards the target side of the screen by a target distance to obtain a moved touch point, wherein the target distance is determined based on the position of the initial touch point in a target channel and a channel weight value of the target channel, and the channel weight value is used for representing the distance length corresponding to the total distance length of the channel in the first direction of the screen.
- 3. The method of claim 2, wherein the target distance is calculated based on a predetermined formula: target distance = first preset value + ((second preset value-first preset value) ×single channel distance value)/channel weight value of target channel; the single channel distance value is the product of a first ratio and a channel weight value of the target channel, the first ratio is the ratio of a first distance to a second distance, the first distance is the distance between the initial touch point and the side edge of the target channel, which is close to the side edge of the target, and the second distance is the length of the target channel in the first direction.
- 4. The method of claim 2, wherein moving the initial touch point toward the target side of the screen by a target distance to obtain the moved touch point comprises: moving the initial touch point towards the target side of the screen by a target distance to obtain a touch point to be mapped; And mapping the touch points to be mapped towards the target side of the screen to obtain the moved touch points, wherein the moved touch points are closer to the target side than the touch points to be mapped.
- 5. The method of claim 4, wherein mapping the touch point to be mapped toward the target side of the screen to obtain the moved touch point comprises: Multiplying the position information of the touch point to be mapped by a second ratio to obtain mapped position information, wherein the second ratio is a ratio between a second distance and a third distance, the second distance is a distance between a first position and a target side, the first position is a position of the touch point closest to the target side, which can be calculated through capacitance data of a screen, the third distance is a distance between the second position and the target side, and the second position is a position closest to the target side after the touch point on the first position is moved through the preset formula; And taking the touch point represented by the mapped position information as the touch point after movement.
- 6. The method of claim 2, wherein the channel weight value of the target channel is obtained based on a size of the target channel, wherein a greater size of the target channel corresponds to a greater distance length characterized by the channel weight value.
- 7. The method of claim 1, wherein moving the initial touch point toward the target side of the screen to obtain the moved touch point comprises: Multiplying the position information of the initial touch point by a preset movement coefficient to obtain the moved position information, wherein the preset movement coefficient is larger than 1; And taking the touch point represented by the moved position information as the touch point after moving towards the target side edge of the screen.
- 8. A touch processing apparatus, operable in an electronic device, the apparatus comprising: the touch point calculating unit is used for responding to the touch of the screen and acquiring an initial touch point of the touch based on capacitance data of the screen; The touch point processing unit is used for moving the initial touch point towards a target side edge of the screen if the initial touch point is located in a preset edge area of the screen so as to obtain a moved touch point, wherein the target side edge is a side edge of the screen corresponding to the preset edge area; And the touch point determining unit is used for taking the moved touch point as the target touch point of the touch.
- 9. A touch chip comprising one or more processors and a memory, one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-7.
- 10. An electronic device comprising a screen, one or more processors, and a memory, one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-7.
- 11. A computer readable storage medium storing program code executable by a processor, characterized in that the computer readable storage medium comprises stored program code, wherein the method of any of claims 1-7 is performed when the program code is run.
Description
Touch processing method and device and electronic equipment Technical Field The present application relates to the field of terminal technologies, and in particular, to a touch processing method and apparatus, and an electronic device. Background With the development of technology, a user can control an electronic device by touching a screen of the electronic device. When the screen is touched, the electronic device can determine the action position of the touch, and then execute subsequent control operation according to the determined action position. However, the related electronic device still has a problem that the detection of the touch position is not accurate enough. Disclosure of Invention In view of the above problems, the present application provides a touch processing method, a touch processing device, and an electronic device, so as to improve the above problems. The application provides a touch processing method which is applied to electronic equipment and comprises the steps of responding to touch of a screen, acquiring an initial touch point of the touch based on capacitance data of the screen, moving the initial touch point towards a target side edge of the screen if the initial touch point is located in a preset edge area of the screen to obtain a moved touch point, wherein the target side edge is a side edge of the screen corresponding to the preset edge area, and taking the moved touch point as a target touch point of the touch. The application provides a touch processing device which is operated in electronic equipment, and the device comprises a touch point calculating unit, a touch point processing unit and a touch point determining unit, wherein the touch point calculating unit is used for responding to touch of a screen and acquiring an initial touch point of the touch based on capacitance data of the screen, the touch point processing unit is used for moving the initial touch point towards a target side edge of the screen if the initial touch point is located in a preset edge area of the screen so as to obtain a moved touch point, the target side edge is a side edge of the screen corresponding to the preset edge area, and the touch point determining unit is used for taking the moved touch point as a target touch point of the touch. In a third aspect, the application provides an electronic device comprising a screen, one or more processors and a memory, one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method described above. In a fourth aspect, the present application provides a computer readable storage medium storing program code executable by a processor, the computer readable storage medium comprising stored program code, wherein the method described above is performed when the program code is run. According to the touch processing method, the touch processing device and the electronic equipment, in the method, the initial touch point of touch can be obtained in response to touch of the screen and based on capacitance data of the screen, the initial touch point can be moved towards the target side of the screen under the condition that the initial touch point is located in a preset edge area of the screen, so that the moved touch point is obtained, and the moved touch point is used as the target touch point of touch. Therefore, under the condition that the calculated initial touch point is located in the preset edge area of the screen, the initial touch point can be moved towards the target side edge, so that the moved touch point can be closer to the target side edge of the screen relative to the initial touch point, and further the problem that when a user touches the edge of the screen, the calculated touch point of the electronic equipment is closer to the inner side of the screen relative to the actual touch position of the user, and the touch of the user cannot be responded is solved, so that the accuracy of detecting the touch position is improved. Drawings In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Fig. 1 shows a flowchart of a touch processing method according to an embodiment of the present application; FIG. 2 is a schematic diagram of a channel and nodes in an embodiment of the application; FIG. 3 shows a schematic view of an edge region in an embodiment of the application; FIG. 4 shows a schematic view of another edge region in an embodiment of the application; Fig. 5 is a schematic diagram illustrating a user touching an edge area of a screen according to an embod