Touch tool recognition method and device, electronic device, and storage medium

CN115793885BActive Publication Date: 2026-08-07SHENZHEN HONGHE INNOVATION INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HONGHE INNOVATION INFORMATION TECH CO LTD
Filing Date
2022-11-30
Publication Date
2026-08-07

AI Technical Summary

Benefits of technology

[0049]本申请实施例中,通过在触控事件产生时,基于所述触控事件中各帧触控信息逐帧进行触控工具的识别,直至满足第一条件或第二条件,其中,所述第一条件为连续n帧触控信息识别到的触控工具均相同,n不小于2,所述第二条件为进行触控工具识别的触控信息的帧数达到预设帧数,若满足所述第一条件,则确定所述触控事件对应的触控工具为所述触控信息识别到的触控工具,若满足所述第二条件,则基于所述预设帧数的触控信息,确定所述触控事件所对应的触控工具。本申请方案结合多帧触控信息的触控工具的识别结果来确定该次触控事件对应的触控工具,可准确的识别与触摸屏交互的触控工具,降低触控工具的误识率,从而提高触控交互的有效性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115793885B_ABST
    Figure CN115793885B_ABST
Patent Text Reader

Abstract

The application is suitable for the terminal technical field, and provides a touch tool identification method and device, electronic equipment and storage medium.The touch tool identification method comprises: when a touch event occurs, identifying the touch tool frame by frame based on each frame touch information in the touch event until a first condition or a second condition is met, wherein the first condition is that the touch tools identified by the continuous n frame touch information are all the same, n is not less than 2, and the second condition is that the frame number of the touch information for identifying the touch tool reaches a preset frame number; if the first condition is met, the touch tool corresponding to the touch event is determined as the touch tool identified by the touch information; and if the second condition is met, the touch tool corresponding to the touch event is determined based on the touch information of the preset frame number.The application can accurately identify the touch tool interacting with the touch screen, improve the effectiveness of the touch interaction, and thus enhance the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a method, apparatus, electronic device and storage medium for identifying touch tools. Background Technology

[0002] With the rapid development of information technology, electronic devices such as smartphones, smart tablets, smart TVs, and interactive large screens are playing an increasingly important role in daily life, and touch screens that support touch operation have become a standard feature of electronic devices.

[0003] A touchscreen is a device that receives input signals. With the development of touchscreen technology, current smart displays support various touch tools for large-screen interaction. Different touch tools can achieve different large-screen interaction functions and levels of precision. How to accurately identify the touch tools interacting with the touchscreen and improve the effectiveness of touch interaction is a matter that needs to be considered. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and storage medium for identifying touch tools, which can accurately identify touch tools interacting with a touchscreen and improve the effectiveness of touch interaction.

[0005] In a first aspect, embodiments of this application provide a touch tool recognition method, including:

[0006] When a touch event occurs, the touch tool is identified frame by frame based on the touch information of each frame in the touch event until the first condition or the second condition is met. The first condition is that the touch tool identified in n consecutive frames of touch information is the same, and n is not less than 2. The second condition is that the number of frames of touch information for touch tool identification reaches a preset number of frames.

[0007] If the first condition is met, then the touch tool corresponding to the touch event is determined to be the touch tool identified by the touch information;

[0008] If the second condition is met, the touch tool corresponding to the touch event is determined based on the touch information of the preset frame number.

[0009] In one possible implementation of the first aspect, the step of identifying the touch tool frame by frame based on the touch information of each frame in the touch event until the first condition is met includes:

[0010] If the recognition results corresponding to the touch information of each frame in the target frame set are different, it is confirmed whether there is a target frame subset in the target frame set. The target frame set includes n consecutive frames of touch information, the target frame subset includes m consecutive frames of touch information, the m consecutive frames of touch information includes the last frame of touch information in the target frame set, and the recognition results corresponding to the m consecutive frames of touch information are the same, where m is an integer greater than 1 and m is less than n.

[0011] If a target frame subset exists in the target frame set, the continuous m frames of touch information in the target frame subset are used as the first to the mth frames of touch information in the new target frame set. The target frame set is then updated to the new target frame set, and the recognition results corresponding to the touch information of each frame in the target frame set are determined until the first condition is met.

[0012] In one possible implementation of the first aspect, if the target frame set does not contain a subset of target frames, the method further includes:

[0013] The last frame of touch information in the target frame set is used as the first frame of touch information in the new target frame set. The target frame set is updated to the new target frame set, and the recognition results corresponding to each frame of touch information in the target frame set are determined until the first condition is met.

[0014] In one possible implementation of the first aspect, if the target frame set does not contain a subset of target frames, the method further includes:

[0015] The touch information of the frame adjacent to the last touch information in the target frame set is taken as the first touch information in the new target frame set. The target frame set is updated to the new target frame set, and the recognition result corresponding to each frame touch information in the target frame set is determined until the first condition is met.

[0016] In one possible implementation of the first aspect, the preset number of frames is N, where N is an integer greater than n;

