Multi-element copybook test set generation method and system for calligraphy evaluation
By collecting and preprocessing single-word handwriting data of different copybooks and combining them into target copybooks, the problem of inefficient generation of test sets in the existing technology is solved, and flexible, accurate and diverse test set generation is achieved, suitable for complex calligraphy system tasks .
Patent Information
- Application Number
- CN202410970293.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing calligraphy system is limited by the fixed matching relationship between characters and copybooks when generating test sets, and cannot flexibly integrate single-word handwriting data of different copybooks, resulting in a cumbersome and inefficient test process.
By collecting single-word handwriting data from different copybooks, preprocessing and scaling, combining them into target copybooks in a specific order and layout, generating a diverse set of tests and supporting user-defined locations for customization.
It improves testing efficiency and accuracy, breaks the inherent limitations of copybook data, supports large-scale data processing, and the generated test set is more flexible, targeted and updating, and is suitable for complex and huge calligraphy system tasks.
Smart Images

Figure CN118918598A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of calligraphy evaluation, and more specifically to a method and system for generating a multivariate copybook test set for calligraphy evaluation. Background Art
[0002] The calligraphy system is a computer technology system used to evaluate and analyze calligraphy works. It evaluates the calligraphy dot matrix handwriting data by calling the algorithm interface to obtain the score of the character and comments on various dimensions such as strokes, structure, and word surface.
[0003] The result data displayed in the calligraphy system is usually composed of characters and copybooks. In order to test the accuracy of its scoring and the stability of various functions, testers usually need to generate a test set containing a large number of Chinese characters. However, the traditional test set construction method is often limited to the fixed matching relationship between characters and copybooks. Since the data relationship between characters and copybooks is matched when writing, this limits the flexibility and scalability of the data to a certain extent. Especially when it is necessary to reassemble the single-character handwriting data from different copybooks, the existing calligraphy system often cannot effectively handle this cross-copybook data integration. This makes the test set generation process cumbersome and inefficient.
[0004] For testers, when faced with testing a large number of Chinese characters, the testing process is often cumbersome, inefficient, and prone to errors. Therefore, how to flexibly integrate single-character handwriting data from different copybooks and dynamically and intelligently generate a variety of test sets is a problem that technicians in this field need to solve urgently. Summary of the invention
[0005] In view of this, the present invention provides a method and system for generating a multi-copybook test set for calligraphy evaluation, which can generate a variety of test sets.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a method for generating a multivariate copybook test set for calligraphy evaluation, comprising the following steps:
[0008] Collecting single-word handwriting data from different copybooks according to preset conditions, performing preprocessing, and obtaining source single-word data;
[0009] First, the font size of the source single word data is scaled in proportion to the font size of the target copybook, and then the strokes and handwriting of the source single word data are scaled in proportion to the same;
[0010] The strokes of the scaled source single-word data are combined into the target copybook in a specific order and layout as a test set.
[0011] Furthermore, the collection of single-word handwriting data from different copybooks includes:
[0012] Determine the characteristics of the single-word handwriting data to be collected according to preset conditions, wherein the preset conditions include: specific copybook, different level scores, whether there are missing strokes, and whether the strokes are too large or too small;
[0013] Use SQL query statements to extract single-word handwriting data that meets preset conditions from the database.
[0014] Furthermore, the preprocessing method for the collected single-word handwriting data includes: one or more of: deduplication, missing value processing, format conversion and standardization.
[0015] Furthermore, the matching process of the source single word data and the target copybook includes:
[0016] Get the target character grid coordinates a(gx1,gy1,gx2,gy2) in the target copybook, and calculate the size of the target character grid;
[0017] Get the word grid coordinates b(vx1,vy1,vx2,vy2) in the source word data, and calculate the size of the word grid of the source word data;
[0018] Calculate the proportion of the source single word data grid that needs to be adjusted according to the size of the target grid and the size of the original single word data grid;
[0019] The coordinates of the source single-word data grid are adjusted according to the calculated ratio, and the unit amounts rx and ry of the x and y coordinates of the adjusted source single-word data grid that need to be moved relative to the target grid are calculated;
[0020] Adjust the strokes and handwriting of the source word data according to the same proportion;
[0021] Move the adjusted x and y coordinates of the strokes of the source single word data so that the strokes are in the target word grid.
[0022] Further, the step of moving the strokes of the source word data to the target word grid includes:
[0023] Determine whether the coordinates of the first stroke are less than (vx1, vy1). If so, move the x-axis coordinate of the stroke right by the gx1 coordinate amount and move the y-axis coordinate up by the gy1 coordinate amount. Otherwise, continue to determine whether gy1 is greater than or equal to vy1, and determine whether gx1 is greater than or equal to vx1.
[0024] If gy1 is greater than or equal to vy1, the y-axis coordinate of the handwriting stroke is moved up by the ry coordinate amount; if gy1 is less than vy1, the y-axis coordinate of the handwriting stroke is moved down by the ry coordinate amount;
[0025] If gx1 is greater than or equal to vx1, the x-axis coordinate of the handwriting stroke is shifted right by the rx coordinate amount. If gx1 is less than vx1, the x-axis coordinate of the handwriting stroke is shifted left by the rx coordinate amount.
[0026] Furthermore, the step of combining the strokes and handwriting of the scaled source word data into the target copybook in a specific order and layout includes:
[0027] Arrange the strokes of the scaled source single-character data horizontally in order into the target copybook; or:
[0028] Arrange the strokes of the scaled source word data vertically in order into the target copybook; or:
[0029] Fill the strokes of the scaled source single word data into a designated row and column of the target copybook.
[0030] Furthermore, the generated test set includes:
[0031] The single-word handwriting data of multiple different copybooks are recombined into the same target copybook;
[0032] The same single character from different copybooks is combined into the same target copybook;
[0033] High-scoring single characters are mixed and combined into the target copybook;
[0034] Low-scoring words are mixed and combined into the target copybook;
[0035] Combine characters that are too large or too small into the target copybook.
[0036] Furthermore, the method further includes: on the user interface, customizing the position of a single word in the target copybook by dragging and dropping.
[0037] Furthermore, when the number of source single-character data exceeds the total number of character grids of a target copybook, the batch of source single-character data is combined into a plurality of new target copybooks.
[0038] In a second aspect, the present invention provides a multi-pronged copybook test set generation system for calligraphy evaluation, which is applicable to the multi-pronged copybook test set generation method for calligraphy evaluation, comprising:
[0039] The single-word acquisition module is used to collect single-word handwriting data from different copybooks according to preset conditions, perform preprocessing, and obtain source single-word data;
[0040] A scaling module is used to first scale the font size of the source single word data in proportion to the font size of the target copybook, and then scale the strokes and handwriting of the source single word data in the same proportion;
[0041] The combination module is used to combine the strokes and handwriting of the scaled source single-word data into the target copybook in a specific order and layout as a test set.
[0042] It can be seen from the above technical solutions that, compared with the prior art, the present invention has the following beneficial effects:
[0043] 1. The present invention can flexibly reassemble single-character handwriting data from different copybooks into the same copybook, breaking the limitation that the characters and copybook data in the calligraphy system are matched when they are written.
[0044] 2. The present invention can improve test efficiency and accuracy. For testers, they can quickly extract the evaluated single-word handwriting data and quickly reassemble it into a new copybook for evaluation. They can also dynamically and intelligently generate a variety of test sets. This not only reduces duplication of work and improves test efficiency, but also ensures the objectivity and accuracy of the evaluation results. The present invention also supports large-scale data processing: in the face of a large number of Chinese characters supported by the calligraphy system (such as more than 3,000 Chinese characters), it can efficiently process these data and realize the rapid extraction, reassembly and evaluation of a large amount of single-word handwriting data. This greatly improves the calligraphy system's ability to process large-scale data, allowing the system to cope with more complex and large tasks.
[0045] 3. The test set generated by the present invention is more flexible and diverse: Traditional copybook test sets usually have fixed structures and contents. The present invention collects single characters from different copybooks under specific conditions, and combines them in a specific order and layout, making the generation of test sets more flexible and diverse. It can also generate multiple copybook test sets containing different difficulty levels and different fonts to meet different testing requirements.
[0046] 4. The test set generated by the present invention is customizable and personalized: it allows specific rows and columns to be specified to fill in single words, thereby realizing customized generation of a copybook test set. This personalized test set can improve the effectiveness and accuracy of the test.
[0047] 5. The test set generated by the present invention is more targeted and accurate: by specifying a specific word in the character grid, a precise test can be performed on a specific Chinese character or stroke. This highly targeted test set can help users more accurately assess their writing level and existing problems, thereby formulating a more effective improvement plan.
[0048] 6. The test set of the present invention is updatable: the design of the specific format combination makes the copybook test set easy to update. New content can be added, difficulty can be adjusted, layout can be optimized, etc. according to different needs and feedback, so that the test set always keeps pace with the times. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] 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.
[0050] Figure 1 A flowchart of a method for generating a multivariate copybook test set for calligraphy evaluation provided by the present invention;
[0051] Figure 2 A flow chart of matching the source single-character data and the target copybook provided by the present invention;
[0052] Figure 3 A schematic diagram of a target copybook for horizontal combination;
[0053] Figure 4 A schematic diagram of a target copybook for vertical combination;
[0054] Figure 5(a)-Figure 5(b) A schematic diagram of a target copybook for a specific format combination;
[0055] FIG6( a ) is a schematic diagram of a source data copybook 1;
[0056] FIG6( b ) is a schematic diagram of the source data copybook 2;
[0057] FIG6(c) is a diagram showing the effect of combining source data copybook 1 and source data copybook 2 into a new copybook;
[0058] Figure 7 A full copybook is an effect diagram of the same single character combined into the copybook;
[0059] Figure 8 This is the effect diagram of the mixed combination copybook of single words with a score of 95 or above;
[0060] Fig. 9 This is the effect diagram of the mixed combination copybook of single words below 60 points;
[0061] Fig.10 This is the effect of a mixed combination of single characters with 50% smaller characters and 50% larger characters. DETAILED DESCRIPTION
[0062] 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.
[0063] like Figure 1 As shown, the embodiment of the present invention discloses a method for generating a multivariate copybook test set for calligraphy evaluation, comprising the following steps:
[0064] S1, collecting single-word handwriting data from different copybooks according to preset conditions, performing preprocessing, and obtaining source single-word data;
[0065] S2, first scaling the font size of the source single word data in proportion to the font size of the target copybook, and then scaling the strokes and handwriting of the source single word data in the same proportion;
[0066] The strokes of the scaled source single-word data are combined into the target copybook in a specific order and layout as a test set.
[0067] The above steps are further explained below.
[0068] S1. Data collection and preprocessing: Collect single-word handwriting data from different copybooks and perform preprocessing, including data cleaning, format conversion and standardization, to ensure data consistency and comparability, including:
[0069] S11. Determine data requirements: determine the single-word handwriting data features to be collected according to preset conditions, wherein the preset conditions include: specific copybook, different levels of scoring, whether there are missing strokes, and whether the strokes are too large or too small.
[0070] S12. Design data extraction strategy:
[0071] Design SQL query statements according to requirements to accurately extract required data.
[0072] Perform data extraction, run SQL queries, and use SQL query statements to extract single-word handwriting data that meets the preset conditions from the MongoDB database.
[0073] S13. Data preprocessing process: The methods of preprocessing the collected single-word handwriting data include: one or more of: deduplication, missing value processing, format conversion and standardization.
[0074] 1) Data deduplication: In MongoDB databases, aggregation pipelines are usually used to achieve data deduplication. For example, if you need to extract the word "gold" with a total score of 90 points, if there are multiple duplicates in the database, deduplication is required.
[0075] 2) Missing value processing: Some of the data in the database may be missing cell data, and some may be missing stroke data. It is necessary to identify the missing values in the data and decide whether to fill or delete them based on the importance of the field.
[0076] 3) Outlier processing: Use the IQR (interquartile range) method to identify and process outliers. When some stroke scores of some characters appear extremely high or extremely low, outlier processing is required:
[0077] Extremely high values: If a Score value is much higher than the normal range of most values in the data set (that is, higher than the third quartile Q3 plus 1.5 times the IQR), the value is considered to be an extremely high value and will be deleted as an outlier.
[0078] Extremely low values: Similarly, if a Score value is far below the normal range of most values in the data set (i.e., below the first quartile Q1 minus 1.5 times the IQR), the value is considered to be an extremely low value and will also be treated as an outlier and deleted.
[0079] 4) Format conversion: Convert data in CSV format to JSON format for front-end display and further processing.
[0080] 5) Standardization processing: For data with different character grid sizes and character grid numbers, all handwriting data are scaled to a unified reference size through a standardization algorithm.
[0081] After preprocessing the collected single-word handwriting data, verification is performed to ensure the consistency and accuracy of the data. The cleaned, converted and standardized data are then imported into a new database or data warehouse to generate a test set.
[0082] S2. Matching of source single-word data and target copybook.
[0083] According to the data collected in the previous step, the single-character handwriting data from different copybooks are matched and combined in a specific order and layout. In this process, the source single-character grid size is first scaled in proportion to the grid size on the target copybook, and then the handwriting data is scaled in the same proportion to ensure that the combined copybook is consistent in strokes, structure, and wording. Figure 2 As shown, specifically including:
[0084] S21, obtaining the target character grid coordinates a (gx1, gy1, gx2, gy2) in the target copybook, (gx1, gy1) is the lower left corner coordinate of the character grid a, (gx2, gy2) is the upper right corner coordinate of the character grid a; calculating the size of the target character grid a, that is, its width and height:
[0085] The width of the target character grid a = gx2-gx1; the height of the target character grid a = gy2-gy1.
[0086] S22. Obtain the coordinates b (vx1, vy1, vx2, vy2) of the character grid in the source single-word data, where (vx1, vy1) is the coordinate of the lower left corner of the character grid b, and (vx2, vy2) is the coordinate of the upper right corner of the character grid b; calculate the size of the character grid of the source single-word data, the width of the source single-word data character grid b = vx2-vx1; the height of the source single-word data character grid b = vy2-vy1.
[0087] S23, according to the size of the target word grid and the size of the original word data word grid, calculate the proportion of the source word data word grid that needs to be adjusted:
[0088] Scaling ratio (width) kx = width of square a / width of square b;
[0089] Scaling ratio (height) ky = height of grid a / height of grid b.
[0090] S24, adjusting the coordinates of the source single word data grid b according to the calculated ratio:
[0091] Adjust the coordinates of the source single word data grid according to the following formula:
[0092] new vx1=vx1×kx;
[0093] New vy1 = vy1 × ky;
[0094] new vx2=vx2×kx;
[0095] The new vy2=vy2×ky.
[0096] S25, calculate the unit amount rx, ry of the x, y coordinates that the adjusted source single word data grid needs to move relative to the target grid:
[0097] rx = int(vx1)-int(gx1);
[0098] ry=int(vy1)-int(gy1).
[0099] S26, adjusting the strokes and handwriting of the source word data in the same proportion; the strokes and handwriting of each word are composed of multiple continuous x, y points, and the adjustment method of the x-coordinate and y-coordinate of the handwriting strokes on the source word grid is:
[0100] For the x coordinate:
[0101] nx i = int(x i ×kx)
[0102] Among them, nx i is the new x coordinate value of the stroke after scaling. iis the x-coordinate value of the original handwriting stroke, and kx is the scaling factor of the x-coordinate.
[0103] For the y coordinate:
[0104] ny i = int(y i ×ky)
[0105] Among them, ny i is the new y coordinate value of the stroke after scaling. i is the y-coordinate value of the original handwriting stroke, and ky is the scaling ratio of the y-coordinate.
[0106] S27, moving the adjusted x, y coordinates of the strokes of the source single word data so that the strokes are in the target word grid.
[0107] The process of moving the strokes of the source word data to the target word grid specifically includes:
[0108] Determine whether it is a special source data format, that is, whether the coordinate of the first stroke is less than (vx1, vy1). If so, move the x-axis coordinate of the handwriting stroke right by gx1 coordinates, that is, x+gx1, and move the y-axis coordinate up by gy1 coordinates, that is, y+gy1; otherwise, continue to determine whether gy1 is greater than or equal to vy1, and determine whether gx1 is greater than or equal to vx1;
[0109] If gy1 is greater than or equal to vy1, the y-axis coordinate of the handwriting stroke is moved up by the ry coordinate, that is, y+abs(ry); if gy1 is less than vy1, the y-axis coordinate of the handwriting stroke is moved down by the ry coordinate, that is, y-abs(ry);
[0110] If gx1 is greater than or equal to vx1, the x-axis coordinate of the handwriting stroke is shifted right by the rx coordinate amount. If gx1 is less than vx1, that is, x+abs(rx), the x-axis coordinate of the handwriting stroke is shifted left by the rx coordinate amount, that is, x-abs(rx).
[0111] 1) When the handwriting stroke coordinates x, y are within the coordinate range of the source single word data grid, the source single word data is considered to be in a normal data source format. For example:
[0112] The source single-word data grid coordinates are [1936,1064,2110,1238].
[0113] The handwriting stroke coordinates x are [2009, 2010, 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018, 2018, 2018];
[0114] The coordinate y is [1111,1111,1112,1113,1114,1115,1116,1117,1119,1119,1120,1120];
[0115] At this point, the handwriting stroke coordinates are within the character grid.
[0116] 2) When the handwriting stroke coordinates x, y are not within the coordinate range of the source word data grid, the source word data is considered to be in a special source data format, for example:
[0117] The source single word data grid coordinates are [1937,2827,2110,3000];
[0118] The handwriting stroke coordinates x are: [57,58,59,59,65,68,78,81,86,89,93,94,97,104,109,111,113,116,117,121,126,127,128,128,129,130,130,129,129,130,130,129,130,130,131,133,132,132,133,132,133,132,133,133,132,129,128,125];
[0119] y is: [77,77,78,78,79,80,81,79,79,79,79,78,78,76,74,74,74,74,73,72,71,71,71,71,70,71,71,70,71,71,71,72,72,73,73,74,73,74,73,74,74,74,72,73].
[0120] At this time, the handwriting stroke coordinates are not within the character grid range.
[0121] 3) After adjusting the handwriting strokes of the source single word data to the target copybook, the adjusted data format must ensure that x and y are within the character grid coordinate range. For example, the target character grid coordinates are: [1066, 1524, 1240, 1699], the handwriting stroke coordinates x are: [1117, 1118, 1118, 1118, 1119, 1120, 1120, 1120], and y are: [1624, 1623, 1624, 1624, 1624, 1624, 1624, 1624].
[0122] The x-axis of the stroke coordinate point is x. Normally, it is within the range of the character grid coordinates, that is, between x1 and x2 (for a special source data format with the (0, 0) coordinate as the reference, when converting to normal data, the starting coordinate of the character grid needs to be added, that is, x + x1). The y-axis of the stroke coordinate point is y. Normally, it is within the range of the character grid coordinates, that is, between y1 and y2 (for special data with the (0, 0) coordinate as the reference, when converting to normal data, the starting coordinate of the character grid needs to be added, y + y1).
[0123] S28. Combine the stroke handwriting of the scaled source single-character data into the target copybook according to a specific order and layout, and output, specifically including:
[0124] Arrange the stroke handwriting of the scaled source single-character data horizontally in order into the target copybook; or:
[0125] Arrange the stroke handwriting of the scaled source single-character data vertically in order into the target copybook; or:
[0126] Fill the stroke handwriting of the scaled source single-character data into a specific row and column of the character grid on the target copybook.
[0127] Next, taking the poem "Gold, Wood, Water, Fire, Earth" as an example, the above combination process will be further explained.
[0128] 1) Split the poem into individual Chinese characters and arrange them in the order of the poem to form a single-character sequence. In this example, the order is: Gold, Wood, Water, Fire, Earth, One, Two, Three, Four, Five, Gold, Wood, Water, Fire, Earth, Sky, Earth, Divide, Up, Down, Sun, Moon, Shine, Now, Ancient.
[0129] 2) Perform single-character data matching. According to the determined single-character order, retrieve the corresponding single-character handwriting data from the database. This step needs to ensure the accuracy and integrity of each single-character data.
[0130] 3) Define the copybook format and determine the layout of the target copybook, including the number of rows and columns, cell size, etc. For example, define a copybook format of 20 rows and 10 columns.
[0131] 4) Matching of single characters and copybook: According to the layout of the target copybook, match the single-character data to each cell of the copybook. This process needs to consider the ratio matching between the size of the single character and the cell of the copybook.
[0132] 5) Match the single characters to the target copybook according to a specific order and layout.
[0133] It can be a horizontal combination, arranging the single characters horizontally in order, with one single character placed in each cell. For example, in the first row, place the characters "Gold", "Wood", "Water", etc. from left to right, as Figure 3 shown.
[0134] It can be a vertical combination, arranging single characters vertically in order, with one single character placed in each cell. For example, characters such as "gold", "wood", "water", etc. are placed in the first column from top to bottom, as shown in Figure 4 shown below.
[0135] It can be a combination in a specific format, that is, specifying the cells in a certain row and column on the copybook to fill in the specified single characters, so that any character can be filled in any cell. This combination method allows for a more flexible layout design, and the positions of the single characters can be arranged according to the test requirements. As shown in Figure 5(a), each sentence occupies one column, from left to right; as shown in Figure 5(b), each sentence occupies one row, from top to bottom, and is written twice repeatedly.
[0136] After obtaining the data adjusted according to the target copybook character grid in the previous step, the single-character handwriting data is restored, that is, the data processed by the calligraphy system is converted back to its original format. At this time, by reversing the parsing and processing method of the calligraphy system, a copybook single-character handwriting data file that can be re-evaluated can be obtained.
[0137] After obtaining the available copybook single-character handwriting data files, these single-character handwriting data need to be combined into copybook handwriting data for each sheet. When the total number of source single characters exceeds the maximum capacity of a new copybook (the total number of character grids in the copybook), this batch of data sources needs to be combined into multiple new copybooks.
[0138] After obtaining the data of the new copybook handwriting file, these handwriting data can be rewritten into the calligraphy evaluation system for a round of evaluation to obtain the score of the combined characters and the comments on each dimension. According to the evaluation results, the combined copybook can be optimized and adjusted to improve its overall quality.
[0139] Through the above steps, it is possible to skillfully integrate copybook data from various sources, which not only have different font styles but also different character grid sizes. When faced with writing works with different scores and single-character data of different sizes written by the writer, the present invention can accurately identify and extract the required data sources.
[0140] Subsequently, these carefully selected data sources will be skillfully combined into the same copybook, just like a calligraphy collection carefully compiled by an experienced calligraphy master. Such a combination not only ensures the professionalism and diversity of the test set but also can provide customized learning evaluation and feedback according to the actual situations and needs of different learners.
[0141] Finally, the generated test set includes:
[0142] A mixed copybook of single characters from multiple copybooks: The single-character handwriting data from two or more different copybooks is recombined into the same target copybook, as shown in Figure 6(a)-Figure 6(c) shown below.
[0143] Multiple forms of the same word: The same word from different copybooks is combined into the same target copybook, such as Figure 7 shown.
[0144] A selection of high-scoring words: High-scoring words (e.g., above 95 points) are mixed and combined into the target copybook, such as Figure 8 shown.
[0145] Improvement set of low-scoring words: low-scoring words (e.g. below 60 points) are mixed and combined into the target copybook, such as Fig. 9 shown.
[0146] Combination set of words with contrasting size: words that are larger or smaller are combined into the target copybook, for example, a mixed combination of 50% smaller words and 50% larger words, such as Fig.10 shown.
[0147] More advantageously, the present invention can also be extended as follows:
[0148] 1) Define specific formatting rules: Design rules to define the logic of specific formatting combinations, such as the order of verses, emphasis on special words, etc.
[0149] 2) Dynamically adjust the cell size: According to the writing characteristics and teaching focus of the single word, dynamically adjust the size of each cell in the copybook to meet the writing needs of different single words.
[0150] 3) Interactive combination: A user interface can be developed to allow users to customize the position of individual words in the target copybook through operations such as dragging and dropping, thereby achieving personalized copybook generation.
[0151] Next, the process of generating the multivariate copybook test set is further explained:
[0152] 1) Select or create a template
[0153] Template selection: Select a target copybook template that suits the test set requirements from the template library, such as a 10-row and 20-column grid layout template.
[0154] Parameter setting: According to the specific requirements of the test set, adjust parameters such as font size and spacing to ensure that the generated test set is visually clear and easy to evaluate.
[0155] 2) Intelligent matching
[0156] The tester starts the intelligent matching and specifies the single word database to be used (containing 3592 words). The appropriate single word data is automatically selected from the database and intelligent matching is performed according to the template parameters.
[0157] 3) Preview and adjust
[0158] Preview effect: Use the preview function to view the generated test set effect to ensure that each word perfectly matches the character grid and the overall layout is reasonable.
[0159] Fine-tuning and optimization: If you find any mismatch or unreasonable layout, you can fine-tune the matching solution until the best effect is achieved.
[0160] 4) Batch generation and export
[0161] Batch generation: After confirming that the matching scheme is correct, select the batch generation function to generate a multi-character copybook test set containing 3592 single words at one time.
[0162] Export format: Select a suitable export format (such as JSON) and export the test set. The JSON format is highly versatile and readable, making it easy to import and use in the calligraphy system later.
[0163] 5) Application and testing
[0164] Import test set: Import the generated test set into the calligraphy system.
[0165] Test scoring accuracy: Use the calligraphy system to score each word in the test set and check the accuracy of the scoring results.
[0166] Test function stability: Test the performance and stability of the calligraphy system when processing a large number of single words, such as whether there are any problems such as lag or crash.
[0167] Optimization and iteration: Based on the test results, the calligraphy system is optimized and iterated accordingly to improve system performance and user experience.
[0168] In general, the method of the present invention has the following properties:
[0169] Efficiency: Through the intelligent matching algorithm, it can automatically select appropriate words from the database and match them to the template, greatly improving the efficiency of test set generation.
[0170] Diversity: By selecting different templates and parameter settings, and adjusting the matching scheme, you can generate test sets with different layouts and styles to meet different testing needs.
[0171] Customizability: Testers can customize templates and parameter settings according to actual needs, and adjust matching schemes to make the generated test sets more in line with specific test scenarios and requirements.
[0172] Optimization support: The generated test set can be used to test the scoring accuracy and functional stability of the calligraphy system, providing strong support for the optimization and iteration of the system.
[0173] The embodiment of the present invention further provides a system for generating a multi-element copybook test set for calligraphy evaluation, which is applicable to the above-mentioned method for generating a multi-element copybook test set for calligraphy evaluation, and includes:
[0174] The single-word acquisition module is used to collect single-word handwriting data from different copybooks according to preset conditions, perform preprocessing, and obtain source single-word data;
[0175] A scaling module is used to first scale the font size of the source single word data in proportion to the font size of the target copybook, and then scale the strokes and handwriting of the source single word data in the same proportion;
[0176] The combination module is used to combine the strokes and handwriting of the scaled source single-word data into the target copybook in a specific order and layout as a test set.
[0177] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0178] 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 generating a multivariate copybook test set for calligraphy evaluation, characterized in that: The following steps are involved: Collecting single-word handwriting data from different copybooks according to preset conditions, performing preprocessing, and obtaining source single-word data; First, the font size of the source single word data is scaled in proportion to the font size of the target copybook, and then the strokes and handwriting of the source single word data are scaled in proportion to the same; The strokes of the scaled source single-word data are combined into the target copybook in a specific order and layout as a test set.
2. The method for generating a multivariate copybook test set for calligraphy evaluation according to claim 1, characterized in that: The collection of single-word handwriting data from different copybooks includes: Determine the characteristics of the single-word handwriting data to be collected according to preset conditions, wherein the preset conditions include: specific copybook, different level scores, whether there are missing strokes, and whether the strokes are too large or too small; Use SQL query statements to extract single-word handwriting data that meets preset conditions from the database.
3. The method for generating a multivariate copybook test set for calligraphy evaluation according to claim 1, characterized in that: The methods of preprocessing the collected single-word handwriting data include: one or more of: deduplication, missing value processing, format conversion and standardization.
4. The method for generating a multivariate copybook test set for calligraphy evaluation according to claim 1, characterized in that: The matching process of source single word data and target copybook includes: Get the target character grid coordinates a(gx1,gy1,gx2,gy2) in the target copybook, and calculate the size of the target character grid; Get the word grid coordinates b(vx1,vy1,vx2,vy2) in the source word data, and calculate the size of the word grid of the source word data; Calculate the proportion of the source single word data grid that needs to be adjusted according to the size of the target grid and the size of the original single word data grid; The coordinates of the source single-word data grid are adjusted according to the calculated ratio, and the unit amounts rx and ry of the x and y coordinates of the adjusted source single-word data grid that need to be moved relative to the target grid are calculated; Adjust the strokes and handwriting of the source word data according to the same proportion; Move the adjusted x and y coordinates of the strokes of the source single word data so that the strokes are in the target word grid.
5. The method for generating a multivariate copybook test set for calligraphy evaluation according to claim 4, characterized in that: The step of moving the strokes of the source word data to the target word grid comprises: Determine whether the coordinates of the first stroke are less than (vx1, vy1). If so, move the x-axis coordinate of the stroke right by the gx1 coordinate amount and move the y-axis coordinate up by the gy1 coordinate amount. Otherwise, continue to determine whether gy1 is greater than or equal to vy1, and determine whether gx1 is greater than or equal to vx1. If gy1 is greater than or equal to vy1, the y-axis coordinate of the handwriting stroke is moved up by the ry coordinate amount; if gy1 is less than vy1, the y-axis coordinate of the handwriting stroke is moved down by the ry coordinate amount; If gx1 is greater than or equal to vx1, the x-axis coordinate of the handwriting stroke is shifted right by the rx coordinate amount. If gx1 is less than vx1, the x-axis coordinate of the handwriting stroke is shifted left by the rx coordinate amount.
6. The method for generating a multivariate copybook test set for calligraphy evaluation according to claim 1, characterized in that: The step of combining the strokes and handwriting of the scaled source single word data into the target copybook according to a specific order and layout includes: Arrange the strokes of the scaled source single-character data horizontally in order into the target copybook; or: Arrange the strokes of the scaled source word data vertically in order into the target copybook; or: Fill the strokes of the scaled source single word data into a designated row and column of the target copybook.
7. The method for generating a multivariate copybook test set for calligraphy evaluation according to claim 1, characterized in that: The generated test suite includes: The single-word handwriting data of multiple different copybooks are recombined into the same target copybook; The same single character from different copybooks is combined into the same target copybook; High-scoring single characters are mixed and combined into the target copybook; Low-scoring words are mixed and combined into the target copybook; Combine characters that are too large or too small into the target copybook.
8. The method for generating a multivariate copybook test set for calligraphy evaluation according to claim 1, characterized in that: Also includes: In the user interface, the position of individual characters in the target copybook can be customized by dragging and dropping.
9. The method for generating a multivariate copybook test set for calligraphy evaluation according to claim 1, characterized in that: When the number of source single-character data exceeds the total number of character grids of a target copybook, the batch of source single-character data is combined into a plurality of new target copybooks.
10. A multi-element copybook test set generation system for calligraphy evaluation, characterized in that: The method is applicable to the method for generating a multivariate copybook test set for calligraphy evaluation as claimed in any one of claims 1 to 9, comprising: The single-word acquisition module is used to collect single-word handwriting data from different copybooks according to preset conditions, perform preprocessing, and obtain source single-word data; A scaling module is used to first scale the font size of the source single word data in proportion to the font size of the target copybook, and then scale the strokes and handwriting of the source single word data in the same proportion; The combination module is used to combine the strokes and handwriting of the scaled source single-word data into the target copybook in a specific order and layout as a test set.
