Handwritten chinese character quality evaluation model training method, evaluation method and device

By training a multi-dimensional handwritten Chinese character quality assessment model based on recurrent neural networks, the problem of the inability of existing technologies to effectively assess the quality of handwritten Chinese characters has been solved, resulting in more scientific and comprehensive assessment results and improving the standardization and aesthetics of handwriting.

CN115294584BActive Publication Date: 2025-11-28BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210821863.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-13
Publication Date
2025-11-28
Estimated Expiration
2042-07-13

AI Technical Summary

Technical Problem

Existing technology cannot effectively assess the quality of handwritten Chinese characters, especially stroke order and character structure, resulting in poor writing standardization and a tendency to produce misspellings and unattractive characters.

Method used

By acquiring the temporal information of handwritten Chinese characters, a recurrent neural network model is used to train a handwritten Chinese character quality assessment model. Multi-dimensional evaluation indicators such as stroke directionality, stroke order, and character structure are used to train a more comprehensive handwritten Chinese character quality assessment model.

Benefits of technology

It enables multi-dimensional scientific evaluation of the quality of handwritten Chinese characters, improves the standardization and aesthetics of writing, and provides more scientific evaluation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294584B_ABST
    Figure CN115294584B_ABST
Patent Text Reader

Abstract

The application provides a handwriting Chinese character quality evaluation model training method, an evaluation method and a device, comprising: obtaining a first training sample set containing a plurality of handwriting Chinese character samples, each handwriting Chinese character sample including time sequence information of a single handwriting Chinese character; adding scores of a plurality of preset dimension evaluation indexes to each handwriting Chinese character sample as labels; preprocessing the time sequence information of each handwriting Chinese character sample according to the evaluation requirements of each preset dimension evaluation index to obtain a plurality of second training sample sets corresponding to each preset dimension evaluation index; and training an initial neural network using each second training sample set to obtain a handwriting Chinese character quality evaluation model corresponding to each preset dimension evaluation index. The handwriting Chinese character quality evaluation model obtained can be used to obtain handwriting Chinese character quality evaluation results corresponding to each preset dimension evaluation index. The application can scientifically and effectively evaluate the quality of handwriting Chinese characters from multiple dimensions.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of information technology, and in particular to a handwriting Chinese character quality evaluation model training method and device and an evaluation method. BACKGROUND

[0002] Writing is considered a necessary skill for human beings to learn and apply knowledge, and is also a common skill frequently used in daily work and life. Writing mainly focuses on strokes and stroke orders. Strokes are for character construction, and the visual image given to people is a static "shape" for character recognition. Stroke orders are for writing, and the visual image given to people is a dynamic "sequence" that specifies the stroke order when writing.

[0003] Stroke orders are technical specifications, and stroke orders are related to writing speed and character shape to some extent. Under different stroke orders, strokes and connection relationships change, and the structure and charm of the written characters also change accordingly. "Without rules, there is no square or circle." Mastering the stroke rules and frame structure of characters is the prerequisite for writing characters correctly, uniformly, and aesthetically. Standard stroke orders are also a writing standard and a writing skill for students.

[0004] However, with the popularity of mobile devices, more and more people are used to typing on a keyboard instead of handwriting, which leads to frequent forgetting of how to write some Chinese characters, resulting in forgetting to write characters, doubting writing errors after writing, or stroke order errors during writing, so that the written Chinese characters have errors, the character shape or structure is not beautiful, and cannot be understood by readers.

[0005] Therefore, in order to solve the existing writing problems mentioned above, a method is needed to evaluate the quality of handwritten Chinese characters. SUMMARY

[0006] In view of this, the embodiments of the present application provide a handwriting Chinese character quality evaluation model training method and device and an evaluation method to eliminate or improve one or more defects in the prior art, solve the problem that the prior art cannot evaluate the quality of handwritten Chinese characters based on stroke orders, and improve writing standards.

[0007] In one aspect, the present application provides a handwriting Chinese character quality evaluation model training method, which comprises the following steps:

[0008] obtain a primary training sample set, the primary training sample set comprising a plurality of handwritten Chinese character samples, each handwritten Chinese character sample including time sequence information of a single handwritten Chinese character, the time sequence information being pen tip horizontal coordinates, vertical coordinates and a contact state information of the pen tip with a Chinese character writing board obtained at a set interval duration, and adding scores of a plurality of preset dimension evaluation indexes to each handwritten Chinese character sample as labels, the preset dimension evaluation indexes at least including a stroke direction evaluation index, a stroke sequence evaluation index and a character frame structure evaluation index;

[0009] preprocess the time sequence information of each handwritten Chinese character sample according to evaluation requirements of each preset dimension evaluation index to obtain a plurality of secondary training sample sets corresponding to each preset dimension evaluation index, each secondary training sample set including representation parameters of the corresponding preset dimension evaluation index recorded in time sequence, and taking scores of the corresponding preset dimension evaluation index as labels;

