Method, device, electronic device and storage medium for detecting writing on handwriting screen

Through the automatic judgment method of copying results on the handwriting screen and comparison with standard fonts, defects in copying can be identified and corrected, which solves the problem of lack of copying quality detection in the existing technology and achieves accurate evaluation and teaching support of the copying process. .

CN112215061BActive Publication Date: 2024-09-10TRS INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010881452.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-27
Publication Date
2024-09-10
Estimated Expiration
2040-08-27

AI Technical Summary

Technical Problem

The existing technology lacks a technical solution for handwriting screen testing of copying quality, which makes it difficult for users to accurately identify and correct defects in copying during calligraphy practice, thus affecting the teaching effect.

Method used

Through the automatic judgment method of copying results on the handwriting screen, the stroke image of each stroke is saved and compared, compared with standard fonts, flaws in the copying are identified, and writing time is calculated to evaluate fluency.

Benefits of technology

It achieves accurate identification of each stroke and automatic identification of defects during the user's copying process, provides accurate writing stroke images and quality assessment, and helps users quickly identify and improve their copying skills.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112215061B
    Figure CN112215061B
Patent Text Reader

Abstract

The present invention belongs to the technical field of copying on a handwriting screen. The present invention provides a detection method, device, electronic device and non-volatile computer storage medium for copying on a handwriting screen; the method includes: starting from the first stroke on the handwriting screen to the last stroke, each stroke is saved as an image corresponding to a stroke; a numbered stroke file is generated for each image corresponding to each stroke; the numbered stroke file can obtain the writing time of an image corresponding to each stroke based on the start time and the lift time of the pen; based on the generation of the numbered stroke file and the writing time of an image corresponding to each stroke, the copying result of the current text on the handwriting screen is identified. Therefore, through the automatic judgment method of the copying result on the handwriting screen, each stroke of the user in the copying process can be accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of handwriting on a screen, and in particular to a detection method, device, electronic equipment and non-volatile computer storage medium for handwriting on a screen. Background Art

[0002] In the early stages of learning calligraphy, when copying from a copybook, paper is usually placed on the copybook. Since general paper has a certain thickness, the clarity of the characters on the copybook is often greatly reduced after passing through the paper, and they become blurred, making it difficult to accurately grasp the details of the strokes. If thinner paper is used, the ink will penetrate and contaminate the copybook, and in serious cases, the copybook will no longer be usable.

[0003] With the technological advancement of electronic science, handwriting screens have been widely used in calligraphy teaching. For example, mobile terminals that support handwriting functions, notebooks, mobile phones, and PDAs have become indispensable tools for modern business applications. There are also handwriting screens specially designed for practicing calligraphy. Various mobile devices will emerge in an endless stream according to needs, greatly enriching our learning, life, and entertainment content.

[0004] However, the prior art lacks a technical solution for copying using a handwriting screen, and in particular lacks a solution for detecting the copying quality. Summary of the invention

[0005] This application innovatively provides a detection method, device, electronic device and non-volatile computer storage medium for copying on a handwriting screen, which can accurately identify each stroke of the user in the copying process through the automatic judgment method of the copying result on the handwriting screen. Furthermore, it can also be compared with the strokes of the standard font, so that the defects that may occur in the copying process of the user can be accurately identified.

[0006] A first aspect of the present invention provides a method for detecting handwriting on a handwriting screen, characterized in that it includes:

[0007] From the first stroke on the handwriting screen to the last stroke, each stroke is saved as an image corresponding to the stroke.

[0008] Each image corresponding to a stroke generates a numbered stroke file, and each image corresponding to a stroke is the stroke corresponding to the current writing result minus the previous image;

[0009] The stroke file with the label stores the writing start time and the writing lift time in association with each other, and based on the writing start time and the writing lift time, the writing time of an image corresponding to each stroke can be obtained;

[0010] Based on the stroke file with a label generated corresponding to an image corresponding to each stroke and the writing time of an image corresponding to each stroke, the copying result of the current text on the handwriting screen is identified.

