Paper— Design and Application of a Fuzzy Evaluation Algorithm for Stroke Force in Calligraphy Teaching Design and Application of a Fuzzy Evaluation Algorithm for Stroke Force in Calligraphy Teaching

— To solve the problem that the existing electronic word learning device only had a single character writing exercise function, the interaction structure and the stroke force analysis algorithm of Chinese characters were studied from aspects such easy use, smart technology and writing paper simulation. In response to the problems in the writing process and the limitations of smart guidance, the writing problems occurred the resistive touch screen were analyzed, and a fuzzy evaluation method for Chinese strokes was proposed. The main contents included membership template construction, fuzzy subset selection, template parameter generation and evaluation. The experimental result showed that the interaction structure can inherit the advantages of paper writing and exert the advantages of electronic devices. It is concluded that human-computer interaction based on interactive structures can better apply the intelligent machine to character practitioner.


Introduction
At present, the writing exercise equipment that appears in the electronic form has only a single practice function, and is weak in the ability to tutor in the writing process, or does not have the characteristics of intelligent tutoring. For instance, it can't point out the mistakes in the writing process, and the way and content to write and prompt is single. However, the study of intelligent tutoring program in writing has pushed writing guidance to a new level.
According to the quality evaluation of text strokes written analysis of the problem, we take Chinese characters as an example. Starting from the stroke, we extract the feature point information in the writing strokes to deal with the fuzzy closeness. We also systematically introduce the design and characteristic functions of the writing intelligent tutorship interaction structure, as well as the detailed introduction to the objective and comprehensive evaluation of the writing style analysis of the writing. The evaluation result is more objective and ideal, and other languages also have strong robustness. Because word is nothing more than a graph composed of two dimensional lines, Chinese characters, as a type of strokes, are strongly representative. The scholar Ren proposed the use of geometric method to calculate the geometric parallelism between the word to be evaluated and the template. And adopted the written English letter writing practice on the four line lattice as an example, he proposed a method for the quality evaluation of the prescribed format writing practice [6]. In addition, the research results in this field are also reported. Writing quality is closely related to the causes of the related literature, and the reasons for the quality of writing are more influenced by the negative effect on the writing quality.
The traditional graphical interface user interface is realized mainly through the icon button, mouse, window and menu selection (WIMP). The user's command is completed through a series of more complex clicks or selection process. The essential characteristics of these interfaces are mandatory command execution, which is difficult for users to interact with their purposes on the operation interface. But it also has an interactive advantage: people no longer need to memorize a large number of tedi-ous and boring commands, but can easily manipulate through visualized windows, menus, mice, dialogs and other forms. And people can directly operate the objects on the screen that conform to the common recognition, such as dragging, rotating and enlarging operation, which is very convenient for users to use.
In terms of the quality evaluation of written characters, the main achievements are mainly about Chinese characters. Fan Jianping put forward that from the perspective of calligraphic aesthetics, we could analyze automatically generated hand writing structure, framework and whiteness. He designed a judgment function to evaluate whether the glyph meets the aesthetic requirements of traditional calligraphy. Through the "thirty-six methods" of "Ouyang Xun junction", we get eight calligraphic rules for the design of printed Chinese characters: uniform whiteness; regular structure and stable center of gravity; tight upper part and loose lower part; consistent and uniform size; interspersed; coordinated proportion in length and width; traditional structure and appropriate care; strokes unity. By comparing several abstract qualitative descriptions, we use computer to evaluate it, then quantify it, and design it as an evaluation function.

Hardware configuration and prototype structure
The multi-function prescribed format intelligent tutoring system with interconnected functions include embedded processor ARMS, FLASH memory, SDRAM memory, EEPROM memory, LCD touch screen, A/D converter, LCD interface, USB interface, COM interface, Internet interface RJ45, power supply, and chassis. The LCD touch screen is embedded in the panel of the chassis for system display, user writing and command clicking. The touch screen is connected to ARMS through A/D converter and LCD interface. ARMS connects with announcer through audio interface and ARMS also connects USB interface, COM interface and Internet interface RJ45. The system uses pattern recognition, graphics, phonetics, friendly interactive interface, database, network engineering, and computer software technology to realize the guiding functions of online arrangement and submission of writing, online correction, online consulting work, voice or voice and text combined guiding function, simulating the interaction structure of paper writing, analysis of writing quality, structure, function and so on.