[0017] The step of identifying the touch tool frame by frame based on the touch information in each frame of the touch event until the second condition is met includes:

[0018] Confirm whether the (N-1)th frame of touch information is included in the n consecutive frames of touch information;

[0019] If the n consecutive frames of touch information include the (N-1)th frame of touch information, confirm whether the recognition results corresponding to the second to the nth frame of touch information in the n consecutive frames of touch information are all the same;

[0020] If the recognition results corresponding to the second frame of touch information to the nth frame of touch information in the n consecutive frames of touch information are different, then it is confirmed that the second condition is met.

[0021] In one possible implementation of the first aspect, the touch information includes the touch area, and the step of identifying the touch tool frame by frame based on the touch information of each frame in the touch event includes:

[0022] Establish a mapping relationship between touch tools and area ranges in advance;

[0023] The touch tool is identified frame by frame based on the area range to which the touch area belongs and the mapping relationship.

[0024] In one possible implementation of the first aspect, the step of determining the touch tool corresponding to the touch event based on the touch information of the preset frame number if the second condition is met includes:

[0025] The touch information of the preset number of frames is filtered to obtain the target touch information;

[0026] Identify the touch tool corresponding to the target touch information, and determine the touch tool corresponding to the touch event based on the identification result.

[0027] Secondly, embodiments of this application provide a touch tool recognition device, comprising:

[0028] The touch recognition unit is used to identify the touch tool frame by frame based on each frame of touch information in the touch event when a touch event occurs, until a first condition or a second condition is met. The first condition is that the touch tool identified in n consecutive frames of touch information is the same, and n is not less than 2. The second condition is that the number of frames of touch information for touch tool recognition reaches a preset number of frames.

[0029] The first touch tool determination unit is configured to determine, if the first condition is met, the touch tool corresponding to the touch event as the touch tool identified by the touch information;

[0030] The second touch tool determination unit is used to determine the touch tool corresponding to the touch event based on the touch information of the preset frame number if the second condition is met.

[0031] In one possible implementation of the second aspect, the touch recognition unit includes:

[0032] The target frame subset confirmation module is used to confirm whether there is a target frame subset in the target frame set if the recognition results corresponding to the touch information of each frame in the target frame set are different. The target frame set includes n consecutive frames of touch information, the target frame subset includes m consecutive frames of touch information, the m consecutive frames of touch information includes the last frame of touch information in the target frame set, and the recognition results corresponding to the m consecutive frames of touch information are the same, where m is an integer greater than 1 and m is less than n.

[0033] The first result recognition module is used to, if there is a target frame subset in the target frame set, take the continuous m frames of touch information in the target frame subset as the first to m frames of touch information in the new target frame set, update the target frame set to the new target frame set, and continue to determine the recognition result corresponding to each frame of touch information in the target frame set until the first condition is met.

[0034] In one possible implementation of the second aspect, if the target frame set does not contain a subset of target frames, the touch recognition unit further includes:

[0035] The second result recognition module is used to take the last frame of touch information in the target frame set as the first frame of touch information in the new target frame set, update the target frame set to the new target frame set, and continue to determine the recognition result corresponding to each frame of touch information in the target frame set until the first condition is met.

[0036] In one possible implementation of the second aspect, if the target frame set does not contain a subset of target frames, the touch tool recognition unit further includes:

[0037] The third result recognition module is used to take the touch information of the frame adjacent to the last touch information in the target frame set as the first touch information in the new target frame set, update the target frame set to the new target frame set, and continue to determine the recognition result corresponding to each frame touch information in the target frame set until the first condition is met.

[0038] In one possible implementation of the second aspect, the preset frame number is N, where N is an integer greater than n; the touch recognition unit further includes:

[0039] The fourth result recognition module is used to confirm whether the (N-1)th frame of touch information is included in the n consecutive frames of touch information; if the (N-1)th frame of touch information is included in the n consecutive frames of touch information, it confirms whether the recognition results corresponding to the second to the nth frame of touch information in the n consecutive frames of touch information are all the same; if the recognition results corresponding to the second to the nth frame of touch information in the n consecutive frames of touch information are different, it confirms that the second condition is met.

[0040] In one possible implementation of the second aspect, the touch information includes the touch area, and the touch recognition unit includes:

[0041] The relationship establishment module is used to pre-establish the mapping relationship between touch tools and area ranges;

[0042] The first touch tool recognition module is used to recognize touch tools frame by frame according to the area range to which the touch area belongs and the mapping relationship.

[0043] In one possible implementation of the second aspect, the second touch tool determining unit includes:

[0044] The filtering module is used to filter the touch information of the preset number of frames to obtain the target touch information;

[0045] The second touch tool identification module is used to identify the touch tool corresponding to the target touch information, and determine the touch tool corresponding to the touch event based on the identification result.

[0046] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the touch tool recognition method as described in the first aspect above.

[0047] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the touch tool recognition method as described in the first aspect above.