[0011] In a preferred implementation manner of an embodiment of the present invention, the method further includes: generating a labeled stroke file for an image corresponding to each stroke in the imitation result, comparing it with the stroke file in the standard writing file, and outputting the defect results generated in the imitation process based on the comparison result of the stroke file in the imitation result and the stroke file in the standard writing file.

[0012] In a further preferred implementation manner of the embodiment of the present invention, the defect result includes at least one of no defect, wrong stroke order, connected writing, separate strokes writing, omitted strokes, and extra strokes.

[0013] In a further preferred implementation of the embodiment of the present invention, the defect result judgment process of the method includes using: time distance, intersection distance, spatial distance, and spatial shape to calculate the correlation between an image corresponding to each stroke in the imitation result and the stroke file in the standard writing file.

[0014] In a further preferred implementation manner of the embodiment of the present invention, the judgment process of the defect result includes a positive match judgment and a negative match judgment; the positive match judgment compares and analyzes the strokes in the standard writing file with the strokes in the user writing file one by one; the negative match judgment compares and analyzes the strokes in the user writing file with the strokes in the standard writing file one by one in the positive match judgment.

[0015] In a preferred implementation manner of an embodiment of the present invention, the method further includes: generating a writing time corresponding to a labeled stroke file corresponding to an image corresponding to each stroke in the imitation result, comparing it with the writing time corresponding to the stroke file in the standard writing file, and outputting a fluency comparison result during the imitation process.

[0016] In a further preferred implementation of the embodiment of the present invention, the fluency comparison result during the imitation process includes at least one of the overall speed, hesitation time, and pen movement time; the overall speed is determined based on the difference between the total time corresponding to the body time of the last stroke minus the start time of the first stroke and the first time threshold, the hesitation time is determined based on the difference between the start time of the current stroke minus the lift time of the previous stroke and the second time threshold, and the pen movement time is determined based on the difference between the lift time of the current stroke minus the start time of the current stroke and the third time threshold.

[0017] The second aspect of the present invention further provides a detection device for copying on a handwriting screen, characterized in that it comprises:

[0018] The stroke image recognition unit saves each stroke image from the first stroke on the handwriting screen to the last stroke.

[0019] A stroke file generating unit generates a numbered stroke file based on an image corresponding to each stroke, and an image corresponding to each stroke is a stroke corresponding to the current writing result minus a previous image;

[0020] A stroke file writing time generating unit, based on the stroke file with the number, stores the writing start time and the writing lift time, and based on the writing start time and the writing lift time, obtains the writing time of an image corresponding to each stroke;

[0021] The copying result generating unit generates a stroke file with a label based on an image corresponding to each stroke and the writing time of an image corresponding to each stroke, and identifies the copying result of the current text on the handwriting screen.

[0022] The third aspect of the present invention also provides an electronic device, characterized in that it includes: a memory, a processor, and a computer program; wherein the computer program is stored in the memory and is configured to be executed by the processor to implement any one of the detection methods for copying on a handwriting screen provided in the first aspect.

[0023] The fourth aspect of the present invention also provides a non-volatile computer storage medium, characterized in that a computer program is stored thereon; the computer program is executed by a processor to implement any one of the detection methods for copying on a handwriting screen provided in the first aspect.

[0024] By adopting the above technical solution provided by the present invention, each stroke of the user in the copying process and the writing time of the stroke can be accurately identified through the automatic judgment method of the copying result on the handwriting screen; in this way, whether it is the subsequent automatic identification of copying defects or manual correction, each stroke on the handwriting screen can be accurately identified; in order to determine whether each word copied by the user on the handwriting screen is correct, an accurate writing stroke image is provided. Furthermore, it can also be compared with the standard font strokes, so that the defects that may occur in the copying process of the user can be accurately identified; and the copying process and the quality of the copying work are quantitatively judged, so as to quickly identify the areas that need improvement, providing good technical support for copying teaching.

[0025] Other features and advantages of the invention will be described in the following description, and partly become apparent from the description, or understood by implementing the technical solution of the invention. The purpose and other advantages of the invention can be achieved and obtained by the structures and / or processes specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A flow chart of a method for detecting writing on a handwriting screen is provided for an embodiment of the present invention.

