Display device and accuracy detection method and device of handwriting prediction algorithm
By calculating the error parameter value and prediction time of each predicted touch point in the handwriting prediction algorithm, the accuracy level of the handwriting prediction algorithm is improved, and the problem of low accuracy detection in the prior art is solved, and more accurate accuracy is achieved Sexual assessment.
Patent Information
- Application Number
- CN202310716846.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-15
- Publication Date
- 2024-12-17
AI Technical Summary
The existing accuracy detection methods of handwriting prediction algorithms only consider the Euclidean distance between the predicted touch points and the actual touch points, resulting in a low accuracy of the accuracy level obtained by the detection.
By acquiring continuous handwriting data, the handwriting prediction algorithm is used to determine the prediction data of multiple predicted touch points, and the actual and predicted touch points are sorted in the order of the detected time and the predicted position to belong to, and the error of each predicted touch point is calculated. The parameter value and prediction duration are then calculated, and the accuracy parameter value is finally determined.
Improve the accuracy of the accuracy level of the handwriting prediction algorithm and provide more accurate accuracy evaluation.
Smart Images

Figure CN119148874A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to display technology, and more specifically, to a display device, a method and a device for detecting the accuracy of a handwriting prediction algorithm. Background Art
[0002] With the development of technology, in addition to being able to display images, users can also write and draw on display devices, and display devices can draw corresponding handwriting. When display devices draw handwriting, they draw according to the data of the touch points. Since the display device obtains the touch point data once every scanning interval and then draws, this will cause handwriting delay problems.
[0003] In the prior art, in order to solve the problem of handwriting delay, a handwriting prediction algorithm is usually used to predict the actual touch point to obtain the predicted touch point data. When drawing handwriting, the handwriting is drawn according to the actual touch point data and the predicted touch point data. As for the accuracy of the handwriting prediction algorithm, the Euclidean distance between the predicted touch point and the corresponding actual touch point is usually calculated, and the accuracy level is determined according to the Euclidean distance.
[0004] In summary, the accuracy detection method of the existing handwriting prediction algorithm only considers the Euclidean distance between the predicted touch point and the corresponding actual touch point, resulting in a low accuracy level of the detected accuracy. Summary of the invention
[0005] The exemplary embodiments of the present application provide a display device, a method and apparatus for detecting the accuracy of a handwriting prediction algorithm, which are used to solve the problem that the accuracy level obtained by the detection is relatively low, as a result of the existing method for detecting the accuracy of a handwriting prediction algorithm only considering the Euclidean distance between the predicted touch point and its corresponding actual touch point.
[0006] In a first aspect, an embodiment of the present application provides a display device, including a processor and a touch screen connected to the processor;
[0007] The touch screen is configured to: obtain a continuous handwriting and actual data of each actual touch point in the handwriting, wherein the actual data includes actual position data and a detected time;
[0008] The processor is configured to: use a handwriting prediction algorithm to determine prediction data of a plurality of predicted touch points, wherein the prediction data includes predicted position data and a time at which the predicted position corresponding to the predicted position data belongs;
[0009] Sorting all actual touch points and predicted touch points in order from earliest to latest according to the detected time and the predicted position time to obtain a touch point set;
[0010] For each predicted touch point, determining an error parameter value and a predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and predicted position data of the predicted touch point;
[0011] Dividing the error parameter value by the predicted duration to obtain an accuracy parameter value corresponding to the predicted touch point;
[0012] An average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and an accuracy level corresponding to the average value is determined.
[0013] In some possible implementations, the processor, when used to determine the error parameter value and the predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and the predicted position data of the predicted touch point, is specifically used to:
[0014] Determining, from the touch point set, a detected touch point corresponding to the predicted touch point according to an order of the predicted touch point in the touch point set;
[0015] According to the handwriting, the touch point set, the actual position data of each detected touch point, and the predicted position data of the predicted touch point, the error parameter value and the predicted duration corresponding to the predicted touch point are determined.
[0016] In some possible implementations, when the processor is used to determine, from the touch point set, the detected touch point corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the processor is specifically used to:
[0017] If the predicted touch point is the first predicted touch point in the touch point set, and there is only one actual touch point before the predicted touch point in the touch point set, then the actual touch point before the predicted touch point and the two actual touch points after the predicted touch point in the touch point set are used as the detected touch points corresponding to the predicted touch point;
[0018] If the predicted touch point is the first predicted touch point in the touch point set, and there are multiple actual touch points before the predicted touch point in the touch point set, then the first two actual touch points of the predicted touch point and the second two actual touch points after the predicted touch point in the touch point set are used as the detected touch points corresponding to the predicted touch point;
[0019] If the predicted touch point is the last predicted touch point in the touch point set, taking the next actual touch point after the predicted touch point and the two actual touch points before the predicted touch point in the touch point set as the detected touch point corresponding to the predicted touch point;
[0020] If the predicted touch point is neither the first predicted touch point nor the last predicted touch point in the touch point set, the first two actual touch points of the predicted touch point and the last two actual touch points of the predicted touch point in the actual touch point set are used as the detected touch points corresponding to the predicted touch point.
[0021] In some possible implementations, the processor is used to determine the error parameter value and the predicted duration corresponding to the predicted touch point according to the handwriting, the touch point set, the actual position data of each detected touch point, and the predicted position data of the predicted touch point, specifically to:
[0022] From the handwriting, dividing a plurality of handwriting segments according to each detected touch point;
[0023] For each handwriting segment, determining a reference point in the handwriting segment that is closest to the predicted touch point;
[0024] If the line connecting the reference point and the predicted touch point is a normal line of the handwriting segment, it is determined that the handwriting segment is available;
[0025] If the line connecting the reference point and the predicted touch point is not a normal line of the handwriting segment, determining that the handwriting segment is unavailable;
[0026] If there is at least one handwriting segment available, for each available handwriting segment, according to the actual position data of the detected touch points at both ends of the handwriting segment and the predicted position data of the predicted touch points, determine the error parameter value corresponding to the predicted touch points;
[0027] If all handwriting segments are unavailable, determining an error parameter value corresponding to the predicted touch point according to actual position data of a detected touch point before the predicted touch point and a detected touch point after the predicted touch point in the actual touch point set, and predicted position data of the predicted touch point;
[0028] The predicted duration corresponding to the predicted touch point is determined according to whether there is a predicted touch point before the predicted touch point in the touch point set.
[0029] In some possible implementations, when the processor is used to determine the error parameter value corresponding to the predicted touch point according to the actual position data of the detected touch points at both ends of the handwriting segment and the predicted position data of the predicted touch point, it is specifically used to:
[0030] Calculating a first detection distance between a reference point in the handwriting segment and the predicted touch point according to actual position data of the detected touch points at both ends of the handwriting segment and predicted position data of the predicted touch point;
[0031] The minimum value of all the first detection distances is determined as the error parameter value corresponding to the predicted touch point.
[0032] In some possible implementations, when the processor is used to determine the error parameter value corresponding to the predicted touch point according to the actual position data of a previous detected touch point of the predicted touch point and a subsequent detected touch point of the predicted touch point in the actual touch point set, and the predicted position data of the predicted touch point, the processor is specifically used to:
[0033] Calculate, based on actual position data of a detected touch point before the predicted touch point and a detected touch point after the predicted touch point in the actual touch point set, and predicted position data of the predicted touch point, a second detection distance between an actual touch point before the predicted touch point and an actual touch point after the predicted touch point, and the predicted touch point;
[0034] The smaller value of the two second detection distances is determined as the error parameter value corresponding to the predicted touch point.
[0035] In some possible implementations, when the processor is used to determine the predicted duration corresponding to the predicted touch point according to whether there is a predicted touch point before the predicted touch point in the touch point set, it is specifically used to:
[0036] In the touch point set, if there is a predicted touch point before the predicted touch point, determining a previous predicted touch point of the predicted touch point as a process touch point;
[0037] Determine the predicted duration as the predicted duration, the interval between the time at which the predicted position of the predicted touch point belongs and the time at which an actual touch point after the process touch point in the touch point set is detected;
[0038] In the touch point set, if there is no predicted touch point before the predicted touch point, the interval between the moment when the predicted position of the predicted touch point belongs and the moment when the first actual touch point in the touch point set is detected is determined as the predicted duration.
[0039] In some possible implementations, the processor is further configured to:
[0040] Calculate the target error parameter variance based on the error parameter values corresponding to all predicted touch points;
[0041] Calculate the target duration variance based on the predicted duration of all predicted touch points;
[0042] Calculate the target accuracy parameter variance based on the accuracy parameter values corresponding to all predicted touch points;
[0043] According to the corresponding relationship among the error parameter variance, the duration variance, the accuracy parameter variance and the stability level, the stability levels corresponding to the target error parameter variance, the target duration variance and the target accuracy parameter variance are determined.
[0044] In a second aspect, an embodiment of the present application provides a method for detecting the accuracy of a handwriting prediction algorithm, comprising:
[0045] Acquire a continuous handwriting and actual data of each actual touch point in the handwriting, wherein the actual data includes actual position data and a time when the handwriting is detected;
[0046] Using a handwriting prediction algorithm, determining prediction data of a plurality of predicted touch points, the prediction data including predicted position data and a time at which the predicted position corresponds to the predicted position data;
[0047] Sorting all actual touch points and predicted touch points in order from earliest to latest according to the detected time and the predicted position time to obtain a touch point set;
[0048] For each predicted touch point, determining an error parameter value and a predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and predicted position data of the predicted touch point;
[0049] Dividing the error parameter value by the predicted duration to obtain an accuracy parameter value corresponding to the predicted touch point;
[0050] An average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and an accuracy level corresponding to the average value is determined.
[0051] In a third aspect, an embodiment of the present application provides a device for detecting the accuracy of a handwriting prediction algorithm, comprising:
[0052] An acquisition module, used for acquiring a continuous handwriting, actual data of each actual touch point in the handwriting, the actual data including actual position data and the time when the handwriting is detected;
[0053] Processing modules for:
[0054] Using a handwriting prediction algorithm, determining prediction data of a plurality of predicted touch points, the prediction data including predicted position data and a time at which the predicted position corresponds to the predicted position data;
[0055] Sorting all actual touch points and predicted touch points in order from earliest to latest according to the detected time and the predicted position time to obtain a touch point set;
[0056] For each predicted touch point, determining an error parameter value and a predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and predicted position data of the predicted touch point;
[0057] Dividing the error parameter value by the predicted duration to obtain an accuracy parameter value corresponding to the predicted touch point;
[0058] An average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and an accuracy level corresponding to the average value is determined.
[0059] The embodiment of the present application provides a display device, a handwriting prediction algorithm accuracy detection method and device, the display device includes a processor and a touch screen; the touch screen is configured to: obtain a continuous handwriting, the actual data of each actual touch point in the handwriting. The processor is configured to: use the handwriting prediction algorithm to determine the predicted data of multiple predicted touch points; then sort all the actual touch points and predicted touch points in the order from early to late of the detected time in the actual data and the predicted position in the predicted data to obtain a touch point set; according to the order of the predicted touch points in the touch point set, the handwriting, the touch point set, and the predicted position data of each predicted touch point, determine the error parameter value and predicted duration corresponding to each predicted touch point; then calculate the accuracy parameter value according to the error parameter value and the predicted duration, and determine the accuracy level corresponding to the average value of the accuracy parameter value. This solution determines the accuracy level of the handwriting prediction algorithm by calculating the error parameter value and predicted duration corresponding to each predicted touch point, which effectively improves the accuracy of the accuracy level.
[0060] These and other aspects of the present application will become more apparent from the following description of the embodiment(s). BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0062] Figure 1 A schematic diagram of an application scenario of the accuracy detection method of the handwriting prediction algorithm provided in this application;
[0063] Figure 2 A schematic diagram of the structure of the display device provided in this application;
[0064] Figure 3 A flow chart of a method for detecting the accuracy of a handwriting prediction algorithm provided in this application;
[0065] Figure 4 A schematic diagram of the process of determining and detecting touch points provided in this application;
[0066] Figure 5 The touch point sequence diagram provided for this application Figure 1 ;
[0067] Figure 6 The touch point sequence diagram provided for this application Figure 2 ;
[0068] Figure 7 A schematic diagram of the process of determining the error parameter value and the prediction duration provided by this application;
[0069] Figure 8 Touch point distribution map provided for this application;
[0070] Fig. 9 Schematic diagram of two normal areas provided for this application;
[0071] Fig.10 A schematic diagram of a process for determining the stability level of a handwriting prediction algorithm provided in this application;
[0072] Fig.11 This is a schematic structural diagram of an embodiment of a device for detecting the accuracy of a handwriting prediction algorithm provided in this application. DETAILED DESCRIPTION
[0073] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0074] Based on the exemplary embodiments described in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the claims attached to this application. In addition, although the disclosure in this application is introduced according to one or several exemplary examples, it should be understood that each aspect of the disclosure can also constitute a complete implementation method separately.
[0075] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0076] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise indicated. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, for example, they can be implemented according to orders other than those given in the diagrams or descriptions of the embodiments of this application.
[0077] In addition, the terms "include" and "have" and any variations thereof are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to those components expressly listed but may include other components not expressly listed or inherent to such products or devices.
[0078] With the development of technology, more and more people write and draw on display devices. When the display device draws the corresponding handwriting, it draws according to the data of the touch point. Since the display device obtains the touch point data once every scanning interval and then draws, this will cause the handwriting delay problem.
[0079] In order to solve this problem, a handwriting prediction algorithm is usually used to predict the actual touch point to obtain the predicted touch point data. When drawing handwriting, the drawing is performed according to the actual touch point data and the predicted touch point data. Different handwriting prediction algorithms have different accuracy. In order to determine the accuracy of the handwriting prediction algorithm, the prior art usually calculates the Euclidean distance between the predicted touch point and the corresponding actual touch point, and then determines the accuracy level based on the Euclidean distance.
[0080] During the operation of the display device, the scanning time may be different from the predicted time in the handwriting prediction algorithm, that is, the time when the actual touch point for calculating the Euclidean distance is detected and the time when the predicted position of the predicted touch point belongs to are not the same. For example, the handwriting prediction algorithm predicts the predicted touch point position at a moment 10 mm after the current moment, that is, the predicted touch point position at the moment when the predicted position belongs to, while the actual touch point position is detected at a moment 15 milliseconds after the current moment, so the actual touch point and the predicted touch point do not completely match, so the obtained Euclidean distance cannot accurately reflect the accuracy level.
[0081] In the prior art, only the Euclidean distance between the predicted touch point and the corresponding actual touch point is considered, which may lead to a problem of low accuracy of the accuracy level obtained by detection.
[0082] In view of the problems existing in the prior art, the inventors found in the process of studying the accuracy detection method of the handwriting prediction algorithm that in order to improve the accuracy of the accuracy level obtained by the detection, in the process of determining the accuracy level, not only the error parameter value but also the prediction duration is considered, and the error parameter value adopts the shortest distance between the predicted touch point and the handwriting. After obtaining a continuous handwriting and the actual data of each actual touch point in the handwriting, the handwriting prediction algorithm is used to determine the predicted data of multiple predicted touch points; then the actual touch points and the predicted touch points are sorted to obtain a touch point set; according to the order of the predicted touch points in the touch point set, the handwriting, the touch point set, and the predicted position data of each predicted touch point, the error parameter value and the predicted duration of each predicted touch point are determined; then according to the error parameter value and the prediction duration, the accuracy parameter value of each predicted touch point is calculated, and then the accuracy level corresponding to the average value of the accuracy parameter value is determined, which effectively improves the accuracy of the accuracy level. Based on the above invention concept, the accuracy detection scheme of the handwriting prediction algorithm in this application is designed.
[0083] For example, Figure 1 A schematic diagram of an application scenario of the accuracy detection method of the handwriting prediction algorithm provided in this application, such as Figure 1 As shown, the application scenario may include: a tester 11 and a display device 12 .
[0084] For example, in Figure 1 In the application scenario shown, the tester 11 needs to test the accuracy of the handwriting prediction algorithm and can use a touch pen to draw a continuous handwriting on the touch screen of the display device 12.
[0085] The display device can obtain the handwriting and the actual data of each actual touch point in the handwriting, and then use the handwriting prediction algorithm to be detected to obtain the predicted data of multiple predicted touch points based on the actual data of the actual touch points. Then, all actual touch points and predicted touch points are sorted in the order of the detected time and the predicted position time from early to late to obtain a touch point set.
[0086] For each predicted touch point, the error parameter value and predicted duration corresponding to the predicted touch point are determined according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and the predicted position data of the predicted touch point; the error parameter value is then divided by the predicted duration to obtain the accuracy parameter value corresponding to the predicted touch point.
[0087] Finally, the average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and the accuracy level corresponding to the average value is determined to complete the test. The accuracy level can also be displayed on the touch screen of the display device for the inspection personnel to view.
[0088] It should be noted that the above scenario is only a schematic diagram of an application scenario provided by an embodiment of the present application. The embodiment of the present application does not limit the actual form of the various devices included in the scenario, nor does it limit the interaction method between the devices. In the specific application of the solution, it can be set according to actual needs.
[0089] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0090] Figure 2 A schematic diagram of the structure of the display device provided in this application, such as Figure 2 As shown, the display device includes a processor, a touch screen connected to the processor, a memory connected to the processor, and a power supply unit, the power supply unit is also connected to the touch screen and the memory respectively, and the power supply unit supplies power to the touch screen, the memory, and the processor. The touch screen is configured to: obtain a continuous handwriting, actual data of each actual touch point in the handwriting, the actual data including actual position data and the time when it is detected.
[0091] The tester can draw a continuous handwriting on the touch screen, and the touch screen can obtain the handwriting and the actual data of each actual touch point in the handwriting.
[0092] Figure 3 The present invention provides a flowchart of a method for detecting the accuracy of a handwriting prediction algorithm. The method may be executed by a display device. The method in this embodiment may be implemented by software, hardware, or a combination of software and hardware.
[0093] like Figure 3 As shown, the processor in the display device is configured to perform the following steps:
[0094] S301: using a handwriting prediction algorithm to determine prediction data of a plurality of predicted touch points.
[0095] In this step, since the touch screen has obtained the actual data of the actual touch point, in order to detect the accuracy of the handwriting prediction algorithm, the processor needs to adopt the handwriting prediction algorithm to determine the predicted data of multiple predicted touch points, and the predicted data includes predicted position data and the time to which the predicted position corresponds to the predicted position data.
[0096] The handwriting prediction algorithm can determine many predicted touch points, and some of these predicted touch points are meaningless, so these predicted touch points and their corresponding prediction data need to be deleted. First, the latest detected time is determined from the detected time of all actual touch points, and then the predicted touch points whose predicted positions belong to a time later than the latest detected time are determined as meaningless predicted touch points, and then the meaningless predicted touch points and their corresponding prediction data are deleted.
[0097] It should be noted that when determining a predicted touch point, it is determined based on the moment when an actual touch point is detected. According to the handwriting prediction algorithm, the predicted duration can be determined, and the moment of the predicted duration after the moment when the actual touch point is detected is determined as the moment to which the predicted position belongs, and then the predicted data of the predicted touch point can be determined.
[0098] S302: Sort all actual touch points and predicted touch points in order from early to late based on the detected time and the predicted position time to obtain a touch point set.
[0099] In this step, after the processor obtains the predicted data of the predicted touch points, in order to facilitate the subsequent processing of the actual touch points and the predicted touch points, it is necessary to sort all the actual touch points and the predicted touch points in order from early to late according to the detected time and the predicted position time to obtain a touch point set.
[0100] Exemplarily, there are 6 actual touch points, namely: P1, P2, P3, P4, P5, P6, and 4 predicted touch points, namely: Q1, Q2, Q3, Q4. P1 was detected at the 1000th millisecond, P2 was detected at the 1012th millisecond, P3 was detected at the 1020th millisecond, P4 was detected at the 1035th millisecond, P5 was detected at the 1045th millisecond, and P6 was detected at the 1057th millisecond. The predicted position of Q1 belongs to the 1010th millisecond, the predicted position of Q2 belongs to the 1018th millisecond, the predicted position of Q3 belongs to the 1040th millisecond, and the predicted position of Q4 belongs to the 1050th millisecond. So the touch point set is {P1, Q1, P2, Q2, P3, P4, Q3, P5, Q4, P6}.
[0101] S303: For each predicted touch point, determine the error parameter value and predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and the predicted position data of the predicted touch point.
[0102] In this step, after the processor obtains the touch point set, for each predicted touch point, the error parameter value and predicted duration corresponding to the predicted touch point can be determined according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and the predicted position data of the predicted touch point.
[0103] According to the order of the predicted touch points in the touch point set, multiple detected touch points corresponding to the predicted touch points can be determined from the touch point set, and the detected touch points are all actual touch points; then, according to the handwriting, the touch point set, the actual position data of each detected touch point, and the predicted position data of the predicted touch point, the error parameter value and predicted duration corresponding to the predicted touch point can be determined.
[0104] When determining the error parameter value, first divide the handwriting according to the detected touch point to obtain handwriting segments, and then determine whether there are available handwriting segments. If there are available handwriting segments, determine the shortest distance between the predicted touch point and each available handwriting segment, and then take the minimum value to obtain the error parameter value. If there are no available handwriting segments, determine the error parameter value based on the distance between the predicted touch point and the detected touch point.
[0105] Furthermore, the predicted duration may be determined according to the duration to which the predicted position of the predicted touch point belongs and the duration to which the detected touch point is detected.
[0106] S304: Divide the error parameter value by the predicted duration to obtain an accuracy parameter value corresponding to the predicted touch point.
[0107] In this step, after the processor obtains the error parameter value and the predicted duration, in order to make the accuracy detection of the handwriting prediction algorithm more precise, it is necessary to divide the error parameter value by the predicted duration to obtain the accuracy parameter value corresponding to the predicted touch point.
[0108] When the error parameter value is fixed, the longer the prediction time is, the higher the accuracy of the handwriting prediction algorithm is.
[0109] S305: Calculate the average value of the accuracy parameter values corresponding to all predicted touch points, and determine the accuracy level corresponding to the average value.
[0110] In this step, after the processor obtains the accuracy parameter value corresponding to each predicted touch point, since the accuracy parameter value corresponding to each predicted touch point is different, the average value of these accuracy parameter values can more accurately reflect the accuracy level of the handwriting prediction algorithm, so the average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and then the accuracy level corresponding to the average value is determined according to the corresponding relationship between the average value range and the accuracy level. The processor can also display the accuracy level on the touch screen for the tester to view.
[0111] Exemplarily, Table 1 is a table of correspondence between average value range and accuracy level provided in this application.
[0112] Table 1
[0113] Average value range Accuracy level (0,1] 1 (1,2] 2 (2,3] 3 (3,4] 4 (4,5] 5 (5,+∞) 6
[0114] As shown in Table 1, the smaller the number of the accuracy level, the higher the accuracy.
[0115] It should be noted that Table 1 is only an example of the correspondence between the average value range and the accuracy level. The embodiments of the present application do not limit the average value range, accuracy level, and the representation of the accuracy level, and can be set according to actual conditions.
[0116] The display device provided in this embodiment includes a processor and a touch screen; the touch screen is configured to: obtain a continuous handwriting and actual data of each actual touch point in the handwriting. The processor is configured to: use a handwriting prediction algorithm to determine the predicted data of multiple predicted touch points; then sort all actual touch points and predicted touch points in the order from early to late of the detected time in the actual data and the predicted position in the predicted data to obtain a touch point set; determine the error parameter value and predicted duration corresponding to each predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and the predicted position data of each predicted touch point; then calculate the accuracy parameter value according to the error parameter value and the predicted duration, and determine the accuracy level corresponding to the average value of the accuracy parameter value. Compared with the prior art that only considers the Euclidean distance between the predicted touch point and its corresponding actual touch point to determine the accuracy level, this solution determines the accuracy level of the handwriting prediction algorithm by calculating the error parameter value and predicted duration corresponding to each predicted touch point, which effectively improves the accuracy of the accuracy level.
[0117] Further, based on the above embodiments, the embodiments of the present application describe a situation in which the processor determines the detected touch point corresponding to the predicted touch point from the touch point set according to the order of the predicted touch points in the touch point set. Figure 4 A schematic diagram of a process for determining a touch point to be detected provided by the present application, wherein a processor in a display device is configured to perform the following steps:
[0118] S401: Determine whether the predicted touch point is the first predicted touch point in the touch point set; if the predicted touch point is the first predicted touch point in the touch point set, execute step S402; if the predicted touch point is not the first predicted touch point in the touch point set, execute step S404.
[0119] In this step, after the processor obtains the touch point set, in order to determine the error parameter value and predicted duration corresponding to a predicted touch point and to reduce the amount of calculation, the detected touch point can be determined and the handwriting can be divided into handwriting segments according to the detected touch point, and then the error parameter value and predicted duration can be determined. This requires first determining the detected touch point corresponding to the predicted touch point, which can be determined according to the order of the predicted touch point in the touch point set. First, determine whether the predicted touch point is the first predicted touch point in the touch point set.
[0120] S402: Determine whether there is only one actual touch point before the predicted touch point in the touch set; if there is only one actual touch point before the predicted touch point, execute step S403; if there are multiple actual touch points before the predicted touch point, execute step S406.
[0121] S403: taking, in the touch point set, an actual touch point preceding the predicted touch point and two actual touch points following the predicted touch point as detected touch points corresponding to the predicted touch point.
[0122] In the above steps, if the predicted touch point is the first predicted touch point in the touch point set, it is also necessary to determine whether there is only one actual touch point before the predicted touch point. If there is only one actual touch point before the predicted touch point, the previous actual touch point of the predicted touch point and the two actual touch points after the predicted touch point in the touch point set are used as the detected touch points corresponding to the predicted touch point.
[0123] For example, Figure 5 The touch point sequence diagram provided for this application Figure 1 ;like Figure 5 As shown, the circle represents the actual touch point, and the triangle represents the predicted touch point. There are 5 actual touch points, namely: P1, P2, P3, P4, P5, and 3 predicted touch points, namely: Q1, Q2, Q3. The arrangement order in the touch set is: P1, Q1, P2, Q2, P3, P4, Q3, P5. If you need to determine the detected touch point corresponding to Q1, it can be seen from the figure that Q1 is the first predicted touch point in the touch point set, and there is only one actual touch point P1 before Q1, so the actual touch point P1 before Q1 and the two actual touch points P2 and P3 after Q1 are used as the detected touch points corresponding to Q1.
[0124] S404: Determine whether the predicted touch point is the last predicted touch point in the touch point set; if the predicted touch point is the last predicted touch point in the touch point set, execute step S405; if the predicted touch point is not the last predicted touch point in the touch point set, execute step S406.
[0125] S405: taking the actual touch point after the predicted touch point and the two actual touch points before the predicted touch point in the touch point set as the detected touch points corresponding to the predicted touch point.
[0126] In the above steps, if the predicted touch point is not the first predicted touch point in the touch point set, it is also necessary to determine whether the predicted touch point is the last predicted touch point in the touch point set. If the predicted touch point is the last predicted touch point in the touch point set, the next actual touch point after the predicted touch point and the two actual touch points before the predicted touch point in the touch point set are used as the detected touch points corresponding to the predicted touch point.
[0127] For example, in Figure 5 On this basis, if it is necessary to determine the detected touch point corresponding to Q3, it can be seen from the figure that Q3 is the last predicted touch point in the touch point set, so the two actual touch points P3 and P4 before Q3 and the actual touch point P5 after Q3 are used as the detected touch points corresponding to Q3.
[0128] S406: taking the first two actual touch points of the predicted touch point and the second two actual touch points of the predicted touch point in the touch point set as detected touch points corresponding to the predicted touch point.
[0129] In this step, if the predicted touch point is the first predicted touch point in the touch point set, and there are multiple actual touch points before the predicted touch point; or, if the predicted touch point is not the first predicted touch point in the touch point set, and the predicted touch point is not the last predicted touch point in the touch point set, then the first two actual touch points of the predicted touch point and the last two actual touch points of the predicted touch point in the touch point set are used as the detected touch points corresponding to the predicted touch point.
[0130] For example, in Figure 5 On this basis, if it is necessary to determine the detected touch point corresponding to Q2, it can be seen from the figure that Q2 is not the first predicted touch point in the touch point set, nor is it the last predicted touch point, so the two actual touch points P1 and P2 before Q2 and the two actual touch points P3 and P4 after Q2 are used as the detected touch points corresponding to Q2.
[0131] For example, Figure 6 The touch point sequence diagram provided for this application Figure 2 ;like Figure 6As shown, the circle represents the actual touch point, and the triangle represents the predicted touch point. There are 5 actual touch points, namely: P1, P2, P3, P4, P5, and 3 predicted touch points, namely: Q1, Q2, Q3. The arrangement order in the touch set is: P1, P2, Q1, P3, Q2, P4, Q3, P5. If you need to determine the detection touch point corresponding to Q1, it can be seen from the figure that Q1 is the first predicted touch point in the touch point set, and there are multiple actual touch points P1 and P2 before Q1, so the two actual touch points P1 and P2 before Q1 and the two actual touch points P3 and P4 after Q1 are used as the detection touch points corresponding to Q1.
[0132] The display device provided in this embodiment determines the detected touch point corresponding to the predicted touch point by judging whether the predicted touch point is the first predicted touch point in the touch point set and whether the predicted touch point is the last predicted touch point. When the predicted touch point is the first predicted touch point in the touch point set, it judges whether there is only one actual touch point in front of it, thereby effectively improving the accuracy of determining the detected touch point.
[0133] Furthermore, based on the above-mentioned embodiments, the embodiments of the present application illustrate the situation in which the processor determines the error parameter value and predicted duration corresponding to the predicted touch point based on the handwriting, the touch point set, the actual position data of each detected touch point, and the predicted position data of the predicted touch point. Figure 7 A schematic diagram of a process for determining an error parameter value and a prediction duration provided by the present application, wherein a processor in a display device is configured to perform the following steps:
[0134] S701: Divide the handwriting into multiple handwriting segments according to each detected touch point.
[0135] In this step, in order to reduce the amount of calculation, handwriting segments may be used to determine the error parameter value, and a plurality of handwriting segments may be divided from the handwriting according to each detected touch point.
[0136] S702: For each handwriting segment, determine a reference point in the handwriting segment that is closest to the predicted touch point.
[0137] In this step, after the processor obtains a plurality of handwriting segments, it is necessary to determine the reference point closest to the predicted touch point in each handwriting segment.
[0138] For example, Figure 8 The touch point distribution diagram provided for this application is as follows: Figure 8As shown, there is a predicted touch point Q2, and its corresponding detected touch points are: P1, P2, P3, P4. The handwriting is divided according to P1, P2, P3, and P4, and there are 3 handwriting segments obtained, the handwriting segment between P1 and P2, the handwriting segment between P2 and P3, and the handwriting segment between P3 and P4. The handwriting segment between P1 and P2 and the closest reference point to Q2 is P2, the handwriting segment between P2 and P3 and the closest reference point to Q2 is M, and the handwriting segment between P3 and P4 and the closest reference point to Q2 is P3.
[0139] S703: Determine whether the line connecting the reference point and the predicted touch point is the normal of the handwriting segment; if the line connecting the reference point and the predicted touch point is the normal of the handwriting segment, execute step S704; if the line connecting the reference point and the predicted touch point is not the normal of the handwriting segment, execute step S705.
[0140] S704: Determine whether the handwriting segment is available.
[0141] S705: Determine that the handwriting segment is unavailable.
[0142] In the above steps, after the processor obtains the reference point of the handwriting segment, it needs to determine whether the line connecting the reference point and the predicted touch point is the normal line of the handwriting segment to determine whether the handwriting segment is available. If the line connecting the reference point and the predicted touch point is the normal line of the handwriting segment, the handwriting segment is determined to be available. If the line connecting the reference point and the predicted touch point is not the normal line of the handwriting segment, the handwriting segment is determined to be unavailable.
[0143] For example, in Figure 8 On the basis of, the line connecting P1 and Q2 is not the normal line of the handwriting segment between P1 and P2, so the handwriting segment between P1 and P2 is not available; the line connecting M and Q2 is the normal line of the handwriting segment between P2 and P3, so the handwriting segment between P2 and P3 is available; the line connecting P3 and Q2 is not the normal line of the handwriting segment between P3 and P4, so the handwriting segment between P3 and P4 is not available.
[0144] It should be noted that the determination of whether a handwriting segment is available can also be achieved by determining whether the predicted touch point is within the normal area formed by all normal lines of the handwriting segment. If it is within the normal area, it means that the handwriting segment is available; if it is not within the normal area, it means that the handwriting segment is unavailable. For example, Fig. 9 Two normal area schematic diagrams provided for this application, such as Fig. 9 As shown in the figure, two normal areas of handwriting segments are shown, one is the normal area when the handwriting segment is a straight line, and the other is the normal area when the handwriting segment is a curve. When the handwriting segment is a straight line, to determine whether the predicted touch point is within the normal area formed by all normal lines of the handwriting segment, the inequality (x k -x n-1 )(x n -xn-1 )+(y k -y n-1 )(y n -y n-1 )≥0 is true. If the inequality holds, it means it is within the normal region; if the inequality does not hold, it means it is not within the normal region. k ,y k ) represents the coordinates of the predicted touch point, (x n ,y n )、(x n-1 ,y n-1 ) represents the coordinates of the detected touch points at both ends of the handwriting segment.
[0145] S706: Determine whether there is at least one handwriting segment available. If there is at least one handwriting segment available, execute step S707; if all handwriting segments are unavailable, execute step S708.
[0146] In this step, after the processor determines whether each handwriting segment is available, it is necessary to determine whether there is at least one handwriting segment available because the number of available handwriting segments affects the way of determining the error parameter value.
[0147] S707: For each available handwriting segment, according to the actual position data of the detected touch points at both ends of the handwriting segment and the predicted position data of the predicted touch points, determine the error parameter value corresponding to the predicted touch points.
[0148] In this step, if there is at least one handwriting segment available, for each available handwriting segment, the error parameter value corresponding to the predicted touch point is determined based on the actual position data of the detected touch points at both ends of the handwriting segment and the predicted position data of the predicted touch points.
[0149] Specifically, for each available handwriting segment, the first detection distance between the reference point in the handwriting segment and the predicted touch point is calculated based on the actual position data of the detected touch points at both ends of the handwriting segment and the predicted position data of the predicted touch points; and then the minimum value of all the first detection distances is determined as the error parameter value corresponding to the predicted touch point.
[0150] It should be noted that when the handwriting segment is a straight line, the formula can be used To calculate the first detection distance, where d0 represents the first detection distance, (x k ,y k ) represents the coordinates of the predicted touch point, (x n ,y n )、(x n-1 ,y n-1 ) represents the coordinates of the detected touch points at both ends of the handwriting segment.
[0151] S708: Determine an error parameter value corresponding to the predicted touch point according to the actual position data of the previous detected touch point and the next detected touch point of the predicted touch point in the actual touch point set, and the predicted position data of the predicted touch point.
[0152] In this step, if all handwriting segments are unavailable, it means that the handwriting segment is far away from the predicted touch point. It is necessary to determine the error parameter value corresponding to the predicted touch point based on the actual position data of the previous detected touch point and the next detected touch point in the actual touch point set, as well as the predicted position data of the predicted touch point.
[0153] Specifically, based on the actual position data of a detected touch point before the predicted touch point and a detected touch point after the predicted touch point in the actual touch point set, as well as the predicted position data of the predicted touch point, the second detection distance between the actual touch point before the predicted touch point, the actual touch point after the predicted touch point, and the predicted touch point is calculated; and then the smaller value of the two second detection distances is determined as the error parameter value corresponding to the predicted touch point.
[0154] It should be noted that the formula The second detection distance is calculated, where d1 represents the second detection distance, (x k ,y k ) represents the coordinates of the predicted touch point, (x n+1 ,y n+1 ) represents the coordinates of the previous detected touch point or the next detected touch point of the predicted touch point.
[0155] S709: Determine a predicted duration corresponding to the predicted touch point according to whether there is a predicted touch point before the predicted touch point in the touch point set.
[0156] In this step, after obtaining the detected touch point, the processor can determine the predicted duration corresponding to the predicted touch point according to whether there is a predicted touch point before the predicted touch point in the touch point set.
[0157] Specifically, in the touch point set, if there is a predicted touch point before the predicted touch point, the previous predicted touch point of the predicted touch point is determined as the process touch point; the interval time between the predicted position of the predicted touch point and the detected time of the next actual touch point of the process touch point in the touch point set is determined as the predicted time. In this case, it means that in actual use, the predicted touch point is predicted after the next actual touch point of the process touch point is obtained.
[0158] For example, in Figure 6On this basis, the predicted duration corresponding to the predicted touch point Q2 is determined. There is a predicted touch point Q1 before Q2, so the process touch point is Q1. Then, the interval between the moment when the predicted position of Q2 belongs and the moment when the next actual touch point P3 of Q1 is detected is calculated to obtain the predicted duration.
[0159] In the touch point set, if there is no predicted touch point before the predicted touch point, the interval between the time when the predicted position of the predicted touch point belongs and the time when the first actual touch point in the touch point set is detected is determined as the predicted duration. In this case, it means that in actual use, the predicted touch point is predicted after the first actual touch point is obtained.
[0160] For example, in Figure 6 Based on this, the predicted duration corresponding to the predicted touch point Q1 is determined. There is no predicted touch point before Q1, so the interval between the moment when the predicted position of Q1 belongs and the moment when the first actual touch point P1 in the touch point set is detected is calculated to obtain the predicted duration.
[0161] It should be noted that the execution order of steps S701 to S708 and step S709 can be: first execute steps S701 to S708, then execute step S709; or first execute step S709, then execute steps S701 to S708; or execute steps S701 to S708 and step S709 simultaneously. The embodiment of the present application does not limit the execution order of steps S701 to S708 and step S709, and can be set according to actual conditions.
[0162] The display device provided in this embodiment determines whether there is at least one handwriting segment available after dividing the handwriting segments and determining the reference points in the handwriting segments. When at least one handwriting segment is available, the minimum value of the minimum distance between the predicted touch point and each available handwriting segment is determined as the error parameter value. When all handwriting segments are unavailable, the smaller value of the distance between the predicted touch point and the previous actual touch point and the next actual touch point is determined as the error parameter value. In addition, the predicted duration is determined based on whether there is a predicted touch point before the predicted touch point, which effectively improves the accuracy of the error parameter value and the predicted duration.
[0163] Furthermore, based on the above-mentioned embodiments, the embodiments of the present application illustrate the situation where the processor can determine the stability level of the handwriting prediction algorithm after obtaining the accuracy level. Fig.10 A schematic diagram of a flow chart for determining the stability level of a handwriting prediction algorithm provided in the present application, wherein a processor in a display device is configured to perform the following steps:
[0164] S1001: Calculate a target error parameter variance according to the error parameter values corresponding to all predicted touch points.
[0165] In this step, after obtaining the accuracy level, the processor can also determine the stability level of the handwriting prediction algorithm, which requires calculating the target error parameter variance based on the error parameter values corresponding to all predicted touch points.
[0166] According to the formula Calculate the target error parameter variance, where, represents the target error parameter variance, Δd k represents the error parameter value, and N represents the number of error parameter values.
[0167] S1002: Calculate the target duration variance according to the predicted durations of all predicted touch points.
[0168] In this step, after obtaining the accuracy level, the processor also needs to calculate the target duration variance based on the predicted durations of all predicted touch points.
[0169] According to the formula Calculate the target error parameter variance, where, represents the target duration variance, Δt k represents the prediction duration, and N represents the number of prediction durations.
[0170] S1003: Calculate the target accuracy parameter variance according to the accuracy parameter values corresponding to all predicted touch points.
[0171] In this step, after obtaining the accuracy level, the processor also needs to calculate the target accuracy parameter variance based on the accuracy parameter values corresponding to all predicted touch points.
[0172] According to the formula Calculate the target accuracy parameter variance, where Represents the target accuracy parameter variance, Precision k represents the accuracy parameter value, and N represents the number of accuracy parameter values.
[0173] S1004: According to the corresponding relationship between the error parameter variance, the duration variance, the accuracy parameter variance and the stability level, the stability levels corresponding to the target error parameter variance, the target duration variance and the target accuracy parameter variance are determined.
[0174] In this step, after the processor obtains the target error parameter variance, target duration variance, and target accuracy parameter variance, it can determine the stability levels corresponding to the target error parameter variance, target duration variance, and target accuracy parameter variance based on the corresponding relationship between the error parameter variance, duration variance, accuracy parameter variance and the stability level.
[0175] Exemplarily, Table 2 is a table of correspondence between error parameter variance, duration variance, accuracy parameter variance and stability level provided in this application.
[0176] Table 2
[0177]
[0178] As shown in Table 2, the smaller the number of the stability level, the higher the stability.
[0179] It should be noted that Table 2 is only an example of the correspondence between error parameter variance, duration variance, accuracy parameter variance and stability level. The embodiment of the present application does not limit the representation of error parameter variance, duration variance, accuracy parameter variance, stability level, and stability level, and can be set according to actual conditions.
[0180] The display device provided in this embodiment determines the stability of the handwriting prediction algorithm by determining the target error parameter variance, the target duration variance, and the target accuracy parameter variance, thereby effectively improving the accuracy of the determined stability level of the handwriting prediction algorithm.
[0181] In the present application, a method for detecting the accuracy of a handwriting prediction algorithm is also provided, and the steps may be:
[0182] Obtaining a continuous handwriting and actual data of each actual touch point in the handwriting, the actual data including actual position data and the time when it was detected;
[0183] Using a handwriting prediction algorithm, predictive data of a plurality of predicted touch points are determined, the predictive data including predicted position data and a time at which the predicted position corresponds to the predicted position data;
[0184] Sorting all actual touch points and predicted touch points in order from earliest to latest according to the detected time and the predicted position time to obtain a touch point set;
[0185] For each predicted touch point, determine the error parameter value and predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and the predicted position data of the predicted touch point;
[0186] Divide the error parameter value by the predicted duration to obtain the accuracy parameter value corresponding to the predicted touch point;
[0187] An average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and an accuracy level corresponding to the average value is determined.
[0188] For specific implementation steps and technical effects, please refer to the above embodiments, and this application will not repeat them.
[0189] Fig.11 This is a schematic diagram of the structure of an embodiment of the handwriting prediction algorithm accuracy detection device provided by the present application; the device can be integrated into the display device in the above method embodiment, or can be implemented by the display device in the above method embodiment. Fig.11 As shown, the accuracy detection device 110 of the handwriting prediction algorithm includes:
[0190] The acquisition module 111 is used to acquire a continuous handwriting and actual data of each actual touch point in the handwriting, wherein the actual data includes actual position data and a time when the touch point is detected.
[0191] The processing module 112 is used to:
[0192] Using a handwriting prediction algorithm, determining prediction data of a plurality of predicted touch points, the prediction data including predicted position data and a time at which the predicted position corresponds to the predicted position data;
[0193] Sorting all actual touch points and predicted touch points in order from earliest to latest according to the detected time and the predicted position time to obtain a touch point set;
[0194] For each predicted touch point, determining an error parameter value and a predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and predicted position data of the predicted touch point;
[0195] Dividing the error parameter value by the predicted duration to obtain an accuracy parameter value corresponding to the predicted touch point;
[0196] An average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and an accuracy level corresponding to the average value is determined.
[0197] Furthermore, the processing module 112 is specifically configured to:
[0198] determining, from the touch point set, a plurality of detected touch points corresponding to the predicted touch points according to an order of the predicted touch points in the touch point set;
[0199] According to the handwriting, the touch point set, the actual position data of each detected touch point, and the predicted position data of the predicted touch point, the error parameter value and the predicted duration corresponding to the predicted touch point are determined.
[0200] Furthermore, the processing module 112 is further configured to:
[0201] If the predicted touch point is the first predicted touch point in the touch point set, and there is only one actual touch point before the predicted touch point in the touch point set, then the actual touch point before the predicted touch point and the two actual touch points after the predicted touch point in the touch point set are used as the detected touch points corresponding to the predicted touch point;
[0202] If the predicted touch point is the first predicted touch point in the touch point set, and there are multiple actual touch points before the predicted touch point in the touch point set, then the first two actual touch points of the predicted touch point and the second two actual touch points after the predicted touch point in the touch point set are used as the detected touch points corresponding to the predicted touch point;
[0203] If the predicted touch point is the last predicted touch point in the touch point set, taking the next actual touch point after the predicted touch point and the two actual touch points before the predicted touch point in the touch point set as the detected touch point corresponding to the predicted touch point;
[0204] If the predicted touch point is neither the first predicted touch point nor the last predicted touch point in the touch point set, the first two actual touch points of the predicted touch point and the last two actual touch points of the predicted touch point in the actual touch point set are used as the detected touch points corresponding to the predicted touch point.
[0205] Furthermore, the processing module 112 is further configured to:
[0206] From the handwriting, dividing a plurality of handwriting segments according to each detected touch point;
[0207] For each handwriting segment, determining a reference point in the handwriting segment that is closest to the predicted touch point;
[0208] If the line connecting the reference point and the predicted touch point is a normal line of the handwriting segment, it is determined that the handwriting segment is available;
[0209] If the line connecting the reference point and the predicted touch point is not a normal line of the handwriting segment, determining that the handwriting segment is unavailable;
[0210] If there is at least one handwriting segment available, for each available handwriting segment, according to the actual position data of the detected touch points at both ends of the handwriting segment and the predicted position data of the predicted touch points, determine the error parameter value corresponding to the predicted touch points;
[0211] If all handwriting segments are unavailable, determining an error parameter value corresponding to the predicted touch point according to actual position data of a detected touch point before the predicted touch point and a detected touch point after the predicted touch point in the actual touch point set, and predicted position data of the predicted touch point;
[0212] The predicted duration corresponding to the predicted touch point is determined according to whether there is a predicted touch point before the predicted touch point in the touch point set.
[0213] Furthermore, the processing module 112 is further configured to:
[0214] Calculating a first detection distance between a reference point in the handwriting segment and the predicted touch point according to actual position data of the detected touch points at both ends of the handwriting segment and predicted position data of the predicted touch point;
[0215] The minimum value of all the first detection distances is determined as the error parameter value corresponding to the predicted touch point.
[0216] Furthermore, the processing module 112 is further configured to:
[0217] Calculate, based on actual position data of a detected touch point before the predicted touch point and a detected touch point after the predicted touch point in the actual touch point set, and predicted position data of the predicted touch point, a second detection distance between an actual touch point before the predicted touch point and an actual touch point after the predicted touch point, and the predicted touch point;
[0218] The smaller value of the two second detection distances is determined as the error parameter value corresponding to the predicted touch point.
[0219] Furthermore, the processing module 112 is further configured to:
[0220] In the touch point set, if there is a predicted touch point before the predicted touch point, determining a previous predicted touch point of the predicted touch point as a process touch point;
[0221] Determine the predicted duration as the predicted duration, the interval between the time at which the predicted position of the predicted touch point belongs and the time at which an actual touch point after the process touch point in the touch point set is detected;
[0222] In the touch point set, if there is no predicted touch point before the predicted touch point, the interval between the moment when the predicted position of the predicted touch point belongs and the moment when the first actual touch point in the touch point set is detected is determined as the predicted duration.
[0223] Furthermore, the processing module 112 is also used for:
[0224] Calculate the target error parameter variance based on the error parameter values corresponding to all predicted touch points;
[0225] Calculate the target duration variance based on the predicted duration of all predicted touch points;
[0226] Calculate the target accuracy parameter variance based on the accuracy parameter values corresponding to all predicted touch points;
[0227] According to the corresponding relationship among the error parameter variance, the duration variance, the accuracy parameter variance and the stability level, the stability levels corresponding to the target error parameter variance, the target duration variance and the target accuracy parameter variance are determined.
[0228] The handwriting prediction algorithm accuracy detection device provided in this embodiment is used to execute the technical solution in any of the aforementioned embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.
[0229] An embodiment of the present application also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the technical solution provided by any of the aforementioned method embodiments is implemented.
[0230] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement the technical solution provided by any of the aforementioned method embodiments when executed by a processor.
[0231] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0232] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0233] For ease of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are intended to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that: It includes a processor and a touch screen connected to the processor; The touch screen is configured to: obtain a continuous handwriting and actual data of each actual touch point in the handwriting, wherein the actual data includes actual position data and a detected time; The processor is configured to: use a handwriting prediction algorithm to determine prediction data of a plurality of predicted touch points, wherein the prediction data includes predicted position data and a time at which the predicted position corresponding to the predicted position data belongs; Sorting all actual touch points and predicted touch points in order from earliest to latest according to the detected time and the predicted position time to obtain a touch point set; For each predicted touch point, determining an error parameter value and a predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and predicted position data of the predicted touch point; Dividing the error parameter value by the predicted duration to obtain an accuracy parameter value corresponding to the predicted touch point; An average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and an accuracy level corresponding to the average value is determined.
2. The display device according to claim 1, characterized in that When the processor is used to determine the error parameter value and the predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and the predicted position data of the predicted touch point, the processor is specifically used to: determining, from the touch point set, a plurality of detected touch points corresponding to the predicted touch points according to an order of the predicted touch points in the touch point set; According to the handwriting, the touch point set, the actual position data of each detected touch point, and the predicted position data of the predicted touch point, the error parameter value and the predicted duration corresponding to the predicted touch point are determined.
3. The display device according to claim 2, characterized in that When the processor is used to determine, from the touch point set, the detected touch point corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the processor is specifically used to: If the predicted touch point is the first predicted touch point in the touch point set, and there is only one actual touch point before the predicted touch point in the touch point set, then the actual touch point before the predicted touch point and the two actual touch points after the predicted touch point in the touch point set are used as the detected touch points corresponding to the predicted touch point; If the predicted touch point is the first predicted touch point in the touch point set, and there are multiple actual touch points before the predicted touch point in the touch point set, then the first two actual touch points of the predicted touch point and the second two actual touch points after the predicted touch point in the touch point set are used as the detected touch points corresponding to the predicted touch point; If the predicted touch point is the last predicted touch point in the touch point set, taking the next actual touch point after the predicted touch point and the two actual touch points before the predicted touch point in the touch point set as the detected touch point corresponding to the predicted touch point; If the predicted touch point is neither the first predicted touch point nor the last predicted touch point in the touch point set, the first two actual touch points of the predicted touch point and the last two actual touch points of the predicted touch point in the actual touch point set are used as the detected touch points corresponding to the predicted touch point.
4. The display device according to claim 2, characterized in that The processor is used to determine the error parameter value and the predicted duration corresponding to the predicted touch point according to the handwriting, the touch point set, the actual position data of each detected touch point, and the predicted position data of the predicted touch point, specifically for: From the handwriting, dividing a plurality of handwriting segments according to each detected touch point; For each handwriting segment, determining a reference point in the handwriting segment that is closest to the predicted touch point; If the line connecting the reference point and the predicted touch point is a normal line of the handwriting segment, it is determined that the handwriting segment is available; If the line connecting the reference point and the predicted touch point is not a normal line of the handwriting segment, determining that the handwriting segment is unavailable; If there is at least one handwriting segment available, for each available handwriting segment, according to the actual position data of the detected touch points at both ends of the handwriting segment and the predicted position data of the predicted touch points, determine the error parameter value corresponding to the predicted touch points; If all handwriting segments are unavailable, determining an error parameter value corresponding to the predicted touch point according to actual position data of a detected touch point before the predicted touch point and a detected touch point after the predicted touch point in the actual touch point set, and predicted position data of the predicted touch point; The predicted duration corresponding to the predicted touch point is determined according to whether there is a predicted touch point before the predicted touch point in the touch point set.
5. The display device according to claim 4, characterized in that When the processor is used to determine the error parameter value corresponding to the predicted touch point according to the actual position data of the detected touch points at both ends of the handwriting segment and the predicted position data of the predicted touch point, it is specifically used to: Calculating a first detection distance between a reference point in the handwriting segment and the predicted touch point according to actual position data of the detected touch points at both ends of the handwriting segment and predicted position data of the predicted touch point; The minimum value of all the first detection distances is determined as the error parameter value corresponding to the predicted touch point.
6. The display device according to claim 4, characterized in that When the processor is used to determine the error parameter value corresponding to the predicted touch point according to the actual position data of the previous detected touch point of the predicted touch point and the next detected touch point of the predicted touch point in the actual touch point set, and the predicted position data of the predicted touch point, the processor is specifically used to: Calculate, based on actual position data of a detected touch point before the predicted touch point and a detected touch point after the predicted touch point in the actual touch point set, and predicted position data of the predicted touch point, a second detection distance between an actual touch point before the predicted touch point and an actual touch point after the predicted touch point, and the predicted touch point; The smaller value of the two second detection distances is determined as the error parameter value corresponding to the predicted touch point.
7. The display device according to claim 4, characterized in that When the processor is used to determine the predicted duration corresponding to the predicted touch point according to whether there is a predicted touch point before the predicted touch point in the touch point set, it is specifically used to: In the touch point set, if there is a predicted touch point before the predicted touch point, determining a previous predicted touch point of the predicted touch point as a process touch point; Determine the predicted duration as the predicted duration, the interval between the time at which the predicted position of the predicted touch point belongs and the time at which an actual touch point after the process touch point in the touch point set is detected; In the touch point set, if there is no predicted touch point before the predicted touch point, the interval between the moment when the predicted position of the predicted touch point belongs and the moment when the first actual touch point in the touch point set is detected is determined as the predicted duration.
8. The display device according to claim 1, characterized in that The processor is further configured to: Calculate the target error parameter variance based on the error parameter values corresponding to all predicted touch points; Calculate the target duration variance based on the predicted duration of all predicted touch points; Calculate the target accuracy parameter variance based on the accuracy parameter values corresponding to all predicted touch points; According to the corresponding relationship among the error parameter variance, the duration variance, the accuracy parameter variance and the stability level, the stability levels corresponding to the target error parameter variance, the target duration variance and the target accuracy parameter variance are determined.
9. A method for detecting the accuracy of a handwriting prediction algorithm, characterized in that: include: Acquire a continuous handwriting and actual data of each actual touch point in the handwriting, wherein the actual data includes actual position data and a time when the handwriting is detected; Using a handwriting prediction algorithm, determining prediction data of a plurality of predicted touch points, the prediction data including predicted position data and a time at which the predicted position corresponds to the predicted position data; Sorting all actual touch points and predicted touch points in order from earliest to latest according to the detected time and the predicted position time to obtain a touch point set; For each predicted touch point, determining an error parameter value and a predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and predicted position data of the predicted touch point; Dividing the error parameter value by the predicted duration to obtain an accuracy parameter value corresponding to the predicted touch point; An average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and an accuracy level corresponding to the average value is determined.
10. A device for detecting the accuracy of a handwriting prediction algorithm, characterized in that: include: An acquisition module, used for acquiring a continuous handwriting, actual data of each actual touch point in the handwriting, the actual data including actual position data and the time when the handwriting is detected; Processing modules for: Using a handwriting prediction algorithm, determining prediction data of a plurality of predicted touch points, the prediction data including predicted position data and a time at which the predicted position corresponds to the predicted position data; Sorting all actual touch points and predicted touch points in order from earliest to latest according to the detected time and the predicted position time to obtain a touch point set; For each predicted touch point, determining an error parameter value and a predicted duration corresponding to the predicted touch point according to the order of the predicted touch point in the touch point set, the handwriting, the touch point set, and predicted position data of the predicted touch point; Dividing the error parameter value by the predicted duration to obtain an accuracy parameter value corresponding to the predicted touch point; An average value of the accuracy parameter values corresponding to all predicted touch points is calculated, and an accuracy level corresponding to the average value is determined.