[0010] obtain an initial neural network model, the initial neural network model adopting a recurrent neural network model, the recurrent neural network including a gated recurrent unit, an average pooling layer, a first node dropout layer, a full connection layer and a second node dropout layer connected in sequence;

[0011] train the initial neural network using each secondary training sample set to obtain a handwritten Chinese character quality evaluation model corresponding to each preset dimension evaluation index.

[0012] In some embodiments of the present application, the handwritten Chinese character quality evaluation model training method further comprises:

[0013] In the primary training sample set corresponding to the stroke direction evaluation index, each handwritten Chinese character sample is arranged from high to low according to stroke direction quality and divided into a plurality of grades, and each grade is added with scores from high to low as labels;

[0014] In the primary training sample set corresponding to the stroke sequence evaluation index, each handwritten Chinese character sample is arranged from high to low according to stroke sequence quality and divided into a plurality of grades, and each grade is added with scores from high to low as labels;

[0015] In the primary training sample set corresponding to the character frame structure evaluation index, each handwritten Chinese character sample is arranged from high to low according to character frame structure quality and divided into a plurality of grades, and each grade is added with scores from high to low as labels.

[0016] In some embodiments of the present application, each secondary training sample set further connects the representation parameters of the corresponding preset dimension evaluation index with the original time sequence information as input of training data.

[0017] In some embodiments of the present application, the handwritten Chinese character quality evaluation model training method further comprises:

[0018] The representation data of the stroke direction evaluation index includes the sine value and the cosine value of the angle between the tangent of the stroke trajectory and the horizontal axis;

[0019] The representation data of the stroke sequence evaluation index includes the normalized time sequence information;

[0020] The representation data of the word frame structure evaluation index includes the stroke trajectory direction, the neighborhood curvature of the stroke trajectory and the neighborhood linearity of the stroke trajectory.

[0021] In some embodiments of the present application, the neighborhood curvature of the stroke trajectory is calculated according to the following formula:

[0022]

[0023] wherein A represents the neighborhood curvature of the stroke trajectory; max(·) represents the maximum value processing; Δx(t) represents the offset of the horizontal coordinate of the pen nib between the previous time and the current time; and Δy(t) represents the offset of the vertical coordinate of the pen nib between the previous time and the current time.

[0024] In some embodiments of the present application, the neighborhood linearity of the stroke trajectory is calculated according to the following formula:

[0025]

[0026] wherein B represents the neighborhood linearity of the stroke trajectory; N represents the total number of sampling points obtained according to the set interval time length for any stroke; and di represents the distance between the i th sampling point and the i-1 th sampling point. i

[0027] In some embodiments of the present application, the contact state information is represented by binary 0 or 1, wherein 0 represents that the pen nib is lifted from the Chinese character writing board, and the pen nib is not in contact with the Chinese character writing board, and 1 represents that the pen nib is in contact with the Chinese character writing board.

[0028] On the other hand, the present application provides a method for evaluating the quality of handwritten Chinese characters, which comprises the following steps:

[0029] Obtaining a handwritten Chinese character sample, wherein the handwritten Chinese character sample includes the time sequence information of a single handwritten Chinese character, and the time sequence information includes the horizontal coordinate, the vertical coordinate of the pen nib and the contact state information of the pen nib with the Chinese character writing board obtained according to a set interval time length;

[0030] Pretreating the time sequence information of each handwritten Chinese character sample according to the evaluation requirements of a set dimension evaluation index, to obtain the representation parameters of the set dimension evaluation index recorded in time sequence;

[0031] ​The feature parameters and the timing information are input into a handwriting Chinese character quality evaluation model corresponding to the set-dimension evaluation index to obtain a quality evaluation result of the handwriting Chinese character on the set-dimension evaluation index.

[0032] In some embodiments of the present application, the timing information of each handwriting Chinese character sample is preprocessed according to the evaluation requirements of the set-dimension evaluation index to obtain feature parameters of the set-dimension evaluation index recorded in time sequence.

[0033] When the set-dimension evaluation index is a stroke direction evaluation index, the sine and cosine values of the tangent of the stroke trajectory and the horizontal axis angle are calculated according to the input requirements of the handwriting Chinese character quality evaluation model corresponding to the stroke direction evaluation index to obtain the feature parameters of the stroke direction evaluation index.

[0034] When the set-dimension evaluation index is a stroke sequence evaluation index, the timing information is normalized according to the input requirements of the handwriting Chinese character quality evaluation model corresponding to the stroke sequence evaluation index to obtain the feature parameters of the stroke sequence evaluation index.

[0035] When the set-dimension evaluation index is a stroke sequence evaluation index, the timing information is normalized according to the input requirements of the handwriting Chinese character quality evaluation model corresponding to the stroke sequence evaluation index to obtain the feature parameters of the stroke sequence evaluation index.