[0027] Figure 2 A flowchart of another method for detecting handwriting on a handwriting screen is provided for an embodiment of the present invention.

[0028] Figure 3 A schematic diagram of a writing document provided by an embodiment of the present invention.

[0029] Figure 4 A schematic diagram of a writing defect with a wrong stroke order is provided for an embodiment of the present invention.

[0030] Figure 5 A schematic diagram of a writing defect with connected strokes is provided for an embodiment of the present invention.

[0031] Figure 6 A schematic diagram of writing defects with separate strokes is provided for an embodiment of the present invention.

[0032] Figure 7 A schematic diagram of a writing defect with missing strokes is provided for an embodiment of the present invention.

[0033] Figure 8 A schematic diagram of a writing defect with extra strokes is provided for an embodiment of the present invention.

[0034] Fig. 9 A flowchart of another method for detecting writing on a handwriting screen is provided for an embodiment of the present invention.

[0035] Fig.10 A schematic diagram of a numbered written document is provided for an embodiment of the present invention.

[0036] Fig.11 A schematic diagram of a stroke file with labels is provided for an embodiment of the present invention.

[0037] Fig.12 A schematic diagram of a copy file matching process is provided for an embodiment of the present invention.

[0038] Fig.13 A structural block diagram of a detection device for copying on a handwriting screen is provided for an embodiment of the present invention.

[0039] Fig.14 A structural block diagram of an electronic device is provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The following will describe the implementation methods of the present invention in detail with reference to the accompanying drawings and embodiments, so that the implementation process of how the present invention applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. It should be noted that these specific descriptions are only to make it easier and clearer for ordinary technicians in the field to understand the present invention, rather than a restrictive interpretation of the present invention; and as long as there is no conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other, and the technical solutions formed are all within the protection scope of the present invention.

[0041] Additionally, the steps shown in the flowcharts of the accompanying drawings may be executed in a control system such as a set of controller executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown here.

[0042] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments:

[0043] Example

[0044] This embodiment innovatively provides a detection method, device, electronic device and non-volatile computer storage medium for copying on a handwriting screen, which can accurately identify each stroke of the user in the copying process through the automatic judgment method of the copying result on the handwriting screen. Furthermore, it can also be compared with the strokes of the standard font, so that the defects that may occur in the copying process of the user can be accurately identified.

[0045] like Figure 1 As shown, this embodiment provides a detection method for copying on a handwriting screen, and the detection method includes:

[0046] S110, from the first stroke on the handwriting screen to the last stroke, each stroke is saved as an image corresponding to the stroke.

[0047] In this embodiment, the result of the handwriting screen is called a writing file, which records the process of the user writing on the handwriting screen, from the first time the user starts writing on the handwriting screen to the last time the user lifts the pen. Each time the user lifts the pen, an image is saved. The image is named "start time - lift time". Therefore, the writing file is a group of image files with timestamps, as shown in the following example. Figure 3 shown.

[0048] In order to facilitate those skilled in the art to more easily understand the technical solution of this embodiment, this embodiment also provides: a standard writing file, a user writing file, and a number of strokes, wherein:

[0049] The standard writing file is a standard writing file that users use as a practice target.

[0050] User written files: written files generated by user practice.

[0051] Number of strokes: The number of strokes in the present invention is defined as the number of files of a written file.

[0052] like Figure 4-Figure 8 As shown, in order to facilitate those skilled in the art to more easily understand this embodiment, some typical writing defects are illustrated as follows: Figure 4 The corresponding strokes shown are incorrect: the order of strokes written is inconsistent with the order of the standard writing file, such as Figure 4 As shown in the figure, the image group in the first row is a standard writing file, and the image group in the second row is a user writing file (the same below), and the first stroke has a stroke order error. Figure 5 The corresponding figure is connected writing: the writing that should be completed by multiple strokes is completed by the user in one stroke. Figure 5 , the user completes the last three strokes with one stroke. Figure 6 The corresponding figure is the writing of divided strokes: the writing that should be completed in one stroke is completed by the user in multiple strokes. Figure 6 As shown in , the user completed the fifth transaction in two parts. Figure 7 The corresponding strokes shown are omitted: the user omitted some strokes. Figure 7 As shown in , the user missed the last entry. Figure 8 The corresponding strokes shown are overwritten: the user wrote some extra strokes. Figure 8 As shown, the user wrote one more stroke. Therefore, the defect results provided in this embodiment include at least one of: no defect, wrong stroke order, continuous writing, separate strokes, missing strokes, and extra strokes.