Working principle
There are two types of touch information provided by users, one is functional information, one is handwriting information, and the process of dealing with the two types of information is designed as shown in Figure 3. For example, the course of handwriting information processing is: firstly, by the writing pen writing on the touch screen, obtaining the information of the point coordinates of the handwriting, and doing corresponding preprocessing of the handwriting point information, and then matching with the known stroke pattern to judge whether the geometry of the strokes is correct. If the writing is wrong, the corresponding correction suggestions and advice should be given. Then, judge whether the relationship between the current strokes and the previous strokes is correct, whether the side relationship is correct, and so on, give the corresponding advice, and finally output the advice through forms such as speech or animation or text.

Interactive function setting
The main interface is divided into two parts, one is the example word selection area, and the other is the exercise area. The word selection area can be used to select examples of exercises. The contents of the exercises are in strict agreement with the contents published in the nine year compulsory education people's education press. The writing practice area is composed of three parts: handwriting case, writing result processing function key and main structure function key. The handwriting grid will be introduced in detail in subsequent chapters. Next, we will summarize the interaction structure function. As shown in Figure 4, it is the logical tree structure module of interaction structure.
There are grade selection keys in the word selection area, which can select the practice contents according to the schedule of practice; the selection key of the number of practice times should be selected according to the assignment of the teacher. Once the word selection is completed, the word selection is completed by directly selecting the word to confirm, and there is an example display paper in the middle to show the selected case. If the content selected exceeds the display scope of a case display paper, it can carry out the page to page processing of the exchange of light and dark pages.  Results and discussion