[0048] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute the touch tool recognition method as described in the first aspect above.

[0049] In this embodiment, when a touch event occurs, the touch tool is identified frame by frame based on each frame of touch information in the touch event until a first condition or a second condition is met. The first condition is that the touch tool identified in n consecutive frames of touch information is the same, where n is not less than 2. The second condition is that the number of frames of touch information used for touch tool identification reaches a preset number of frames. If the first condition is met, the touch tool corresponding to the touch event is determined to be the touch tool identified by the touch information. If the second condition is met, the touch tool corresponding to the touch event is determined based on the preset number of frames of touch information. This solution combines the identification results of touch tools from multiple frames of touch information to determine the touch tool corresponding to the current touch event, accurately identifying the touch tool interacting with the touchscreen, reducing the false identification rate of touch tools, and thus improving the effectiveness of touch interaction. Attached Figure Description

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

[0051] Figure 1 This is a flowchart illustrating the implementation of the touch tool recognition method provided in the embodiments of this application;

[0052] Figure 2 This is a flowchart illustrating the specific implementation of the touch tool identification method provided in this application embodiment, which identifies touch tools frame by frame based on touch information in each frame of the touch event until the first condition is met.

[0053] Figure 3 This is another specific implementation flowchart of the touch tool identification method provided in the embodiments of this application, which identifies the touch tool frame by frame based on the touch information of each frame in the touch event until the first condition is met;

[0054] Figure 4 This is another specific implementation flowchart of the touch tool identification method provided in the embodiments of this application, which identifies the touch tool frame by frame based on the touch information of each frame in the touch event until the first condition is met;

[0055] Figure 5 This is a flowchart illustrating a specific implementation of the touch tool identification method provided in this application embodiment, which identifies touch tools frame by frame based on touch information in each frame of the touch event until the second condition is met.

[0056] Figure 6This is a flowchart illustrating a specific implementation of the touch tool identification method provided in this application, which identifies touch tools frame by frame based on the touch information in each frame of the touch event.

[0057] Figure 7 This is a flowchart illustrating the specific implementation of step S103 in the touch tool recognition method provided in this application embodiment;

[0058] Figure 8 This is a structural block diagram of the touch tool recognition device provided in the embodiments of this application;

[0059] Figure 9 This is a schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0060] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0061] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0062] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0063] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0064] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0065] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0066] Current interactive screens often have touch tool recognition capabilities, identifying whether the current touch tool is a pen tip, pen cap, finger, or eraser by recognizing touch information. However, various touch tool recognition devices have limited ability to identify touch tools. For example, infrared screens, because the infrared light is centered above the screen surface, can detect touch signals before the touch tool even touches the screen, but the accuracy of the touch information obtained at this time is low, which can easily lead to misjudgment of the touch tool.

[0067] To address the aforementioned issues, embodiments of this application provide a touch tool recognition method, apparatus, electronic device, and storage medium, as detailed below.

[0068] The touch tool recognition method provided in this application can be applied to electronic devices such as smart tablets and interactive large screens. This application does not impose any restrictions on the specific type of electronic device.

[0069] Figure 1 This paper illustrates the implementation flow of the touch tool recognition method provided in an embodiment of this application. In this embodiment, the execution end is an electronic device, such as a smart interactive screen. The method flow includes steps S101 to S103. The specific implementation principle of each step is as follows:

[0070] S101: When a touch event occurs, the touch tool is identified frame by frame based on the touch information of each frame in the touch event until the first condition or the second condition is met. The first condition is that the touch tool identified in n consecutive frames of touch information is the same, and n is not less than 2. The second condition is that the number of frames of touch information for touch tool identification reaches a preset number of frames.

[0071] A single touch event includes at least one of a touch drop event, a touch move event, and a touch release event. A single touch event includes multiple frames of touch information.

[0072] In this embodiment, the electronic device monitors touch signals when a touch tool operates on the screen and acquires touch information corresponding to the monitored touch signals. The touch information includes touch location, touch point shape, and touch area. Touch tools include pen tips, pen caps, fingers, and erasers. Different touch tools may have different functions in interacting with the large screen, and the touch information corresponding to different touch tools, such as touch area and touch point shape, may also differ.

[0073] In one possible implementation, touch information is collected in real time after a touch-activated command is detected.

[0074] In this embodiment of the application, after a touch event occurs, the touch information in the touch event is identified frame by frame to determine whether the identification result meets the first condition or the second condition.

[0075] For example, if n=3, the touch tool is identified frame by frame based on the touch information of each frame in the touch event, and the touch tool corresponding to 3 consecutive frames of touch information is the same, then it is determined that the above first condition is met.

[0076] For example, if the preset number of frames is 10, the touch tool is identified frame by frame based on the touch information of each frame in the touch event. When 10 frames of touch information are identified continuously, there are no three consecutive frames of touch information corresponding to the same touch tool, then it is determined that the above second condition is met.