[0053] S120, a stroke file with a label is generated for each image corresponding to each stroke, and each image corresponding to each stroke is the stroke corresponding to the current writing result minus the previous image.

[0054] S130. The stroke file with the labels stores the writing start time and the writing lift time in association with each other, and based on the writing start time and the writing lift time, the writing time of an image corresponding to each stroke can be obtained.

[0055] S140, based on the image corresponding to each stroke, a stroke file with a label is generated, and the writing time of the image corresponding to each stroke, and the copying result of the current text on the handwriting screen is identified.

[0056] Therefore, by adopting the above-mentioned technical solution provided in this embodiment, through the automatic judgment method of the copying result on the handwriting screen, each stroke of the user in the copying process and the writing time of the stroke can be accurately identified; in this way, whether it is the subsequent automatic identification of copying defects or manual correction, each stroke on the handwriting screen can be accurately identified; in order to judge whether each word copied by the user on the handwriting screen is correct, an accurate writing stroke image is provided.

[0057] like Figure 2 As shown, this embodiment provides another method for detecting writing on a handwriting screen. In addition to the above-mentioned steps S110-2140, the detection method also includes:

[0058] S150. Generate a labeled stroke file for an image corresponding to each stroke in the imitation result, and compare it with the stroke file in the standard writing file. According to the comparison result of the stroke file in the imitation result and the stroke file in the standard writing file, output the defect result generated in the imitation process.

[0059] Among them, the judgment process of the defect result includes using: time distance, intersection distance, spatial distance, and spatial shape to calculate the correlation between an image corresponding to each stroke in the imitation result and the stroke file in the standard writing file.

[0060] Therefore, the detection method for copying on the handwriting screen provided in this embodiment can also be combined with standard font strokes for comparison, so that defects that may occur in the copying process of the user can be accurately identified; and the copying process and the quality of the copied work can be quantitatively judged, so as to quickly identify areas that need improvement, providing good technical support for copying teaching.

[0061] In a preferred implementation manner of this embodiment, the judgment process of the defect result includes positive matching judgment and negative matching judgment; the positive matching judgment compares and analyzes the strokes in the standard writing file with the strokes in the user writing file one by one; the negative matching judgment compares and analyzes the strokes in the user writing file with the strokes in the standard writing file one by one.

[0062] In a preferred implementation of this embodiment, the detection method for copying on the writing screen also includes: generating a writing time corresponding to a numbered stroke file corresponding to an image corresponding to each stroke in the copying result, comparing it with the writing time corresponding to the stroke file in the standard writing file, and outputting the fluency comparison result during the copying process. In a further preferred implementation, the fluency comparison result during the copying process of the method includes at least one of the overall speed, hesitation time, and pen movement time; the overall speed is determined based on the difference between the total time corresponding to the body time of the last stroke minus the start time of the first stroke and the first time threshold, the hesitation time is determined based on the difference between the start time of the current stroke minus the lift time of the previous stroke and the second time threshold, and the pen movement time is determined based on the difference between the lift time of the current stroke minus the start time of the current stroke and the third time threshold.

[0063] More specifically, if Fig. 9 As shown, a flow chart of another method for detecting writing on a handwriting screen is provided in this embodiment, and the method for detecting writing on a handwriting screen includes:

[0064] S210, initializing the standard writing file, that is, saving the copied object as a writing file and a stroke file according to the standard strokes.

[0065] S220, standard writing file initialization:

[0066] This process generates a numbered stroke file. Assume the stroke file is:

[0067] like Fig.10 The corresponding documents shown are numbered. Fig.11 This is a numbered stroke file.

