A method, device, equipment and storage medium for evaluating the writing order of character strokes
By evaluating the writing order of primary school students' writing strokes, and using the regularization and prediction technology of trajectory point sequences, the problem of difficult to supervise and correct the wrong writing order in the existing technology is solved, and effective writing quality evaluation and correction is achieved.
Patent Information
- Application Number
- CN202210480055.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-05-05
AI Technical Summary
It is difficult for the existing technology to effectively supervise and correct the error in writing strokes of primary school students. Especially under the complex structure of Chinese characters, teachers and parents are prone to writing strokes incorrectly, resulting in misleading.
Provide a method for evaluating the order of writing strokes. By obtaining the trajectory point sequence of the user's writing text, performing regular and prediction, determining the stroke category sequence, and comparing it with the stroke category sequence of the standard text, evaluating the correctness of the stroke writing order.
This method can effectively evaluate whether the user's stroke writing order is correct, and provide specific error strokes when making mistakes, helping the user correct errors and thus improving the writing quality.
Smart Images

Figure CN114913532B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of writing quality assessment, and in particular to a method, device, equipment and storage medium for assessing the writing order of character strokes. Background Art
[0002] Writing characters (such as Chinese characters) is a basic skill that students must master. It plays an indispensable role in their daily learning and life. Many behaviors, such as taking notes, doing exercises, answering test papers, writing essays, and making blackboard newspapers, all rely on it. The new curriculum standard for primary school Chinese requires that lower-grade primary school students learn to read and write characters "master the basic strokes of Chinese characters and commonly used radicals, and be able to write with a hard pen according to the stroke order rules." This shows that in the enlightenment stage of primary school students' literacy and writing, mastering the stroke order of characters is crucial.
[0003] Writing is a skill training, which emphasizes less teaching and more practice, so more practice can form the correct stroke order writing habits. At present, teachers and parents have no practical way to supervise the writing of primary school students. It is impossible to help students correct the wrong stroke order in time by relying on the time teachers spend in class or giving the task of supervising students' writing to parents. In addition, Chinese characters themselves have a complex structure. Once many parents and teachers pick up the pen, they can easily write the stroke order wrong, which is misleading. Summary of the invention
[0004] In view of this, the present invention provides a method, device, equipment and storage medium for evaluating the stroke writing order of characters, which are used to evaluate the stroke writing order of characters written by users, thereby helping users correct incorrect stroke writing order, thereby helping users master the stroke writing order of characters. The technical solution is as follows:
[0005] A method for evaluating the writing order of character strokes, comprising:
[0006] Acquire a trajectory point sequence corresponding to the target text, and regularize the trajectory point sequence corresponding to the target text, and use the regularized trajectory point sequence as the target trajectory point sequence;
[0007] According to the target trajectory point sequence, the stroke category of each stroke of the target character is predicted in sequence according to the actual stroke writing order, so as to obtain the stroke category sequence of the target character;
[0008] According to the stroke category sequence of the target character and the stroke category sequence of the standard character corresponding to the target character, determine whether the stroke writing order of the target character is correct and the sequence error strokes when the stroke writing order is incorrect, and output the evaluation result.
[0009] Optionally, obtaining a trajectory point sequence corresponding to the target text includes:
[0010] Get the trajectory point sequence corresponding to the text written by the user;
[0011] Based on the trajectory point sequence corresponding to the user-written text, determining whether the user-written text meets the stroke writing order evaluation condition, and if so, determining the user-written text as the target text to obtain the trajectory point sequence corresponding to the target text;
[0012] Among them, the stroke writing order evaluation conditions include: the character category of the user-written text is consistent with the character category of the text required to be written by the user, and the number of strokes of the user-written text is the same as the number of strokes of the standard text corresponding to the user-written text.
[0013] Optionally, the step of regularizing the trajectory point sequence corresponding to the target text and using the regularized trajectory point sequence as the target trajectory point sequence includes:
[0014] Performing a first regularization on the trajectory point sequence corresponding to the target character, wherein the first regularization is regularization of the strokes of the target character;
[0015] The trajectory point sequence after the first regularization is subjected to a second regularization, and the trajectory point sequence after the second regularization is used as a target trajectory point sequence, wherein the second regularization is a regularization for the target character shape.
[0016] Optionally, the first regularizing of the trajectory point sequence corresponding to the target text includes:
[0017] Perform one or more of the following processing on the trajectory point sequence corresponding to the target text:
[0018] Track point processing, track point resampling, and redundant track point filtering with the goal of regularizing text size to a specified size.
[0019] Optionally, performing a second regularization on the trajectory point sequence after the first regularization includes:
[0020] The first regularized trajectory point sequence is reconstructed with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text.
[0021] Optionally, the step of reconstructing the first regularized trajectory point sequence with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text includes:
[0022] Acquire the features of each trajectory point in the first regularized trajectory point sequence and the features of each trajectory point in the standard trajectory point sequence, and acquire the global features of the standard trajectory point sequence, wherein the standard trajectory point sequence is the trajectory point sequence of the standard text corresponding to the target text;
[0023] Determine a trajectory point matching matrix according to the characteristics of each trajectory point in the first regularized trajectory point sequence and the characteristics of each trajectory point in the standard trajectory point sequence, wherein the trajectory point matching matrix can characterize the trajectory point matching situation between the first regularized trajectory point sequence and the standard trajectory point sequence;
[0024] The first regularized trajectory point sequence is reconstructed according to the trajectory point matching matrix and the global feature to obtain a trajectory point sequence whose style of corresponding text is close to the style of the standard text corresponding to the target text.
[0025] Optionally, determining a trajectory point matching matrix according to a feature of each trajectory point in the first regularized trajectory point sequence and a feature of each trajectory point in the standard trajectory point sequence includes:
[0026] Calculating the similarity between the feature of each trajectory point in the first regularized trajectory point sequence and the feature of each trajectory point in the standard trajectory point sequence to obtain a similarity matrix;
[0027] The similarity matrix is normalized, and the obtained normalized matrix is used as the trajectory point matching matrix.
[0028] Optionally, the reconstructing the first regularized trajectory point sequence according to the trajectory point matching matrix and the global feature to obtain a trajectory point sequence corresponding to a text whose style is close to a style of a standard text corresponding to the target text includes:
[0029] Transforming the first regularized trajectory point sequence using the trajectory point matching matrix to obtain a transformed trajectory point sequence;
[0030] A trajectory point sequence corresponding to a character whose style is close to a style of a standard character corresponding to the target character is determined according to the transformed trajectory point sequence and the global feature.
[0031] Optionally, determining, according to the transformed trajectory point sequence and the global feature, a trajectory point sequence corresponding to a text whose style is close to a style of a standard text corresponding to the target text comprises:
[0032] According to the number of trajectory points in the transformed trajectory point sequence, the global feature is copied to obtain multiple copies of the global feature;
[0033] splicing a global feature for each trajectory point in the transformed trajectory point sequence to obtain a trajectory point sequence spliced with the global feature;
[0034] According to the trajectory point sequence spliced with the global features, a trajectory point sequence corresponding to a character whose style is close to the style of the standard character corresponding to the target character is determined.
[0035] Optionally, the step of reconstructing the first regularized trajectory point sequence with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text includes:
[0036] Reconstructing the first regularized trajectory point sequence based on a pre-built trajectory point reconstruction model;
[0037] The trajectory point reconstruction model is trained using a training trajectory point sequence and a standard trajectory point sequence corresponding to the training trajectory point sequence. The training goal of the trajectory point reconstruction model includes making the trajectory sequence reconstructed from the training trajectory point sequence close to the standard trajectory point sequence corresponding to the training trajectory point sequence.
[0038] Optionally, predicting the stroke category of each stroke of the target character in sequence according to the target trajectory point sequence and the actual stroke writing order to obtain the stroke category sequence of the target character includes:
[0039] Acquire the features of each trajectory point in the target trajectory point sequence according to the coordinates and state of each trajectory point in the target trajectory point sequence, and obtain a trajectory point feature sequence corresponding to the target trajectory point sequence;
[0040] Encoding the trajectory point feature sequence corresponding to the target trajectory point sequence to obtain an encoded feature sequence;
[0041] The stroke category to which each stroke of the target character belongs is predicted according to the encoded feature sequence.
[0042] Optionally, acquiring the feature of each trajectory point in the target trajectory point sequence according to the coordinates and state of each trajectory point in the target trajectory point sequence includes:
[0043] For each target trajectory point to be characterized in the target trajectory point sequence:
[0044] Calculating abscissa differences and ordinate differences between relevant trajectory points and the target trajectory point to obtain abscissa differences and ordinate differences, wherein the relevant trajectory points include trajectory points that are adjacent to the target trajectory point in a backward direction and / or trajectory points that are located after the target trajectory point and are separated from the target trajectory point by one trajectory point;
[0045] According to the state of the target trajectory point and the state of the backward adjacent trajectory point of the target trajectory point, determining a value that can represent whether the states of the target trajectory point and the backward adjacent trajectory point of the target trajectory point are consistent, as a value representing whether the states are consistent;
[0046] A vector including the abscissa and ordinate of the target trajectory point, the abscissa difference, the ordinate difference and the state consistency characterization value is used as a feature of the target trajectory point.
[0047] A device for evaluating the writing order of character strokes, comprising: a trajectory point data acquisition module, a trajectory point data regularization module, a stroke category prediction module, a stroke writing order evaluation module and an evaluation result output module;
[0048] The trajectory point data acquisition module is used to acquire the trajectory point sequence corresponding to the target text;
[0049] The trajectory point data regularization module is used to regularize the trajectory point sequence corresponding to the target text, and the regularized trajectory point sequence is used as the target trajectory point sequence;
[0050] The stroke category prediction module is used to predict the stroke category of each stroke of the target character in sequence according to the target trajectory point sequence and the actual stroke writing order, so as to obtain the stroke category sequence of the target character;
[0051] The stroke writing order evaluation module is used to determine whether the stroke writing order of the target character is correct and the strokes in the wrong order when the stroke writing order is incorrect, based on the stroke category sequence of the target character and the stroke category sequence of the standard character corresponding to the target character;
[0052] The evaluation result output module is used to output the evaluation result of the stroke writing order evaluation module.
[0053] A device for evaluating the writing order of character strokes, comprising: a memory and a processor;
[0054] The memory is used to store programs;
[0055] The processor is used to execute the program to implement each step of the method for evaluating the writing order of character strokes described in any one of the above items.
[0056] A readable storage medium stores a computer program, which, when executed by a processor, implements each step of any of the above-mentioned methods for evaluating the writing order of character strokes.
[0057] The method, device, equipment and storage medium for evaluating the writing order of strokes of a character provided by the present invention first obtain a trajectory point sequence corresponding to a target character, then regularize the trajectory point sequence corresponding to the target character, use the regularized trajectory point sequence as a target trajectory point sequence, then predict the stroke category of each stroke of the target character in turn according to the actual stroke writing order based on the target trajectory point sequence, and obtain the stroke category sequence of the target character; finally, based on the stroke category sequence of the target character and the stroke category sequence of a standard character corresponding to the target character, evaluate the writing order of the strokes of the target character and output the evaluation result. The character stroke writing order evaluation method provided by the present invention can evaluate whether the stroke writing order of the target character is correct according to the trajectory point sequence corresponding to the target character, and can also give the strokes with incorrect writing order when the stroke writing order of the target character is incorrect. The evaluation result obtained by the character stroke writing order evaluation method provided by the present invention can effectively help users correct the errors in the character stroke writing order, thereby helping users master the character stroke writing order. The character stroke writing order evaluation method provided by the present invention is of great significance for cultivating users to develop correct writing habits. In addition, since the present invention evaluates the target character stroke writing order according to the trajectory point sequence of the target character, there is no constraint on the user's writing, the user can write at will, and the user experience is good. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0059] Figure 1 A schematic diagram of a hardware architecture involved in the present invention;
[0060] Figure 2 A schematic diagram of a method for evaluating the writing order of character strokes provided in an embodiment of the present invention;
[0061] Figure 3 A schematic diagram of an example of comparing a stroke category sequence of a target character with a stroke category sequence of a standard character corresponding to the target character provided by an embodiment of the present invention;
[0062] Figure 4 An example of text differences caused by different writing habits, etc., provided in an embodiment of the present invention;
[0063] Figure 5 This is an example of adjusting the size of text according to an embodiment of the present invention;
[0064] Figure 6 An example of resampling a trajectory point sequence corresponding to a text provided by an embodiment of the present invention;
[0065] Figure 7 An example of filtering out redundant points from a trajectory point sequence corresponding to a text provided by an embodiment of the present invention;
[0066] Figure 8 An example of a character with stroke layout problems provided by an embodiment of the present invention;
[0067] Fig. 9 Examples of text with component layout problems provided for embodiments of the present invention;
[0068] Fig.10 A schematic diagram of a process of reconstructing a first regularized trajectory point sequence with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text provided by an embodiment of the present invention;
[0069] Fig.11 A schematic diagram of the structure of a trajectory point reconstruction model provided by an embodiment of the present invention and a process of reconstructing a first regularized trajectory point sequence based on the trajectory point reconstruction model;
[0070] Fig.12 A schematic diagram of a process for determining a trajectory point matching matrix provided by an embodiment of the present invention;
[0071] Fig.13 A schematic diagram of an implementation process of reconstructing a trajectory point sequence according to global features of a transformed trajectory point sequence and a standard trajectory point sequence provided by an embodiment of the present invention;
[0072] Fig.14 An example of reconstructing a trajectory point sequence to obtain a trajectory point sequence corresponding to a text whose style is close to that of a standard text provided by an embodiment of the present invention;
[0073] Fig.15 A schematic diagram of a flow chart of predicting the stroke category to which each stroke of a target character belongs in sequence according to the actual stroke writing order based on a target trajectory point sequence provided by an embodiment of the present invention;
[0074] Fig.16 A schematic diagram of the structure of a stroke category prediction model provided in an embodiment of the present invention and an implementation process of stroke category prediction based on the stroke category prediction model;
[0075] Fig.17 A schematic diagram of the structure of a device for evaluating the writing order of character strokes provided by an embodiment of the present invention;
[0076] Fig.18A schematic diagram of the structure of a device for evaluating the writing order of character strokes provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0078] The applicant found in the process of realizing the present invention that there are some stroke order teaching software, such as PowerPoint Chinese character stroke order teaching software, Chinese character stroke order Flash teaching software, etc., wherein the PowerPoint Chinese character stroke order teaching software can demonstrate the stroke order of Chinese characters by slide show mode, which is intuitive and relatively easy to operate, and the Chinese character stroke order Flash teaching software provides the learning of Chinese character stroke order, word group, English interpretation and pinyin, and can display Chinese character stroke order in various forms. The applicant studied the current stroke order teaching software and found that the current stroke order teaching software mainly focuses on auxiliary teaching and demonstration, and cannot evaluate the stroke writing order of the user's written text, that is, these software cannot effectively help users master the stroke writing order of text.
[0079] In order to effectively correct the user's stroke writing order errors and help the user master the stroke writing order of the text, the applicant conducted research and finally proposed a better text stroke writing order evaluation method through continuous research. The text stroke writing order evaluation method can determine whether the stroke writing order of the text written by the user is correct, and when the stroke writing order of the text written by the user is incorrect, it can give the strokes with incorrect writing order. Before introducing the text stroke writing order evaluation method provided by the present invention, the hardware architecture involved in the present invention is first described.
[0080] In one possible implementation, Figure 1 As shown, the hardware architecture involved in the present invention may include: an electronic device 101 and a server 102 .
[0081] Exemplarily, the electronic device 101 may be any electronic product that can perform human-computer interaction with a user through one or more methods such as a touch pad, a touch screen, a handwriting device, etc., such as a mobile phone, a tablet computer, a PDA, a PAD, etc.
[0082] It should be noted that Figure 1 This is just an example. There are many types of electronic devices, not limited to Figure 1 Tablet computer in the room.
[0083] Exemplarily, the server 102 may be a single server, or a server cluster consisting of multiple servers, or a cloud computing server center. The server 102 may include a processor, a memory, a network interface, and the like.
[0084] Exemplarily, the electronic device 101 may establish a connection and communicate with the server 102 via a wireless communication network; exemplary, the electronic device 101 may establish a connection and communicate with the server 102 via a wired communication network.
[0085] The electronic device 101 can obtain the trajectory point sequence of the user's written text, and send the trajectory point sequence of the user's written text to the server 102. The server 102 evaluates the text stroke writing order according to the text stroke writing order evaluation method provided by the present invention, and sends the evaluation result to the electronic device 101.
[0086] In another possible implementation, the hardware architecture of the present invention may include: an electronic device. The electronic device is a device with strong data processing capability.
[0087] Exemplarily, the electronic device may be any electronic product that can perform human-computer interaction with a user through one or more methods such as a touch pad, a touch screen, a handwriting device, etc., for example, a mobile phone, a tablet computer, a PDA, a PAD, etc.
[0088] The electronic device obtains a trajectory point sequence of text written by a user, performs evaluation according to the text stroke writing sequence evaluation method provided by the present invention, and outputs an evaluation result.
[0089] Those skilled in the art should understand that the above-mentioned electronic devices and servers are only examples, and other existing or future electronic devices or servers that are applicable to the present invention should also be included in the protection scope of the present invention and are included here by reference.
[0090] Next, the character stroke writing order evaluation method provided by the present invention is introduced through the following embodiments.
[0091] First embodiment
[0092] See also Figure 2 , shows a schematic flow chart of a method for evaluating the writing order of character strokes provided by an embodiment of the present invention, the method may include:
[0093] Step S201: Obtain a trajectory point sequence corresponding to the target text.
[0094] The target text is the text to be evaluated, and the trajectory point sequence corresponding to the target text is the trajectory point sequence of each stroke constituting the target text. The text to be evaluated in this embodiment can be but is not limited to Chinese characters.
[0095] Specifically, the process of obtaining the trajectory point sequence corresponding to the target text may include: obtaining the trajectory point sequence corresponding to the user's written text; based on the trajectory point sequence corresponding to the user's written text, determining whether the user's written text meets the stroke writing order evaluation conditions, and if so, determining the user's written text as the target text to obtain the trajectory point sequence corresponding to the target text.
[0096] The stroke writing order evaluation conditions include: the text category of the text written by the user is consistent with the text category of the text required to be input by the user, and the number of strokes of the text written by the user is the same as the number of strokes of the standard text corresponding to the text written by the user.
[0097] It should be noted that the text written by the user is composed of a series of strokes, and each stroke is composed of a series of trajectory points. Therefore, this embodiment determines the text category of the user's written text and the number of strokes of the user's written text according to the trajectory point sequence corresponding to the user's written text, and then determines whether the text category of the user's written text is consistent with the text category of the text required to be written by the user, and whether the number of strokes of the user's written text is the same as the number of strokes of the standard text corresponding to the user's written text. If the text category of the user's written text is consistent with the text category of the text required to be written by the user, and the number of strokes of the user's written text is the same as the number of strokes of the standard text corresponding to the user's written text, the user's written text is used as the target text, and the stroke writing order of the target text is evaluated.
[0098] It should be noted that if the text written by the user does not meet the stroke writing order evaluation condition, the stroke writing order evaluation process is terminated. Optionally, an indication information that the text written by the user does not meet the stroke writing order evaluation condition can be output.
[0099] Step S202: regularizing the trajectory point sequence corresponding to the target text, and using the regularized trajectory point sequence as the target trajectory point sequence.
[0100] In order to reduce the impact of writing differences caused by writing habits, writing styles, etc. of different users on subsequent stroke category prediction, the present invention, after obtaining the trajectory point sequence of the target text, regularizes the trajectory point sequence corresponding to the target text, and uses the regularized trajectory point sequence as the target trajectory point sequence for subsequent stroke category prediction.
[0101] Specifically, the process of regularizing the trajectory point sequence corresponding to the target text may include: performing a first regularization on the trajectory point sequence corresponding to the target text, performing a second regularization on the trajectory point sequence after the first regularization, and using the trajectory point sequence after the second regularization as the target trajectory point sequence. The first regularization is regularization for the strokes of the target text, and the second regularization is regularization for the glyphs of the target text.
[0102] It should be noted that when regularizing the trajectory point sequence corresponding to the target text, only the above-mentioned first regularization can be performed on the trajectory point sequence corresponding to the target text, or only the above-mentioned second regularization can be performed on the trajectory point sequence corresponding to the target text. If only the above-mentioned first regularization is performed, the trajectory point sequence after the first regularization is used as the target trajectory point sequence, and if only the second regularization is performed, the trajectory point sequence after the second regularization is used as the target trajectory point sequence. In order to accurately predict the stroke category in the subsequent process, and thus ultimately obtain a more accurate evaluation result, the present invention preferably first performs the first regularization on the trajectory point sequence corresponding to the target text, and then performs the second regularization on the trajectory point sequence after the first regularization.
[0103] Step S203: predicting the stroke category of each stroke of the target character in sequence according to the target trajectory point sequence and the actual stroke writing order, and obtaining the stroke category sequence of the target character.
[0104] Optionally, the features of each trajectory point in the target trajectory point sequence may be obtained to obtain a trajectory point feature sequence corresponding to the target trajectory point sequence, and then the stroke category to which each stroke of the target character belongs may be predicted based on the trajectory point feature sequence corresponding to the target trajectory point sequence.
[0105] Optionally, when predicting the stroke category to which each stroke of the target text belongs based on the trajectory point feature sequence corresponding to the target trajectory point sequence, the trajectory point feature sequence corresponding to the target trajectory point sequence can be input into a pre-trained stroke category prediction model to obtain the stroke category to which each stroke of the target text belongs.
[0106] Step S204: Determine whether the stroke writing sequence of the target character is correct and the strokes in the wrong order when the stroke writing sequence is incorrect based on the stroke category sequence of the target character and the stroke category sequence of the standard character corresponding to the target character, and output the evaluation result.
[0107] Specifically, the stroke category sequence of the target text is compared one by one with the stroke category sequence of the standard text corresponding to the target text. Through the comparison, it is determined whether the stroke writing order of the target text is correct. When the stroke writing order of the target text is incorrect, the strokes with incorrect writing order are determined, and then the evaluation result is output.
[0108] Figure 3A schematic diagram shows an example of comparing the stroke category sequence of a target character with the stroke category sequence of a standard character corresponding to the target character. Through the comparison, it can be found that the stroke category sequence of the target character is inconsistent with the stroke category sequence of the standard character corresponding to the target character, that is, the writing order of the strokes of the target character is incorrect, and the wrong writing order is the first stroke and the second stroke. The first stroke should be "vertical", but the first stroke of the target character is "horizontal-bend-bend", and the second stroke should be "horizontal-bend-bend", but the second stroke of the target character is "vertical".
[0109] It should be noted that when it is determined that the stroke writing order of the target text is correct, an evaluation result indicating that the stroke writing order is correct can be output; when it is determined that the stroke writing order of the target text is incorrect, an evaluation result indicating that the stroke writing order of the target text is wrong and the strokes in the wrong order can be output.
[0110] Preferably, when it is determined that the stroke writing order of the target text is incorrect, the output evaluation result may also include the stroke category sequence of the standard text corresponding to the target text, that is, the correct stroke writing order. Outputting the correct stroke writing order enables the user to correct the writing order error more effectively.
[0111] The method for evaluating the writing order of strokes of a character provided by the embodiment of the present invention first obtains the trajectory point sequence corresponding to the target character, then regularizes the trajectory point sequence corresponding to the target character, and uses the regularized trajectory point sequence as the target trajectory point sequence. Then, according to the target trajectory point sequence, the stroke category to which each stroke of the target character belongs is predicted in turn according to the actual stroke writing order to obtain the stroke category sequence of the target character. Finally, according to the stroke category sequence of the target character and the stroke category sequence of the standard character corresponding to the target character, the stroke writing order of the target character is evaluated and the evaluation result is output. The method for evaluating the writing order of strokes of a character provided by the embodiment of the present invention can evaluate whether the writing order of the strokes of the target character is correct according to the trajectory point sequence corresponding to the target character, and can also give the strokes with incorrect writing order and the correct stroke writing order when the writing order of the strokes of the target character is incorrect. The evaluation result obtained by the method for evaluating the writing order of strokes of a character provided by the embodiment of the present invention can effectively help users correct the errors in the writing order of strokes, thereby helping users master the writing order of strokes of characters, which is of great significance for cultivating users to develop correct writing habits.
[0112] In addition, in the process of evaluating the stroke writing order of characters provided by the embodiment of the present invention, there is no need for the interactive interface to display the glyphs of the corresponding standard characters, and since the evaluation method provided by the embodiment of the present invention evaluates the stroke writing order of the target characters according to the trajectory point sequence of the target characters, there is no restriction on the user's writing. The interactive interface does not need to display the glyphs of the corresponding standard characters and the user is not forced to write according to the specified requirements, so that the evaluation method provided by the embodiment of the present invention is more in line with the requirements of character writing evaluation in the dictation scenario.
[0113] Second embodiment
[0114] The above-mentioned embodiment mentioned that when regularizing the trajectory point sequence corresponding to the target text, the trajectory point sequence corresponding to the target text can be first regularized, and then the trajectory point sequence after the first regularization can be secondly regularized. This embodiment focuses on introducing the implementation process of "performing the first regularization on the trajectory point sequence corresponding to the target text".
[0115] The Chinese characters written by users are composed of a series of strokes, and each stroke is composed of a series of trajectory points. In reality, due to various reasons, the collected characters may be different, for example, writing habits may lead to differences in the size of characters, writing speed may lead to differences in the density of trajectory points, writing style may lead to differences in the curvature of strokes, etc. Figure 4 shown.
[0116] In order to reduce the interference of the above-mentioned differences on subsequent stroke category prediction, the present invention performs a first regularization on the trajectory point sequence corresponding to the target text. Specifically, the trajectory point sequence corresponding to the target text is subjected to one or more of the following processing: trajectory point processing with the goal of regularizing the text size to a specified size, trajectory point resampling, and redundant trajectory point filtering.
[0117] Among them, the trajectory point processing with the goal of regularizing the text size to a specified size refers to scaling the trajectory composed of the trajectory point sequence to be processed to pixels of a specified size according to the aspect ratio of the whole word, for example, 96×96 pixels (whichever of the word length or width reaches 96 pixels first. In principle, the text size can be scaled to any size, but it is generally recommended that 64 to 200 pixels are sufficient. The use of 96 pixels takes into account the balance between computing efficiency and recognition accuracy). Figure 5 The left picture shows the text before size regularization, and the right picture shows the text after size regularization.
[0118] Since the user's pen speed changes during the writing process, the track points will be piled up in places where the pen speed is slow, which is redundant, while the track points are very sparse in places where the pen speed is fast. In order to eliminate the influence of the writing speed on the arrangement of the track points, the present invention resamples the track point sequence. Optionally, the track point sequence to be sampled can be sampled at equal intervals, for example, interpolation is performed every 5 pixels, so that a track point sequence with uniform and equal intervals can be obtained. Figure 6 Examples of trajectory point sequences before resampling and trajectory point sequences after resampling are shown.
[0119] Considering that the trajectory point sequence may be redundant, in order to reduce the subsequent amount of calculation, the present invention simplifies the trajectory point sequence, that is, filters out the redundant trajectory points. It can be understood that the key to filtering out the redundant trajectory points is to determine the redundant trajectory points from the trajectory point sequence.
[0120] The present invention adopts the following strategy to determine redundant trajectory points from the trajectory point sequence of the redundant trajectory points to be determined: for the t-th trajectory point in the trajectory point sequence of the redundant trajectory points to be determined, if the distance between the trajectory point and the t-1-th trajectory point is less than a preset distance threshold T dis , or the angle between the trajectory point and the t-1th trajectory point is less than the preset angle threshold T ang , then the track point is determined to be a redundant track point. It should be noted that the distance between the t-th track point and the t-1-th track point is less than the preset distance threshold T dis , indicating that the distance between the t-th trajectory point and the t-1-th trajectory point is very small, and the t-th trajectory point can be determined to be a redundant trajectory point. The angle between the t-th trajectory point and the t-1-th trajectory point is less than the preset angle threshold T ang , indicating that the t-th trajectory point and the t-1-th trajectory point are almost on a straight line, and the t-th trajectory point can be determined to be a redundant trajectory point.
[0121] The distance between the t-th trajectory point and the t-1-th trajectory point is dis t It can be determined by the following formula:
[0122] dis t =Δx 2 +Δy 2 (1)
[0123] Wherein, Δx is the difference between the horizontal coordinates of the t-th trajectory point and the t-1-th trajectory point, and Δy is the difference between the vertical coordinates of the t-th trajectory point and the t-1-th trajectory point.
[0124] The angle ang between the t-th trajectory point and the t-1-th trajectory point t It can be determined by the following formula:
[0125]
[0126] Among them, Δx t-1 is the difference in the abscissa between the (t - 1)-th trajectory point and the t-th trajectory point, and Δy t-1 is the difference in the ordinate between the (t - 1)-th trajectory point and the t-th trajectory point, and Δx t is the difference in the abscissa between the t-th trajectory point and the (t - 1)-th trajectory point, and Δy t is the difference in the ordinate between the t-th trajectory point and the (t - 1)-th trajectory point.
[0127] For the t-th trajectory point, if dis t < T dis or ang t < T ang , then it is determined that the t-th trajectory point is a redundant trajectory point and it is filtered out. Figure 7 Shows an example of the trajectory point sequence before redundant point filtering and the trajectory point sequence after redundant point filtering.
[0128] The third embodiment
[0129] This embodiment introduces the implementation process of "performing a second regularization on the first regularized trajectory point sequence".
[0130] It should be noted that due to the different writing styles of each user, compared with standard characters, the characters written by users have relatively large differences in glyphs. Especially for primary school students whose writing styles are not yet fixed and are in the stage of learning to write, it is even more difficult to control the writing quality.
[0131] The glyphs of characters are generally described in terms of stroke layout and component layout. Common problems in stroke layout include: inappropriate length of a certain stroke, that is, the length of a certain stroke is too long or too short. For example, the first stroke of the character "土" is written too long, as shown in Figure 8 (a); inappropriate relative position of a certain stroke with respect to other strokes. For example, the position of the second stroke of the character "洁" is inappropriate, as shown in Figure 8 (b); incorrect intersection of a certain stroke with other strokes. For example, there is an intersection point between the two strokes of the character "入", as shown in Figure 8 (c). Common problems in component layout include: imbalance in the shape of a certain component (such as aspect ratio). For example, the left component of the character "村" is too wide and the right component is written too narrow, resulting in an uncoordinated shape, as shown in Fig. 9 (a); inappropriate relative position of a certain component with respect to other components. For example, the position of the right component of the character "把" is too high, as shown in Fig. 9 (b).
[0132] In view of the fact that the target text may have the above-mentioned stroke layout and / or component layout problems, in order to reduce the impact of these problems on subsequent stroke category prediction, the present invention proposes to perform a second regularization on the trajectory point sequence after the first regularization to achieve regularization of the target text glyph.
[0133] The process of performing a second regularization on the trajectory point sequence after the first regularization may include: reconstructing the trajectory point sequence after the first regularization with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text, so that the style of the text corresponding to the reconstructed trajectory point sequence is close to the style of the standard text corresponding to the target text.
[0134] See also Fig.10 , showing a schematic flow chart of reconstructing the first regularized trajectory point sequence with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text, which may include:
[0135] Step S1001: Acquire the features of each trajectory point in the first regularized trajectory point sequence and the features of each trajectory point in the standard trajectory point sequence, and acquire the global features of the standard trajectory point sequence.
[0136] The standard trajectory point sequence is a trajectory point sequence of a standard text corresponding to the target text.
[0137] The global features of the standard trajectory point sequence are determined by the features of each trajectory point in the standard trajectory point sequence.
[0138] Step S1002: determining a trajectory point matching matrix according to the features of each trajectory point in the first regularized trajectory point sequence and the features of each trajectory point in the standard trajectory point sequence.
[0139] The trajectory point matching matrix can characterize the trajectory point matching between the first regularized trajectory point sequence and the standard trajectory point sequence.
[0140] Specifically, according to the features of each trajectory point in the first regularized trajectory point sequence and the features of each trajectory point in the standard trajectory point sequence, the process of determining the trajectory point matching matrix may include:
[0141] Step S1002-1: Calculate the similarity between the feature of each trajectory point in the first regularized trajectory point sequence and the feature of each trajectory point in the standard trajectory point sequence to obtain a similarity matrix.
[0142] Step S1002-2: normalize the similarity matrix, and use the normalized matrix as the trajectory point matching matrix.
[0143] Step S1003: reconstructing the first regularized trajectory point sequence according to the trajectory point matching matrix and the global features of the standard trajectory point sequence to obtain a trajectory point sequence corresponding to a text whose style is close to the style of the standard text corresponding to the target text.
[0144] Specifically, the process of reconstructing the first regularized trajectory point sequence according to the global features of the matching matrix and the standard trajectory point sequence to obtain a trajectory point sequence whose style of the corresponding text is close to the style of the standard text corresponding to the target text may include:
[0145] Step S1003 - 1 : transform the first regularized trajectory point sequence using a trajectory point matching matrix to obtain a transformed trajectory point sequence.
[0146] Step S1003 - 2 : Determine a trajectory point sequence corresponding to a character whose style is close to the style of the standard character corresponding to the target character according to the global features of the transformed trajectory point sequence and the standard trajectory point sequence.
[0147] Specifically, the process of determining a trajectory point sequence whose style is close to the style of the standard text corresponding to the target text based on the global features of the transformed trajectory point sequence and the standard trajectory point sequence may include: copying the global features of the standard trajectory point sequence according to the number of trajectory points in the transformed trajectory point sequence to obtain multiple copies of the global features; splicing one global feature for each trajectory point in the transformed trajectory point sequence to obtain a trajectory point sequence spliced with the global features; and determining a trajectory point sequence whose style is close to the style of the standard text corresponding to the target text based on the trajectory point sequence spliced with the global features.
[0148] The trajectory point sequence whose style of the corresponding text is close to the style of the standard text corresponding to the target text is the reconstructed trajectory point sequence.
[0149] Optionally, the first regularized trajectory point sequence may be reconstructed based on a pre-built trajectory point reconstruction model to obtain a trajectory point sequence corresponding to a text style close to the style of a standard text corresponding to the target text. The trajectory point reconstruction model is trained using a training trajectory point sequence and a standard trajectory point sequence corresponding to the training trajectory point sequence.
[0150] Specifically, based on the trajectory point reconstruction model, the process of reconstructing the first regularized trajectory point sequence includes: inputting the first regularized trajectory point sequence and the standard trajectory point sequence into the trajectory point reconstruction model to obtain a trajectory point sequence reconstructed by the trajectory point reconstruction model. The trajectory point reconstruction model reconstructs the first regularized trajectory point sequence according to the process of steps S1001 to S1003.
[0151] Optional, such as Fig.11As shown, the trajectory point reconstruction model may include: a feature encoding module 1101 , a trajectory point matching matrix determination module 1102 and a trajectory point reconstruction module 1103 .
[0152] If the standard trajectory point sequence is represented as A = {a1, a2, a3, ..., aN}, and the first regularized trajectory point sequence is represented as B = {b1, b2, b3, ..., bN}, then the first regularized trajectory point sequence B and the standard trajectory point sequence A are input Fig.11 The process of obtaining the trajectory point sequence reconstructed by the trajectory point reconstruction model may include:
[0153] Step a1: input the first regularized trajectory point sequence B and the standard trajectory point sequence A into the feature encoding module 1101 of the trajectory point reconstruction model, and obtain the feature {f b1 ,f b2 ,f b2 ,…,f bN}、The characteristics of each trajectory point in the standard trajectory point sequence A{f a1 ,f a2 ,f a2 ,…,f aN} and the global feature V of the standard trajectory point sequence A a .
[0154] When the first regularized trajectory point sequence B and the standard trajectory point sequence A are input into the feature encoding module 1101, as shown in FIG. Fig.11 As shown, the corresponding text category information can be spliced after each track point in the first regularized track point sequence B. Similarly, the text category information can be spliced after each track point in the standard track point sequence A. The two track point sequences spliced with text category information are input into the feature encoding module 1101 for encoding.
[0155] like Fig.11 As shown, the feature encoding module 1101 obtains the feature {f b1 ,f b2 ,f b2 ,…,f bN} and the features of each trajectory point in the standard trajectory point sequence A {f a1 ,f a2 ,f a2 ,…,f aN}, and according to the characteristics of each trajectory point in the standard trajectory point sequence A {f a1 ,f a2 ,f a2 ,…,f aN}Get the global feature V of the standard trajectory point sequence Aa .
[0156] Optionally, the feature encoding module 1101 may include a dynamic graph convolutional network (DGCNN) and a pooling layer, through which the feature {f b1 ,f b2 ,f b2 ,…,f bN} and the feature {f a1 ,f a2 ,f a2 ,…,f aN}, through the pooling layer, the features of each trajectory point in the standard trajectory point sequence A {f a1 ,f a2 ,f a2 ,…,f aN} Perform the maximum pooling operation to obtain the global feature V of the standard trajectory point sequence A a .
[0157] Step a2: The feature {f b1 ,f b2 ,f b2 ,…,f bN} and the features of each trajectory point in the standard trajectory point sequence A {f a1 ,f a2 ,f a2 ,…,f aN} Input the trajectory point matching matrix determination module 1102 of the trajectory point reconstruction model to obtain the trajectory point matching matrix P output by the trajectory point matching matrix determination module 1102.
[0158] Specifically, Fig.12 As shown, the trajectory point matching matrix determination module 1102 first determines the similarity between the feature of each trajectory point in the first regularized trajectory point sequence B and the feature of each trajectory point in the standard trajectory point sequence A to obtain a similarity matrix Then the similarity matrix Normalize and obtain the normalized matrix as the trajectory point matching matrix P.
[0159] Optional, similarity matrix Each element in (i.e., the feature f of the i-th trajectory point in the standard trajectory point sequence A ai and the feature f of the jth trajectory point in the first regularized trajectory point sequence B bj The similarity of can be calculated as shown in the following formula:
[0160]
[0161] In obtaining the similarity matrix After that, the similarity matrix can be normalized using an existing normalization algorithm (such as the DeSmooth algorithm). Normalize to get the final trajectory point matching matrix P. It should be noted that if the element p in the trajectory point matching matrix P ij =1, it means that the i-th trajectory point in the standard trajectory point sequence A and the j-th trajectory point in the first regularized trajectory point sequence B are a matching trajectory point pair.
[0162] Step a3: The first regularized trajectory point sequence B, the trajectory point matching matrix P and the global feature V of the standard trajectory point sequence A are a Input the trajectory point reconstruction module 1103 of the trajectory point reconstruction model, and obtain the trajectory point sequence of the corresponding text output by the trajectory point reconstruction module 1103, the style of which is close to the style of the standard text corresponding to the target text
[0163] The trajectory point reconstruction module 1103 first transforms the first regularized trajectory point sequence B using the trajectory point matching matrix P to obtain a transformed trajectory point sequence Then according to the transformed trajectory point sequence and the global feature V of the standard trajectory point sequence A a Determine a trajectory point sequence whose style of the corresponding text is close to the style of the standard text corresponding to the target text
[0164] Specifically, the first regularized trajectory point sequence B can be transformed based on the following formula to obtain a transformed trajectory point sequence:
[0165]
[0166] After obtaining the transformed trajectory point sequence Afterwards, according to The global feature V of the standard trajectory point sequence A a , reconstruct the trajectory point sequence whose style of the corresponding text is close to the style of the standard text corresponding to the target text
[0167] The trajectory point reconstruction module 1103 is based on The global feature V of the standard trajectory point sequence A a Reconstruct trajectory point sequence When Fig.13 As shown, first according to The number of trajectory points, the global feature V of the standard trajectory point sequence A a Copy to get multiple copies of the global feature Va , then Each trajectory point is spliced with a global feature V a , and the splicing has global features V a The trajectory point sequence is finally concatenated with global features V based on the forward neural network MLP. a The trajectory point sequence is processed to obtain a trajectory point sequence whose style of the corresponding text is close to the style of the standard text corresponding to the target text. Fig.14 An example of reconstructing a trajectory sequence to obtain a trajectory point sequence corresponding to text whose style is close to that of standard text is shown.
[0168] As mentioned above, the trajectory point reconstruction model is trained using the training trajectory point sequence and the standard trajectory point sequence corresponding to the training trajectory point sequence. Next, the training process of the trajectory point reconstruction model is introduced.
[0169] The training process of the trajectory point reconstruction model may include:
[0170] Step b1, based on the feature encoding module of the trajectory point reconstruction model, obtain the features of each trajectory point in the training trajectory point sequence and the features of each trajectory point in the standard trajectory point sequence corresponding to the training trajectory point sequence, and obtain the global features of the standard trajectory point sequence corresponding to the training trajectory point sequence.
[0171] Among them, the standard trajectory point sequence corresponding to the training trajectory point sequence is the trajectory point sequence corresponding to the standard text corresponding to the training text, the training text is the text corresponding to the training trajectory point sequence, and the text corresponding to the training trajectory point sequence is a text sample written by the user.
[0172] Specifically, the training trajectory point sequence and the standard trajectory point sequence corresponding to the training trajectory point sequence are input into the feature encoding module of the trajectory point reconstruction model to obtain the features of each trajectory point in the training trajectory point sequence, the features of each trajectory point in the standard trajectory point sequence corresponding to the training trajectory point sequence, and the global features of the standard trajectory point sequence corresponding to the training trajectory point sequence.
[0173] Step b2, determining a trajectory point matching matrix based on a trajectory point matching matrix determination module of a trajectory point reconstruction model, features of each trajectory point in a training trajectory point sequence, and features of each trajectory point in a standard trajectory point sequence corresponding to the training trajectory point sequence.
[0174] The trajectory point matching matrix obtained in step a2 can characterize the trajectory point matching between the training trajectory point sequence and the standard trajectory point sequence corresponding to the training trajectory point sequence.
[0175] Specifically, the features of each trajectory point in the training trajectory point sequence and the features of each trajectory point in the standard trajectory point sequence corresponding to the training trajectory point sequence are input into the trajectory point matching matrix determination module of the trajectory point reconstruction model to obtain the trajectory point matching matrix output by the trajectory point matching matrix determination module.
[0176] Step b3: based on the trajectory point reconstruction module of the trajectory point reconstruction model, the trajectory point matching matrix, and the global features of the standard trajectory point sequence corresponding to the training trajectory point sequence, the training trajectory point sequence is reconstructed to obtain a reconstructed trajectory point sequence corresponding to the training trajectory point sequence.
[0177] Specifically, the global features of the training trajectory point sequence, the trajectory point matching matrix and the standard trajectory point sequence corresponding to the training trajectory point sequence are input into the trajectory point reconstruction module of the trajectory point reconstruction model to obtain the reconstructed trajectory point sequence corresponding to the training trajectory point sequence output by the trajectory point reconstruction module.
[0178] For more specific implementation processes of steps b1 to b3, reference may be made to the specific implementation processes of steps a1 to a3, which will not be described in detail in this embodiment.
[0179] Step b4, determine the first prediction loss according to the reconstructed trajectory point sequence corresponding to the training trajectory point sequence and the standard trajectory point sequence corresponding to the training trajectory point sequence, determine the second prediction loss according to the trajectory point matching matrix and the permutation matrix, and determine the third prediction loss according to the training trajectory point sequence and the trajectory point matching matrix.
[0180] Among them, the first prediction loss can be calculated by the following formula:
[0181]
[0182] A′ in the above formula represents the standard trajectory point sequence corresponding to the training trajectory point sequence. It indicates the reconstructed trajectory point sequence corresponding to the training trajectory point sequence B′. It should be noted that the function of the first prediction loss is to make the reconstructed trajectory point sequence corresponding to the training trajectory point sequence and the standard trajectory point sequence corresponding to the training trajectory point sequence as close as possible.
[0183] Among them, the second prediction loss can be calculated by the following formula:
[0184]
[0185] P′ in the above formula represents the trajectory point matching matrix obtained in step b2, I n It should be noted that the role of the second prediction loss is to make the matching matrix P a permutation matrix as much as possible.
[0186] Among them, the third prediction loss can be calculated by the following formula:
[0187]
[0188] In the above formula, p′ i is the i-th row in the trajectory point matching matrix P′, a i is a trajectory point in the training trajectory point sequence, is a i It should be noted that the role of the third prediction loss is to ensure that the neighboring points of a certain trajectory point in the training trajectory point sequence still maintain a neighboring relationship after reordering (i.e., transformation).
[0189] Step b5: fuse the first prediction loss, the second prediction loss and the third prediction loss, and update the parameters of the trajectory point reconstruction model according to the fused losses.
[0190] There are many ways to fuse the first prediction loss, the second prediction loss, and the third prediction loss. In one possible implementation, the first prediction loss, the second prediction loss, and the third prediction loss may be directly summed, and the loss after the direct summation is the fusion loss. In another possible implementation, the first prediction loss, the second prediction loss, and the third prediction loss may be weighted and summed as shown in the following formula, and the loss after the weighted summation is the fusion loss:
[0191]
[0192] in, is the loss after fusion, λ1 is L perm The weight of (P′), λ2 is L mfd The weight of (P′), The weight of is 1, and λ1 and λ2 can be set according to the specific situation.
[0193] Use different training data to perform multiple trainings according to the process of steps b1 to b5 above until the training end condition is met. The model obtained after the training is completed is the constructed trajectory point reconstruction model.
[0194] Fourth embodiment
[0195] This embodiment introduces the implementation process of "Step S203: predicting the stroke category of each stroke of the target character in sequence according to the target trajectory point sequence and the actual stroke writing order to obtain the stroke category sequence of the target character" in the above embodiment.
[0196] See also Fig.15 , shows a schematic flow chart of predicting the stroke category to which each stroke of a target character belongs in sequence according to the actual stroke writing order based on the target trajectory point sequence, which may include:
[0197] Step S1501: Acquire the features of each trajectory point in the target trajectory point sequence according to the coordinates and state of each trajectory point in the target trajectory point sequence, and obtain a trajectory point feature sequence corresponding to the target trajectory point sequence.
[0198] Specifically, according to the coordinates and state of each trajectory point in the target trajectory point sequence, the process of acquiring the feature of each trajectory point in the target trajectory point sequence may include:
[0199] Step S1501 - 1 : for each target trajectory point whose features are to be acquired in the target trajectory point sequence, calculate the abscissa difference and ordinate difference between the relevant trajectory point and the target trajectory point to obtain the abscissa difference value and the ordinate difference value.
[0200] The related trajectory point may include a trajectory point that is adjacent to the target trajectory point in the backward direction, and / or a trajectory point that is located after the target trajectory point and is separated from the target trajectory point by one trajectory point.
[0201] In order to obtain accurate prediction results, the relevant trajectory points preferably include the backward adjacent trajectory points of the target trajectory point, and the trajectory points located after the target trajectory point and separated from the target trajectory point by one trajectory point. i ,y i ), then the coordinates of the relevant trajectory points can be expressed as (x i+1 ,y i+1 ) and (x i+2 ,y i+2 ).
[0202] Step S1501-2: According to the state of the target trajectory point and the state of the backward adjacent trajectory point of the target trajectory point, determine a value that can represent whether the states of the target trajectory point and the backward adjacent trajectory point of the target trajectory point are consistent, as a value representing whether the states are consistent.
[0203] Optionally, if the states of the target trajectory point and the target trajectory point's rearward adjacent trajectory point are consistent, the state consistency representation value is "1", and if the states of the target trajectory point and the target trajectory point's rearward adjacent trajectory point are inconsistent, the state consistency representation value is "0".
[0204] Step S1501-3: taking a vector including the abscissa and ordinate of the target trajectory point, the abscissa difference, the ordinate difference and the value representing whether the state is consistent or not as a feature of the target trajectory point.
[0205] If the relevant trajectory points include the backward adjacent trajectory points of the target trajectory point, and the trajectory points that are located after the target trajectory point and are separated from the target trajectory point by one trajectory point, the features of the features of the target trajectory point can be expressed as:
[0206] f = [xi ,y r ,Δx i ,Δy i ,Δx′ i ,Δy′ i ,δ(s t =s i+1 ),δ(s i ≠s t+1 )]
[0207] Where Δx i =x i+1 -x i , Δy i =y i+1 -y i , Δx′ i =x i+2 -x i , Δy′ i =y i+2 -y i ,s i Indicates the state of the target trajectory point, s i+1 represents the state of the backward adjacent trajectory point of the target trajectory point, δ(s i =s i+1 ) and δ(s i ≠s i+1 ) is the value representing whether the state is consistent or not, if s i =s i+1 , then δ(s i =s i+1 )=1,δ(s i ≠s i+1 )=0, which means lifting the pen. If s i ≠s i+1 , then δ(s i =s i+1 )=0,δ(s i ≠s i+1 )=1, which means the pen is put down.
[0208] Step S1502: Encode the trajectory point feature sequence corresponding to the target trajectory point sequence to obtain an encoded feature sequence.
[0209] Step S1503: predicting the stroke category to which each stroke of the target character belongs based on the encoded feature sequence.
[0210] In one possible implementation, the stroke category to which each stroke of the target character belongs can be predicted based on a pre-constructed stroke category prediction model. Specifically, the trajectory point feature sequence corresponding to the target trajectory point sequence is input into the stroke category prediction model to obtain the probability that the stroke category of each stroke of the target character is each set stroke category, and the stroke category of each stroke of the target character is determined according to the probability that the stroke category of each stroke of the target character is each set stroke category.
[0211] Among them, the stroke category prediction model is trained using the training trajectory point sequence and the stroke category sequence corresponding to the training trajectory point sequence. The training goal of the stroke category prediction model is to make the stroke category sequence predicted according to the training trajectory point sequence and the stroke category sequence corresponding to the training trajectory point sequence tend to be consistent.
[0212] Optional, such as Fig.16 As shown, the stroke category prediction model may include an encoding module and a decoding module. The trajectory point feature sequence corresponding to the target trajectory point sequence is input into the stroke category prediction model, and the process of obtaining the probability that the stroke category of each stroke of the target character is each set stroke category includes:
[0213] Step b1: input the trajectory point feature sequence corresponding to the target trajectory point sequence into the encoding module of the stroke category prediction model for encoding to obtain the encoded feature sequence.
[0214] If the trajectory point feature sequence corresponding to the target trajectory point sequence is expressed as F = [f1, f2, ..., f N ], then F=[f1,f2,…,f N ] is input into the encoding module, the encoding module outputs H = [h1, h2, ..., h N ].
[0215] Optionally, the encoding module can use a 5-layer stacked bidirectional gated recurrent neural network (GRU), and the bidirectional GRU output state h at each moment t The calculation process is as follows:
[0216]
[0217]
[0218]
[0219] All time h t Together they constitute the encoded feature sequence H.
[0220] Step b2: input the encoded feature sequence into a decoding module to obtain the probability that the stroke category of each stroke of the target character output by the decoding module is each set stroke category.
[0221] Exemplarily, if the target text is a Chinese character, the stroke categories to be set may include the 32 stroke categories in the following table.
[0222] Table 1 Stroke categories
[0223]
[0224]
[0225] Optionally, the decoding module can use two unidirectional gated recurrent neural networks (GRUs), and the GRU hidden layer state s at each moment t The calculation process is as follows:
[0226]
[0227]
[0228]
[0229] The stroke category probability y at time t t By context feature variable c t , the hidden state s of the gated recurrent neural network t and the stroke category y output at the previous moment t-1 Calculated together:
[0230] p(y t |y t-1 , H)=softmax(W o (Ey t-1 +W s s t + W cc t )) (15)
[0231] Among them, W o , W s , W c and E are both optimizable network parameters.
[0232] The output of the encoding module is H = [h1, h2, ..., h N ]After inputting the decoding module, the decoding module will output Y=[y1, y2, ...y t , …, y L ],y t represents the probability that the stroke category of the t-th stroke is each set stroke category, y t ∈R K , that is, y t =[y t1 ,y t2 ,......,y tK], K represents the number of stroke categories set. If the target text is Chinese characters, K=32, and L represents the number of strokes of the target text.
[0233] After obtaining Y = [y1, y2, ...y t , …, y L ], we can calculate Y=[y1, y2, …y t , …, y L ] Perform argmax operation, for y t For y t Perform argmax operation, that is, convert y t The maximum value in is 1, and the other values are 0, resulting in a value similar to g t =[0, 0, 1, 0, , ..., 0,], i.e., a one-hot vector, g t Each dimension in g corresponds to a set stroke category. t The stroke category corresponding to "1" in is determined as the stroke category of the tth stroke.
[0234] Fifth embodiment
[0235] An embodiment of the present invention further provides a character stroke writing order evaluation device. The character stroke writing order evaluation device provided by the embodiment of the present invention is described below. The character stroke writing order evaluation device described below and the character stroke writing order evaluation method described above can refer to each other.
[0236] See also Fig.17 , showing a schematic diagram of the structure of a device for evaluating the writing order of strokes of a character provided in an embodiment of the present invention, which may include: a trajectory point data acquisition module 1701, a trajectory point data regularization module 1061, a stroke category prediction module 1703, a stroke writing order evaluation module 1704 and an evaluation result output module 1705.
[0237] The track point data acquisition module 1701 is used to acquire the track point sequence corresponding to the target text;
[0238] A trajectory point data regularization module 1702 is used to regularize the trajectory point sequence corresponding to the target text, and the regularized trajectory point sequence is used as the target trajectory point sequence;
[0239] A stroke category prediction module 1703 is used to predict the stroke category of each stroke of the target character in sequence according to the target trajectory point sequence and the actual stroke writing order, so as to obtain the stroke category sequence of the target character;
[0240] A stroke writing order evaluation module 1704 is used to determine whether the stroke writing order of the target character is correct and the strokes in the wrong order when the stroke writing order is incorrect, based on the stroke category sequence of the target character and the stroke category sequence of the standard character corresponding to the target character;
[0241] The evaluation result output module 1705 is used to output the evaluation result of the stroke writing order evaluation module.
[0242] Optionally, the trajectory point data acquisition module 1701, when acquiring the trajectory point sequence corresponding to the target text, is specifically used to:
[0243] Get the trajectory point sequence corresponding to the text written by the user;
[0244] Based on the trajectory point sequence corresponding to the user-written text, determining whether the user-written text meets the stroke writing order evaluation condition, and if so, determining the user-written text as the target text to obtain the trajectory point sequence corresponding to the target text;
[0245] Among them, the stroke writing order evaluation conditions include: the character category of the user-written text is consistent with the character category of the text required to be written by the user, and the number of strokes of the user-written text is the same as the number of strokes of the standard text corresponding to the user-written text.
[0246] Optionally, the trajectory point data regularization module 1702 may include: a first regularization module and a second regularization module.
[0247] A first regularization module, configured to perform a first regularization on the trajectory point sequence corresponding to the target character, wherein the first regularization is a regularization of the strokes of the target character;
[0248] The second regularization module is used to perform a second regularization on the trajectory point sequence after the first regularization, and the trajectory point sequence after the second regularization is used as the target trajectory point sequence, wherein the second regularization is a regularization for the target character shape.
[0249] Optionally, when the first regularization module performs the first regularization on the trajectory point sequence corresponding to the target text, it is specifically used to:
[0250] Perform one or more of the following processing on the trajectory point sequence corresponding to the target text:
[0251] Track point processing, track point resampling, and redundant track point filtering with the goal of regularizing text size to a specified size.
[0252] Optionally, when the second regularization module performs the second regularization on the trajectory point sequence after the first regularization, it is specifically used to:
[0253] The first regularized trajectory point sequence is reconstructed with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text.
[0254] Optionally, when the second regularization module reconstructs the first regularized trajectory point sequence with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text, it is specifically used to:
[0255] Acquire the features of each trajectory point in the first regularized trajectory point sequence and the features of each trajectory point in the standard trajectory point sequence, and acquire the global features of the standard trajectory point sequence, wherein the standard trajectory point sequence is the trajectory point sequence of the standard text corresponding to the target text;
[0256] Determine a trajectory point matching matrix according to the characteristics of each trajectory point in the first regularized trajectory point sequence and the characteristics of each trajectory point in the standard trajectory point sequence, wherein the trajectory point matching matrix can characterize the trajectory point matching situation between the first regularized trajectory point sequence and the standard trajectory point sequence;
[0257] The first regularized trajectory point sequence is reconstructed according to the trajectory point matching matrix and the global feature to obtain a trajectory point sequence whose style of corresponding text is close to the style of the standard text corresponding to the target text.
[0258] Optionally, when the second regularization module determines the trajectory point matching matrix according to the feature of each trajectory point in the first regularized trajectory point sequence and the feature of each trajectory point in the standard trajectory point sequence, it is specifically used to:
[0259] Calculating the similarity between the feature of each trajectory point in the first regularized trajectory point sequence and the feature of each trajectory point in the standard trajectory point sequence to obtain a similarity matrix;
[0260] The similarity matrix is normalized, and the obtained normalized matrix is used as the trajectory point matching matrix.
[0261] Optionally, when the second regularization module reconstructs the first regularized trajectory point sequence according to the trajectory point matching matrix and the global feature to obtain a trajectory point sequence whose style of the corresponding text is close to the style of the standard text corresponding to the target text, it is specifically used to:
[0262] Transforming the first regularized trajectory point sequence using the trajectory point matching matrix to obtain a transformed trajectory point sequence;
[0263] A trajectory point sequence corresponding to a character whose style is close to a style of a standard character corresponding to the target character is determined according to the transformed trajectory point sequence and the global feature.
[0264] Optionally, when the second regularization module determines, based on the transformed trajectory point sequence and the global feature, a trajectory point sequence whose style of the corresponding text is close to the style of the standard text corresponding to the target text, it is specifically configured to:
[0265] According to the number of trajectory points in the transformed trajectory point sequence, the global feature is copied to obtain multiple copies of the global feature;
[0266] splicing a global feature for each trajectory point in the transformed trajectory point sequence to obtain a trajectory point sequence spliced with the global feature;
[0267] According to the trajectory point sequence spliced with the global features, a trajectory point sequence corresponding to a character whose style is close to the style of the standard character corresponding to the target character is determined.
[0268] Optionally, when the second regularization module reconstructs the first regularized trajectory point sequence with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text, it is specifically used to:
[0269] Reconstructing the first regularized trajectory point sequence based on a pre-built trajectory point reconstruction model;
[0270] The trajectory point reconstruction model is trained using a training trajectory point sequence and a standard trajectory point sequence corresponding to the training trajectory point sequence. The training goal of the trajectory point reconstruction model includes making the trajectory sequence reconstructed from the training trajectory point sequence close to the standard trajectory point sequence corresponding to the training trajectory point sequence.
[0271] Optionally, when the stroke category prediction module 1703 predicts the stroke category to which each stroke of the target character belongs in sequence according to the target trajectory point sequence and the actual stroke writing order to obtain the stroke category sequence of the target character, it is specifically used to:
[0272] Acquire the features of each trajectory point in the target trajectory point sequence according to the coordinates and state of each trajectory point in the target trajectory point sequence, and obtain a trajectory point feature sequence corresponding to the target trajectory point sequence;
[0273] Encoding the trajectory point feature sequence corresponding to the target trajectory point sequence to obtain an encoded feature sequence;
[0274] The stroke category to which each stroke of the target character belongs is predicted according to the encoded feature sequence.
[0275] Optionally, when the stroke category prediction module 1703 obtains the feature of each trajectory point in the target trajectory point sequence according to the coordinates and state of each trajectory point in the target trajectory point sequence, it is specifically used to:
[0276] For each target trajectory point to be characterized in the target trajectory point sequence:
[0277] Calculating abscissa differences and ordinate differences between relevant trajectory points and the target trajectory point to obtain abscissa differences and ordinate differences, wherein the relevant trajectory points include trajectory points that are adjacent to the target trajectory point in a backward direction and / or trajectory points that are located after the target trajectory point and are separated from the target trajectory point by one trajectory point;
[0278] According to the state of the target trajectory point and the state of the backward adjacent trajectory point of the target trajectory point, determining a value that can represent whether the states of the target trajectory point and the backward adjacent trajectory point of the target trajectory point are consistent, as a value representing whether the states are consistent;
[0279] A vector including the abscissa and ordinate of the target trajectory point, the abscissa difference, the ordinate difference and the state consistency characterization value is used as a feature of the target trajectory point.
[0280] The character stroke writing order evaluation device provided by the embodiment of the present invention can evaluate whether the stroke writing order of the target character is correct according to the trajectory point sequence corresponding to the target character, and can also give the strokes with incorrect writing order and the correct stroke writing order when the stroke writing order of the target character is incorrect. The evaluation result obtained by the character stroke writing order evaluation method provided by the embodiment of the present invention can effectively help users correct the stroke writing order errors, thereby helping users master the stroke writing order of the character, which is of great significance for cultivating users to develop correct writing habits. In addition, in the process of evaluating the character stroke writing order evaluation device provided by the embodiment of the present invention, there is no need for the interactive interface to display the font of the corresponding standard character, and because the evaluation method provided by the embodiment of the present invention evaluates the stroke writing order of the target character according to the trajectory point sequence of the target character, there is no constraint on the user's writing, and there is no need for the interactive interface to display the font of the corresponding standard character and the user is not forced to write according to the specified requirements, so that the evaluation device provided by the embodiment of the present invention is more in line with the character writing evaluation requirements in the dictation scenario.
[0281] Sixth embodiment
[0282] The present invention also provides a device for evaluating the writing order of strokes of a character. Fig.18, shows a schematic diagram of the structure of the character stroke writing order evaluation device, the character stroke writing order evaluation device may include: at least one processor 1801, at least one communication interface 1802, at least one memory 1803 and at least one communication bus 1804;
[0283] In the embodiment of the present invention, the number of the processor 1801, the communication interface 1802, the memory 1803, and the communication bus 1804 is at least one, and the processor 1801, the communication interface 1802, and the memory 1803 communicate with each other through the communication bus 1804;
[0284] The processor 1801 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;
[0285] The memory 1803 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;
[0286] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:
[0287] Acquire a trajectory point sequence corresponding to the target text, and regularize the trajectory point sequence corresponding to the target text, and use the regularized trajectory point sequence as the target trajectory point sequence;
[0288] According to the target trajectory point sequence, the stroke category of each stroke of the target character is predicted in sequence according to the actual stroke writing order, so as to obtain the stroke category sequence of the target character;
[0289] According to the stroke category sequence of the target character and the stroke category sequence of the standard character corresponding to the target character, determine whether the stroke writing order of the target character is correct and the sequence error strokes when the stroke writing order is incorrect, and output the evaluation result.
[0290] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0291] Seventh embodiment
[0292] An embodiment of the present invention further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0293] Acquire a trajectory point sequence corresponding to the target text, and regularize the trajectory point sequence corresponding to the target text, and use the regularized trajectory point sequence as the target trajectory point sequence;
[0294] According to the target trajectory point sequence, the stroke category of each stroke of the target character is predicted in sequence according to the actual stroke writing order, so as to obtain the stroke category sequence of the target character;
[0295] According to the stroke category sequence of the target character and the stroke category sequence of the standard character corresponding to the target character, determine whether the stroke writing order of the target character is correct and the sequence error strokes when the stroke writing order is incorrect, and output the evaluation result.
[0296] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0297] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0298] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0299] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for evaluating the writing order of character strokes, characterized in that: include: Acquire a trajectory point sequence corresponding to the target text, and regularize the trajectory point sequence corresponding to the target text, and use the regularized trajectory point sequence as the target trajectory point sequence; According to the target trajectory point sequence, the stroke category of each stroke of the target character is predicted in sequence according to the actual stroke writing order, so as to obtain the stroke category sequence of the target character; According to the stroke category sequence of the target character and the stroke category sequence of the standard character corresponding to the target character, determine whether the stroke writing sequence of the target character is correct and the strokes with incorrect sequence when the stroke writing sequence is incorrect, and output the evaluation result; The regularization of the trajectory point sequence corresponding to the target text includes: The trajectory point sequence corresponding to the target text is subjected to the first regularization or the second regularization; or, the trajectory point sequence corresponding to the target text is subjected to the first regularization, and the trajectory point sequence after the first regularization is subjected to the second regularization; the first regularization is for the regularization of the target text strokes, and the second regularization is for the regularization of the target text glyphs.
2. The method for evaluating the writing order of character strokes according to claim 1, characterized in that: The step of obtaining a trajectory point sequence corresponding to the target text includes: Get the trajectory point sequence corresponding to the text written by the user; Based on the trajectory point sequence corresponding to the user-written text, determining whether the user-written text meets the stroke writing order evaluation condition, and if so, determining the user-written text as the target text to obtain the trajectory point sequence corresponding to the target text; Among them, the stroke writing order evaluation conditions include: the character category of the user-written text is consistent with the character category of the text required to be written by the user, and the number of strokes of the user-written text is the same as the number of strokes of the standard text corresponding to the user-written text.
3. The method for evaluating the writing order of character strokes according to claim 1, characterized in that: The first step of regularizing the trajectory point sequence corresponding to the target text includes: Perform one or more of the following processing on the trajectory point sequence corresponding to the target text: Track point processing, track point resampling, and redundant track point filtering with the goal of regularizing text size to a specified size.
4. The method for evaluating the writing order of character strokes according to claim 1, characterized in that: The second regularization of the trajectory point sequence after the first regularization includes: The first regularized trajectory point sequence is reconstructed with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text.
5. The method for evaluating the writing order of character strokes according to claim 4, characterized in that: The step of reconstructing the first regularized trajectory point sequence with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text comprises: Acquire the features of each trajectory point in the first regularized trajectory point sequence and the features of each trajectory point in the standard trajectory point sequence, and acquire the global features of the standard trajectory point sequence, wherein the standard trajectory point sequence is the trajectory point sequence of the standard text corresponding to the target text; Determine a trajectory point matching matrix according to the characteristics of each trajectory point in the first regularized trajectory point sequence and the characteristics of each trajectory point in the standard trajectory point sequence, wherein the trajectory point matching matrix can characterize the trajectory point matching situation between the first regularized trajectory point sequence and the standard trajectory point sequence; The first regularized trajectory point sequence is reconstructed according to the trajectory point matching matrix and the global feature to obtain a trajectory point sequence whose style of corresponding text is close to the style of the standard text corresponding to the target text.
6. The method for evaluating the writing order of character strokes according to claim 5, characterized in that: The determining of a trajectory point matching matrix according to the feature of each trajectory point in the first regularized trajectory point sequence and the feature of each trajectory point in the standard trajectory point sequence comprises: Calculating the similarity between the feature of each trajectory point in the first regularized trajectory point sequence and the feature of each trajectory point in the standard trajectory point sequence to obtain a similarity matrix; The similarity matrix is normalized, and the obtained normalized matrix is used as the trajectory point matching matrix.
7. The method for evaluating the writing order of character strokes according to claim 5, characterized in that: The step of reconstructing the first regularized trajectory point sequence according to the trajectory point matching matrix and the global feature to obtain a trajectory point sequence whose style of corresponding text is close to the style of the standard text corresponding to the target text includes: Transforming the first regularized trajectory point sequence using the trajectory point matching matrix to obtain a transformed trajectory point sequence; A trajectory point sequence corresponding to a character whose style is close to a style of a standard character corresponding to the target character is determined according to the transformed trajectory point sequence and the global feature.
8. The method for evaluating the writing order of character strokes according to claim 7, characterized in that: The step of determining, based on the transformed trajectory point sequence and the global feature, a trajectory point sequence corresponding to a character whose style is close to a style of a standard character corresponding to the target character, comprises: According to the number of trajectory points in the transformed trajectory point sequence, the global feature is copied to obtain multiple copies of the global feature; splicing a global feature for each trajectory point in the transformed trajectory point sequence to obtain a trajectory point sequence spliced with the global feature; According to the trajectory point sequence spliced with the global features, a trajectory point sequence corresponding to a character whose style is close to the style of the standard character corresponding to the target character is determined.
9. The method for evaluating the writing order of character strokes according to any one of claims 4 to 8, characterized in that: The step of reconstructing the first regularized trajectory point sequence with the goal of making the style of the corresponding text close to the style of the standard text corresponding to the target text comprises: Reconstructing the first regularized trajectory point sequence based on a pre-built trajectory point reconstruction model; The trajectory point reconstruction model is trained using a training trajectory point sequence and a standard trajectory point sequence corresponding to the training trajectory point sequence. The training goal of the trajectory point reconstruction model includes making the trajectory sequence reconstructed from the training trajectory point sequence close to the standard trajectory point sequence corresponding to the training trajectory point sequence.
10. The method for evaluating the writing order of character strokes according to claim 1, characterized in that: The step of predicting the stroke category of each stroke of the target character in sequence according to the target trajectory point sequence and the actual stroke writing order to obtain the stroke category sequence of the target character includes: Acquire the features of each trajectory point in the target trajectory point sequence according to the coordinates and state of each trajectory point in the target trajectory point sequence, and obtain a trajectory point feature sequence corresponding to the target trajectory point sequence; Encoding the trajectory point feature sequence corresponding to the target trajectory point sequence to obtain an encoded feature sequence; The stroke category to which each stroke of the target character belongs is predicted according to the encoded feature sequence.
11. The method for evaluating the writing order of character strokes according to claim 10, characterized in that: The step of acquiring the feature of each trajectory point in the target trajectory point sequence according to the coordinates and the state of each trajectory point in the target trajectory point sequence comprises: For each target trajectory point to be characterized in the target trajectory point sequence: Calculating abscissa differences and ordinate differences between relevant trajectory points and the target trajectory point to obtain abscissa differences and ordinate differences, wherein the relevant trajectory points include trajectory points that are adjacent to the target trajectory point in a backward direction and / or trajectory points that are located after the target trajectory point and are separated from the target trajectory point by one trajectory point; According to the state of the target trajectory point and the state of the backward adjacent trajectory point of the target trajectory point, determining a value that can represent whether the states of the target trajectory point and the backward adjacent trajectory point of the target trajectory point are consistent, as a value representing whether the states are consistent; A vector including the abscissa and ordinate of the target trajectory point, the abscissa difference, the ordinate difference and the state consistency characterization value is used as a feature of the target trajectory point.
12. A device for evaluating the writing order of character strokes, characterized in that: include: Track point data acquisition module, track point data regularization module, stroke category prediction module, stroke writing order evaluation module and evaluation result output module; The trajectory point data acquisition module is used to acquire the trajectory point sequence corresponding to the target text; The trajectory point data regularization module is used to regularize the trajectory point sequence corresponding to the target text, and the regularized trajectory point sequence is used as the target trajectory point sequence; The stroke category prediction module is used to predict the stroke category of each stroke of the target character in sequence according to the target trajectory point sequence and the actual stroke writing order, so as to obtain the stroke category sequence of the target character; The stroke writing order evaluation module is used to determine whether the stroke writing order of the target character is correct and the strokes in the wrong order when the stroke writing order is incorrect, based on the stroke category sequence of the target character and the stroke category sequence of the standard character corresponding to the target character; The evaluation result output module is used to output the evaluation result of the stroke writing order evaluation module; Wherein, when the trajectory point data regularization module regularizes the trajectory point sequence corresponding to the target text, it is specifically used to: The trajectory point sequence corresponding to the target text is subjected to the first regularization or the second regularization; or, the trajectory point sequence corresponding to the target text is subjected to the first regularization, and the trajectory point sequence after the first regularization is subjected to the second regularization; the first regularization is for the regularization of the target text strokes, and the second regularization is for the regularization of the target text glyphs.
13. A device for evaluating the writing order of character strokes, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the character stroke writing order evaluation method as described in any one of claims 1 to 11.
14. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the character stroke writing order evaluation method as described in any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Character evaluation method and device, character learning method and device, equipment and storage medium
CN110490157A
Handwriting recognition method and device, electronic equipment and storage medium
CN113807295A