[0077] As one possible implementation of this application Figure 2 The present application illustrates a specific implementation flow of the touch tool identification method provided in this embodiment, which identifies the touch tool frame by frame based on the touch information of each frame in the touch event until a first condition is met. The details are as follows:

[0078] 1011: If the recognition results corresponding to the touch information of each frame in the target frame set are different, confirm whether there is a target frame subset in the target frame set. The target frame set includes n consecutive frames of touch information, the target frame subset includes m consecutive frames of touch information, the m consecutive frames of touch information includes the last frame of touch information in the target frame set, and the recognition results corresponding to the m consecutive frames of touch information are the same, where m is an integer greater than 1 and m is less than n.

[0079] 1012: If there is a target frame subset in the target frame set, take the continuous m frames of touch information in the target frame subset as the first to m frames of touch information in the new target frame set, update the target frame set to the new target frame set, and continue to determine the recognition result corresponding to each frame of touch information in the target frame set until the first condition is met.

[0080] The target frame set includes n consecutive frames of touch information. The target frame subset is a subset of the target frame set, including m consecutive frames of touch information, where each m frame includes the last touch information frame in the target frame set. The recognition results for the m consecutive frames of touch information are the same. When the recognition results for the n consecutive frames of touch information in the target frame set differ, it is determined whether a target frame subset exists; that is, whether there exist several frames of touch information that are consecutive to the last touch information frame in the n consecutive frames and have the same recognition result. In this embodiment, the specific data for m is determined based on the number of touch information frames that are consecutive to the last touch information frame in the n consecutive frames and have the same recognition result. For example, X1 to X... n This represents n consecutive frames of touch information in the target frame set, where X1~X n When the corresponding recognition results are different, first confirm X. n The corresponding recognition result is determined by X. n The recognition results are compared frame by frame in reverse order. For example, when comparing to X... n-2 The corresponding recognition results are all the same, X n-3 If the corresponding recognition results are different, then X n-2 X n-1 X n The three frames constitute the target frame subset, m=3.

[0081] It should be understood that if the comparison reaches X... n-1 The corresponding recognition results are different, i.e., X n-1 With X n If the corresponding recognition results are different, and there is no touch information with the same recognition results in at least two consecutive frames, then it is confirmed that there is no target frame subset.

[0082] If a target frame subset exists, the touch information of the m frames in the target frame subset is used as the first m frames of the new target frame subset. Then, the recognition results corresponding to the touch information of each frame in the target frame subset are determined until the first condition is met.

[0083] For example, taking n=3 as an example, when the target frame set includes touch information 1, touch information 2 and touch information 3, if the recognition results of the touch tools corresponding to touch information 1, touch information 2 and touch information 3 are different, it is determined whether there is a target frame subset in the target frame set. If the recognition results corresponding to touch information 2 and touch information 3 are the same, and the recognition results corresponding to touch information 1 and touch information 2 are different, it can be determined that there is a target frame subset in the target frame set. Touch information 2 and touch information 3 are taken as the first two frames of touch information in the new target frame set, and the recognition results corresponding to each frame of touch information in the target frame set are determined until the touch tools recognized by the three consecutive frames of touch information are the same.

[0084] As one possible implementation of this application, if the target frame set does not contain a target frame subset, such as Figure 3 As shown, the specific implementation process of identifying the touch tool frame by frame based on the touch information of each frame in the touch event until the first condition is met also includes:

[0085] 1013: If there is no target frame subset in the target frame set, the last frame touch information in the target frame set is used as the first frame touch information in the new target frame set, the target frame set is updated to the new target frame set, and the recognition result corresponding to each frame touch information in the target frame set is determined until the first condition is met.

[0086] In this embodiment, when the recognition results corresponding to touch information in the target frame set are different, it is first determined whether there is a target frame subset in the target frame set. If there is no target frame subset, the touch information of the last frame in the target frame set is taken as the first frame touch information in the new target frame set, the target frame set is updated to the new target frame set, and the recognition results corresponding to the touch information of each frame in the target frame set are determined again until the first condition is met. Wherein, there is no target frame subset in the target frame set, that is, there is no frame in the target frame set that is consecutive to and has the same recognition result as the last frame in n consecutive frames. For example, using X1 to X... n This represents n consecutive frames of touch information in the target frame set, represented by X. n When comparing the recognition results frame by frame in reverse order, the comparison reaches X. n-1 The recognition result corresponding to the frame and X n The corresponding recognition results are different.

[0087] For example, taking n=3 as an example, when the target frame set includes touch information 1, touch information 2 and touch information 3, if the recognition results of the touch tools corresponding to touch information 1, touch information 2 and touch information 3 are different, it is determined whether there is a target frame subset in the target frame set. If the recognition results corresponding to touch information 2 and touch information 3 are different, it can be determined that there is no target frame subset in the target frame set. Touch information 3 is taken as the first frame touch information in the new target frame set, and the recognition results corresponding to the other two frames touch information in the new target frame set are determined until the touch tools corresponding to the three consecutive frames touch information are the same.