[0068] S230, defect detection and identification:

[0069] Assumption B i (1≤i≤m), is the stroke file generated by the standard writing file, U j (1≤j≤n) is the stroke file generated by the user writing file, R ij (1≤i≤m,1≤j≤n) is the correlation between the two strokes Bi and Uj.

[0070] The specific process of defect detection and identification includes:

[0071] Stroke correlation calculation

[0072] The correlation between the strokes is used to determine whether two strokes belong to the same stroke. i (1≤i≤m) and U j When the correlation is (1≤j≤n), the main indicators are:

[0073] 1.1 Time Distance

[0074] The difference in the time position of the strokes in this writing is calculated as follows:

[0075] D time =|i / mj / n|

[0076] 1.2 Intersection distance

[0077] If the two strokes are exactly the same, the value is 0; if the two strokes do not intersect at all, the value is 1; when the two strokes partially intersect, the value is between 0 and 1. The smaller the value, the more relevant it is.

[0078] The calculation formula is: cross =1-Point(B i ∩U j ) / Point(B i ∪U j ).

[0079] Point(x) represents the number of pixels corresponding to stroke x, B i ∩U j Indicates stroke B i and stroke U j The overlapping strokes of B i ∪U j Indicates stroke B i and stroke U j The strokes of the characters when put together.

[0080] 1.3 Spatial distance

[0081] The ratio of the distance between the two stroke centers to the average size of the two strokes is denoted as D position ,in:

[0082] (1) The stroke center point refers to the center of gravity of the stroke, which is calculated using the center calculation method of a general binary image;

[0083] (2) Stroke size refers to the maximum distance between any two points in the stroke. The maximum value is obtained by calculating the distance between all two points.

[0084] 1.4 Spatial shape (aspect ratio, area ratio, pixel ratio):

[0085] Generally speaking, if two strokes are related, their aspect ratios should be consistent; the areas of their corresponding bounding rectangles should be consistent; and the number of pixels they correspond to should be consistent.

[0086] Assume xi and yi are strokes B i (1≤i≤m) corresponds to the width and height of the circumscribed rectangle; xj and yj are the strokes Uj (1≤j≤n) corresponds to the width and height of the circumscribed rectangle, then:

[0087] The formula for calculating the aspect ratio is D size =atan(max(xi / yi,xj / yj) / min(xi / yi,xj / yj)-1);

[0088] The area ratio is calculated as D area =atan(max(xi*yi,xj*yj) / min(xi*yi,xj*yj)-1);

[0089] The calculation formula of pixel ratio is:

[0090] D pixel = atan(max(Point(B i ),Point(U j )) / min(Point(B i ),Point(U j ))-1)

[0091] 1.5 Stroke Correlation Calculation

[0092] Calculate the correlation between two strokes using weighted method

[0093] R ij =α1D time +α2D cross +α3D position +α4D size +α5D area +α6D pixel

[0094] Where R ij It is B i (1≤i≤m) and U j (1≤j≤n), R ij The smaller the value, the more related the two strokes are. α1 to α6 are the weights of each calculation dimension, α1+α2+α3+α4+α5+α6=1.

[0095] By setting a threshold, we can judge whether two strokes are related. If the correlation R ij is less than a certain threshold r (r = 0.6), indicating that B i (1≤i≤m) and U j (1≤j≤n) Successfully matched, record<i,j> .

[0096] 2. Positive and negative matching

[0097] Positive match: The match from the standard written file to the user written file, the process is as follows:

[0098] (1). For each stroke of the standard writing document, calculate the correlation with each stroke of the user's writing document and obtain the minimum correlation.

[0099] (2). If the minimum correlation is less than a certain threshold r, it indicates a successful match, and record <the stroke order of the standard writing document, the stroke order of the stroke with the minimum correlation in the user's writing document>.

[0100] (3). If the minimum correlation is greater than or equal to the threshold r, the match fails.

[0101] (4). Continue with (1) until all strokes of the standard writing document are matched.

[0102] Inverse matching: The matching from the user's writing document to the standard writing document has a process similar to that of forward matching. The difference is that inverse matching starts from the user's writing document.

