Chinese character calligraphy training system
By introducing multi-dimensional evaluation indicators and deep learning technology, users' calligraphy portraits are constructed and the writing environment is optimized, and the problem of inaccurate evaluation in the existing technology is solved, and a more comprehensive calligraphy training effect is achieved.
Patent Information
- Application Number
- CN202510574664.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing Chinese calligraphy training system relies on a single-dimensional evaluation method and cannot fully reflect the user's calligraphy level, resulting in inaccurate evaluation.
Multi-dimensional evaluation indicators are adopted, combined with random forest model and deep learning technology, and users' calligraphy works are analyzed, users' calligraphy portraits are constructed, personalized learning plans are customized, and the writing environment is optimized through intelligent correction technology.
It has achieved more comprehensive calligraphy level evaluation and personalized training, and improved the user's calligraphy learning efficiency and level.
Smart Images

Figure CN120496376A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of VR display technology, and in particular to a Chinese calligraphy training system. Background Art
[0002] In modern society, with the rapid development of technology and the prevalence of paperless office work, people's opportunities to write Chinese characters have gradually decreased, leading to a general decline in calligraphy skills. However, calligraphy, as a treasure of Chinese culture, not only carries rich cultural connotations and historical memories, but also plays a vital role in people's lives and work. The Chinese Calligraphy Training System uses scientific training methods and advanced technical means to enable people to learn and master Chinese calligraphy more conveniently and effectively, thereby contributing to the inheritance and promotion of Chinese character culture.
[0003] Existing evaluation methods mainly rely on online tests and calligraphy work analysis, but this single-dimensional evaluation may not fully reflect the user's calligraphy level. Therefore, a Chinese calligraphy training system is proposed. Summary of the Invention
[0004] The purpose of the present invention is to solve the shortcomings of the existing technology, that is, the existing evaluation method mainly relies on online testing and calligraphy work analysis, but this single-dimensional evaluation may not fully reflect the user's calligraphy level, and propose a Chinese calligraphy training system.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A Chinese calligraphy training system, comprising:
[0007] Learning Resource Center: Provides calligraphy learning resources. Through the dynamic tutorial library, users can choose video, graphic or animation tutorials according to their learning stage and needs.
[0008] Environmental Optimization Module: This module uses intelligent correction technology to identify and correct the effects of paper quality, ink color, and external lighting on calligraphy works. Based on the recognition results, it provides optimization suggestions such as lighting adjustment and desktop layout.
[0009] Feedback and Guidance Module: This module analyzes the user's calligraphy works and introduces multi-dimensional evaluation indicators, including writing speed, stroke continuity, structural layout rationality, font style consistency, and overall aesthetics. It uses random forests to assess the user's calligraphy level based on these multi-dimensional evaluation indicators, points out problems with strokes and structure, and provides improvement suggestions.
[0010] Personalized learning module: Utilizes deep learning to capture the user's writing style and habits, constructs a user's calligraphy portrait, and customizes a learning plan for the user based on their calligraphy level, calligraphy portrait, and needs;
[0011] Intelligent recommendation module: Based on the user's learning progress, calligraphy portrait and needs, it uses deep reinforcement learning to recommend tutorials and exercises to help users continuously improve their calligraphy skills.
[0012] The above technical solution further includes:
[0013] Furthermore, the specific steps of paper quality identification and correction are:
[0014] Collecting images of calligraphy works;
[0015] Use image processing technology to extract paper texture and glossiness;
[0016] Compare the extracted features with the preset paper quality standards;
[0017] According to the comparison results, the calligraphy work image is corrected. The paper quality feature vector is F, the preset paper quality standard vector is S, and the correction parameter vector is P. The correction process is expressed as P=f(F,S), where f is the correction function. According to the difference between the paper quality feature vector F and the preset standard S, the correction parameter P is calculated, such as enhancing the contrast, adjusting the brightness, etc., to simulate the display effect of high-quality paper.
[0018] Furthermore, the specific steps of ink color recognition and correction are:
[0019] Extracting ink information from calligraphy works;
[0020] Analyze the color and saturation of ink;
[0021] Compare with preset ink color standards;
[0022] Based on the comparison results, adjust the color properties of the ink to meet the preset standards.
[0023] Furthermore, the specific steps of the external light recognition and correction are:
[0024] Use image analysis technology to detect uneven lighting in calligraphy images;
[0025] Calculate the correction parameters according to the degree of uneven illumination;
[0026] The calligraphy image is subjected to illumination correction to make the overall illumination uniform. The degree of illumination unevenness is I, and the correction parameter is C. The correction process is expressed as C=g(I), where g is an illumination correction function, and the correction parameter C is calculated according to the degree of illumination unevenness I.
[0027] Furthermore, the specific steps of using random forest to evaluate the user's calligraphy level according to multi-dimensional evaluation indicators are as follows:
[0028] Data preprocessing: Collect calligraphy samples, including works by users of different levels, annotate each work, including scores for multi-dimensional evaluation indicators and evaluation of overall calligraphy level, and divide the annotated data into training and test sets;
[0029] Feature extraction: Extract the feature values of multi-dimensional evaluation indicators from each work, which will serve as the input of the random forest model;
[0030] Model training: Use the training set data to train the random forest model. During the training process, the random forest constructs multiple decision trees and combines their prediction results to improve accuracy. Suppose there are N trees, and the prediction result of each tree is, then the final prediction result Y is expressed as Y=mode({y1,y2,...,y N}), where mode means taking the mode;
[0031] Model evaluation and optimization: Use test set data to evaluate the performance of the model and adjust model parameters such as the number of decision trees and maximum depth based on the evaluation results to optimize model performance;
[0032] Prediction and feedback: For new calligraphy works, the trained random forest model is used to evaluate them. Based on the evaluation results, problems with strokes and structure are pointed out, and improvement suggestions are provided.
[0033] Furthermore, the method of using deep learning to capture the user's writing style and habits and constructing the user's calligraphy portrait includes the following steps:
[0034] Data collection: We extract a large amount of calligraphy information, including strokes, structure, and layout, from user-written works to form a raw data set. This data includes calligraphy works in different fonts, sizes, and styles.
[0035] Data preprocessing: Clean, standardize, and normalize the raw data to ensure data quality and consistency. For example, image data can be converted into grayscale or binary images to reduce computational complexity.
[0036] Feature extraction: Stroke features: Image processing technology is used to extract stroke thickness, length, direction and other features; Structural features: Analyze the structural layout of characters to extract features such as the proportions and positional relationships of each part; Style features: Deep learning algorithms are used to identify the user's writing style, such as the smoothness of strokes and the thickness of ink.
[0037] Model training: The preprocessed data is fed into the convolutional neural network for training. The training dataset is divided into multiple batches, each containing a fixed number of samples. For each batch, the following steps are performed:
[0038] Forward propagation: Calculate the predicted output for each sample, y pred =f(X,θ), where X is the input data, θ is the model parameter, f is the model function, and y pred is the predicted output;
[0039] Calculate loss: Use the loss function to calculate the error between the predicted output and the true label. Where M is the number of output samples, N is the number of samples in the batch, is the loss of a single sample, y true is the actual output;
[0040] Back propagation: Calculate the gradient of the loss function with respect to the model parameters through the chain rule, in, is a vector containing the loss function L for all parameters θ i The partial derivative of
[0041] Update parameters: Use Adam optimizer to update model parameters according to gradient, Among them, α is the learning rate, AdamUpdate is the update rule of Adam optimizer;
[0042] Apply early stopping:
[0043] Monitor validation set performance: At the end of each epoch, use the validation dataset to evaluate the performance of the model.
[0044] Check performance improvement: If the validation performance of the current epoch fails to improve within the predetermined patience period, stop training;
[0045] Save the best model: During the training process, retain the model parameters that perform best on the validation set;
[0046] Output: The final output is the best model that performs best on the validation set;
[0047] User calligraphy portrait generation: When a user submits a new calligraphy work, its stroke, structure, and style features are extracted and fed into the trained optimal model to generate the user's calligraphy portrait. This is usually a high-dimensional vector or feature map that can reflect the user's writing style and habits. To more intuitively display the user's calligraphy portrait, it can be converted into an image, such as generating a font sample similar to the user's writing style.
[0048] Furthermore, the method of using FP-Growth to customize a learning plan for a user based on the user's calligraphy level, user's calligraphy portrait, and needs includes the following steps:
[0049] Collect data: Collect user learning data, including tutorials and exercises that users have learned, users' calligraphy skills, users' calligraphy portraits, and users' learning needs;
[0050] Build a transaction database: Treat each user's learning record as a transaction and build a transaction database. Items in a transaction include the tutorials the user has studied, the types of exercises, and the user's preferred learning style.
[0051] Constructing FP-tree:
[0052] Calculate item frequency: Scan the transaction database and calculate the frequency (i.e., the number of occurrences) of each item;
[0053] Construct the initial FP tree: Sort the items by frequency from high to low and construct the initial FP tree;
[0054] Update FP tree: For each transaction, update the FP tree in the sorted order of items. If the item already exists in the FP tree, increase its count; if the item does not exist, create a new node and connect it to the FP tree.
[0055] Mining frequent itemsets:
[0056] Extract frequent item sets from FP tree: extract all frequent item sets by traversing FP tree;
[0057] Calculate the support of frequent itemsets: Support represents the number of times a frequent itemset appears in the transaction database;
[0058] Customize learning plans using frequent itemsets:
[0059] Association rule mining: Mining association rules based on frequent item sets, such as "If a user has studied tutorial A, they are likely to be interested in tutorial B";
[0060] Customized learning plan: Based on the user's calligraphy level, user calligraphy portrait and needs, combined with the mined association rules, learning resources and exercises are recommended to the user.
[0061] Furthermore, the method of using deep reinforcement learning to recommend tutorials and exercises based on the user's learning progress, user calligraphy portrait, and needs includes the following steps:
[0062] State input: The user's learning progress, calligraphy portrait, and needs are input into the deep reinforcement learning model as state;
[0063] The policy network generates recommended actions: Through the policy network, the model generates recommended actions based on the current state, such as recommending a tutorial or exercise. The policy network is usually represented as π(a|s), where s represents the state and a represents the action. The reward function is represented as R(s,a), which represents the reward obtained from state s after performing action a. The goal is to maximize the expected value of the long-term reward, that is, E[ΣR(s,a)];
[0064] Execute recommended actions: Users select tutorials or exercises based on recommended actions to learn;
[0065] Reward function evaluation effect: Based on the user's learning results and feedback, the reward function is used to evaluate the effect of the recommended action;
[0066] Optimize the policy network: Based on the evaluation results of the reward function, continuously optimize the policy network to improve the accuracy and effectiveness of recommended actions.
[0067] The present invention has the following beneficial effects:
[0068] This method analyzes a user's calligraphy works, introduces multi-dimensional evaluation indicators, and uses random forests to assess the user's calligraphy level based on these multi-dimensional evaluation indicators, providing a more comprehensive assessment of the user's calligraphy ability. Deep learning is used to capture the user's writing style and habits, constructing a user calligraphy profile. Based on the user's calligraphy level, user calligraphy profile, and needs, a personalized training plan is customized for the user. This helps improve the user's calligraphy skills and learning efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 This is a system block diagram of a Chinese calligraphy training system proposed by the present invention. DETAILED DESCRIPTION
[0070] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.
[0071] See also Figure 1 As shown, the present invention is a Chinese calligraphy training system, comprising:
[0072] Learning Resource Center: Provides calligraphy learning resources. Through the dynamic tutorial library, users can choose video, graphic or animation tutorials according to their learning stage and needs.
[0073] Environmental Optimization Module: This module uses intelligent correction technology to identify and correct the effects of paper quality, ink color, and external lighting on calligraphy works. Based on the recognition results, it provides optimization suggestions such as lighting adjustment and desktop layout.
[0074] Feedback and Guidance Module: This module analyzes the user's calligraphy works and introduces multi-dimensional evaluation indicators, including writing speed, stroke continuity, structural layout rationality, font style consistency, and overall aesthetics. It uses random forests to assess the user's calligraphy level based on these multi-dimensional evaluation indicators, points out problems with strokes and structure, and provides improvement suggestions.
[0075] Personalized learning module: Utilizes deep learning to capture the user's writing style and habits, constructs a user's calligraphy portrait, and customizes a learning plan for the user based on their calligraphy level, calligraphy portrait, and needs;
[0076] Intelligent recommendation module: recommends tutorials and exercises based on the user's learning progress, calligraphy portrait, and needs to help users continuously improve their calligraphy skills.
[0077] In one embodiment, the specific steps of paper quality identification and correction are:
[0078] Collecting images of calligraphy works;
[0079] Use image processing technology to extract paper texture and glossiness;
[0080] Compare the extracted features with the preset paper quality standards;
[0081] According to the comparison results, the calligraphy work image is corrected. The paper quality feature vector is F, the preset paper quality standard vector is S, and the correction parameter vector is P. The correction process is expressed as P=f(F,S), where f is the correction function. According to the difference between the paper quality feature vector F and the preset standard S, the correction parameter P is calculated, such as enhancing the contrast, adjusting the brightness, etc., to simulate the display effect of high-quality paper.
[0082] In one embodiment, the specific steps of ink color identification and correction are:
[0083] Extracting ink information from calligraphy works;
[0084] Analyze the color and saturation of ink;
[0085] Compare with preset ink color standards;
[0086] Based on the comparison results, adjust the color properties of the ink to meet the preset standards.
[0087] In one embodiment, the specific steps of external light identification and correction are:
[0088] Use image analysis technology to detect uneven lighting in calligraphy images;
[0089] Calculate the correction parameters according to the degree of uneven illumination;
[0090] The calligraphy image is subjected to illumination correction to make the overall illumination uniform. The degree of illumination unevenness is I, and the correction parameter is C. The correction process is expressed as C=g(I), where g is an illumination correction function, and the correction parameter C is calculated according to the degree of illumination unevenness I.
[0091] In one embodiment, the specific steps of using random forest to evaluate the user's calligraphy level based on multi-dimensional evaluation indicators are as follows:
[0092] Data preprocessing: Collect calligraphy samples, including works by users of different levels, annotate each work, including scores for multi-dimensional evaluation indicators and evaluation of overall calligraphy level, and divide the annotated data into training and test sets;
[0093] Feature extraction: Extract the feature values of multi-dimensional evaluation indicators from each work, which will serve as the input of the random forest model;
[0094] Model training: Use the training set data to train the random forest model. During the training process, the random forest constructs multiple decision trees and combines their prediction results to improve accuracy. Suppose there are N trees, and the prediction result of each tree is, then the final prediction result Y is expressed as Y=mode({y1,y2,...,y N}), where mode means taking the mode;
[0095] Model evaluation and optimization: Use test set data to evaluate the performance of the model and adjust model parameters such as the number of decision trees and maximum depth based on the evaluation results to optimize model performance;
[0096] Prediction and feedback: For new calligraphy works, the trained random forest model is used to evaluate them. Based on the evaluation results, problems with strokes and structure are pointed out, and improvement suggestions are provided.
[0097] In one embodiment, using deep learning to capture the user's writing style and habits and constructing the user's calligraphy portrait includes the following steps:
[0098] Data collection: We extract a large amount of calligraphy information, including strokes, structure, and layout, from user-written works to form a raw data set. This data includes calligraphy works in different fonts, sizes, and styles.
[0099] Data preprocessing: Clean, standardize, and normalize the raw data to ensure data quality and consistency. For example, image data can be converted into grayscale or binary images to reduce computational complexity.
[0100] Feature extraction: Stroke features: Image processing technology is used to extract stroke thickness, length, direction and other features; Structural features: Analyze the structural layout of characters to extract features such as the proportions and positional relationships of each part; Style features: Deep learning algorithms are used to identify the user's writing style, such as the smoothness of strokes and the thickness of ink.
[0101] Model training: The preprocessed data is fed into the convolutional neural network for training. The training dataset is divided into multiple batches, each containing a fixed number of samples. For each batch, the following steps are performed:
[0102] Forward propagation: Calculate the predicted output for each sample, y pred =f(X,θ), where X is the input data, θ is the model parameter, f is the model function, and y pred is the predicted output;
[0103] Calculate loss: Use the loss function to calculate the error between the predicted output and the true label. Where M is the number of output samples, N is the number of samples in the batch, is the loss of a single sample, y true is the actual output;
[0104] Back propagation: Calculate the gradient of the loss function with respect to the model parameters through the chain rule, in, is a vector containing the loss function L for all parameters θ i The partial derivative of
[0105] Update parameters: Use Adam optimizer to update model parameters according to gradient, Among them, α is the learning rate, AdamUpdate is the update rule of Adam optimizer;
[0106] Apply early stopping:
[0107] Monitor validation set performance: At the end of each epoch, use the validation dataset to evaluate the performance of the model.
[0108] Check performance improvement: If the validation performance of the current epoch fails to improve within the predetermined patience period, stop training;
[0109] Save the best model: During the training process, retain the model parameters that perform best on the validation set;
[0110] Output: The final output is the best model that performs best on the validation set;
[0111] User calligraphy portrait generation: When a user submits a new calligraphy work, its stroke, structure, and style features are extracted and fed into the trained optimal model to generate the user's calligraphy portrait. This is usually a high-dimensional vector or feature map that can reflect the user's writing style and habits. To more intuitively display the user's calligraphy portrait, it can be converted into an image, such as generating a font sample similar to the user's writing style.
[0112] In one embodiment, the method of using FP-Growth to customize a learning plan for a user based on the user's calligraphy level, the user's calligraphy portrait, and needs includes the following steps:
[0113] Collect data: Collect user learning data, including tutorials and exercises that users have learned, users' calligraphy skills, users' calligraphy portraits, and users' learning needs;
[0114] Build a transaction database: Treat each user's learning record as a transaction and build a transaction database. Items in a transaction include the tutorials the user has studied, the types of exercises, and the user's preferred learning style.
[0115] Constructing FP-tree:
[0116] Calculate item frequency: Scan the transaction database and calculate the frequency (i.e., the number of occurrences) of each item;
[0117] Construct the initial FP tree: Sort the items by frequency from high to low and construct the initial FP tree;
[0118] Update FP tree: For each transaction, update the FP tree in the sorted order of items. If the item already exists in the FP tree, increase its count; if the item does not exist, create a new node and connect it to the FP tree.
[0119] Mining frequent itemsets:
[0120] Extract frequent item sets from FP tree: extract all frequent item sets by traversing FP tree;
[0121] Calculate the support of frequent itemsets: Support represents the number of times a frequent itemset appears in the transaction database;
[0122] Customize learning plans using frequent itemsets:
[0123] Association rule mining: Mining association rules based on frequent item sets, such as "If a user has studied tutorial A, they are likely to be interested in tutorial B";
[0124] Customized learning plan: Based on the user's calligraphy level, user calligraphy portrait and needs, combined with the mined association rules, recommend learning resources and exercises to the user.
[0125] In one embodiment, the method of using deep reinforcement learning to recommend tutorials and exercises based on the user's learning progress, the user's calligraphy portrait, and needs includes the following steps:
[0126] State input: The user's learning progress, calligraphy portrait, and needs are input into the deep reinforcement learning model as state;
[0127] The policy network generates recommended actions: Through the policy network, the model generates recommended actions based on the current state, such as recommending a tutorial or exercise. The policy network is usually represented as π(a|s), where s represents the state and a represents the action. The reward function is represented as R(s,a), which represents the reward obtained from state s after performing action a. The goal is to maximize the expected value of the long-term reward, that is, E[ΣR(s,a)];
[0128] Execute recommended actions: Users select tutorials or exercises based on recommended actions to learn;
[0129] Reward function evaluation effect: Based on the user's learning results and feedback, the reward function is used to evaluate the effect of the recommended action;
[0130] Optimize the policy network: Based on the evaluation results of the reward function, continuously optimize the policy network to improve the accuracy and effectiveness of recommended actions.
[0131] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A Chinese calligraphy training system, characterized in that: include: Learning Resource Center: Provides calligraphy learning resources. Through the dynamic tutorial library, users can choose video, graphic or animation tutorials according to their learning stage and needs. Environmental Optimization Module: Uses intelligent correction technology to identify and correct the effects of paper quality, ink color, and external lighting on calligraphy works, and provides optimization suggestions based on the recognition results; Feedback and Guidance Module: This module analyzes the user's calligraphy works and introduces multi-dimensional evaluation indicators, including writing speed, stroke continuity, structural layout rationality, font style consistency, and overall aesthetics. It uses random forests to assess the user's calligraphy level based on these multi-dimensional evaluation indicators, identify any problems, and provide improvement suggestions. Personalized learning module: Utilizes deep learning to capture the user's writing style and habits, constructs a user's calligraphy portrait, and customizes a learning plan for the user based on their calligraphy level, calligraphy portrait, and needs; Intelligent recommendation module: uses deep reinforcement learning to recommend tutorials and exercises based on the user's learning progress, calligraphy portrait, and needs.
2. A Chinese calligraphy training system according to claim 1, characterized in that: The specific steps of paper quality identification and correction are as follows: Collecting images of calligraphy works; Use image processing technology to extract paper texture and glossiness; Compare the extracted features with the preset paper quality standards; According to the comparison results, the calligraphy work image is corrected. The paper quality feature vector is F, the preset paper quality standard vector is S, and the correction parameter vector is P. The correction process is expressed as P=f(F,S), where f is the correction function. The correction parameter P is calculated based on the difference between the paper quality feature vector F and the preset standard S.
3. A Chinese calligraphy training system according to claim 1, characterized in that: The specific steps of ink color identification and correction are as follows: Extracting ink information from calligraphy works; Analyze the color and saturation of ink; Compare with preset ink color standards; Based on the comparison results, adjust the color properties of the ink to meet the preset standards.
4. A Chinese calligraphy training system according to claim 1, characterized in that: The specific steps of external light identification and correction are as follows: Use image analysis technology to detect uneven lighting in calligraphy images; Calculate the correction parameters according to the degree of uneven illumination; Lighting correction is performed on the calligraphy work image, the degree of uneven lighting is I, the correction parameter is C, and the correction process is expressed as C=g(I), where g is the lighting correction function, and the correction parameter C is calculated according to the degree of uneven lighting I.
5. A Chinese calligraphy training system according to claim 1, characterized in that: The specific steps of using random forest to evaluate the user's calligraphy level based on multi-dimensional evaluation indicators are as follows: Data preprocessing: Collect calligraphy samples, including works by users of different levels, annotate each work, including scores for multi-dimensional evaluation indicators and evaluation of overall calligraphy level, and divide the annotated data into training and test sets; Feature extraction: Extract the feature values of multi-dimensional evaluation indicators from each work, which will serve as the input of the random forest model; Model training: Use the training set data to train the random forest model. During the training process, the random forest constructs multiple decision trees and combines their prediction results to improve accuracy. Suppose there are N trees, and the prediction result of each tree is, then the final prediction result Y is expressed as Y=mode({y1,y2,...,y N }), where mode means taking the mode; Model evaluation and optimization: Use test set data to evaluate the performance of the model and adjust the model parameters based on the evaluation results; Prediction and feedback: For new calligraphy works, the trained random forest model is used to evaluate them. Based on the evaluation results, problems are pointed out and improvement suggestions are provided.
6. A Chinese calligraphy training system according to claim 3, characterized in that: The method of using deep learning to capture the user's writing style and habits and constructing the user's calligraphy portrait includes the following steps: Data collection: Extract calligraphy information from user-written works to form an original data set; Data preprocessing: cleaning, standardization and normalization of raw data; Feature extraction: Stroke features: Use image processing technology to extract stroke features; Structural features: Analyze the structural layout of characters and extract the features of each part; Style features: Identify the user's writing style through deep learning algorithms; Model training: The preprocessed data is fed into the convolutional neural network for training. The training dataset is divided into multiple batches, each containing a fixed number of samples. For each batch, the following steps are performed: Forward propagation: Calculate the predicted output for each sample, y pred =f(X,θ), where X is the input data, θ is the model parameter, f is the model function, and y pred is the predicted output; Calculate loss: Use the loss function to calculate the error between the predicted output and the true label. Where M is the number of output samples, N is the number of samples in the batch, is the loss of a single sample, y true is the actual output; Back propagation: Calculate the gradient of the loss function with respect to the model parameters through the chain rule, in, is a vector containing the loss function L for all parameters θ i The partial derivative of Update parameters: Use Adam optimizer to update model parameters according to gradient, Among them, α is the learning rate, AdamUpdate is the update rule of Adam optimizer; Apply early stopping: Monitor validation set performance: At the end of each epoch, use the validation dataset to evaluate the performance of the model. Check performance improvement: If the validation performance of the current epoch fails to improve within the predetermined patience period, stop training; Save the best model: During the training process, retain the model parameters that perform best on the validation set; Output: The final output is the best model that performs best on the validation set; User calligraphy portrait generation: When a user submits a new calligraphy work, its stroke, structure, and style features are extracted, and the extracted features are input into the trained optimal model to generate the user's calligraphy portrait.
7. A Chinese calligraphy training system according to claim 1, characterized in that: The method of using FP-Growth to customize a learning plan for a user based on the user's calligraphy level, user's calligraphy portrait, and needs includes the following steps: Collect data: Collect user learning data, including tutorials and exercises that users have learned, users' calligraphy skills, users' calligraphy portraits, and users' learning needs; Build a transaction database: Treat each user's learning record as a transaction and build a transaction database. The items in the transaction include the tutorials the user has studied, the type of exercises, and the user's preferred learning style. Constructing FP-tree: Calculate item frequency: Scan the transaction database and calculate the frequency (i.e., the number of occurrences) of each item; Construct the initial FP tree: Sort the items by frequency from high to low and construct the initial FP tree; Update FP tree: For each transaction, update the FP tree in the sorted order of items. If the item already exists in the FP tree, increase its count; if the item does not exist, create a new node and connect it to the FP tree. Mining frequent itemsets: Extract frequent item sets from FP tree: extract all frequent item sets by traversing FP tree; Calculate the support of frequent itemsets: Support represents the number of times a frequent itemset appears in the transaction database; Customize learning plans using frequent itemsets: Association rule mining: mining association rules based on frequent item sets; Customized learning plan: Based on the user's calligraphy level, user calligraphy portrait and needs, combined with the mined association rules, recommend learning resources and exercises to the user.
8. A Chinese calligraphy training system according to claim 7, characterized in that: The method of using deep reinforcement learning to recommend tutorials and exercises based on the user's learning progress, user's calligraphy portrait, and needs includes the following steps: State input: The user's learning progress, calligraphy portrait, and needs are input into the deep reinforcement learning model as state; The policy network generates recommended actions: Through the policy network, the model generates recommended actions based on the current state. The policy network is usually expressed as π(a|s), where s represents the state and a represents the action. The reward function is expressed as R(s,a), which represents the reward obtained from state s after performing action a. The goal is to maximize the expected value of the long-term reward, that is, E[ΣR(s,a)]; Execute recommended actions: Users select tutorials or exercises based on recommended actions to learn; Reward function evaluation effect: Based on the user's learning results and feedback, the reward function is used to evaluate the effect of the recommended action; Optimize the policy network: Continuously optimize the policy network based on the evaluation results of the reward function.