[0036] In another aspect, the present application also provides a computer readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of the method according to any one of the above.

[0037] The present application has at least the following advantages:

[0038] The present application provides a handwriting Chinese character quality evaluation model training method, evaluation method and device. A primary training sample set is obtained, which contains a plurality of handwriting Chinese character samples, and each handwriting Chinese character sample includes timing information of a single handwriting Chinese character. A plurality of preset-dimension evaluation index scores are added to each handwriting Chinese character sample as labels. The timing information of each handwriting Chinese character sample is preprocessed according to the evaluation requirements of each preset-dimension evaluation index to obtain a plurality of secondary training sample sets corresponding to each preset-dimension evaluation index. Each secondary training sample set is used to train an initial neural network to obtain a handwriting Chinese character quality evaluation model corresponding to each preset-dimension evaluation index. The handwriting Chinese character quality evaluation model is used to obtain handwriting Chinese character quality evaluation results corresponding to each preset-dimension evaluation index. The present application evaluates handwriting Chinese character quality from multiple-dimension evaluation indexes based on stroke order features, and the evaluation results are more comprehensive and scientific.

[0039] Additional advantages, objects, and features of the application will be set forth in part by the description that follows, and will become apparent to those skilled in the art upon examination of the following detailed description and drawings. The objects and other advantages of the present application can be realized and attained by means of the instrumentalities particularly pointed out in the specification and drawings.

[0040] Those skilled in the art will appreciate that the objects and advantages of the application can be realized and attained by means of the instrumentalities and combinations particularly pointed out in the following detailed description. BRIEF DESCRIPTION OF DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application. In the drawings:

[0042] Figure 1 A schematic diagram of a handwriting Chinese character quality evaluation model training method in an embodiment of the present application.

[0043] Figure 2 A handwriting Chinese character stroke writing trajectory schematic diagram in an embodiment of the present application.

[0044] Figure 3 A bidirectional recurrent neural network structure schematic diagram in an embodiment of the present application.

[0045] Figure 4 A handwriting Chinese character quality evaluation method step schematic diagram in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the embodiments and drawings. Herein, the illustrative embodiments of the present application and their descriptions are used to explain the present application, but are not intended to limit the present application.

[0047] It should be noted that, in order to avoid the present application being obscured by unnecessary details, only the structures and / or processing steps closely related to the solutions according to the present application are shown in the drawings, and other details not closely related to the present application are omitted.

[0048] It should be emphasized that the terms "comprises / comprising" when used in this specification are taken to specify the presence of stated features, elements, steps or components, but do not preclude the presence or addition of one or more other features, elements, steps, components, or groups thereof.

[0049] It is also noted herein that, if it is not otherwise indicated, the term "connection" can refer to not only a direct connection, but also an indirect connection via an intermediate object.

[0050] In the following, embodiments of the present application will be described with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0051] It is emphasized here that the step designations mentioned in the following are not a limitation of the order of the steps, but it is to be understood that the steps can be carried out in the order mentioned in the embodiments, but also differently from the order in the embodiments, or several steps can be carried out simultaneously.

[0052] In order to solve the problem that the quality of handwritten Chinese characters cannot be evaluated based on stroke order and writing standard cannot be improved in the prior art, the present application provides a handwritten Chinese character quality evaluation model training method, as shown in Figure 1 The method comprises the following steps S101-S104:

[0053] Step S101: Obtain a first-level training sample set, the first-level training sample set comprising a plurality of handwritten Chinese character samples, each handwritten Chinese character sample comprising time sequence information of a single handwritten Chinese character, the time sequence information being a pen tip horizontal coordinate, a pen tip vertical coordinate and a contact state information of the pen tip with a Chinese character writing board obtained at a set interval time length; adding scores of a plurality of preset dimension evaluation indexes to each handwritten Chinese character sample as labels; the preset dimension evaluation indexes at least comprising a stroke direction evaluation index, a stroke order evaluation index and a character frame structure evaluation index.

[0054] Step S102: Preprocess the time sequence information of each handwritten Chinese character sample according to the evaluation requirements of each preset dimension evaluation index to obtain a plurality of second-level training sample sets corresponding one-to-one to each preset dimension evaluation index, each second-level training sample set comprising a representation parameter of the corresponding preset dimension evaluation index recorded in time sequence, and taking the score of the corresponding preset dimension evaluation index as a label.

[0055] Step S103: Obtain an initial neural network model, the initial neural network model adopting a recurrent neural network model, the recurrent neural network comprising a gated recurrent unit, an average pooling layer, a first node dropout layer, a full connection layer and a second node dropout layer connected in sequence.

[0056] Step S104: Train the initial neural network using each second-level training sample set to obtain a handwritten Chinese character quality evaluation model corresponding to each preset dimension evaluation index.