[0103] 3. Detect and identify defects based on the matching results.

[0104] Sort all stroke matching pairs in ascending order according to the first number. If the first numbers are the same, sort them in ascending order according to the second number. Taking the character '口' as an example, the standard writing should have 3 strokes. As Fig.12 shown, the stroke matching pairs after forward and inverse matching with the user's writing and sorting may be as follows:

[0105] (0) No defect: The sorted stroke matching pairs are characterized by: <1, 1>, <2, 2>, <3, 3>,..., <m, m> (where m is the number of strokes in the standard writing).

[0106] (1) Incorrect stroke order: There is a descending order in the second column (as above Fig.12 , the second column is 213).

[0107] (2) Writing strokes separately: There are duplicate numbers in the first column (as above Fig.12 , the first column is 1223).

[0108] (3) Writing strokes continuously: There are duplicate numbers in the second column (as above Fig.12 , the second column is 112).

[0109] (4) Missing strokes: There is a stroke in the first column that is not matched (as above Fig.12 , the third stroke in the standard writing is not matched).

[0110] (5) Extra strokes: There is a stroke in the second column that is not matched (as above Fig.12 , the fourth stroke in the user's writing is not matched).

[0111] Among them, if the user's writing has defects such as omissions and overwriting, we call it serious defects; the rest of the defects we call general defects.

[0112] Therefore, first determine whether there are serious defects? (S240), if yes, directly output unqualified. (S272); otherwise, further determine the fluency (S250):

[0113] Since the writing file is named after the time when writing starts and the time when writing ends,

[0114] T 总耗时 =t 最后一笔的提笔时间 -t 第一笔的起笔时间

[0115] T 犹豫时间 =t 当前笔画的起笔时间 -t 上一笔画的提笔时间

[0116] T 运笔时间 =t 当前笔画的提笔时间 -t 当天笔画的运笔时间 .

[0117] When evaluating fluency, the full score is 3, indicating very fluent, and it is assumed that the number of strokes is m.

[0118] It is also necessary to calculate the comprehensive score (S260) based on the above time, and determine whether it is excellent (S278), good (S276) or qualified (S274) according to the calculation result.

[0119] a). Overall speed evaluation: If the total time the user spends writing is much longer than the total time spent on standard writing, 1 point will be deducted;

[0120] b). Evaluation of hesitation time: If the hesitation time of a certain stroke is much longer than the hesitation time of standard writing, 1 / m points will be deducted;

[0121] c). Evaluation of pen movement time: If the pen movement time of a certain stroke is much longer than the standard writing time, 1 / m point will be deducted;

[0122] Among them: the "far greater than" here refers to twice the standard writing time.

[0123] at last,

[0124] like Fig.13 As shown, this embodiment also provides a detection device 200 for copying on a handwriting screen, comprising:

[0125] The stroke image recognition unit 210 stores each stroke from the first stroke on the handwriting screen to the last stroke, and saves each stroke as an image corresponding to the stroke;

[0126] The stroke file generating unit 220 generates a numbered stroke file based on an image corresponding to each stroke, and the image corresponding to each stroke is the stroke corresponding to the current writing result minus the previous image;

[0127] The stroke file writing time generating unit 230 stores the writing start time and the writing lift time in the corresponding association of the numbered stroke file, and obtains the writing time of an image corresponding to each stroke based on the writing start time and the writing lift time;

[0128] The copying result generating unit 240 generates a stroke file with a label based on an image corresponding to each stroke and the writing time of an image corresponding to each stroke, and recognizes the copying result of the current text on the handwriting screen.

[0129] In a preferred embodiment, the detection device 200 for copying on the handwriting screen also includes: a defect result recognition unit, which is used to generate a labeled stroke file for an image corresponding to each stroke in the copying result, and compare it with the stroke file in the standard writing file, and output the defect result generated in the copying process based on the comparison result of the stroke file in the copying result and the stroke file in the standard writing file.