[0088] As one possible implementation of this application, if the target frame set does not contain a target frame subset, such as Figure 4 As shown, the specific implementation process of identifying the touch tool frame by frame based on the touch information of each frame in the touch event until the first condition is met also includes:

[0089] 1014: If there is no target frame subset in the target frame set, take the touch information of the frame adjacent to the last touch information in the target frame set as the first touch information in the new target frame set, update the target frame set to the new target frame set, and continue to determine the recognition result corresponding to each frame touch information in the target frame set until the first condition is met.

[0090] Specifically, the target frame set does not contain a subset of target frames; that is, the target frame set does not contain at least one frame whose recognition result is consecutive to and corresponds to the last frame in a series of n consecutive frames. For example, using X1 to X... n This represents n consecutive frames of touch information in the target frame set, represented by X. n When comparing the recognition results frame by frame in reverse order, the comparison reaches X. n-1 The recognition result corresponding to the frame and X n The corresponding recognition results are different.

[0091] It should be understood that if a subset of target frames does not exist in the target frame set, the target frame set will be updated. During the update, it will be compared with X. n The adjacent Xth n+1 The frame is the first frame of touch information in the new target frame set; that is, X is the n consecutive frames in the new target frame set. n+1~ X 2n .

[0092] For example, taking n=3 as an example, when the target frame set includes touch information 1, touch information 2 and touch information 3, if the recognition results of the touch tools corresponding to touch information 1, touch information 2 and touch information 3 are different, it is determined whether there is a target frame subset in the target frame set. If the recognition results corresponding to touch information 2 and touch information 3 are different, it can be determined that there is no target frame subset in the target frame set. At this time, the touch information frame adjacent to touch information 3 in the touch event is taken as the first touch information frame in the new target frame set, the target frame set is updated to the new target frame set, and the recognition results corresponding to each frame of touch information in the target frame set are determined until the touch tools recognized by 3 consecutive frames of touch information are the same.

[0093] In one possible implementation of this application, the preset number of frames is N, where N is an integer greater than n. Figure 5 The present application illustrates a specific implementation flow of the touch tool identification method provided in this embodiment, which identifies the touch tool frame by frame based on the touch information of each frame in the touch event until the second condition is met. The details are as follows:

[0094] 1021: Confirm whether the (N-1)th frame of touch information is included in the n consecutive frames of touch information.

[0095] 1022: If the n consecutive frames of touch information include the (N-1)th frame of touch information, confirm whether the recognition results corresponding to the second to the nth frame of touch information in the n consecutive frames of touch information are all the same.

[0096] 1023: If the recognition results corresponding to the second frame of touch information to the nth frame of touch information in the n consecutive frames of touch information are different, then it is confirmed that the second condition is met.

[0097] For example, if n=3 and the preset number of frames N=10, first confirm whether the (N-1)th frame of touch information is included in the n consecutive frames of touch information, that is, confirm whether the 9th frame of touch information is included in the 3 consecutive frames. Since the touch information recognition method in this application is frame-by-frame recognition, if the 9th frame of touch information is included, then proceed as described above. Figures 1-4 In any embodiment, the recognition method for three consecutive frames includes the following three combinations: the first is frames 7, 8, and 9; the second is frames 8, 9, and 10; and the third is frames 9, 10, and 11. Since the second and third combinations will inevitably recognize the 10th frame after recognizing the 9th frame (otherwise, it cannot be confirmed whether the first condition is met), these two combinations satisfy the second condition during the recognition process. Regarding the first combination, if it includes a 9th frame, it checks whether the recognition results of frames 8 and 9 are the same. If the recognition results of frames 8 and 9 are different, then it proceeds according to the above... Figures 1-4 In any embodiment, the recognition method would necessarily identify the 10th frame to determine if three consecutive frames have the same recognition result. However, according to this embodiment, it is not necessary to identify the touch tool category corresponding to the 10th frame to determine that the second condition is met. This reduces the number of recognition frames and improves recognition efficiency.

[0098] As one possible implementation of this application, the touch information includes the touch area. Figure 6 The present application illustrates a specific implementation flow of the touch tool identification method provided in this embodiment, which identifies the touch tool frame by frame based on the touch information of each frame in the touch event. The details are as follows:

[0099] 1031: Establish a mapping relationship between touch tools and area ranges in advance. The mapping relationship between touch tools and area ranges is one-to-one.

[0100] For example, the mapping relationship between touch tools and area ranges is shown in equation (1) below:

[0101]

[0102] Where f(x) represents the mapping relationship between the touch tool and the area range, s represents the touch area corresponding to the touch information, and the touch area is in millimeters. nib represents the pen tip, cap represents the pen cap, finger represents the finger, and eraser represents the whiteboard eraser.

[0103] 1032: Determine the touch tool corresponding to the touch information based on the area range to which the touch area belongs and the mapping relationship.