[0057] In step S101, collection of stroke timing information of a handwritten Chinese character sample is performed. In some embodiments, ISKN Slate 2+ kit is used to assist in collection of the timing information, which includes a writing board and a handwriting pen, and the handwriting pen tip is provided with a sensing magnetic ring, which interacts with the writing board to obtain the writing trajectory and the pen tip state during writing of the Chinese character. During the writing process, the writing board obtains and records the horizontal coordinate, the vertical coordinate and the contact state information of the pen tip with the Chinese character writing board at a set interval. The ISKN writing board can record the position of the handwriting pen at a time interval of microseconds, with high resolution and more accurate coordinates of the pen tip. Therefore, the writing trajectory mentioned above is composed of sampling points sampled at a set interval.

[0058] The data set obtained by the writing board is in the format of [horizontal coordinate, vertical coordinate, contact state of the pen tip with the Chinese character writing board], which is saved as a txt file, so as to facilitate subsequent conversion of the data set into different formats to meet the input data form requirements of various neural networks. In some embodiments, the contact state of the pen tip with the Chinese character writing board is represented by binary 0 or 1, wherein 0 represents that the pen tip is lifted from the Chinese character writing board and the pen tip is not in contact with the Chinese character writing board, and 1 represents that the pen tip is in contact with the Chinese character writing board.

[0059] For example, the timing information data set is shown in Table 1:

[0060] Table 1

[0061]

[0062] In the contact state of the pen tip with the Chinese character writing board, 0 represents that the pen tip is lifted, and 1 represents that the pen tip continues to fall. Separately arranging this column can obtain a string of numbers composed of 0 and 1, wherein continuous 0 or continuous 1 usually appears, for example, as shown in [011111000011111...], the continuous 0 represents that there is no writing or at the break of two strokes, and the continuous 1 represents that the user is writing a stroke of the Chinese character. The contact state of the pen tip with the Chinese character writing board can determine the position of the continuous stroke and the position of the broken stroke of the written Chinese character.

[0063] Considering the comprehensiveness of the quality evaluation of the handwritten Chinese character, multi-dimensional evaluation indexes are set for the quality evaluation, which are respectively evaluated from the stroke directionality, the stroke order and the character frame structure. Among them, the stroke directionality evaluation index is used to evaluate whether there is any jitter or distortion in the writing process; the stroke order evaluation index is used to evaluate the correctness of the stroke order in the writing process; and the character frame structure evaluation index is used to evaluate the overall character frame structure and aesthetics of the handwritten Chinese character.

[0064] In step S102, the first-level training sample set is preprocessed according to the evaluation requirements of each preset dimension evaluation index to obtain the representation parameters, which correspond one-to-one with each preset dimension evaluation index and are recorded in time sequence.

[0065] Each preset dimension's evaluation index has specific characterization parameters. In some embodiments, the characterization data for the stroke directionality evaluation index includes the sine and cosine values ​​of the angle between the stroke trajectory tangent and the horizontal axis. The characterization data for the stroke sequence evaluation index includes normalized temporal information. The character structure evaluation index includes the stroke trajectory direction, the neighborhood curvature of the stroke trajectory, and the neighborhood linearity.

[0066] For example, such as Figure 2 The figure shows a schematic diagram of the writing trajectory of a certain stroke of a handwritten Chinese character. For the representation data of the stroke directionality evaluation index, taking sampling point P4 as an example, the tangent line of the stroke trajectory is the straight line formed by connecting P4 and P5. The tangent line of the stroke trajectory forms an angle α with the horizontal axis. Therefore, at sampling point P4, the representation data of the stroke directionality evaluation index is expressed as (cosα, sinα).

[0067] In some embodiments, the domain curvature of the stroke trajectory is calculated as shown in formula (1):

[0068]

[0069] Where A represents the curvature of the stroke trajectory; max(·) represents the maximum value; Δx(t) represents the offset of the pen tip's horizontal coordinate between the previous and current times; Δy(t) represents the offset of the pen tip's vertical coordinate between the previous and current times.

[0070] In some embodiments, the formula for calculating the linearity of the stroke trajectory is as shown in formula (2):

[0071]

[0072] Where B represents the neighborhood linearity of the stroke trajectory; N represents the total number of sampling points obtained for any stroke at set intervals; d i This represents the distance between the i-th sampling point and the (i-1)-th sampling point.

[0073] For example, as well as Figure 2 As shown, the characterization data for the evaluation index of the character structure needs to consider the neighborhood curvature and neighborhood linearity of the stroke trajectory. For the neighborhood curvature part, taking the P4 sampling point as an example, the horizontal coordinate of the P4 sampling point is x4 and the vertical coordinate is y4, and the horizontal coordinate of the P5 sampling point is x5 and the vertical coordinate is y5. Then, according to formula (1), the neighborhood curvature between the P4 sampling point and the P5 sampling point is calculated as shown in formula (3):

[0074]