[0130] It should be noted that the detection device 200 for copying on the handwriting screen provided in this embodiment is executed in the same specific manner as the above-mentioned detection method for copying on the handwriting screen, and can also achieve the same technical effect. For details, please refer to the corresponding description of the detection method for copying on the handwriting screen, which will not be repeated here.

[0131] like Fig.14 As shown, this embodiment further provides an electronic device 100, including:

[0132] One or more processors 110 and memory 120;

[0133] Multiple applications;

[0134] A power supply 130 for providing power to the processor 110 and the memory 120, and a peripheral circuit 140 corresponding to the power supply 130 and specific execution operations;

[0135] And one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the electronic device, the electronic device implements any one of the detection methods for copying on the handwriting screen mentioned above.

[0136] In addition, this embodiment also provides a non-volatile computer storage medium on which a computer program is stored; the computer program is executed by a processor to implement any one of the detection methods for copying on a handwriting screen provided in the first aspect.

[0137] It can be understood by those skilled in the art that the above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an ASIC, FPGA or SoC). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the processing method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the processing shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the processing shown herein.

[0138] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present invention.

[0139] Finally, it should be noted that the above description is only the best embodiment of the present invention and does not limit the present invention in any form. Any technician familiar with the art can make many possible changes and simple replacements to the technical solution of the present invention by using the above disclosed practices and technical contents without departing from the scope of the technical solution of the present invention, which all belong to the scope of protection of the technical solution of the present invention.

Claims

1. A method for detecting writing on a handwriting screen, characterized in that: include: From the first stroke on the handwriting screen to the last stroke, each stroke is saved as an image corresponding to the stroke. Each image corresponding to a stroke generates a numbered stroke file, and each image corresponding to a stroke is the stroke corresponding to the current writing result minus the previous image; The stroke file with the label stores the writing start time and the writing lift time in association with each other, and based on the writing start time and the writing lift time, the writing time of an image corresponding to each stroke can be obtained; Based on the stroke file with a label generated by the image corresponding to each stroke and the writing time of the image corresponding to each stroke, the result of copying the current text on the handwriting screen is identified; Generate a labeled stroke file corresponding to an image of each stroke in the imitation result, compare it with the stroke file in the standard writing file, and output the defect result generated in the imitation process according to the comparison result of the stroke file in the imitation result and the stroke file in the standard writing file; the judgment process of the defect result includes calculating the correlation between the image corresponding to each stroke in the imitation result and the stroke file in the standard writing file using: time distance, intersection distance, space distance, and space shape for each stroke; the intersection distance means that if the two strokes are exactly the same, its value is 0, if the two strokes do not intersect at all, its value is 1, and when they partially intersect, its value is between 0 and 1, and the smaller the value, the more relevant it is, and the calculation formula is: D cross =1-Point(B i ∩U j ) / Point(B i ∪U j ), where Point(x) represents the number of pixels corresponding to stroke x, B i ∩U j Indicates stroke B i and stroke U j The overlapping strokes of B i ∪U j Indicates stroke B i and stroke U j The spatial distance refers to the ratio of the distance between the center points of the two strokes to the average value of the two stroke sizes, wherein: the center point of the stroke refers to the center of gravity of the stroke, and the center calculation method of the general binary image is adopted; the stroke size refers to the maximum value of the distance between any two points in the stroke, and the maximum value is obtained after calculating the pairwise distances of all points; the spatial shape includes the aspect ratio, area ratio and pixel ratio, assuming that xi and yi are strokes B i (1≤i≤m) corresponds to the width and height of the circumscribed rectangle; xj and yj are the strokes U j (1≤j≤n) corresponds to the width and height of the circumscribed rectangle, then: The formula for calculating the aspect ratio is D size =atan(max(xi / yi,xj / yj) / min(xi / yi,xj / yj)-1); The area ratio is calculated as D area =atan(max(xi*yi,xj*yj) / min(xi*yi,xj*yj)-1); The calculation formula of pixel ratio is: D pixel =atan(max(Point(B i ),Point(U j )) / min(Point(B i ),Point(U j ))-1)。 2. The method according to claim 1, characterized in that The defect result includes at least one of no defect, wrong stroke order, connected writing, separate strokes writing, missing strokes, and extra strokes.