[0104] For example, if the touch area is 5 mm², the touch tool can be determined to be a pen tip based on the above mapping relationship. If the touch area is 128 mm², the touch tool can be determined to be a finger based on the above mapping relationship.

[0105] In this embodiment of the application, by pre-establishing a mapping relationship between the touch area and the touch tool, and then determining the area range to which the touch area belongs, the touch tool corresponding to the touch area can be quickly determined.

[0106] S102: If the first condition is met, then the touch tool corresponding to the touch event is determined to be the touch tool identified by the touch information.

[0107] In this embodiment of the application, if the first condition is met, that is, if the touch tools identified by n consecutive frames of touch information are all the same, then the touch tools identified by the n consecutive frames of touch information are determined as the touch tools corresponding to this touch event.

[0108] For example, if n=3, the touch tool is identified frame by frame based on the touch information of each frame in the touch event, and the touch tool corresponding to 3 consecutive frames of touch information is the same, then the first condition is satisfied, and the touch tool corresponding to the 3 frames of touch information is determined as the touch tool corresponding to this touch event.

[0109] S103: If the second condition is met, then based on the touch information of the preset frame number, determine the touch tool corresponding to the touch event.

[0110] In this embodiment of the application, when the identification of the touch tool is performed frame by frame based on the touch information of each frame in the touch event and the second condition is met, that is, when the number of frames of touch information for touch tool identification reaches a preset number of frames, the touch tool corresponding to the touch event is determined based on the touch information of the preset number of frames.

[0111] As one possible implementation of this application Figure 7 A specific implementation flow of step S103 in the touch tool recognition method provided in this application embodiment is shown below:

[0112] 3011: Filter the touch information of the preset number of frames to obtain the target touch information.

[0113] The filtering algorithms mentioned above include median filtering, mean filtering, and polynomial filtering. For details, please refer to the filtering algorithms in the existing technology. They will not be elaborated here.

[0114] 3012: Identify the touch tool corresponding to the target touch information, and determine the touch tool corresponding to the touch event based on the identification result.

[0115] In this embodiment, the touch information is only filtered when the number of frames for touch tool identification exceeds a specified frame threshold. Then, the touch tool corresponding to the target touch information obtained from the filtering process is determined, which effectively reduces noise interference and eliminates the need for the user to re-touch, thereby improving the effectiveness of touch tool identification.

[0116] For example, mean filtering is used to process the touch area of ​​the several frames to obtain an average touch area, which is the average value of the touch areas of the several frames. Based on the mapping relationship between touch tools and area ranges, the touch tool corresponding to the average touch area is determined. The touch tool corresponding to the average touch area of ​​the several frames is identified as the touch tool for this touch event, effectively reducing noise interference and improving the effectiveness of touch tool recognition.

[0117] In this embodiment, when the touch tool cannot be accurately identified after performing touch tool identification on the preset number of touch information frames, the effectiveness of touch tool identification can be improved by filtering the preset number of touch information frames to reduce noise amplitude and optimize the touch information. Then, the touch tool corresponding to the touch event can be determined based on the identification result of the target touch information obtained by filtering and optimization.

[0118] As can be seen from the above, in this embodiment, when a touch event occurs, the touch tool is identified frame by frame based on the touch information in each frame of the touch event until a first condition or a second condition is met. The first condition is that the touch tool identified in n consecutive frames of touch information is the same, where n is not less than 2. The second condition is that the number of frames of touch information used for touch tool identification reaches a preset number of frames. If the first condition is met, the touch tool corresponding to the touch event is determined to be the touch tool identified by the touch information. If the second condition is met, the touch tool corresponding to the touch event is determined based on the preset number of frames of touch information. This solution combines the identification results of touch tools from multiple frames of touch information to determine the touch tool corresponding to the current touch event, which can accurately identify the touch tool interacting with the touchscreen, reduce the false identification rate of touch tools, and thus improve the effectiveness of touch interaction.

[0119] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0120] Corresponding to the touch tool recognition method described in the above embodiments, Figure 8 A structural block diagram of the touch tool recognition device provided in the embodiments of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0121] Reference Figure 8 The touch tool identification device includes: a touch identification unit 71, a first touch tool determination unit 72, and a second touch tool determination unit 73, wherein:

[0122] The touch recognition unit 71 is used to identify the touch tool frame by frame based on each frame of touch information in the touch event when a touch event occurs, until a first condition or a second condition is met. The first condition is that the touch tool identified in n consecutive frames of touch information is the same, and n is not less than 2. The second condition is that the number of frames of touch information for touch tool identification reaches a preset number of frames.

[0123] The first touch tool determination unit 72 is used to determine, if the first condition is met, the touch tool corresponding to the touch event is the touch tool identified by the touch information;

[0124] The second touch tool determination unit 73 is used to determine the touch tool corresponding to the touch event based on the touch information of the preset frame number if the second condition is met.

[0125] As one possible implementation of this application, the touch recognition unit 71 includes:

[0126] The target frame subset confirmation module is used to confirm whether a target frame subset exists in the target frame set when the recognition results corresponding to the touch information of each frame in the target frame set are different. The target frame set includes n consecutive frames of touch information, the target frame subset includes m consecutive frames of touch information, the m consecutive frames of touch information include the last frame of touch information in the target frame set, and the recognition results corresponding to the m consecutive frames of touch information are the same, where m is an integer greater than 1 and m is less than n.

[0127] The first result recognition module is used to, if there is a target frame subset in the target frame set, take the continuous m frames of touch information in the target frame subset as the first to m frames of touch information in the new target frame set, update the target frame set to the new target frame set, and continue to determine the recognition result corresponding to each frame of touch information in the target frame set until the first condition is met.

[0128] As one possible implementation of this application, if the target frame set does not contain a target frame subset, the touch recognition unit 71 further includes:

[0129] The second result recognition module is used to take the last frame of touch information in the target frame set as the first frame of touch information in the new target frame set, update the target frame set to the new target frame set, and continue to determine the recognition result corresponding to each frame of touch information in the target frame set until the first condition is met.

[0130] As one possible implementation of this application, if the target frame set does not contain a target frame subset, the touch recognition unit 71 further includes:

[0131] The third result recognition module is used to take the touch information of the frame adjacent to the last touch information in the target frame set as the first touch information in the new target frame set, update the target frame set to the new target frame set, and continue to determine the recognition result corresponding to each frame touch information in the target frame set until the first condition is met.

[0132] As one possible implementation of this application, the preset frame number is N, where N is an integer greater than n; the touch recognition unit 71 further includes:

[0133] The fourth result recognition module is used to confirm whether the (N-1)th frame of touch information is included in the n consecutive frames of touch information; if the (N-1)th frame of touch information is included in the n consecutive frames of touch information, it confirms whether the recognition results corresponding to the second to the nth frame of touch information in the n consecutive frames of touch information are all the same; if the recognition results corresponding to the second to the nth frame of touch information in the n consecutive frames of touch information are different, it confirms that the second condition is met.

[0134] As one possible implementation of this application, the touch information includes the touch area, and the touch recognition unit 71 includes:

[0135] The relationship establishment module is used to pre-establish the mapping relationship between touch tools and area ranges;

[0136] The first touch tool recognition module is used to recognize touch tools frame by frame according to the area range to which the touch area belongs and the mapping relationship.

[0137] As one possible implementation of this application, the second touch tool determining unit 73 includes:

[0138] The filtering module is used to filter the touch information of the preset number of frames to obtain the target touch information;

[0139] The second touch tool identification module is used to identify the touch tool corresponding to the target touch information, and determine the touch tool corresponding to the touch event based on the identification result.

[0140] As can be seen from the above, when a touch event occurs, the touch tool is identified frame by frame based on the touch information in each frame of the touch event until either a first condition or a second condition is met. The first condition is that the touch tool identified in n consecutive frames of touch information is the same, where n is not less than 2. The second condition is that the number of frames of touch information used for touch tool identification reaches a preset number of frames. If the first condition is met, the touch tool corresponding to the touch event is determined to be the touch tool identified by the touch information. If the second condition is met, the touch tool corresponding to the touch event is determined based on the preset number of frames of touch information. This application's solution combines the touch tool identification results of multiple frames of touch information to determine the touch tool corresponding to the current touch event, which can accurately identify the touch tool interacting with the touchscreen, reduce the false identification rate of the touch tool, and thus improve the effectiveness of touch interaction.

[0141] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0142] This application embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements... Figures 1 to 7 The steps of any touch tool recognition method are represented.

[0143] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements... Figures 1 to 7 The steps of any touch tool recognition method are represented.

[0144] This application also provides a computer program product that, when run on an electronic device, causes the electronic device to perform the following: Figures 1 to 7 The steps of any touch tool recognition method are represented.

[0145] Figure 9This is a schematic diagram of an electronic device provided in an embodiment of this application. Figure 9 As shown, the electronic device 8 of this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. When the processor 80 executes the computer program 82, it implements the steps in the various touch tool recognition method embodiments described above, for example... Figure 1 Steps S101 to S103 are shown. Alternatively, when the processor 80 executes the computer program 82, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 8 The functions of units 71 to 73 are shown.

[0146] For example, the computer program 82 may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete this application. The one or more modules / units may be a series of computer-readable instruction segments capable of performing a specific function, which describe the execution process of the computer program 82 in the electronic device 8.

[0147] The electronic device 8 can be a smart interactive large screen. The electronic device 8 may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will understand that... Figure 9 This is merely an example of electronic device 8 and does not constitute a limitation on electronic device 8. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 8 may also include input / output devices, network access devices, buses, etc.