[0075] The field linearity part, such as Figure 2 As shown, there are seven sampling points, N = 7, d i = {d1, d2, d3, d4, d5, d6, d7}, according to formula (2), the field linearity calculation formula from P1 sampling point to P7 sampling point is shown as formula (4):

[0076]

[0077] In some embodiments, each secondary training sample set will also connect the representation parameters of the corresponding preset dimension evaluation indicators and the original time sequence information as the input of the training data. The extracted representation parameters of each dimension evaluation indicator are added to the normalized sequence of each handwritten Chinese character sample, and the normalized sequence of the handwritten Chinese character sample embodies the time sequence characteristics of the strokes, so as to ensure that the time sequence information of the strokes is included in the initial neural network model training.

[0078] According to the multiple dimension evaluation indicators, each handwritten Chinese character sample adds the score of the corresponding dimension evaluation indicator. In some embodiments, in order to facilitate the scoring according to the stroke order evaluation indicator, the code is reconstructed according to the txt format data set file collected by the ISKN writing board and the developed online scoring application program. The data set file of the handwritten Chinese character is loaded as an svg format file. When the user clicks on a certain handwritten Chinese character, the application interface can demonstrate the writing process of the Chinese character to the user in the form of animation, so as to judge the correctness of the stroke order of the corresponding handwritten Chinese character.

[0079] In some embodiments, in order to more fairly and objectively evaluate the quality of the handwritten Chinese character sample in multiple dimension evaluation indicators, the following scoring method is selected: two handwritten Chinese character samples are randomly selected from the primary training samples in each round, and the two handwritten Chinese character samples are scored from the aspects of stroke directionality, stroke order and character frame structure. The sample with relatively good quality is marked as 1, and the other is marked as 0 by default. For example, if the first handwritten Chinese character sample is better than the second handwritten Chinese character sample in the aspects of stroke directionality, stroke order and character frame structure, the score of the first handwritten Chinese character sample in the stroke directionality evaluation indicator is 1, the score in the stroke order evaluation indicator is 1, and the score in the character frame structure evaluation indicator is 1. The score of the second handwritten Chinese character sample in the three dimension evaluation indicators is 0.

[0080] After the comparison and scoring of the set number of rounds, all handwritten Chinese character samples are marked and scored in the three dimension evaluation indicators. The handwritten Chinese character samples are divided into three categories according to the three dimension evaluation indicators, and the handwritten Chinese character samples marked and scored are sorted according to the scores from high to low.

[0081] In some embodiments, in the first-level training sample set corresponding to the stroke direction evaluation index, the samples are ranked according to the stroke direction quality from high to low and divided into multiple grades, and a score from high to low is added to each grade as a label. For example, the samples are ranked according to the stroke direction quality from high to low and divided into five grades, and scores 5, 4, 3, 2 and 1 are marked from high to low as the score labels of the stroke direction evaluation index according to the five grades.

[0082] In the first-level training sample set corresponding to the stroke order evaluation index, the samples are ranked according to the stroke order quality from high to low and divided into multiple grades, and a score from high to low is added to each grade as a label. For example, the samples are ranked according to the stroke order quality from high to low and divided into two grades, and scores 1 and 0 are added from high to low as the score labels of the stroke order evaluation index according to the two grades.

[0083] In the first-level training sample set corresponding to the stroke order evaluation index, the samples are ranked according to the stroke order quality from high to low and divided into multiple grades, and a score from high to low is added to each grade as a label. For example, the samples are ranked according to the stroke order quality from high to low and divided into two grades, and scores 1 and 0 are added from high to low as the score labels of the stroke order evaluation index according to the two grades.

[0084] In step S103, the initial neural network model in the embodiment of the application adopts a recurrent neural network model, the input is the time series information after the preprocessing operation, and the output is the quality evaluation result of the handwritten Chinese character. The recurrent neural network model adopts a bidirectional recurrent neural network structure, as shown in FIG. 1. The structure of the ordinary recurrent neural network includes an input layer, a hidden layer and an output layer, that is, the input information and the output information of the last time are received, and the information of the current time is output, that is, the information of the current time depends on the input information and the output information of the last time. For the bidirectional recurrent neural network, it is equivalent to two superimposed recurrent neural networks, and the information of the current time depends not only on the input information and the output information of the last time, but also on the output information of the future time. Figure 3

[0085] In the embodiment of the application, the recurrent module of the recurrent neural network adopts a gated recurrent unit (GRU), and for example, a long short-term memory network (LSTM) can also be selected. In model training, the effect and performance of GRU and LSTM are similar, the parameters of GRU are only one third of those of LSTM, the model is easier to converge, and for general data volume, it is more appropriate to use GRU.

[0086] ​The GRU has two gating units, reset gate and update gate, which are the combination of the LSTM forget gate and input gate. Unlike LSTM, GRU has no independent storage unit. The output and hidden state h t of the GRU unit are linear combinations between the last hidden state h t-1 and the current time hidden state , which are controlled by the update gate. The whole calculation process is shown in formula (5) to formula (8):