3. The method according to any one of claims 1-2, characterized in that: The judgment process of the defect result includes positive matching judgment and negative matching judgment; the positive matching judgment compares and analyzes the strokes in the standard writing file with the strokes in the user writing file one by one; the negative matching judgment compares and analyzes the strokes in the user writing file with the strokes in the standard writing file in the positive matching judgment one by one.

4. The method according to claim 1, characterized in that: Also includes: The writing time corresponding to a stroke file with a label generated by an image corresponding to each stroke in the imitation result is compared with the writing time corresponding to the stroke file in the standard writing file, and the fluency comparison result of the imitation process is output.

5. The method according to claim 4, characterized in that The fluency comparison result during the copying process includes at least one of the overall speed, hesitation time, and pen-moving time; the overall speed is determined based on the difference between the total time corresponding to the body time of the last stroke minus the starting time of the first stroke and the first time threshold, the hesitation time is determined based on the difference between the starting time of the current stroke minus the lifting time of the previous stroke and the second time threshold, and the pen-moving time is determined based on the difference between the lifting time of the current stroke minus the starting time of the current stroke and the third time threshold.

6. A detection device for copying on a handwriting screen, characterized in that: include: The stroke image recognition unit saves each stroke image from the first stroke on the handwriting screen to the last stroke. A stroke file generating unit generates a numbered stroke file based on an image corresponding to each stroke, and an image corresponding to each stroke is a stroke corresponding to the current writing result minus a previous image; A stroke file writing time generating unit, based on the stroke file with the number, stores the writing start time and the writing lift time, and based on the writing start time and the writing lift time, obtains the writing time of an image corresponding to each stroke; A copy result generating unit generates a stroke file with a label based on the image corresponding to each stroke and the writing time of the image corresponding to each stroke, and identifies the copy result of the current text on the handwriting screen; Generate a labeled stroke file corresponding to an image of each stroke in the imitation result, compare it with the stroke file in the standard writing file, and output the defect result generated in the imitation process according to the comparison result of the stroke file in the imitation result and the stroke file in the standard writing file; the judgment process of the defect result includes calculating the correlation between the image corresponding to each stroke in the imitation result and the stroke file in the standard writing file using: time distance, intersection distance, space distance, and space shape for each stroke; the intersection distance means that if the two strokes are exactly the same, its value is 0, if the two strokes do not intersect at all, its value is 1, and when they partially intersect, its value is between 0 and 1, and the smaller the value, the more relevant it is, and the calculation formula is: D cross =1-Point(B i ∩U j ) / Point(B i ∪U j ), where Point(x) represents the number of pixels corresponding to stroke x, B i ∩U j Indicates stroke B i and stroke U j The overlapping strokes of B i ∪U j Indicates stroke B i and stroke U j The spatial distance refers to the ratio of the distance between the center points of the two strokes to the average value of the two stroke sizes, wherein: the center point of the stroke refers to the center of gravity of the stroke, and the center calculation method of the general binary image is adopted; the stroke size refers to the maximum value of the distance between any two points in the stroke, and the maximum value is obtained after calculating the pairwise distances of all points; the spatial shape includes the aspect ratio, area ratio and pixel ratio, assuming that xi and yi are strokes B i (1≤i≤m) corresponds to the width and height of the circumscribed rectangle; xj and yj are the strokes U j (1≤j≤n) corresponds to the width and height of the circumscribed rectangle, then: The formula for calculating the aspect ratio is D size =atan(max(xi / yi,xj / yj) / min(xi / yi,xj / yj)-1); The area ratio is calculated as D area =atan(max(xi*yi,xj*yj) / min(xi*yi,xj*yj)-1); The calculation formula of pixel ratio is: D pixel =atan(max(Point(B i ),Point(U j )) / min(Point(B i ),Point(U j ))-1)。 7. An electronic device, characterized in that: include: A memory, a processor, and a computer program; wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the detection method for tracing on a handwriting screen as described in any one of claims 1-5.

8. A non-volatile computer storage medium, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement the detection method for copying on a handwriting screen as described in any one of claims 1-5.