Interactive structure implementation
In the word practice, we select different writing formats according to the type selection and training mode selection. For example, in the practice of Chinese characters, our traditional writing forms are field, rice, back and mouth, but when practicing phonetic alphabet or English alphabet, the commonly used is four lines, the second line, and so on. At the beginning of practice, because of the poor sense of balance in writing pen and the complicated writing line, the word written is too large. When designing interaction structure, we should take full account of these characteristics, and make reasonable and free adjustment of grid size, format, and layout and so on. On paper-material exercise paper, because of the "dynamic nature" of electronic equipment, some attributes such as exercise format and grid size cannot be changed at will. Using resistive touch screen can avoid this shortcoming. As long as we use dynamic refresh to redraw, we can finish the modification.
According to these different personalization requirements, different writing formats should be generated. To facilitate the later description, we set up some related variables and instructions here. The length and width of interaction paper are represented by a and b, respectively, the size of writing grid is represented by Size=a*b and the distance between rows and rows is d. The interactive paper is a two-dimensional Cartesian coordinate plane, as shown in Figure 5. When plotting a written case, we should automatically calculate, generate and arrange based on the size of a*b of interactive paper and the size of each writing grid. The rectangle range of drawing squares is drawn on the interaction paper, and the left upper and lower coordinates are respectively (left, top) and (right, down). We began to draw the upper left corner of the written lattice as (left, top), and the lower right corner is (right, down). The mathematical model is shown in (1).
The mathematical model of drawing lines and each row writing grid number are shown in (2).
When the scope coordinates of all the writing panels on the interactive paper are calculated, only the format and scope of the written grid of the book should be drawn in the specified format in each writing grid. After obtaining the parameters, the coordinates drawn for each grid are obtained by the following algorithm.
In general, when writing practice and habit writing are conducted, there is a written template that can be referred to. The design of this interaction structure continues this writing habit, and takes the layout of example words. There are n new words in the current exercise class, and the number of written layouts that need to be laid out should be divided into the situation of square block and not a square word to discuss. If it is a square word, it only needs to lay out n writing grids; if it is not a square word, such as pinyin or English word, it needs to be split into characters. The number of layout writing grids is: In (3), t i refers to the number of characters representing i-th word or Pinyin. It should be noted that in non-square words, there is a need to reserve a word between words and words, so as to distinguish different words or Pinyin, and not to be confused.
Because of younger age, distraction and other factors, it is easy for practitioners to write pictures randomly on writing paper. In order to prevent this situation and improve the practice efficiency, this interactive structure designs a function of writing scope supervision, which enables the practitioners to practice only in the specified writing grid. When the current writing tasks are completed, they can be moved to subsequent writing grids for writing.
The handwriting coordinate of the current writing is (x, y), and the control information Position is read from the current ICEAS description object. When the mathematical model of the writing range satisfied in Position satisfies the formula (4), the current handwriting coordinates are located in the prescribed writing grid, allowing the writing activity to be carried out. Otherwise, the computation result can be passed to Suggestion through the form of message flow, and output feedback information.
Layout of the case in the practice area: It is still the ICEAS description with the writing grid as the unit. Each writing grid is a coaching description object. There are four new word in the case area, and each word is described red for 7 times, 1=5, c=4, namely 4*28>4*5. It means that in a page, not all practiced new words can be shown.
In order to solve the problem that cannot be displayed in one page, a mechanism of bright and dark page display is designed. By calculating the number of rows per page and the number of columns, we get the number of ICEAS of the l*c page. In containers, the logic order of all agents tutoring object structure, namely, each ICEAS describing object stored is shown in Figure 6. The first level container stores page node information, which represents each node to store all the ICEAS description object information described by the ICEAS structure in one page; and in each node of A, a two-level container is stored. Each node of this two-level container stores all the ICEAS description object information in a row. For example, the j-th row node in B shown in the figure represents all the information on the j-th row in the first page; then there is a three-level container in each node of the two-level container, and each node in the three-level container expresses the specific ICEAS describing object. ICEAS describing objects describe, in the current writing grid, how the writing word guide and control some interactive information. The ICEAS describing object itself is a container unit. When writing to the i-th page, we only need to index the i-th node in the first level container to display the information and provide guidance.
The form of the writing grid is determined by the results of the "practice format" selection. The number of format lines is determined by the size of the touch screen, the area distribution of the two areas and the size of the writing grid, and the mathematical models and algorithms for the formatting form in the upper section are introduced in detail.  The writing area is a multi-layer structure. The touch screen writing area for the user's writing is a clear page. In the storage area, the multi-page space that can hold exactly the same page grid is developed. The page of the space is called a hidden page. The hidden page recorded by the one page tracking touch is called the buffer potential page, which is recorded as BP, and the rest of the hidden pages are dynamically generated, to be recorded as DP 1 , DP 2 ,...,DP q , respectively. The page structure of the writing area is shown in Figure 7.
BP {DP 1 , DP 2 , ……, DP q }, for the convenience of interaction between BP and DP 1 , DP 2 ,...,DP q , we set up the dynamic hidden page meter !. !=i, i {1, 2, ……, q} shows that the content of BP is the content of DP i , and the content of DP i is also the content of a clear page. For different exercises, Q has different formulas.
Supposing that a practice objects are selected, every word is practiced for b times, and it can accommodate up to write c words for describing red: For comparison and practice: The back cleaning is the function of the eraser to erase the writing handwriting in the simulation writing practice. The functions realized by this interactive structure include stroke back cleaning, word back cleaning, row back cleaning and page back cleaning. The realization mechanism is that the writing back cleaning is to read the stroke[point_type] information in the current ICEAS describing guidance object, delete the last input handwriting information and redraw it, and then invoke the handwriting information in the corresponding writing grid to display. The word back cleaning is similar to the stroke back cleaning, but the deleted handwriting information is more than the stroke back cleaning, and the information of the stroke[point_type] container is emptied and then redrawn the information in the writing grid. The row back cleaning read directly the two-level container, and the content of stroke [point_type] in all the ICEAS description information in the node is circulated and emptied.
If it is currently on j-th line in i-th page, then read out the i-th node information from the first level container, then read out the information of the j-th node of the two-level container from the node, and delete all the stroke[point_type] information in its description structure; finally, realize the page back cleaning, which is relatively simple, basically similar to the row deletion. The scope of deleting information is wider, and all the stroke[point_type] describing structures in the corresponding node in the first level container should be deleted. As shown in Figure 8, it represents the logic diagram of the word back cleaning. At the moment, the k-th word on the first row in the first page is to be deleted. At this time, the direct index is positioned to the k location in the three-level container C, and the delete operation can be done. It is of great significance to the social acceptance of this system that the preservation of the results of the exercises is indispensable for reviewing the progress of the writing, making mistakes in writing, promoting the effect of learning, and realizing the encouragement of the teaching aids.
The preservation function is divided into two kinds of practice preservation and operation preservation. The contents of the practice preservation are the whole scene, including the practice attributes, the clear pages and all the hidden pages to facilitate the next practice for users. As long as the operation preservation is convenient for a teacher to checking the homework of a number of students, it does not need to recover the scene. The two kinds of storage are both in the form of stack files. The save function implementation process is shown in Figure 9.