[0087] r t = sigm(W r x t + U r h t-1 + b r ); (5)

[0088] z t = sigm(W z x t + U z h t-1 + b z ); (6)

[0089]

[0090]

[0091] wherein r t is the reset gate of the gating recurrent unit; sigm(·) represents the processing of the sigmoid function; W r , W z , W, U r , U z and U are weight parameters; x t is the input information at the current time; h t-1 is the hidden state at the last time; b r , b z and b are bias parameters; z t is the update gate of the gating recurrent unit; is the hidden state at the current time; tanh(·) represents the processing of the tanh function; and is the Hadamard product operator.

[0092] The gated recurrent unit is sequentially connected to the average pooling layer, the first node dropout layer, the fully connected layer, and the second node dropout layer. The average pooling layer directly achieves dimensionality reduction, reduces network parameters, and performs structural regularization on the entire network to prevent overfitting. The node dropout layer is used to randomly disable the weights of some hidden layer nodes in the network during model training. Nodes that are not working can be temporarily considered not to be part of the network structure, but their corresponding weights need to be retained (just not updated temporarily) and it will be determined whether they need to be reactivated when the next sample input is received. The fully connected layer connects each of its nodes to all nodes of the previous layer, maps the feature space calculated by the previous layer to the sample label space, and integrates the features extracted by the previous layer to obtain the handwritten Chinese character quality assessment results required in this embodiment of the invention.

[0093] In step S104, multiple secondary training sample sets corresponding one-to-one with each preset dimension evaluation index have been obtained in step S102. Each secondary training sample set includes the representation parameters of the corresponding preset dimension evaluation index recorded in time sequence. For example, the representation parameters of the stroke directionality evaluation index are denoted as the first representation parameter, the representation parameters of the stroke order evaluation index are denoted as the second representation parameter, and the representation parameters of the character structure evaluation index are denoted as the third representation parameter.

[0094] The first representation parameter containing time sequence information is input into the recurrent neural network to train the recurrent neural network, thereby obtaining the handwritten Chinese character quality assessment model corresponding to the stroke direction evaluation index, and outputting the evaluation result corresponding to the stroke direction evaluation index.

[0095] The second representation parameter containing temporal information is input into the recurrent neural network to train the recurrent neural network, thereby obtaining the handwritten Chinese character quality assessment model corresponding to the stroke order evaluation index, and outputting the evaluation result corresponding to the stroke order evaluation index.

[0096] The third representation parameter, which contains temporal information, is input into the recurrent neural network to train the recurrent neural network, thereby obtaining the handwritten Chinese character quality assessment model corresponding to the character structure evaluation index, and outputting the evaluation result corresponding to the character structure evaluation index.

[0097] This invention also provides a method for evaluating the quality of handwritten Chinese characters, such as... Figure 4 As shown, the method includes the following steps S201 to S203:

[0098] Step S201: Obtain handwritten Chinese character samples. The handwritten Chinese character samples include the temporal information of a single handwritten Chinese character. The temporal information consists of the pen tip's horizontal and vertical coordinates and the contact state information between the pen tip and the Chinese character writing board, which are obtained at set intervals.

[0099] Step S202: Preprocess the time sequence information of each handwritten Chinese character sample according to the evaluation requirement of the set dimension evaluation index, to obtain the representation parameters of the set dimension evaluation index recorded in time sequence.

[0100] Step S203: Input the representation parameters into the handwritten Chinese character quality assessment model corresponding to any one of the set dimension evaluation indexes mentioned above, to obtain the quality assessment result of the handwritten Chinese character under the set dimension evaluation index.

[0101] In step S201, the user writes Chinese characters using the ISKN writing board and the handwriting pen, the ISKN writing board collects the time sequence information of the handwritten Chinese characters, and saves the time sequence information as a txt format file.

[0102] In some embodiments, in step S202, when the set dimension evaluation index is the stroke direction evaluation index, according to the input requirement of the handwritten Chinese character quality assessment model corresponding to the stroke direction evaluation index, the sine value and the cosine value of the angle between the stroke trajectory tangent and the horizontal axis are calculated to obtain the representation parameters of the stroke direction evaluation index; when the set dimension evaluation index is the stroke order evaluation index, according to the input requirement of the handwritten Chinese character quality assessment model corresponding to the stroke order evaluation index, the time sequence information is normalized to obtain the representation parameters of the stroke order evaluation index; when the set dimension evaluation index is the character frame structure evaluation index, according to the input requirement of the handwritten Chinese character quality assessment model corresponding to the character frame structure evaluation index, the stroke trajectory direction, the neighborhood curvature and the neighborhood linearity of the stroke trajectory are calculated to obtain the representation parameters of the character frame structure evaluation index. The calculation methods of the sine value and the cosine value of the angle between the stroke trajectory tangent and the horizontal axis and the neighborhood curvature and the neighborhood linearity of the stroke trajectory can refer to the specific embodiments in step S102.