[0148] The processor 80 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0149] The memory 81 can be an internal storage unit of the electronic device 8, such as a hard disk or memory. The memory 81 can also be an external storage device of the electronic device 8, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 81 can include both internal and external storage units of the electronic device 8. The memory 81 is used to store the computer program and other programs and data required by the electronic device. The memory 81 can also be used to temporarily store data that has been output or will be output.

[0150] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0151] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0152] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / terminal equipment, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0153] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0154] The above-described 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, and should all be included within the protection scope of this application.

Claims

1. A method for recognizing touch tools, characterized in that, include: When a touch event occurs, the touch tool is identified frame by frame based on the touch information of each frame in the touch event until either a first condition or a second condition is met. The first condition is that the touch tool identified in n consecutive frames of touch information is the same, and n is not less than 2. The second condition is that the number of frames of touch information used for touch tool identification reaches a preset number of frames; the preset number of frames is N, where N is an integer greater than n. The step of identifying the touch tool frame by frame based on the touch information of each frame in the touch event until the second condition is met includes: Confirm whether the (N-1)th frame of touch information is included in the n consecutive frames of touch information; If the n consecutive frames of touch information include the (N-1)th frame of touch information, confirm whether the recognition results corresponding to the second to the nth frame of touch information in the n consecutive frames of touch information are all the same; If the recognition results corresponding to the second frame of touch information to the nth frame of touch information in the n consecutive frames of touch information are different, then it is confirmed that the second condition is met; If the first condition is met, then the touch tool corresponding to the touch event is determined to be the touch tool identified by the touch event; If the second condition is met, the touch tool corresponding to the touch event is determined based on the touch information of the preset frame number.

2. The method according to claim 1, characterized in that, The step of identifying the touch tool frame by frame based on the touch information in each frame of the touch event until the first condition is met includes: If the recognition results corresponding to the touch information of each frame in the target frame set are different, it is confirmed whether there is a target frame subset in the target frame set. The target frame set includes n consecutive frames of touch information, the target frame subset includes m consecutive frames of touch information, the m consecutive frames of touch information includes the last frame of touch information in the target frame set, and the recognition results corresponding to the m consecutive frames of touch information are the same, where m is an integer greater than 1 and m is less than n. If a target frame subset exists in the target frame set, the continuous m frames of touch information in the target frame subset are used as the first to the mth frames of touch information in the new target frame set. The target frame set is then updated to the new target frame set, and the recognition results corresponding to the touch information of each frame in the target frame set are determined until the first condition is met.

3. The method according to claim 2, characterized in that, If the target frame set does not contain a subset of target frames, the method further includes: The last frame of touch information in the target frame set is used as the first frame of touch information in the new target frame set. The target frame set is updated to the new target frame set, and the recognition results corresponding to each frame of touch information in the target frame set are determined until the first condition is met.

4. The method according to claim 2, characterized in that, If the target frame set does not contain a subset of target frames, the method further includes: The touch information of the frame adjacent to the last touch information in the target frame set is taken as the first touch information in the new target frame set. The target frame set is updated to the new target frame set, and the recognition result corresponding to each frame touch information in the target frame set is determined until the first condition is met.

5. The method according to claim 1, characterized in that, The touch information includes the touch area, and the step of identifying the touch tool frame by frame based on the touch information of each frame in the touch event includes: Establish a mapping relationship between touch tools and area ranges in advance; The touch tool is identified frame by frame based on the area range to which the touch area belongs and the mapping relationship.

6. The method according to claim 1, characterized in that, If the second condition is met, then based on the touch information of the preset frame number, the touch tool corresponding to the touch event is determined, including: The touch information of the preset number of frames is filtered to obtain the target touch information; Identify the touch tool corresponding to the target touch information, and determine the touch tool corresponding to the touch event based on the identification result.

7. A touch tool recognition device, characterized in that, include: A touch recognition unit is configured to, when a touch event occurs, identify the touch tool frame by frame based on each frame of touch information in the touch event until a first condition or a second condition is met. The first condition is that the touch tool identified in n consecutive frames of touch information is the same, where n is not less than 2. The second condition is that the number of frames of touch information used for touch tool identification reaches a preset number of frames; the preset number of frames is N, where N is an integer greater than n. The step of identifying the touch tool frame by frame based on each frame of touch information in the touch event until the second condition is met includes: confirming whether the (N-1)th frame of touch information is included in the n consecutive frames of touch information; if the (N-1)th frame of touch information is included, confirming whether the identification results corresponding to the second to the nth frame of touch information in the n consecutive frames are all the same; if the identification results corresponding to the second to the nth frame of touch information in the n consecutive frames are different, then confirming that the second condition is met. The first touch tool determination unit is used to determine, if the first condition is met, the touch tool corresponding to the touch event as the touch tool identified by the touch information; The second touch tool determination unit is used to determine the touch tool corresponding to the touch event based on the touch information of the preset frame number if the second condition is met.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the touch tool recognition method as described in any one of claims 1 to 6.

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

Citation Information

Patent Citations

  • Touch event recognition method, device and equipment and storage medium

    CN112527180A

  • KR20210010601A