Stroke fuzzy evaluation of touch screen handwriting Chinese characters
The handwriting point information includes the ordered two-dimensional coordinate sequence vector of all handwriting points acquired in real time, the monotone analysis results of the handwriting point sequence in the direction of X and Y, the key point description vector and so on.
The number 1, 0, and -1 are used to indicate monotonically increasing, monotonically invariant and monotonically decreasing, that is, a monotone annotation vector in one direction is a vector consisting of n-1 -1, 0, and 1 elements. Let u to be the coordinates of a certain direction for the handwriting, and " is the monotonous labeling value of the direction. The calculation method of the monotonous labeling vector in the direction of X and Y is: In the above formula, f (u)=u i -u i-1 .
To evaluate the quality of stroke writing and writing style analysis, we set up two kinds of fuzzy subsets. In terms of the stroke force analysis, the number of key points in the stroke is the fuzzy subset, that is, the domain is the number of key points, namely the number of K lt , K rd , K ld , K l , K r , K t , K d appearing in turn. For instance, the vertically corresponding ideal fuzzy subset set is {0, 0, 0, 0, 0, 0, 0, 0}, that is, the transverse ideal geometry does not appear any key points; the ideal fuzzy subsets corresponding to the transverse fold are {0, 1, 0, 0, 0, 0, 0, 0}, that is, the transverse fold ideal set shape will only have a right upper inflection point at the corner. There are five levels of writing quality evaluation, which are excellent, good, medium, qual-ified and poor. For the fuzzy membership degree obtained by analyzing the whole Chinese character, we can get the grade of handwriting quality evaluation through the analysis of the membership degree.
Set up a Chinese character consisting of K strokes and the corresponding number of the i-th (i=1, 2, …,K) strokes is N. µ # refers to the key point fuzzy matrix template of K Chinese characters stroke, where # represents the words, as shown in (8).
µ ic uses the Gauss analytic formula, that is: In (9), (i=1, 2,…, K, c {lt, rt, rd, ld, l, r, t, d}, parameter a is the number of characteristic points of ideal strokes, and n ic is the number of template strokes and feature points obtained from Ni.
The evaluation basis is the closeness between the stroke force of actually written word and that of the template word. Because the writing basis of different writing practitioners participating in the evaluation is different, we need to adopt different criteria with different strictness to evaluate different practitioners.
For the words with K strokes, set µ #´ as its fuzzy template parameter matrix, and µ # is the fuzzy parameter matrix of the actually written stroke of the writing. The comprehensive closeness of the stroke force of the written word and the stroke force of the template is expressed by Sim (µ #´, µ # ), and then there are: iJET -Vol. 13, No. 7, 2018 In (11), w i (i=1, 2,…, K) suggests the weight based on stroke length. In general, there is uneven phenomenon that the stroke force of long stroke writing is more than the short stroke writing. Set l to be the stroke length and l i to be the i-th stroke length, then there is: Due to the too small stroke force, the phenomenon of "jumping line" appears as a serious problem of the stroke, which is given higher weights singly, such as 0.5, and the rest is calculated according to the ratio of length. The template is µ #´, the stroke is written one by one, and the system orderly generates, µ # (i= 1, 2, ......, K). When each stroke is produced, a stroke is calculated with sim(µ i´, µ i ) once. After K strokes are finished, solve w i , and then calculate Sim (µ #´, µ # ) and compare Sim (µ #´, µ # ) with the grade division parameters to give the stroke force evaluation.

Test and effect analysis
Taking the first lesson of the first book of nine years of compulsory education, published by the people's education press, as an example, there are four new characters. The number of repeated exercises in this set is 2 times and the practice format is set to field grid contrast practice. The interactive structure generation steps are as follows: Step 1: draw the writing grid, and draw the method according to the practice parameters.
Step 2: carry out word layout and point selection. In this practice, all the new words are selected. With the description of the word structure in the third chapter, the first word "person" is taken an example.
Step 3: do word practice layout in the practice area. According to the description of previous chapters, there is only one node in the first level container, and its logical structure is shown in Figure 10. This page shows three lines, and each line contains 5 practice words.  Step 4: implement intelligent real-time tutoring based on ICEAS describing objects of each written case in container. With the example of the writing grid in Figure 10, in the case of the ICEAS description of the first two writing cases, the human character in the first writing case is only used as an example word, which cannot be written in this square, but only the display font is drawn. If we write here, it will prompt to write beyond the scope. The second handwriting grid is allowed to write, and the handwriting should be displayed according to the trajectory of the writing pen, such as ICEAS describes information in the second grid. The motion implemented in Action is based on G information in Event, and then guiding. If writing is not carried out according to the G template, Action sends feedback to Suggestion and prompts for guidance counseling.
According to the feedback advice of the interactive machine, when the practitioner enters the stroke information, the machine calculates in real time and calculates whether the stroke is in accordance with the preset conditions in the interaction. If it is conformed, the machine allows the practitioner to practice the next step, to grant the right to write the next stroke or to automatically jump the writing range to the next writing case. Writing feedback advice uses multi-channel technology, which can be divided into three ways: text, animation and voice. Because of the limitation of screenshots, we use the way of text prompt. The format of the practice set is "meter" or "field". The way of practice is clear training, that is, no red template or example word, and the example word is only displayed on the example area above. In Experiment 1, there is a mistake in the writing of the word of "Kou". The relationship between the first vertical and the second cross section is too long, and the relationship with the vertical is not "T" cross. In Experiment 2, it is also a hint of relationship error, and jumps dialog box to prompt "horizontal and vertical bold is not a semi encircling relationship". According to the graph, the vertical writing is too long and passes through the vertical bold. Because of the wrong relationship between the two strokes, it results in writing errors. At this time, the machine prompts timely for the practitioners to erase the current writing strokes and rewrite them. In Experiment 3, it is suggested that the vertical geometry of writing is wrong when writing the word "Zhong" finally, and the vertical pen starts with burrs to make the shape change.
The writing is two-dimensional lines, so it is used to evaluate other languages, which also has very strong robustness. It uses different methods from the past and starts from the characteristic points of the strokes, and then uses the fuzzy psychology for the fuzzy method evaluation. The experiment shows that the method is basically close to the results of most people, the results of the practice of evaluating different practitioners are more objective and impartial, and the evaluation results will not be changed with the teacher's personal preferences.

Conclusion
This paper studies the intelligent tutoring of text writing, and uses resistive touch screen and software technology to simulate the traditional writing paper. On the basis of inheriting traditional paper writing practices, we overcome the "static" drawbacks of paper writing practices and carry forward the advantages of electronic devices, so that their practices can be changed dynamically and change the properties of the exercise at will. The second is the stroke force analysis of the writing lines. Taking the Chinese characters written on the touch screen as an example, we extract the information of the feature points in the strokes and use the fuzzy method to analyze and evaluate the strokes force. It fills up the abstract concept of "stroke force" neglected when using computer technology to deal with the problem of writing quality and it only focuses on the blanks in the study of image geometry.