[0103] In step S203, three corresponding handwritten Chinese character quality assessment models are trained in step S104 for the three dimension evaluation indexes. For example, if the user only wants to evaluate the quality of handwritten Chinese characters in terms of stroke order and character frame structure, only the sample data needs to be normalized and the field curvature and the field linearity need to be calculated. The normalized data obtained by preprocessing is input into the handwritten Chinese character quality assessment model corresponding to the stroke order evaluation index, and the field curvature and the field linearity containing time sequence information obtained by preprocessing are input into the handwritten Chinese character quality assessment model corresponding to the character frame structure evaluation index, so that the quality assessment results of the handwritten Chinese characters under the stroke order evaluation index and the character frame structure evaluation index can be obtained.

[0104] In some embodiments, the handwriting Chinese character quality evaluation results of the multi-dimension evaluation indexes can be added to obtain a comprehensive handwriting Chinese character quality evaluation result, which can be applied to writing competitions. Meanwhile, the writing problems existing according to the handwriting Chinese character quality evaluation results are analyzed to gradually improve the writing ability and improve the writing standard.

[0105] The present application also provides a computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the steps of the handwriting Chinese character quality evaluation model training method and the handwriting Chinese character quality evaluation method.

[0106] Corresponding to the above method, the present application also provides a device comprising a computer device, the computer device comprising a processor and a memory, the memory having stored therein computer instructions, the processor being configured to execute the computer instructions stored in the memory, and the device implementing the steps of the method as described above when the computer instructions are executed by the processor.

[0107] The present application also provides a computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer readable storage medium can be a tangible storage medium, such as a random access memory (RAM), an internal memory, a read only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable memory disk, a CD-ROM, or any other form of storage medium known in the art.

[0108] In summary, the present application provides a handwriting Chinese character quality evaluation model training method, an evaluation method and an apparatus. A first-level training sample set is obtained, which contains a plurality of handwriting Chinese character samples, and each handwriting Chinese character sample includes time sequence information of a single handwriting Chinese character. A plurality of preset dimension evaluation indexes are added to each handwriting Chinese character sample to serve as labels. The time sequence information of each handwriting Chinese character sample is preprocessed according to the evaluation requirements of each preset dimension evaluation index to obtain a plurality of second-level training sample sets corresponding to each preset dimension evaluation index. Each second-level training sample set is used to train an initial neural network to obtain a handwriting Chinese character quality evaluation model corresponding to each preset dimension evaluation index. The handwriting Chinese character quality evaluation model is used to obtain handwriting Chinese character quality evaluation results corresponding to each preset dimension evaluation index. The handwriting Chinese character quality is evaluated from multiple dimension evaluation indexes based on stroke features, and the evaluation results are more comprehensive and scientific.

[0109] Those of ordinary skill in the art will appreciate that the various illustrative components, systems and methods described in connection with the embodiments disclosed herein can be implemented as hardware, software, or both. The particular implementation is dependent on the specific application and design constraints imposed on the overall system. Skilled persons can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. When implemented in hardware, for example, the hardware can comprise an electronic circuit, an Application Specific Integrated Circuit (ASIC), a suitable firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the application are the program or code segments to perform a specific task. The program or code segments can be stored in a machine-readable medium, or transmitted by a carrier wave as data signals over a transmission medium or communication link.

[0110] It is to be understood that the application is not limited to the particular configurations and processes described herein and shown in the drawings. For simplicity, detailed descriptions of known methods and apparatuses are omitted so as not to obscure the disclosure. In the above-described embodiments, several specific steps are described and illustrated as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and the order of the steps can be changed, or other steps can be added, or replaced, or eliminated, depending on the application.

[0111] In the present application, features described and / or illustrated in relation to one embodiment can be used in the same or a similar way in one or more other embodiments, and / or combined with or instead of features of other embodiments.

[0112] The above description is only preferred embodiments of the present application, and is not intended to limit the present application. The embodiments of the present application can be variously changed and modified by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the present application.

Claims

