Touch recognition method, touch device, storage medium, and computer device
The touch recognition method improves accuracy by training a model to differentiate between touch and non-touch conditions using infrared light intensity data, addressing the high recognition error issue in infrared touch screens.
Patent Information
- Application Number
- CN202110658328.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-11
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-06-11
Smart Images

Figure CN115471852B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of touch technology, and in particular, to a touch recognition method, a touch device, a storage medium, and a computer device. Background Art
[0002] With the development of touch technology, infrared touch display devices (such as smart phones, tablet computers, etc.) have become more and more popular. Since the infrared lamps are required to be higher than the glass surface in the design of infrared touch screens, therefore, the infrared sensing height (touch height) of existing infrared touch display devices is generally higher than 2 mm, which easily causes the problem of connected writing, resulting in incorrect touch recognition, and further reducing the accuracy of touch recognition results. Summary of the Invention
[0003] The present application provides a touch recognition method, an apparatus, a storage medium, and a computer device, which can solve the technical problem of how to improve the accuracy of touch recognition results.
[0004] In a first aspect, an embodiment of the present application provides a touch recognition method, which includes:
[0005] Obtain target sensing data of a touch device;
[0006] Input the target sensing data into a pre-trained touch recognition model to output a touch recognition result. The touch recognition model is trained based on first touch data, second touch data, and non-touch data. The first touch data is the sensing data of the touch device when the touch height of the touch object is within a first preset height range within the touchable height range. The lower limit of the touchable height range is zero, and the upper limit of the touchable height range is the maximum touchable height. The touchable height refers to the vertical distance from the optical axis between the infrared emission device and the infrared reception device of the touch device to the touch screen. The second touch data is the sensing data of the touch device when the touch height of the touch object is within a second preset height range within the touchable height range. The upper limit of the first preset height range is less than the lower limit of the second preset height range. The non-touch data is the sensing data of the touch device when the touch height of the touch object is within a third preset height range outside the touchable height range. The upper limit of the second preset height range is less than the lower limit of the third preset height range. In a second aspect, an embodiment of the present application provides a touch device, including:
[0007] A data acquisition module, configured to obtain target sensing data of the touch device;
[0008] A touch recognition module, configured to input the target sensing data into a pre-trained touch recognition model to output a touch recognition result.
[0009] In a third aspect, an embodiment of the present application provides a storage medium storing a computer program adapted to be loaded and executed by a processor to perform the steps of the above method.
[0010] In a fourth aspect, an embodiment of the present application provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the above method are implemented.
[0011] In an embodiment of the present application, target sensing data of a touch device is obtained; the target sensing data is input into a pre-trained touch recognition model to output a touch recognition result. The touch recognition model is trained based on first touch data, second touch data, and non-touch data. The first touch data, second touch data, and non-touch data are sensing data of the touch device when the touch height of a touch object is in different preset height intervals. By using the present application, by pre-training the touch recognition model, the touchable height interval of the touch device is divided into a touch height interval and a non-touch height interval, where the touch height interval is a first preset height interval. After obtaining the target sensing data, touch recognition is performed through the touch recognition model, thereby reducing the recognizable touch height, avoiding recognition errors caused by writing in a cursive style, and improving the accuracy of the touch recognition result. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.
[0013] Figure 1 It is a schematic flowchart of a touch recognition method provided by an embodiment of the present application;
[0014] Figure 2 It is a partial structural schematic diagram of an infrared touch device provided by an embodiment of the present application;
[0015] Figure 3 It is a schematic flowchart of a touch recognition method provided by an embodiment of the present application;
[0016] Figure 4 It is an example schematic diagram of a touch point division method of a touch screen provided by an embodiment of the present application;
[0017] Figure 5 It is an example schematic diagram of a storage method of non-touch data provided by an embodiment of the present application;
[0018] Figure 6A flowchart for obtaining first touch data provided by an embodiment of the present application;
[0019] Figure 7 An example schematic diagram of a storage method for first touch data provided by an embodiment of the present application;
[0020] Figure 8 A flowchart for obtaining second touch data provided by an embodiment of the present application;
[0021] Figure 9 A flowchart for training a touch recognition model provided by an embodiment of the present application;
[0022] Figure 10 An infrared light schematic diagram on a touch screen provided by an embodiment of the present application;
[0023] Figure 11 A flowchart for obtaining a touch recognition result provided by an embodiment of the present application;
[0024] Figure 12 A schematic diagram of the structure of a touch device provided by an embodiment of the present application;
[0025] Figure 13 A schematic diagram of the structure of a touch device provided by an embodiment of the present application;
[0026] Figure 14 A schematic diagram of the structure of a first data acquisition module provided by an embodiment of the present application;
[0027] Figure 15 A schematic diagram of the structure of a second data acquisition module provided by an embodiment of the present application;
[0028] Figure 16 A schematic diagram of the structure of a third data acquisition module provided by an embodiment of the present application;
[0029] Figure 17 A schematic diagram of the structure of a model training module provided by an embodiment of the present application;
[0030] Figure 18 A schematic diagram of the structure of a touch recognition module provided by an embodiment of the present application;
[0031] Figure 19 A schematic diagram of the structure of a data acquisition module provided by an embodiment of the present application;
[0032] Figure 20 A schematic diagram of the structure of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0033] To make the features and advantages of the present application more obvious and understandable, the following will clearly and completely describe the technical solutions in the embodiments of the present application in combination with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0034] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims. The flowcharts shown in the drawings are only illustrative and not necessarily executed in the order shown. For example, some steps are parallel and there is no strict sequence in logic, so the actual execution order can be variable. In addition, the terms "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth" are only for the purpose of distinction and should not be construed as a limitation of the content of the present disclosure.
[0035] The touch recognition method and touch device disclosed in the embodiments of the present application can be applied to the field of touch technology, such as touch recognition of infrared touch devices, etc., and can also be applied to touch recognition of touch control devices. By obtaining the target sensing data of the device, and then inputting the obtained target sensing data into a pre-trained touch recognition model, a touch recognition result is output. The touch device may include, but is not limited to, intelligent interactive tablets, mobile phones, personal computers, laptop computers and other intelligent terminals.
[0036] In the embodiments of the present application, the touch device can obtain the target sensing data of the touch device; input the target sensing data into a pre-trained touch recognition model, and output a touch recognition result. The touch recognition model is trained based on first touch data, second touch data, and non-touch data. The first touch data, second touch data, and non-touch data are the sensing data of the touch device when the touch height of the touch object is in different preset height intervals. By adopting the present application, by pre-training the touch recognition model, after obtaining the target sensing data, touch recognition is performed through the touch recognition model, thereby improving the accuracy of the touch recognition result.
[0037] The following will be combined with Figures 1 to 13 , and the touch recognition method provided in the embodiments of the present application will be introduced in detail.
[0038] Please refer to Figure 1 , which is a schematic flowchart of a touch recognition method provided in the embodiments of the present application. As Figure 1As shown, the method may include the following steps S101 to step S102.
[0039] Step S101, obtaining target sensing data of a touch device.
[0040] Specifically, the touch device may be an intelligent interactive flat panel, a smart terminal with an infrared touch device such as a mobile phone, a personal computer, or a laptop computer. The infrared touch device includes a touch screen, at least one infrared emission device, and at least one infrared reception device. Optionally, the infrared touch device may also be an external input device connected to the touch device, such as a graphics tablet, a writing tablet, or a touchpad. Exemplarily, as Figure 2 shown, Figure 2 shows a partial structure of the infrared touch device. Figure 2 The infrared lamp in [reference] is an infrared emission device, which is provided at the border of the infrared touch device. A filter strip is provided in front of the infrared light emission direction of the infrared lamp, and the filter strip is used to filter infrared light. Figure 2 The glass in [reference] is the touch screen, and the user can write on the touch screen, thereby generating a writing trajectory. Figure 2 The theoretical touch height in [reference] refers to the maximum touch height at which the infrared touch device can recognize a touch object under the current installation method of the infrared lamp and the glass, that is, the maximum touchable height. It can be understood that different installation methods of the infrared lamp and the glass will result in different theoretical touch heights.
[0041] The target sensing data refers to the infrared light intensity currently received by each infrared reception device of the touch device, and the target sensing data is used to identify whether the infrared touch device is currently being touched.
[0042] Step S102, inputting the target sensing data into a pre-trained touch recognition model, and outputting a touch recognition result. The touch recognition model is trained based on first touch data, second touch data, and non-touch data. The first touch data is the sensing data of the touch device when the touch height of the touch object is within a first preset height range within the touchable height range. The lower limit of the touchable height range is zero, and the upper limit of the touchable height range is the maximum touchable height. The touchable height refers to the vertical distance from the optical axis between the infrared emission device and the infrared reception device of the touch device to the touch screen. The second touch data is the sensing data of the touch device when the touch height of the touch object is within a second preset height range within the touchable height range. The upper limit of the first preset height range is less than the lower limit of the second preset height range. The non-touch data is the sensing data of the touch device when the touch height of the touch object is within a third preset height range outside the touchable height range. The upper limit of the second preset height range is less than the lower limit of the third preset height range.
[0043] Specifically, the first touch data, the second touch data, and the non-touch data are all the infrared light intensities received by the infrared receiving device of the touch device in corresponding situations. After the touch recognition model is trained according to the first touch data, the second touch data, and the non-touch data, the touchable height range of the touch device is divided into a touch height range and a non-touch height range. Among them, the touch height range is the first preset height range. When the touch height of the touch object is within the first preset height range, the touch recognition model determines that the touch screen is touched; the non-touch height range is the second preset height range, and the touch recognition model determines that the touch screen is not touched. It can be understood that after the touch recognition model receives the target induction data, it performs touch recognition based on the received target induction data to determine whether the touch height of the touch object is within the first preset height range. If it is within the first preset height range, it determines that the touch screen of the touch device is touched; if it is not within the first preset height range, for example, the touch height of the touch object is within the second preset height range, it determines that the touch screen of the touch device is not touched; finally, the touch recognition result is output.
[0044] In the embodiment of the present application, the target induction data of the touch device is obtained; the target induction data is input into a pre-trained touch recognition model, and the touch recognition result is output. The touch recognition model is trained based on the first touch data, the second touch data, and the non-touch data. The first touch data, the second touch data, and the non-touch data are the induction data of the touch device when the touch height of the touch object is in different preset height ranges. By adopting the present application, by pre-training the touch recognition model, the touchable height range of the touch device is divided into a touch height range and a non-touch height range, where the touch height range is the first preset height range, so as to perform touch recognition through the touch recognition model after obtaining the target induction data, thereby reducing the recognizable touch height, avoiding recognition errors caused by writing connected strokes, and improving the accuracy of the touch recognition result.
[0045] Please refer to Figure 3 , which is a schematic flowchart of a touch recognition method provided by an embodiment of the present application. As Figure 3 shown, the method of the embodiment of the present application may include the following steps S201-step S206.
[0046] Step S201, obtain the first touch data of each touch point of the touch device within the first preset height range, and mark the first touch data as the first preset value, where the first preset value indicates that the touch device is touched.
[0047] Specifically, at least two touch areas can be pre-divided on the touch screen of the touch device, and the area of each touch area is the same. Then, a position (such as the center point of the area) is selected in the touch area as the touch point corresponding to the touch area. It can be understood that the intervals between the touch points are the same. Exemplarily, as Figure 4 shown Figure 4 shows a way of dividing touch points on a touch screen.
[0048] There is a touch object above the touch screen of the touch device for assisting data collection. The touch object can be a writing tool such as a stylus controlled by a robotic arm or manually. The touch height of the touch object is maintained within a first preset height range by the robotic arm or manually. When the touch object is within the first preset height range and the touch position is within each touch area or touch point, the processor obtains the currently received infrared light intensity of each infrared receiving device of the touch device, and takes the currently received infrared light intensity of each infrared receiving device as the first touch data corresponding to the current touched touch area or touch point. Specifically, there is at least one set of first touch data for each touch point. Then, the obtained first touch data is marked as a first preset value. Exemplarily, the first touch data can be stored in the format of a text file. Correspondingly, when marking the first touch data, the file name of the first touch data can be modified to the first preset value. Specifically, the first preset value indicates that the touch device is touched. Optionally, the first touch data can also be stored in association with the first preset value. This embodiment does not limit the way of marking the first touch data.
[0049] Step S202, obtain the second touch data of the touch device within a second preset height range, and mark the second touch data as a second preset value, where the second preset value indicates that the touch device is not touched.
[0050] Specifically, the touch object above the touch screen of the touch device maintains the touch height of the touch object within a second preset height range by the robotic arm or manually. When the touch object is within the second preset height range and the touch position is within each touch area or touch point, the processor obtains the currently received infrared light intensity of each infrared receiving device of the touch device, and takes the currently received infrared light intensity of each infrared receiving device as the second touch data corresponding to the current touched touch area or touch point. Specifically, there is at least one set of second touch data for each touch point. Then, the obtained second touch data is marked as a second preset value. Exemplarily, the second touch data can be stored in the format of a text file. Correspondingly, when marking the second touch data, the file name of the second touch data can be modified to the second preset value. Specifically, the second preset value indicates that the touch device is not touched. Optionally, the second touch data can also be stored in association with the second preset value. This embodiment does not limit the way of marking the second touch data.
[0051] Step S203: Obtain the untouched data of the touch device and mark the untouched data as a second preset value.
[0052] Specifically, the processor obtains the untouched data of the touch device. Optionally, the untouched data can also be associated and stored with the second preset value. This embodiment does not limit the way of marking the untouched data.
[0053] Optionally, step S204 further includes the following steps:
[0054] Obtain the third infrared light intensity received by each infrared receiving device on the touch device. The touch height of the touch object is located in a third preset height interval outside the touchable height interval, and the third touch data is the third infrared light intensity currently received by each infrared receiving device on the touch device.
[0055] Specifically, the touch device generates untouched data based on the third infrared light intensity received by each infrared receiving device obtained in the current cycle, stores the untouched data as a third data file, and then modifies the file name of the data file to the second preset value. Exemplarily, the untouched data stored in the third data file can be as Figure 5 shown. Further, in the Figure 5 shown data table, different values represent the infrared light intensities received by different infrared receiving devices in the current cycle. The numerical positions in the data table represent the positions of the infrared receiving devices, that is, the positions of each infrared receiving device in the data table are fixed. Then it can be understood that after obtaining the infrared light intensities of each infrared receiving device, a data table of the current cycle, that is, the untouched data, is generated according to the position information of the infrared receiving devices. By obtaining the untouched data, the number of training data is increased, and thus the recognition accuracy of the touch recognition model is improved.
[0056] It should be noted that in the current cycle, the touch height of the touch object is located in the third preset height interval, or there is no touch object above the touch screen of the touch device.
[0057] Step S204: Train the touch recognition model according to the first touch data, the second touch data, and the untouched data.
[0058] Specifically, the touch device performs decision-making training according to the first touch data, the second touch data, and the untouched data to obtain the touch recognition model.
[0059] Step S205: Obtain the target sensing data of the touch device.
[0060] For details, refer to step S101, which will not be elaborated here.
[0061] Step S206: Input the target sensing data into a pre-trained touch recognition model to output a touch recognition result. The touch recognition model is trained based on first touch data, second touch data, and non-touch data. The first touch data is the sensing data of the touch device when the touch height of the touch object is within a first preset height range within the touchable height range. The lower limit of the touchable height range is zero, and the upper limit of the touchable height range is the maximum touchable height. The touchable height refers to the vertical distance from the optical axis between the infrared emission device and the infrared reception device of the touch device to the touch screen. The second touch data is the sensing data of the touch device when the touch height of the touch object is within a second preset height range within the touchable height range. The upper limit of the first preset height range is less than the lower limit of the second preset height range. The non-touch data is the sensing data of the touch device when the touch height of the touch object is within a third preset height range outside the touchable height range. The upper limit of the second preset height range is less than the lower limit of the third preset height range.
[0062] For details, refer to step S102, which will not be elaborated here.
[0063] Please refer to Figure 6 , which provides a flowchart for obtaining the first touch data in the embodiments of this application. As Figure 6 shown, the method of the embodiments of this application may include the following steps S301 - S302.
[0064] Step S301: Traverse each touch point pre-divided on the touch screen of the touch device to obtain the first touch data corresponding to the currently traversed touch point. The touch height of the touch object corresponding to each touch point is within the first preset height range within the touchable height range. The first touch data is the first infrared light intensity currently received by each infrared reception device on the touch device.
[0065] Specifically, the touch device may send a traversal instruction for traversing the touch points to the control device controlling the robotic arm, so that the robotic arm controls the touch object to touch each touch point on the touch screen in turn. Optionally, the touch device may also periodically output a prompt message for changing the current touch point until the traversal of each touch point on the touch screen is completed, so that when the user sees the prompt message, the touch object is moved from the currently touched touch point to the next touch point.
[0066] The touch device periodically obtains the infrared light intensity received by each infrared reception device in the current period. It should be noted that in different periods, the touch points touched by the touch object are different, and in the same period, the touch point touched by the touch object is only one. The touch device generates a first data file of the first touch data based on the first infrared light intensity received by each infrared reception device obtained in the current period. Exemplarily, the first touch data stored in the first data file may be asFigure 7 As shown, further, in Figure 7 the data table shown, different numerical values all represent the infrared light intensity received by different infrared receiving devices in the current period. The numerical positions in the data table represent the positions of the infrared receiving devices, that is, the positions of each infrared receiving device in the data table are fixed. Then it can be understood that after obtaining the infrared light intensity of each infrared receiving device, a data table for the current period, that is, the first touch data, is generated according to the position information of the infrared receiving devices. Optionally, a set of first touch data is obtained in each period, that is, a first data file is obtained.
[0067] Specifically, in the current traversal process, the touch height of the touch object is limited within the first preset height range.
[0068] Step S302, when all touch points have been traversed, the first touch data of each touch point is obtained.
[0069] Thus, by traversing the touch points on the touch screen, the first touch data corresponding to each touch point is obtained, the number of training data is increased, and further the recognition accuracy of the touch recognition model is improved.
[0070] Please also refer to Figure 8 , which provides a flowchart for obtaining the second touch data in an embodiment of the present application. As Figure 8 shown, the method in the embodiment of the present application may include the following steps S401 - step S402.
[0071] Step S401, traverse each touch point pre-divided on the touch screen of the touch device, and obtain the second touch data corresponding to the currently traversed touch point. The touch height of the touch object corresponding to each touch point is within a second preset height range within the touchable height range. The second touch data is the second infrared light intensity currently received by each infrared receiving device on the touch device.
[0072] Specifically, the touch device generates a second data file of the second touch data according to the second infrared light intensity received by each infrared receiving device in the current period. After the processor of the touch device obtains the infrared light intensity of each infrared receiving device, it generates a data table for the current period according to the position information of the infrared receiving devices, that is, the second touch data.
[0073] Optionally, a set of second touch data is obtained in each period, that is, a second data file is obtained. In the current traversal process, the touch height of the touch object is limited within the second preset height range.
[0074] Step S402, when all touch points have been traversed, the second touch data of each touch point is obtained.
[0075] Thus, by traversing the touch points on the touch screen, the second touch data corresponding to each touch point is obtained, the number of training data is increased, and thus the recognition accuracy of the touch recognition model is improved.
[0076] Please refer to Figure 9 together, which provides a flowchart for training a touch recognition model in an embodiment of the present application. As Figure 9 shown, the method of the embodiment of the present application may include the following steps S601-S604.
[0077] Step S601, obtaining first touch data features according to the first touch data and the non-touch data, where the first touch data features include at least one of the horizontal coordinate of the first touch position, the vertical coordinate of the first touch position, the number of first horizontal light occlusions, the number of first vertical light occlusions, the maximum first horizontal light occlusion depth, the maximum first vertical light occlusion depth, the average first horizontal light occlusion depth, and the average first vertical light occlusion depth.
[0078] Specifically, the processor sequentially obtains the first data file, that is, obtains the first touch data and obtains the non-touch data, and then obtains the infrared light intensity difference between the first touch data and the non-touch data for each infrared receiving device. It should be noted that the infrared light intensities stored in the first touch data and the non-touch data are both associated and saved with the corresponding infrared receiving device. For example, the infrared receiving device corresponding to the infrared light intensity can be determined according to the position of the infrared light intensity in the data table. When the processor obtains the infrared light intensity difference of each infrared receiving device, it first obtains the infrared light intensity of an infrared receiving device in the first touch data, then obtains the infrared light intensity of the infrared receiving device in the non-touch data, and then subtracts the infrared light intensity in the first touch data from the infrared light intensity in the non-touch data, and uses the obtained difference as the infrared light intensity difference corresponding to the infrared receiving device. Exemplarily, when the first touch data is a data table as Figure 7 shown, and the non-touch data is a data table as Figure 5 shown, first obtain Figure 7 the infrared light intensity value in the first row and the first column in, that is, 106, and then obtain Figure 5 the infrared light intensity value in the first row and the first column in, that is, 107, and then calculate the difference between these two data, that is, 107 - 106 = 1, so the infrared light intensity difference of the infrared receiving device corresponding to the first row and the first column is 1.
[0079] Then, the infrared light intensity difference of each infrared receiving device is compared with the preset infrared light intensity difference one by one. The preset infrared light intensity difference is used to determine whether the infrared light emitted by the infrared transmitting device is blocked by an object. That is, when the infrared light intensity currently received by the infrared receiving device is greater than the infrared light intensity received when not blocked, it is determined that the infrared light emitted by the infrared transmitting device corresponding to the infrared receiving device is blocked. Determine the infrared receiving devices with the infrared light intensity difference greater than or equal to the preset infrared light intensity difference, and record them as target infrared receiving devices. Then, record the infrared transmitting devices corresponding to each target infrared receiving device as target infrared transmitting devices. Then, according to the first coordinates of each target infrared receiving device and the second coordinates of the corresponding target infrared transmitting device, determine the horizontal coordinate and the vertical coordinate of the first touch position touched in the first touch data. Exemplarily, as Figure 10 shown Figure 10 FIG. shows a schematic diagram of infrared light on a touch screen, which only shows the infrared light blocked by an object. Take the straight line in the horizontal direction below the touch screen as the X-axis, and the straight line in the vertical direction on the left side of the touch screen as the Y-axis. Then, after determining the target infrared receiving device and the corresponding target infrared transmitting device, obtain the connection lines between each target infrared receiving device and the corresponding target infrared transmitting device (such as Figure 10 each straight line in), and then calculate the intersection coordinates between each connection line according to each connection line. Then, obtain the intersection range where each intersection coordinate is located (such as Figure 10 the circles in), and use the center coordinates within this intersection range as the position information of the first touch position, that is, the X-axis coordinate of the center coordinates is the horizontal coordinate of the first touch position, and the Y-axis coordinate of the center coordinates is the vertical coordinate of the first touch position.
[0080] Exemplarily, the intersection coordinates between any two connection lines can be calculated in the following manner.
[0081] Take the coordinates of a group of first target infrared receiving devices as the first target coordinates, and the coordinates of the first target infrared transmitting device corresponding to the first target infrared receiving device as the second target coordinates. Among them, the first target coordinates are denoted as (a1, b1), and the second target coordinates are denoted as (a2, b2); take the coordinates of another group of first target infrared receiving devices as the third target coordinates, and the coordinates of the first target infrared transmitting device corresponding to the first target infrared receiving device as the fourth target coordinates. Among them, the third target coordinates are denoted as (a3, b3), and the fourth target coordinates are denoted as (a4, b4); substitute the first target coordinates, the second target coordinates, the third target coordinates, and the fourth target coordinates into the formula (x - a1)(b2 - b1) = (y - b1)(a2 - a1) and the formula (x - a3)(b4 - b3) = (y - b3)(a4 - a3) to calculate the intersection coordinates (x, y) of the current two connection lines.
[0082] Further, obtain the position information of the target infrared receiving device, and divide the target infrared receiving device into a horizontal target infrared receiving device in the horizontal direction and a vertical target infrared receiving device in the vertical direction according to the position information, and use the number of horizontal target infrared receiving devices as the first horizontal light occlusion quantity, and use the number of vertical target infrared receiving devices as the first vertical light occlusion quantity. Specifically, the position information of the infrared receiving device refers to the position information of the infrared receiving device at the border of the touch screen. Among them, the infrared receiving devices located above and below the touch screen are the infrared receiving devices in the horizontal direction, and the infrared receiving devices located on the left and right sides of the touch screen are the infrared receiving devices in the vertical direction. Exemplarily, as Figure 10 shown in the infrared light schematic diagram, the number of light rays in the horizontal direction in this figure is two, so the number of horizontal target infrared receiving devices is 2; the number of light rays in the vertical direction in this figure is three, so the number of vertical target infrared receiving devices is 3.
[0083] Further, divide the infrared light intensity difference corresponding to the horizontal target infrared receiving device by the infrared light intensity of the horizontal target infrared receiving device in the non-touch data, and then use the obtained quotient value as the light occlusion depth of the horizontal target infrared receiving device; divide the infrared light intensity difference corresponding to the vertical target infrared receiving device by the infrared light intensity of the vertical target infrared receiving device in the non-touch data, and then use the obtained quotient value as the light occlusion depth of the vertical target infrared receiving device.
[0084] Exemplarily, the infrared light intensity of the target infrared receiving device in the first touch data is 46, and the infrared light intensity of the target infrared receiving device in the non-touch data is 84, then the infrared light intensity difference corresponding to the target infrared receiving device is 84 - 46 = 38, and the light occlusion depth corresponding to the target infrared receiving device is 38 / 84 = 0.45 (rounded off).
[0085] Then compare the light occlusion depths corresponding to each horizontal target infrared receiving device, and use the maximum value of the light occlusion depths as the maximum first horizontal light occlusion depth. Similarly, compare the light occlusion depths corresponding to each vertical target infrared receiving device, and use the maximum value of the light occlusion depths as the maximum first vertical light occlusion depth.
[0086] Further, accumulate the light shielding depths of each horizontal target infrared receiving device, divide the accumulated value by the number of horizontal target infrared receiving devices, obtain the mean value of each light shielding depth, and use the currently obtained mean value as the first average horizontal light shielding depth. Similarly, accumulate the light shielding depths of each vertical target infrared receiving device, divide the accumulated value by the number of vertical target infrared receiving devices, obtain the mean value of each light shielding depth, and use the currently obtained mean value as the first average vertical light shielding depth.
[0087] Step S602, obtain second touch data features according to the second touch data and the non-touch data. The second touch data features include at least one of the horizontal coordinate of the second touch position, the vertical coordinate of the second touch position, the second horizontal light shielding quantity, the second vertical light shielding quantity, the second maximum horizontal light shielding depth, the second maximum vertical light shielding depth, the second average horizontal light shielding depth, and the second average vertical light shielding depth.
[0088] Specifically, refer to step S601. The calculation method of the second touch data features is the same as that in step S601. In this step, only the first touch data in step S601 is changed to the second touch data to calculate the second touch data features of the second touch data according to the second touch data and the non-touch data, which will not be elaborated here.
[0089] Step S603, mark the first touch data features as the first preset value and mark the second touch data features as the second preset value.
[0090] Specifically, after calculating the first touch data features according to the foregoing method, mark the first touch data features as the first preset value. Similarly, after calculating the second touch data features according to the foregoing method, mark the second touch data features as the first preset value.
[0091] Step S604, perform decision training on the touch recognition model according to the first touch data features, the marked values of the first touch data features, the second touch data features, and the marked values of the second touch data features.
[0092] Specifically, use the first touch data features and the second touch data features as the training set of the touch recognition model, and use the marked values of the first touch data features and the marked values of the second touch data features as the attribute set of the touch recognition model. Then, perform decision tree training according to the training set and the attribute set to obtain the trained touch recognition model.
[0093] By calculating various first touch data features and second touch data features, the types of training samples in the training set can be increased when training the touch recognition model.
[0094] In the embodiment of the present application, the touch recognition model is trained based on the first touch data, the second touch data, and the non-touch data, where the first touch data, the second touch data, and the non-touch data are the sensing data of the touch device when the touch height of the touch object is in different preset height intervals. By adopting the present application, by pre-training the touch recognition model, the touchable height interval of the touch device is divided into a touch height interval and a non-touch height interval, where the touch height interval is the first preset height interval, so as to perform touch recognition through the touch recognition model after obtaining the target sensing data, thereby reducing the recognizable touch height, avoiding recognition errors caused by writing connected strokes, and improving the accuracy of the touch recognition result.
[0095] Please refer to Figure 11 , which provides a flowchart for obtaining a touch recognition result in the embodiment of the present application. As Figure 11 shown, the method of the embodiment of the present application may include the following steps S701-step S703.
[0096] Step S701, obtain the intensity of the fourth infrared light received by each infrared receiving device on the touch device, and the target sensing data is the intensity of the fourth infrared light currently received by each infrared receiving device on the touch device.
[0097] Specifically, the touch device periodically obtains the intensity of the infrared light received by each infrared receiving device in the current period, and then generates target sensing data according to the intensity of the fourth infrared light received by each infrared receiving device obtained in the current period.
[0098] Step S702, based on the non-touch data, extract the target data features of the target sensing data, and the target data features include at least one of the horizontal coordinate of the target touch position, the vertical coordinate of the target touch position, the number of target horizontal light occlusions, the number of target vertical light occlusions, the maximum occlusion depth of the target horizontal light, the maximum occlusion depth of the target vertical light, the average occlusion depth of the target horizontal light, and the average occlusion depth of the target vertical light.
[0099] Specifically, after the touch device obtains the current target sensing data, it extracts the target data features of the target sensing data based on the non-touch data. Please refer to step S601, and the calculation method of the target data features is the same as that in step S601. In this step, only the first touch data in step S601 is changed to the target sensing data to calculate the target data features of the target sensing data according to the target sensing data and the non-touch data, which will not be elaborated here.
[0100] Step S703, input the target data features into the pre-trained touch recognition model, and output the touch recognition result.
[0101] In an embodiment of the present application, by obtaining the target data characteristics of the target sensing data, touch recognition is performed through a pre-trained touch recognition model, thereby reducing the recognizable touch height, avoiding recognition errors caused by writing connected strokes, and improving the accuracy of the touch recognition result.
[0102] The following will combine the attached Figure 12 ~attached Figure 19 The touch device provided by the embodiment of the present application will be introduced in detail. It should be noted that the attached Figure 12 ~attached Figure 19 The touch device is used to execute the present application Figures 1 to 11 The method of the embodiment shown. For the sake of convenience of description, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application Figures 1 to 11 The embodiment shown.
[0103] Please refer to Figure 12 , which is a schematic structural diagram of a touch device provided by an embodiment of the present application. As Figure 12 shown, the touch device 1 of the embodiment of the present application may include: a data acquisition module 101 and a touch recognition module 102.
[0104] The data acquisition module 101 is used to acquire the target sensing data of the touch device
[0105] The touch recognition module 102 is used to input the target sensing data into a pre-trained touch recognition model and output a touch recognition result.
[0106] In an embodiment of the present application, the target sensing data of the touch device is acquired; the target sensing data is input into a pre-trained touch recognition model to output a touch recognition result. The touch recognition model is trained based on the first touch data, the second touch data, and the non-touch data. The first touch data, the second touch data, and the non-touch data are the sensing data of the touch device when the touch height of the touch object is in different preset height intervals. By adopting the present application, by pre-training the touch recognition model, the touchable height interval of the touch device is divided into a touch height interval and a non-touch height interval, where the touch height interval is the first preset height interval. After acquiring the target sensing data, touch recognition is performed through the touch recognition model, thereby reducing the recognizable touch height, avoiding recognition errors caused by writing connected strokes, and improving the accuracy of the touch recognition result.
[0107] Please refer to Figure 13 , which is a schematic structural diagram of a touch device provided by an embodiment of the present application. As Figure 13As shown in the figure, the touch device 1 according to the embodiment of the present application may include: a data acquisition module 101, a touch recognition module 102, a first data acquisition module 103, a second data acquisition module 104, a third data acquisition module 105, and a model training module 106.
[0108] The data acquisition module 101 is configured to acquire target induction data of the touch device
[0109] The touch recognition module 102 is configured to input the target induction data into a pre-trained touch recognition model and output a touch recognition result.
[0110] The first data acquisition module 103 is configured to acquire first touch data of each touch point of the touch device within a first preset height range, and mark the first touch data as a first preset value;
[0111] The second data acquisition module 104 is configured to acquire second touch data of the touch device within a second preset height range, and mark the second touch data as a second preset value;
[0112] The third data acquisition module 105 is configured to acquire non-touch data of the touch device, and mark the non-touch data as a second preset value;
[0113] The model training module 106 is configured to train the touch recognition model according to the first touch data, the second touch data, and the non-touch data.
[0114] In the embodiment of the present application, the touch recognition model is trained based on the first touch data, the second touch data, and the non-touch data. Among them, the first touch data, the second touch data, and the non-touch data are induction data of the touch device when the touch height of the touch object is located in different preset height ranges. By adopting the present application, by pre-training the touch recognition model, the touchable height range of the touch device is divided into a touch height range and a non-touch height range. Among them, the touch height range is the first preset height range, so as to perform touch recognition through the touch recognition model after acquiring the target induction data, thereby reducing the recognizable touch height, avoiding recognition errors caused by writing connected strokes, and improving the accuracy of the touch recognition result.
[0115] Please refer to Figure 14 together, which is a schematic structural diagram of a first data acquisition module provided by the embodiment of the present application. As Figure 14 shown, the first data acquisition module 103 may include:
[0116] The first data acquisition unit 1031 is configured to traverse each touch point pre-divided on the touch screen of the touch device, and acquire first touch data corresponding to the currently traversed touch point. The touch height of the touch object corresponding to each touch point is within a first preset height range within the touchable height range, and the first touch data is the first infrared light intensity currently received by each infrared receiving device on the touch device;
[0117] The second data acquisition unit 1032 is configured to obtain the first touch data of each touch point when all touch points have been traversed.
[0118] In the embodiment of the present application, by traversing the touch points on the touch screen, the first touch data corresponding to each touch point is acquired, the number of training data is increased, and thus the recognition accuracy of the touch recognition model is improved.
[0119] Please refer to Figure 15 together, which is a schematic structural diagram of a second data acquisition module provided by the embodiment of the present application. As Figure 15 shown, the second data acquisition module 104 may include:
[0120] The third data acquisition unit 1041 is configured to traverse each touch point pre-divided on the touch screen of the touch device, and acquire second touch data corresponding to the currently traversed touch point. The touch height of the touch object corresponding to each touch point is within a second preset height range within the touchable height range, and the second touch data is the second infrared light intensity currently received by each infrared receiving device on the touch device;
[0121] The fourth data acquisition unit 1042 is configured to obtain the second touch data of each touch point when all touch points have been traversed.
[0122] In the embodiment of the present application, by traversing the touch points on the touch screen, the second touch data corresponding to each touch point is acquired, the number of training data is increased, and thus the recognition accuracy of the touch recognition model is improved.
[0123] Please refer to Figure 16 together, which is a schematic structural diagram of a third data acquisition module provided by the embodiment of the present application. As Figure 16 shown, the third data acquisition module 105 may include:
[0124] The fifth data acquisition unit 1051 is configured to acquire the third infrared light intensity received by each infrared receiving device on the touch device. The touch height of the touch object is within a third preset height range outside the touchable height range, and the third touch data is the third infrared light intensity currently received by each infrared receiving device on the touch device.
[0125] In the embodiments of the present application, by obtaining non-touch data, the number of training data is increased, thereby improving the recognition accuracy of the touch recognition model.
[0126] Please refer to Figure 17 together, which provides a schematic structural diagram of a model training module for the embodiments of the present application. As Figure 17 shown, the model training module 106 may include:
[0127] A first feature acquisition unit 1061, configured to obtain first touch data features according to the first touch data and the non-touch data, where the first touch data features include at least one of the horizontal coordinate of the first touch position, the vertical coordinate of the first touch position, the first horizontal light occlusion quantity, the first vertical light occlusion quantity, the first horizontal light maximum occlusion depth, the first vertical light maximum occlusion depth, the first horizontal light average occlusion depth, and the first vertical light average occlusion depth;
[0128] A second feature acquisition unit 1062, configured to obtain second touch data features according to the second touch data and the non-touch data, where the second touch data features include at least one of the horizontal direction coordinate of the second touch position, the vertical direction coordinate of the second touch position, the second horizontal light occlusion quantity, the second vertical light occlusion quantity, the second horizontal light maximum occlusion depth, the second vertical light maximum occlusion depth, the second horizontal light average occlusion depth, and the second vertical light average occlusion depth;
[0129] A feature marking unit 1063, configured to mark the first touch data features as a first preset value and mark the second touch data features as a second preset value;
[0130] A model training unit 1064, configured to perform decision training on the touch recognition model according to the first touch data features, the marked values of the first touch data features, the second touch data features, and the marked values of the second touch data features.
[0131] In the embodiments of the present application, by calculating various first touch data features and second touch data features, when training the touch recognition model, the types of training samples in the training set are calculated to be increased.
[0132] Please refer to Figure 18 together, which provides a schematic structural diagram of a touch recognition module for the embodiments of the present application. As Figure 18 shown, the touch recognition module 102 may include:
[0133] A target feature acquisition unit 1021 is configured to extract target data features of target sensing data based on non-touch data, where the target data features include at least one of a horizontal coordinate of a target touch position, a vertical coordinate of the target touch position, a target horizontal light occlusion quantity, a target vertical light occlusion quantity, a maximum target horizontal light occlusion depth, a maximum target vertical light occlusion depth, an average target horizontal light occlusion depth, and an average target vertical light occlusion depth;
[0134] A result acquisition unit 1022 is configured to input the target data features into a pre-trained touch recognition model and output a touch recognition result.
[0135] In an embodiment of the present application, by acquiring target data features of target sensing data, touch recognition is performed through a pre-trained touch recognition model, thereby reducing the recognizable touch height, avoiding recognition errors caused by connected writing strokes, and improving the accuracy of touch recognition results.
[0136] Please refer to Figure 19 together, which is a schematic structural diagram of a data acquisition module provided by an embodiment of the present application. As Figure 19 shown, the data acquisition module 101 may include:
[0137] A target data acquisition unit 1011 is configured to acquire the intensity of the fourth infrared light received by each infrared receiving device on the touch device, and the target sensing data is the intensity of the fourth infrared light currently received by each infrared receiving device on the touch device.
[0138] In an embodiment of the present application, by acquiring target data features of target sensing data, touch recognition is performed through a pre-trained touch recognition model, thereby reducing the recognizable touch height, avoiding recognition errors caused by connected writing strokes, and improving the accuracy of touch recognition results.
[0139] The embodiment of the present application further provides a storage medium, which may store multiple program instructions. The program instructions are suitable for being loaded and executed by a processor to perform the method steps of the above Figures 1 to 11 shown embodiment. The specific execution process may refer to the specific description of the Figures 1 to 11 shown embodiment and will not be elaborated herein.
[0140] Please refer to Figure 20 together, which is a schematic structural diagram of a computer device provided by an embodiment of the present application. As Figure 20As shown in the figure, the computer device 1000 may include: at least one processor 1001, at least one memory 1002, at least one network interface 1003, at least one input / output interface 1004, at least one communication bus 1005, and at least one display unit 1006. Among them, the processor 1001 may include one or more processing cores. The processor 1001 connects various parts within the entire computer device 1000 through various interfaces and lines, and by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1002, as well as calling data stored in the memory 1002, it executes various functions of the terminal 1000 and processes data. The memory 1002 may be a high-speed RAM memory, or a non-volatile memory, such as at least one disk memory. Optionally, the memory 1002 may also be at least one storage device located far from the aforementioned processor 1001. Among them, the network interface 1003 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The communication bus 1005 is used to implement connection communication between these components. As Figure 20 shown, the memory 1002, as a storage medium of a terminal device, may include an operating system, a network communication module, an input / output interface module, and an exercise label prediction program.
[0141] In Figure 20 the computer device 1000 shown in the figure, the input / output interface 1004 is mainly used to provide an input interface for users and access devices, and obtain data input by users and access devices.
[0142] In one embodiment.
[0143] The processor 1001 may be used to call the touch recognition program stored in the memory 1002 and specifically perform the following operations:
[0144] Obtain the target sensing data of the touch device;
[0145] Input the target sensing data into a pre-trained touch recognition model to output a touch recognition result. The touch recognition model is trained based on first touch data, second touch data, and non-touch data. The first touch data is the sensing data of the touch device when the touch height of the touch object is within a first preset height range within the touchable height range. The lower limit of the touchable height range is zero, and the upper limit of the touchable height range is the maximum touchable height. The touchable height refers to the vertical distance from the optical axis between the infrared emission device and the infrared reception device of the touch device to the touch screen. The second touch data is the sensing data of the touch device when the touch height of the touch object is within a second preset height range within the touchable height range. The upper limit of the first preset height range is less than the lower limit of the second preset height range. The non-touch data is the sensing data of the touch device when the touch height of the touch object is within a third preset height range outside the touchable height range. The upper limit of the second preset height range is less than the lower limit of the third preset height range.
[0146] Optionally, before the processor 1001 executes to obtain the target sensing data of the touch device, the following operations are also performed:
[0147] Obtain the first touch data of each touch point of the touch device within the first preset height range, and mark the first touch data with a first preset value, where the first preset value indicates that the touch device is touched;
[0148] Obtain the second touch data of the touch device within the second preset height range, and mark the second touch data with a second preset value, where the second preset value indicates that the touch device is not touched;
[0149] Obtain the non-touch data of the touch device, and mark the non-touch data with the second preset value;
[0150] Train the touch recognition model according to the first touch data, the second touch data, and the non-touch data.
[0151] Optionally, when the processor 1001 executes to obtain the first touch data of each touch point of the touch device within the first preset height range, the following operations are specifically performed:
[0152] Traverse each touch point pre-divided on the touch screen of the touch device, and obtain the first touch data corresponding to the currently traversed touch point. The touch height of the touch object corresponding to each touch point is within the first preset height range within the touchable height range. The first touch data is the first infrared light intensity currently received by each infrared reception device on the touch device;
[0153] When all touch points are traversed, obtain the first touch data of each touch point.
[0154] Optionally, when the processor 1001 executes to obtain the second touch data of the touch device within the second preset height range, the following operations are specifically performed:
[0155] Traverse each touch point pre-divided on the touch screen of the touch device, and obtain the second touch data corresponding to the currently traversed touch point. The touch height of the touch object corresponding to each touch point is within the second preset height range of the touchable height range. The second touch data is the second infrared light intensity currently received by each infrared receiving device on the touch device;
[0156] When all touch points are traversed, the second touch data of each touch point is obtained.
[0157] Optionally, when the processor 1001 executes to obtain the untouch data of the touch device, the following operations are specifically performed:
[0158] Obtain the third infrared light intensity received by each infrared receiving device on the touch device. The touch height of the touch object is within the third preset height range outside the touchable height range. The third touch data is the third infrared light intensity currently received by each infrared receiving device on the touch device.
[0159] Optionally, when the processor 1001 executes to train the touch recognition model according to the first touch data, the second touch data, and the untouch data, the following operations are specifically performed:
[0160] Obtain the first touch data feature according to the first touch data and the untouch data. The first touch data feature includes at least one of the horizontal coordinate of the first touch position, the vertical coordinate of the first touch position, the first horizontal light occlusion quantity, the first vertical light occlusion quantity, the first horizontal light maximum occlusion depth, the first vertical light maximum occlusion depth, the first horizontal light average occlusion depth, and the first vertical light average occlusion depth;
[0161] Obtain the second touch data feature according to the second touch data and the untouch data. The second touch data feature includes at least one of the horizontal direction coordinate of the second touch position, the vertical direction coordinate of the second touch position, the second horizontal light occlusion quantity, the second vertical light occlusion quantity, the second horizontal light maximum occlusion depth, the second vertical light maximum occlusion depth, the second horizontal light average occlusion depth, and the second vertical light average occlusion depth;
[0162] Mark the first touch data feature as the first preset value, and mark the second touch data feature as the second preset value;
[0163] Perform decision training on the touch recognition model according to the first touch data feature, the marked value of the first touch data feature, the second touch data feature, and the marked value of the second touch data feature.
[0164] Optionally, when the processor 1001 executes the operation of inputting the target sensing data into the pre-trained touch recognition model and outputting the touch recognition result, the following operations are specifically performed:
[0165] Based on the non-touch data, extract the target data features of the target sensing data. The target data features include at least one of the horizontal coordinate of the target touch position, the vertical coordinate of the target touch position, the number of target horizontal light occlusions, the number of target vertical light occlusions, the maximum occlusion depth of the target horizontal light, the maximum occlusion depth of the target vertical light, the average occlusion depth of the target horizontal light, and the average occlusion depth of the target vertical light;
[0166] Input the target data features into the pre-trained touch recognition model and output the touch recognition result.
[0167] Optionally, when the processor 1001 executes the operation of obtaining the target sensing data of the touch device, the following operations are specifically performed:
[0168] Obtain the intensity of the fourth infrared light received by each infrared receiving device on the touch device. The target sensing data is the intensity of the fourth infrared light currently received by each infrared receiving device on the touch device.
[0169] In the embodiments of the present application, obtain the target sensing data of the touch device; input the target sensing data into the pre-trained touch recognition model and output the touch recognition result. The touch recognition model is trained based on the first touch data, the second touch data, and the non-touch data. The first touch data, the second touch data, and the non-touch data are the sensing data of the touch device when the touch height of the touch object is in different preset height intervals. By adopting the present application, by pre-training the touch recognition model, the touchable height interval of the touch device is divided into a touch height interval and a non-touch height interval, where the touch height interval is the first preset height interval, so as to perform touch recognition through the touch recognition model after obtaining the target sensing data, thereby reducing the recognizable touch height, avoiding recognition errors caused by writing in a connected style, and improving the accuracy of the touch recognition result.
[0170] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0171] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0172] The above is the description of a touch recognition method, device, storage medium, and equipment provided by the present application. For those skilled in the art, according to the idea of the embodiments of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A touch recognition method, characterized in that, Applied to a touch device, the method includes: Obtaining target sensing data of the touch device; Inputting the target sensing data into a pre-trained touch recognition model to output a touch recognition result. The touch recognition model is trained based on first touch data features, labeled values of the first touch data features, second touch data, and labeled values of the second touch data features. The first touch data features are obtained according to first touch data and non-touch data. The first touch data features include at least one of the horizontal coordinate of the first touch position, the vertical coordinate of the first touch position, the number of horizontal light occlusions, the number of vertical light occlusions, the maximum horizontal light occlusion depth, the maximum vertical light occlusion depth, the average horizontal light occlusion depth, and the average vertical light occlusion depth. The labeled value of the first touch data features is a first preset value. The second touch data features are obtained according to second touch data and the non-touch data. The second touch data features include at least one of the horizontal direction coordinate of the second touch position, the vertical direction coordinate of the second touch position, the number of second horizontal light occlusions, the number of second vertical light occlusions, the maximum second horizontal light occlusion depth, the maximum second vertical light occlusion depth, the average second horizontal light occlusion depth, and the average second vertical light occlusion depth. The labeled value of the second touch data features is a second preset value. The first touch data is the sensing data of the touch device when the touch height of the touch object is within a first preset height interval within the touchable height interval. The lower limit of the touchable height interval is zero, and the upper limit of the touchable height interval is the maximum touchable height. The touchable height refers to the vertical distance from the optical axis between the infrared emission device and the infrared reception device of the touch device to the touch screen. The first preset value indicates that the touch device is touched. The second touch data is the sensing data of the touch device when the touch height of the touch object is within a second preset height interval within the touchable height interval. The upper limit of the first preset height interval is less than the lower limit of the second preset height interval. The second preset value indicates that the touch device is not touched. The non-touch data is the sensing data of the touch device when the touch height of the touch object is within a third preset height interval outside the touchable height interval. The upper limit of the second preset height interval is less than the lower limit of the third preset height interval.
2. The method according to claim 1, wherein Before obtaining the target sensing data of the touch device, it further includes: Obtaining first touch data of each touch point of the touch device within the first preset height interval and labeling the first touch data with the first preset value; Obtaining second touch data of the touch device within the second preset height interval and labeling the second touch data with the second preset value; Obtaining non-touch data of the touch device and labeling the non-touch data with the second preset value; Train the touch recognition model according to the first touch data, the second touch data, and the non-touch data.
3. The method according to claim 2, wherein The obtaining of the first touch data of each touch point within a first preset height range by the touch device includes: Traverse each touch point pre-divided on the touch screen of the touch device, and obtain the first touch data corresponding to the currently traversed touch point. The touch height of the touch object corresponding to each touch point is within a first preset height range within the touchable height range. The first touch data is the first infrared light intensity currently received by each infrared receiving device on the touch device; When all touch points have been traversed, obtain the first touch data of each touch point.
4. The method according to claim 2, wherein The obtaining of the second touch data of the touch device within a second preset height range includes: Traverse each touch point pre-divided on the touch screen of the touch device, and obtain the second touch data corresponding to the currently traversed touch point. The touch height of the touch object corresponding to each touch point is within a second preset height range within the touchable height range. The second touch data is the second infrared light intensity currently received by each infrared receiving device on the touch device; When all touch points have been traversed, obtain the second touch data of each touch point.
5. The method according to claim 2, characterized in that, The obtaining of the non-touch data of the touch device includes: Obtain the third infrared light intensity received by each infrared receiving device on the touch device, and generate the non-touch data according to the third infrared light intensity. The touch height of the touch object is within a third preset height range outside the touchable height range.
6. The method according to claim 2, wherein The training of the touch recognition model according to the first touch data, the second touch data, and the non-touch data includes: Obtain the first touch data feature according to the first touch data and the non-touch data; Obtain the second touch data feature according to the second touch data and the non-touch data; Mark the first touch data feature as the first preset value, and mark the second touch data feature as the second preset value; Perform decision training on the touch recognition model according to the first touch data feature, the marked value of the first touch data feature, the second touch data feature, and the marked value of the second touch data feature.
7. The method according to claim 1, wherein The inputting of the target sensing data into the pre-trained touch recognition model and outputting a touch recognition result includes: Based on the non-touch data, extract the target data feature of the target sensing data. The target data feature includes at least one of the horizontal coordinate of the target touch position, the vertical coordinate of the target touch position, the number of blocked horizontal light rays of the target, the number of blocked vertical light rays of the target, the maximum occlusion depth of the target horizontal light rays, the maximum occlusion depth of the target vertical light rays, the average occlusion depth of the target horizontal light rays, and the average occlusion depth of the target vertical light rays; Input the target data feature into the pre-trained touch recognition model and output a touch recognition result.
8. The method according to claim 1, wherein The obtaining of the target sensing data of the touch device includes: Obtain the fourth infrared light intensity received by each infrared receiving device on the touch device, and the target sensing data is the fourth infrared light intensity currently received by each infrared receiving device on the touch device.
9. A touch device, characterized in that, Including: A data acquisition module for acquiring the target sensing data of the touch device; A touch recognition module for inputting the target sensing data into a pre-trained touch recognition model and outputting a touch recognition result. The touch recognition model is trained based on the first touch data feature, the marked value of the first touch data feature, the second touch data, and the marked value of the second touch data feature. The first touch data feature is obtained according to the first touch data and the non-touch data. The first touch data feature includes at least one of the horizontal coordinate of the first touch position, the vertical coordinate of the first touch position, the number of blocked horizontal light rays, the number of blocked vertical light rays, the maximum blocked depth of the horizontal light rays, the maximum blocked depth of the vertical light rays, the average blocked depth of the horizontal light rays, and the average blocked depth of the vertical light rays. The marked value of the first touch data feature is the first preset value. The second touch data feature is obtained according to the second touch data and the non-touch data. The second touch data feature includes at least one of the horizontal direction coordinate of the second touch position, the vertical direction coordinate of the second touch position, the number of blocked second horizontal light rays, the number of blocked second vertical light rays, the maximum blocked depth of the second horizontal light rays, the maximum blocked depth of the second vertical light rays, the average blocked depth of the second horizontal light rays, and the average blocked depth of the second vertical light rays. The marked value of the second touch data feature is the second preset value. The first touch data is the sensing data of the touch device when the touch height of the touch object is within the first preset height interval of the touchable height interval. The lower limit of the touchable height interval is zero, and the upper limit of the touchable height interval is the maximum touchable height. The touchable height refers to the vertical distance from the optical axis between the infrared transmitting device and the infrared receiving device of the touch device to the touch screen. The first preset value indicates that the touch device is touched. The second touch data is the sensing data of the touch device when the touch height of the touch object is within the second preset height interval of the touchable height interval. The upper limit of the first preset height interval is less than the lower limit of the second preset height interval. The second preset value indicates that the touch device is not touched. The non-touch data is the sensing data of the touch device when the touch height of the touch object is within the third preset height interval outside the touchable height interval. The upper limit of the second preset height interval is less than the lower limit of the third preset height interval.
10. The device according to claim 9, characterized in that, It also includes: A first data acquisition module for acquiring the first touch data of each touch point on the touch device within the first preset height interval and marking the first touch data as the first preset value; A second data acquisition module, configured to acquire second touch data of the touch device within the second preset height range, and mark the second touch data as the second preset value; A third data acquisition module, configured to acquire non-touch data of the touch device, and mark the non-touch data as the second preset value; A model training module, configured to train the touch recognition model according to the first touch data, the second touch data, and the non-touch data.
11. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 8.
12. A computer device, characterized in that, Comprising: A processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the steps of the touch recognition method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Touch force recognition method, training method and device of touch force recognition model and electronic system
CN111061394A
Infrared touch screen multi-point touch recognition method, device and equipment
CN112214135A