1. A method for training a handwritten Chinese character quality assessment model, characterized in that, The method includes the following steps: A primary training sample set is obtained, which contains multiple handwritten Chinese character samples. Each handwritten Chinese character sample includes temporal information of a single handwritten Chinese character. The temporal information consists of the pen tip's horizontal and vertical coordinates, as well as the contact state information between the pen tip and the writing board, acquired at set intervals. Multiple preset-dimensional evaluation indicators are added to each handwritten Chinese character sample as labels. The preset-dimensional evaluation indicators include at least stroke directionality evaluation indicators, stroke order evaluation indicators, and character structure evaluation indicators. The representation data of the stroke directionality evaluation indicators includes the sine and cosine values ​​of the angle between the stroke trajectory tangent and the horizontal axis. The representation data of the stroke order evaluation indicators includes normalized temporal information. The representation data of the character structure evaluation indicators includes the stroke trajectory direction, the neighborhood curvature of the stroke trajectory, and the neighborhood linearity. The formula for calculating the neighborhood curvature of the stroke trajectory is: ; Where A represents the neighborhood curvature of the stroke trajectory; max(·) represents the maximum value. This indicates the offset of the pen tip's horizontal coordinate between the previous and current moments; This indicates the offset of the pen tip's vertical coordinate between the previous and current moments; The formula for calculating the neighborhood linearity of the stroke trajectory is: ; Where B represents the neighborhood linearity of the stroke trajectory; N represents the total number of sampling points obtained for any stroke at a set interval; d i This represents the distance between the i-th sampling point and the (i-1)-th sampling point; For each preset dimension evaluation indicator, the temporal information of each handwritten Chinese character sample is preprocessed to obtain multiple secondary training sample sets that correspond one-to-one with each preset dimension evaluation indicator. Each secondary training sample set includes the representation parameters of the corresponding preset dimension evaluation indicator recorded in time sequence, and uses the score of the corresponding preset dimension evaluation indicator as the label. An initial neural network model is obtained, wherein the initial neural network model adopts a recurrent neural network model, and the recurrent neural network includes a gated recurrent unit, an average pooling layer, a first node discarding layer, a fully connected layer, and a second node discarding layer connected in sequence. The initial neural network is trained using each of the secondary training sample sets to obtain a handwritten Chinese character quality assessment model corresponding to each preset dimension evaluation index.

2. The training method for the handwritten Chinese character quality assessment model according to claim 1, characterized in that, Also includes: In the primary training sample set corresponding to the stroke directionality evaluation index, each handwritten Chinese character sample is arranged from high to low according to the stroke directionality quality and divided into multiple grades. A score from high to low is added as a label for each grade. In the primary training sample set corresponding to the stroke order evaluation index, each handwritten Chinese character sample is arranged from high to low according to the quality of stroke order and divided into multiple grades. Each grade is then labeled with a score from high to low. In the primary training sample set corresponding to the character structure evaluation index, each handwritten Chinese character sample is arranged from high to low according to the quality of the character structure and divided into multiple grades. Each grade is then labeled with a score from high to low.

3. The training method for the handwritten Chinese character quality assessment model according to claim 1, characterized in that, Each secondary training sample set will also connect the representation parameters of the corresponding preset dimension evaluation index with the original time series information as input for training data.

4. The training method for the handwritten Chinese character quality assessment model according to claim 1, characterized in that, The contact status information is represented by binary 0 or 1, where 0 indicates that the pen tip is lifted from the Chinese character writing board and the pen tip does not contact the Chinese character writing board, and 1 indicates that the pen tip is in contact with the Chinese character writing board.

5. A method for evaluating the quality of handwritten Chinese characters, characterized in that, The method includes the following steps: Obtain handwritten Chinese character samples, the handwritten Chinese character samples include the temporal information of a single handwritten Chinese character, the temporal information being the pen tip's horizontal and vertical coordinates and the contact state information between the pen tip and the Chinese character writing board, obtained at set intervals; To meet the evaluation requirements of the set-dimensional evaluation indicators, the temporal information of each handwritten Chinese character sample is preprocessed to obtain the representation parameters of the set-dimensional evaluation indicators recorded in time sequence. The characterization parameters are added to the time series information and input together into the handwritten Chinese character quality assessment model corresponding to the set dimension evaluation index as described in any one of claims 1 to 4, so as to obtain the quality assessment result of the handwritten Chinese character on the set dimension evaluation index.

6. The method for evaluating the quality of handwritten Chinese characters according to claim 5, characterized in that, To meet the evaluation requirements of the defined dimensional evaluation indicators, the temporal information of each handwritten Chinese character sample is preprocessed to obtain the temporal representation parameters of the defined dimensional evaluation indicators, which also include: When the set dimension evaluation index is the stroke directionality evaluation index, according to the input requirements of the handwritten Chinese character quality assessment model corresponding to the stroke directionality evaluation index, the sine and cosine values ​​of the angle between the tangent of the stroke trajectory and the horizontal axis are calculated to obtain the characterization parameters of the stroke directionality evaluation index. When the set dimension evaluation index is the stroke order evaluation index, the time sequence information is normalized according to the input requirements of the handwritten Chinese character quality assessment model corresponding to the stroke order evaluation index, so as to obtain the characterization parameters of the stroke order evaluation index. When the set dimension evaluation index is the character structure evaluation index, the stroke trajectory direction, the neighborhood curvature and the neighborhood linearity of the stroke trajectory are calculated according to the input requirements of the handwritten Chinese character quality assessment model corresponding to the character structure evaluation index, so as to obtain the character structure evaluation index characterization parameters.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 5.