An AI-based intelligent method for analyzing calligraphy handwriting
Patent Information
- Application Number
- CN202610980016.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-02
- Publication Date
- 2026-09-18
AI Technical Summary
[0005]针对现有技术的不足,本发明提供一种基于AI的书法笔迹智能评析方法,其能够综合利用动态书写过程数据与静态书写结果图像,实现笔法、结构、节奏多维度分层可解释评价,并自动生成针对性的综合练习指导方案,解决现有书法评价技术中数据来源单一、评价过程不可解释、评价与教学脱节以及高级审美特征无法量化评价的技术问题
[0015]This invention synchronously collects dynamic temporal data during the writing process and static calligraphy images after completion using a pressure-sensitive writing device. It then performs pixel-level spatial mapping between the dynamic data and the static images to generate a joint data structure. This ensures that each pixel in the static image is bound to instantaneous speed, instantaneous pressure, and instantaneous orientation angle information at the moment of writing. This breaks through the limitations of existing technologies that rely solely on static images or use only temporal data, achieving for the first time a deep fusion of dual-channel data: "writing process + writing result." Furthermore, this invention aligns the dynamic temporal data with a database of famous calligraphers' works on a timeline, generating speed difference curves, pressure difference curves, and orientation angle difference curves. These three difference curves are input into three independent diagnostic channels, which make independent judgments based on clearly defined calligraphy rules. This abandons the end-to-end black-box evaluation model commonly used in existing technologies, achieving complete traceability and interpretability of the evaluation decision-making process. Furthermore, this invention performs a time axis intersection operation on the three types of abnormal time segments and maps them back to the corresponding stroke areas in the static calligraphy image to generate a visual diagnostic map with abnormal markers. The abnormal stroke positions are displayed intuitively by highlighting them with color, allowing users to understand their own writing problems without professional knowledge background.
Smart Images

Figure CN122780976A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interdisciplinary technology of calligraphy teaching and artificial intelligence, specifically to an AI-based intelligent analysis method for calligraphy handwriting. Background Technology
[0002] Calligraphy, as an important part of traditional Chinese culture, carries profound connotations of cultural inheritance. With the rapid development of computer vision and machine learning technologies, digital calligraphy research has become an emerging field, among which the automatic evaluation of calligraphic handwriting has always been a research hotspot and challenge. Currently, some related technical solutions have been disclosed, such as generating evaluation results by acquiring dot matrix data formed by intelligent pen writing, or conducting multi-dimensional similarity comparison and scoring by acquiring writing trajectory data, as well as solutions for evaluating the standardization of brushwork based on extracting feature vectors from time-series data and decoding them through probabilistic models, and solutions for style recognition or score prediction of calligraphy works based on deep learning models.
[0003] However, the aforementioned existing technologies still have the following shortcomings: First, the evaluation data sources are singular and lack dynamic process information—methods based on static images completely lose dynamic temporal information such as pen speed, pressure, and changes in turning angles, making it impossible to judge the standardization of the writing process based solely on the writing result; even if some methods introduce temporal data, their end-to-end black-box models can only output a comprehensive score, leaving users unable to trace "why points were deducted" or "what problem occurred in which stage or stroke." Second, the evaluation dimensions are singular and lack interpretability—existing methods mostly focus on single-dimensional evaluation, lacking a mechanism to decouple and layer multiple calligraphic aesthetic dimensions such as penmanship quality, structural layout, and writing rhythm, making the evaluation decision-making process untraceable and difficult to provide effective improvement guidance for learners. Third, the evaluation results are disconnected from teaching guidance—existing technologies mostly stop at outputting scores or grades, lacking a closed-loop feedback mechanism from "precise problem diagnosis" to "automatic generation of targeted practice plans." Fourth, there is a lack of quantitative modeling for the advanced aesthetic features of calligraphy. Existing technologies can handle the "form" features such as stroke shape and structural layout, but there is no effective quantitative evaluation method for the "spirit" of calligraphy (i.e., the advanced aesthetic features such as spirit, rhythm, and artistic conception).
[0004] In summary, existing intelligent evaluation technologies for calligraphy handwriting have significant shortcomings in terms of the completeness of data sources, the interpretability of the evaluation process, the closed-loop nature of evaluation and teaching, and the quantitative modeling of advanced aesthetic features. There is an urgent need for an intelligent calligraphy handwriting analysis method that can comprehensively utilize the dynamic writing process and static writing results, achieve hierarchical interpretable evaluation, and automatically generate personalized practice plans. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an AI-based intelligent evaluation method for calligraphy handwriting. It can comprehensively utilize dynamic writing process data and static writing result images to achieve multi-dimensional, layered, and interpretable evaluation of brushstrokes, structure, and rhythm, and automatically generate targeted comprehensive practice guidance programs. This solves the technical problems of existing calligraphy evaluation technologies, such as single data sources, uninterpretable evaluation processes, disconnect between evaluation and teaching, and the inability to quantify advanced aesthetic features.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an AI-based intelligent calligraphy handwriting analysis method, comprising the following steps: Step S1: synchronously acquiring dynamic temporal data of the writer during the writing process and a static calligraphy image after the writing is completed through a pressure-sensitive writing device; the dynamic temporal data includes a sequence of coordinates of the writing tool's motion trajectory, a sequence of vertical pressure values, a sequence of travel speed values, and a sequence of changes in the travel direction angle; Step S2: establishing a spatial mapping relationship between each data point in the dynamic temporal data and the corresponding stroke position in the static calligraphy image to generate a joint data structure; in the joint data structure, each pixel in the static calligraphy image is bound to the instantaneous velocity value, instantaneous pressure value, and instantaneous speed value of the pixel at the moment of writing. Step S3: Align the dynamic time-series data in the joint data structure with the standard time-series data in the pre-built database of famous calligraphers' model time-series data. At each time point after alignment, calculate the differences between the user's writing data and the famous calligraphers' model data in the dimensions of speed, pressure, and direction angle to obtain speed difference curves, pressure difference curves, and direction angle difference curves. Step S4: Input the speed difference curves, pressure difference curves, and direction angle difference curves into three independent diagnostic channels for judgment. The speed diagnostic channel extracts the abnormal speed time segment from the speed difference curve based on the preset compliant writing speed range. The pressure diagnostic channel extracts the abnormal speed time segment based on the preset pressing force. The pressure variation pattern is analyzed to extract abnormal time segments from the pressure difference curve; the directional angle diagnosis channel extracts abnormal time segments from the directional angle difference curve based on a preset turning angle smoothness threshold; the above three types of abnormal time segments are comprehensively calculated on the time axis to generate a comprehensive set of abnormal brushwork time segments, and each abnormal segment in the comprehensive set of abnormal brushwork time segments is mapped back to the corresponding stroke area in the static calligraphy image to generate a visual diagnostic atlas with abnormality markers; Step S5: Based on the proportion of the total duration of the comprehensive set of abnormal brushwork time segments to the total writing time, a brushwork dimension evaluation score is generated; based on the correspondence between each stroke in the static calligraphy image and the strokes in the database of famous calligraphers' models. The degree of spatial offset generates a structural dimension evaluation score; the speed difference curve is converted into a speed spectrum, and the speed spectrum is compared with the standard speed spectrum of the corresponding character in the database of famous calligraphers' model characters. Based on the degree of difference in energy distribution between the two, a rhythm dimension evaluation score is generated; Step S6: determine whether the brushwork dimension evaluation score, the structural dimension evaluation score, and the rhythm dimension evaluation score are lower than their respective passing thresholds; for evaluation dimensions that are lower than the passing threshold, based on the specific error type and location identified in steps S4 and S5, the corresponding correction practice items are matched and extracted from the preset practice question bank, and all the extracted correction practice items are combined and output as a comprehensive practice guidance scheme.
[0007] As a further improvement of the present invention, the writing data acquisition step in step S1 specifically includes the following sub-steps: Step S11: Set the sampling frequency of the pressure-sensitive writing device to no less than one hundred times per second, continuously acquire the horizontal and vertical coordinate values of the writing tool on the writing plane during the writer's writing process, arrange the horizontal and vertical coordinate values in the order of acquisition time, and generate a motion trajectory coordinate sequence; Step S12: During the writer's writing process, record the vertical pressure value between the writing tool and the writing surface in the form of a continuous analog quantity through the pressure sensor embedded in the pressure-sensitive writing device, arrange the vertical pressure values in the order of acquisition time, and generate a vertical pressure value sequence; Step S13: Divide the displacement between two adjacent trajectory coordinate points in the motion trajectory coordinate sequence by the corresponding time interval to calculate the travel speed value at each acquisition moment, and then calculate the travel speed value at each acquisition time. The velocity values are arranged in chronological order to generate a velocity value sequence; Step S14: The direction angle of the line connecting two adjacent trajectory coordinate points in the motion trajectory coordinate sequence is calculated. The change in direction angle is obtained by subtracting the direction angle of the line connecting the current point from the direction angle of the line connecting the previous point. All the changes in direction angle are arranged in chronological order to generate a motion direction angle change sequence; Step S15: After the writer finishes writing, a static calligraphy image is acquired through an image acquisition device. The motion trajectory coordinate sequence, vertical pressure value sequence, velocity value sequence, and motion direction angle change sequence in the dynamic time series data are time-stamped and synchronized with the static calligraphy image using the same clock source to generate a dynamic time series dataset and a static calligraphy image with timestamps and mutual time alignment. The dynamic time series dataset and the static calligraphy image are used together as input data for cross-modal alignment in step S2.
[0008] As a further improved technical solution of the present invention, the cross-modal alignment step in step S2 specifically includes the following sub-steps: Step S21: Using the pixel coordinate system of the static calligraphy image as a spatial reference, project each trajectory coordinate point in the dynamic temporal data onto the pixel coordinate system through coordinate transformation, so that each trajectory coordinate point obtains a corresponding pixel position in the pixel coordinate system, completing the one-to-one spatial matching between trajectory coordinate points and pixel points; Step S22: For each pixel point in the static calligraphy image, according to the time sequence in which the pixel point is covered by the writing tool in the writing time sequence, find the trajectory coordinate point that matches the spatial position of the pixel point in the dynamic temporal data, and extract it. The instantaneous velocity value, instantaneous pressure value, and instantaneous direction angle value carried by the trajectory coordinate point; Step S23: Bind the instantaneous velocity value, instantaneous pressure value, and instantaneous direction angle value as three attribute components to the corresponding pixel point to form the dynamic attribute vector of the pixel point, so that each pixel point in the static calligraphy image simultaneously has spatial coordinate attributes and dynamic attribute vectors. After all pixels are bound, a joint data structure is obtained; Step S24: Use the joint data structure as input data for the dynamic writing process comparison in step S3, wherein the dynamic attribute vector of each pixel point in the joint data structure is used to extract the velocity difference value, pressure difference value, and direction angle difference value according to spatial position in step S3.
[0009] As a further improved technical solution of the present invention, the dynamic writing process comparison step in step S3 specifically includes the following sub-steps: Step S31: Retrieve the standard total writing time corresponding to the standard character that is the same as the currently written text from the famous model time series database; Step S32: Stretch or compress the actual total time of the user's writing process to be equal to the standard total writing time, and re-extract the user's writing data on the stretched or compressed unified time axis with equal interval sampling, and at the same sampling interval, re-extract the standard time series data from the famous model time series database; Step S33: At each sampling time point, calculate the absolute value of the difference between the speed value of the user's writing data and the speed value of the famous model data, and take the absolute value as the speed difference value at that time point; calculate the absolute value of the difference between the pressure value of the user's writing data and the pressure value of the famous model data, and take the absolute value as the speed difference value at that time point. As the pressure difference value at that time point; calculate the absolute value of the difference between the direction angle value of the user's writing data and the direction angle value of the famous model data, and use this absolute value as the direction angle difference value at that time point; Step S34: Arrange the speed difference values of all sampling time points on the entire time axis in chronological order to generate a speed difference curve; arrange the pressure difference values of all sampling time points on the entire time axis in chronological order to generate a pressure difference curve; arrange the direction angle difference values of all sampling time points on the entire time axis in chronological order to generate a direction angle difference curve; Step S35: Use the speed difference curve, the pressure difference curve, and the direction angle difference curve together as input data for the three diagnostic channels in step S4, wherein the speed difference curve is input to the speed diagnostic channel, the pressure difference curve is input to the pressure diagnostic channel, and the direction angle difference curve is input to the direction angle diagnostic channel.
[0010] As a further improved technical solution of the present invention, the layered decoupling diagnosis step in step S4 specifically includes the following sub-steps: Step S41: Extract the standard speed curve of the current text from the famous model text time series database, extend the standard speed curve with a percentage threshold above and below to form a writing speed compliance interval, extract all continuous time segments on the speed difference curve whose values exceed the writing speed compliance interval, mark each extracted continuous time segment as a speed abnormal time segment, and summarize all speed abnormal time segments into a speed abnormal time segment set; Step S42: Calculate the first derivative of the standard pressure curve in the famous model text time series database. A standard pressure change rate curve is obtained. The range between the maximum and minimum values in the standard pressure change rate curve is taken as the normal range of pressure variation. For each time point in the pressure difference curve, the actual pressure change rate corresponding to that time point is calculated. All continuous time segments where the actual pressure change rate exceeds the normal range of pressure variation are extracted. Each extracted continuous time segment is marked as a pressure abnormal time segment. All pressure abnormal time segments are summarized into a pressure abnormal time segment set. Step S43: Calculate the absolute value of the second derivative of the standard direction angle curve in the famous model time series database. The maximum value among all the absolute values of the second derivative is taken as the turning angle. For each time point in the azimuth threshold, calculate the absolute value of the second derivative of the actual azimuth angle corresponding to that time point. Extract all continuous time segments whose absolute value of the second derivative of the actual azimuth angle exceeds the turning angle smoothness threshold. Mark each extracted continuous time segment as an azimuth angle abnormal time segment. Summarize all azimuth angle abnormal time segments into a set of azimuth angle abnormal time segments. Step S44: Perform an intersection operation on the time axis of the set of velocity abnormal time segments, the set of pressure abnormal time segments, and the set of azimuth angle abnormal time segments. Specifically, find the time segments where any two of the three sets overlap on the time axis. Find the time segments where all three sets overlap, merge all the overlapping segments into a unified set, and generate a comprehensive set of abnormal time segments in brushwork; Step S45: Using each abnormal time segment in the comprehensive set of abnormal time segments in brushwork as an index, locate the starting pixel position corresponding to the start time and the ending pixel position corresponding to the end time in the static calligraphy image through the spatial mapping relationship recorded in the joint data structure, mark all pixels between the starting pixel and the ending pixel as abnormal stroke pixels, and mark the area where all abnormal stroke pixels are located on the static calligraphy image with color highlighting, generating a visual diagnostic map with abnormal markings;Step S46: Use the set of comprehensive abnormal stroke time periods as input data for calculating the stroke dimension evaluation score in step S5, and use the visualized diagnostic atlas as a reference atlas for locating abnormal stroke positions when calculating the structural dimension evaluation score in step S5.
[0011] As a further improved technical solution of the present invention, the multi-dimensional quantitative evaluation step in step S5 specifically includes the following sub-steps: Step S51: Calculate the sum of the durations of all abnormal time segments in the comprehensive abnormal time segment set to obtain the total abnormal duration, calculate the percentage of the total abnormal duration to the actual total duration of the user's writing process, take a full score of 100 as the baseline score for penmanship, and subtract the penmanship deduction value proportional to the percentage from the baseline score for penmanship to obtain the penmanship dimension evaluation score, wherein the penmanship deduction value is zero when the percentage is zero, and the penmanship deduction value is 100 when the percentage is 100%; Step S52: Extract the centroid coordinates of each stroke in the visual diagnostic atlas, retrieve the standard centroid coordinates of the corresponding stroke from the famous model time series database, calculate the centroid offset distance between the centroid coordinates of each stroke and the standard centroid coordinates, take the average of the centroid offset distances of all strokes to obtain the average offset distance, take a full score of 100 as the structural baseline score, and subtract the percentage from the structural baseline score for the average offset distance. Step S53: Perform a Fourier transform on the speed difference curve to obtain the speed spectrum of the user's writing process. Retrieve the standard speed spectrum corresponding to the currently written text from the database of famous model texts. Calculate the absolute value of the amplitude difference between the speed spectrum and the standard speed spectrum at each frequency point. Sum the absolute values of the amplitude differences at all frequency points to obtain the total value of the spectrum energy distribution difference. Use a full score of 100 as the rhythm benchmark score. Subtract the deduction value proportional to the total value of the spectrum energy distribution difference from the rhythm benchmark score to obtain the rhythm dimension evaluation score. Step S54: Use the penmanship dimension evaluation score, the structure dimension evaluation score, and the rhythm dimension evaluation score together as the comparison basis for judging whether each dimension is below the passing threshold in step S6. At the same time, use the center-of-gravity offset distance of each stroke calculated in step S52 as the index data for identifying the largest offset stroke when matching structure practice items in step S6.
[0012] As a further improvement of the present invention, the automatic generation step of the practice scheme in step S6 specifically includes the following sub-steps: Step S61: Pre-construct a practice question bank, which contains multiple practice items. Each practice item has three attribute tags: error type tag, belonging dimension tag, and corresponding stroke position tag. The error type tag includes speed anomaly tag, pressure anomaly tag, and direction angle anomaly tag. The belonging dimension tag includes brushwork dimension tag, structure dimension tag, and rhythm dimension tag. The corresponding stroke position tag records the name of the stroke targeted by the practice item. Step S62: Evaluate the brushwork dimension. The score is compared with a preset penmanship passing threshold. When the penmanship dimension evaluation score is lower than the penmanship passing threshold, all practice items with the penmanship dimension label are selected from the practice question bank as a first candidate set. From the first candidate set, practice items whose error type labels match the error types recorded in the speed anomaly time segment set, the pressure anomaly time segment set, and the direction angle anomaly time segment set are further selected. All selected practice items are combined into a penmanship practice scheme. Step S63: The structure dimension evaluation score is compared with a preset structure passing threshold. When the structure dimension evaluation score is lower than the structure passing threshold... Step S52: Select all practice items from the practice question bank whose dimension label is the structure dimension label as a second candidate set. Obtain the stroke name with the largest center-of-gravity offset distance from step S52. Further select practice items from the second candidate set whose corresponding stroke position label matches the stroke name with the largest center-of-gravity offset distance. Combine all selected practice items into a structure practice scheme. Step S64: Compare the rhythm dimension evaluation score with a preset rhythm passing threshold. When the rhythm dimension evaluation score is lower than the rhythm passing threshold, select all practice items from the practice question bank whose dimension label is the rhythm dimension label as a third candidate set. Further filter the candidate set for practice items with the error type label of speed abnormality, and combine all the filtered practice items into a rhythm practice scheme; Step S65: Calculate the difference between the penmanship dimension evaluation score and the penmanship passing threshold, the difference between the structure dimension evaluation score and the structure passing threshold, and the difference between the rhythm dimension evaluation score and the rhythm passing threshold. Compare the size of the penmanship difference, the structure difference, and the rhythm difference, and sort the penmanship practice scheme, the structure practice scheme, and the rhythm practice scheme in descending order of difference. Combine all the sorted practice items and output them as a comprehensive practice guidance scheme.
[0013] As a further improved technical solution of the present invention, the construction process of the famous calligraphers' model time-series database specifically includes the following sub-steps: selecting authentic ink rubbings of several recognized calligraphers, performing high-definition scanning on each single character in each authentic ink rubbing to obtain a standard static image of each single character; inviting several professionals with senior calligraphy qualifications, equipping each professional with the same pressure-sensitive writing device as in step S1, instructing each professional to copy the writing according to the stroke direction, structural layout, and writing rhythm of each single character in the authentic ink rubbing, and collecting dynamic time-series data of each professional through the pressure-sensitive writing device during the copying process; calculating the total writing time of each copying sample for multiple copies of the same single character, selecting at least three copying samples with the shortest total writing time, and submitting the at least three copying samples to at least three independent calligraphy experts for evaluation, with each calligraphy expert independently giving an evaluation conclusion of "both spirit and form" or "not meeting the standard," and selecting the best-performing samples. The calligraphy experts unanimously rated the copy sample as "possessing both spirit and form" as the standard sample for the single character. The dynamic time-series data of the standard sample is extracted as the standard time-series data for the single character, and the static image of the standard sample is extracted as the standard static image for the single character. The total writing time of the standard sample is calculated to obtain the standard total writing time. The standard speed curve, standard pressure curve, and standard direction angle curve are extracted from the standard time-series data. The standard speed curve is subjected to Fourier transform to obtain the standard speed spectrum. The centroid coordinates of each stroke in the standard static image are calculated to obtain the standard centroid coordinates of each stroke. The standard time-series data, the standard static image, the standard total writing time, the standard speed curve, the standard pressure curve, the standard direction angle curve, the standard speed spectrum, and the standard centroid coordinates of each stroke are used as reference data for the single character. They are stored in the famous calligraphers' model time-series database with the single character name as the index for retrieval and use in steps S3 and S5.
[0014] Compared with the prior art, the present invention has the following beneficial effects:
[0015] This invention synchronously collects dynamic temporal data during the writing process and static calligraphy images after completion using a pressure-sensitive writing device. It then performs pixel-level spatial mapping between the dynamic data and the static images to generate a joint data structure. This ensures that each pixel in the static image is bound to instantaneous speed, instantaneous pressure, and instantaneous orientation angle information at the moment of writing. This breaks through the limitations of existing technologies that rely solely on static images or use only temporal data, achieving for the first time a deep fusion of dual-channel data: "writing process + writing result." Furthermore, this invention aligns the dynamic temporal data with a database of famous calligraphers' works on a timeline, generating speed difference curves, pressure difference curves, and orientation angle difference curves. These three difference curves are input into three independent diagnostic channels, which make independent judgments based on clearly defined calligraphy rules. This abandons the end-to-end black-box evaluation model commonly used in existing technologies, achieving complete traceability and interpretability of the evaluation decision-making process. Furthermore, this invention performs a time axis intersection operation on the three types of abnormal time segments and maps them back to the corresponding stroke areas in the static calligraphy image to generate a visual diagnostic map with abnormal markers. The abnormal stroke positions are displayed intuitively by highlighting them with color, allowing users to understand their own writing problems without professional knowledge background.
[0016] Meanwhile, this invention achieves quantitative evaluation through three dimensions: the brushwork dimension calculates a score based on the proportion of abnormal total time; the structural dimension calculates a score based on the degree of stroke center of gravity shift; and the rhythm dimension calculates a score by performing a Fourier transform on the speed difference curve to obtain the speed spectrum and comparing its energy distribution with the standard speed spectrum of famous calligraphers' works. The rhythm dimension's evaluation method, for the first time, transforms the abstract aesthetic concept of "rhythm" in writing into a calculable difference in spectral energy distribution, achieving a quantitative evaluation of the "spirit" of calligraphy and filling the technological gap where existing technologies cannot quantify advanced aesthetic features. After evaluation, this invention further constructs a complete closed-loop feedback mechanism from "problem diagnosis" to "practice plan generation"—when the evaluation score of a certain dimension is lower than the corresponding passing threshold, based on the precisely located abnormal time segment and the identified weak dimension and the stroke with the largest shift, targeted corrective practice items are automatically matched and extracted from a practice question bank with error type labels, dimension labels, and corresponding stroke position labels. These items are then sorted by the difference from the passing threshold and a comprehensive practice guidance plan is output, making evaluation no longer the end point but the starting point for the next improvement, achieving an integrated fusion of evaluation and teaching.
[0017] In summary, this invention achieves a triple leap from "static scoring" to "dynamic diagnosis," from "black box scoring" to "interpretable evaluation," and from "single evaluation" to "evaluation-teaching closed loop" through the systematic synergy of several pioneering technologies, including cross-modal fusion of dynamic time series and static images, interpretable diagnosis through hierarchical decoupling, quantitative evaluation of rhythm spectrum, and closed-loop feedback of evaluation and teaching. The deep synergy between the modules has produced significant technical effects and has outstanding substantive features and significant progress. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the overall process of an AI-based intelligent calligraphy handwriting analysis method according to the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] like Figure 1 As shown, this invention provides an AI-based intelligent calligraphy handwriting analysis method, comprising six main steps: data acquisition, cross-modal fusion, dynamic comparison, hierarchical diagnosis, multi-dimensional evaluation, and practice scheme generation. Each step is described in detail below with reference to specific implementation methods.
[0021] In a specific embodiment of the present invention, the writing data acquisition step in step S1 is implemented as follows: First, the sampling frequency of the pressure-sensitive writing device is set to 100 times per second. During the writer's writing process, the horizontal and vertical coordinate values of the writing tool on the writing plane are continuously acquired. The horizontal and vertical coordinate values are arranged in the order of acquisition time to generate a motion trajectory coordinate sequence. The sampling frequency can be adjusted according to the actual hardware performance, but it is recommended not to be less than 100 times per second to ensure sufficient time resolution. When the sampling frequency is less than 100 times per second, the time interval between adjacent sampling points is too large, making it impossible to completely capture the speed changes and directional angle changes at the turning points during the writing process, resulting in the subsequent diagnostic channel being unable to identify short-duration penmanship abnormalities.
[0022] Secondly, during the writing process, the pressure sensor embedded in the pressure-sensitive writing device continuously records the vertical pressure value between the writing tool and the writing surface in analog form. The vertical pressure values are then arranged in chronological order of acquisition time to generate a vertical pressure value sequence. It is recommended that the range of the pressure sensor be set to 0 to 500 grams, with a resolution of no less than 0.1 grams, to accurately capture changes in the pressure applied during the writing process.
[0023] Next, the displacement between two adjacent trajectory coordinate points in the motion trajectory coordinate sequence is divided by the corresponding time interval to calculate the travel velocity value at each acquisition moment. All travel velocity values are arranged in chronological order to generate a travel velocity value sequence. For example, if the Nth trajectory coordinate point is (X_N, Y_N) and the (N+1)th trajectory coordinate point is (X_{N+1}, Y_{N+1}), and the time interval between them is T, then the displacement between the two points is the square root of ((X_{N+1}-X_N)^2+(Y_{N+1}-Y_N)^2), and the travel velocity value is this displacement divided by the time interval T.
[0024] Then, the direction angle of the line connecting two adjacent trajectory coordinate points in the motion trajectory coordinate sequence is calculated. The change in direction angle is obtained by subtracting the direction angle of the line connecting the current point from the direction angle of the line connecting the previous point. All changes in direction angle are arranged in chronological order to generate a sequence of changes in the direction angle. The direction angle is calculated as follows: taking the horizontal direction of the writing plane as the zero-degree reference, the angle between the line connecting two adjacent points and the horizontal direction is calculated. The value of the angle ranges from zero degrees to 360 degrees.
[0025] Finally, after the writer completes the writing, a static calligraphy image is acquired using an image acquisition device, such as a document camera, scanner, or high-definition camera. The image resolution should ideally be no less than 300 DPI to ensure the accuracy of subsequent analysis. The dynamic time-series data (including motion trajectory coordinate sequences, vertical pressure value sequences, travel speed value sequences, and travel direction angle change sequences) and the static calligraphy image are time-stamped and synchronized using the same clock source to ensure strict temporal alignment between the two types of data. After completing the above operations, a dynamic time-series dataset and a static calligraphy image with timestamps and mutual temporal alignment are generated. These two datasets serve as input data for cross-modal alignment in step S2.
[0026] In a specific embodiment of the present invention, the cross-modal alignment step S2 is implemented as follows: First, using the pixel coordinate system of the static calligraphy image as a spatial reference, each trajectory coordinate point in the dynamic time-series data is projected into the pixel coordinate system through coordinate transformation. Since the acquisition plane of the pressure-sensitive writing device and the imaging plane of the image acquisition device may differ in physical size and coordinate system origin, coordinate transformation needs to be completed through a pre-calibrated transformation matrix. The calibration method is as follows: several calibration points with known pixel coordinates are pre-drawn on the writing plane. The writer writes on the calibration points, and the trajectory coordinates of these calibration points are acquired by the pressure-sensitive device to establish a mapping relationship between trajectory coordinates and pixel coordinates. Based on this, the parameters of the transformation matrix are calculated. After calibration, each trajectory coordinate point is multiplied by the transformation matrix to obtain a corresponding pixel position in the pixel coordinate system, thus completing the one-to-one spatial matching between trajectory coordinate points and pixel points.
[0027] Secondly, for each pixel in the static calligraphy image, based on the temporal order in which the pixel is covered by the writing tool during the writing process, the trajectory coordinates that match the spatial position of the pixel are found from the dynamic temporal data. The instantaneous velocity value, instantaneous pressure value, and instantaneous direction angle value carried by the trajectory coordinates are extracted. Since the strokes may have a certain width during the writing process, one trajectory coordinate point may correspond to multiple pixels. In this case, all these pixels are bound to the same instantaneous velocity value, instantaneous pressure value, and instantaneous direction angle value.
[0028] Then, the instantaneous velocity, instantaneous pressure, and instantaneous direction angle are bound as three attribute components to the corresponding pixel, forming the dynamic attribute vector of that pixel. After the above binding, each pixel in the static calligraphy image simultaneously possesses spatial coordinate attributes and a dynamic attribute vector—the spatial coordinate attribute records the pixel's position in the image, and the dynamic attribute vector records the writing speed, writing pressure, and writing direction angle at the moment the pixel is written. After all pixels are bound, a joint data structure is obtained. This joint data structure is actually a composite data structure of "image + temporal attributes," and each pixel can be indexed to its corresponding dynamic attribute vector through its spatial coordinates.
[0029] Finally, the joint data structure is used as the input data for the dynamic writing process comparison in step S3. The dynamic attribute vector of each pixel in the joint data structure is called according to spatial position when extracting the velocity difference value, pressure difference value and orientation angle difference value in step S3.
[0030] In a specific embodiment of the present invention, the dynamic writing process comparison step in step S3 is implemented as follows: First, the standard total writing time corresponding to the standard character that is the same as the currently written text is retrieved from the famous calligraphers' model time sequence database. The famous calligraphers' model time sequence database pre-stores reference data for each single character, including standard time sequence data, standard static image, standard total writing time, standard speed curve, standard pressure curve, standard direction angle curve, standard speed spectrum, and standard centroid coordinates of each stroke.
[0031] Secondly, the actual total time of the user's writing process is stretched or compressed to be equal to the standard total writing time. Specifically, the ratio of the actual total time of the user's writing process to the standard total writing time is calculated, and this ratio is used as a scaling factor to scale the timeline of the user's writing data. For example, if a user takes three seconds to write a character, and the standard total writing time is two seconds, the user's three-second timeline is compressed to two seconds; conversely, if a user takes two seconds to write a character, and the standard total writing time is three seconds, the user's two-second timeline is stretched to three seconds. On the stretched or compressed unified timeline, the user's writing data is re-extracted using equal-interval sampling, and simultaneously, the standard time-series data from the famous calligraphers' model time-series database is re-extracted using the same sampling interval, ensuring that both sets of data have the same number and sampling positions on the timeline.
[0032] Then, at each sampling time point, the absolute value of the difference between the speed value of the user's writing data and the speed value of the model's data is calculated, and this absolute value is taken as the speed difference value at that time point; the absolute value of the difference between the pressure value of the user's writing data and the pressure value of the model's data is calculated, and this absolute value is taken as the pressure difference value at that time point; the absolute value of the difference between the direction angle value of the user's writing data and the direction angle value of the model's data is calculated, and this absolute value is taken as the direction angle difference value at that time point. It should be noted that the calculation of the direction angle difference value needs to consider the case where the angle crosses the zero-degree boundary—for example, if the user's direction angle is 350 degrees and the model's direction angle is 10 degrees, directly subtracting them gives a difference of 340 degrees, but the actual angle difference is only 20 degrees. Therefore, the angle difference needs to be normalized to the range of 0 to 180 degrees.
[0033] Subsequently, the velocity difference values at all sampling time points along the entire time axis were arranged in chronological order to generate a velocity difference curve; the pressure difference values at all sampling time points along the entire time axis were arranged in chronological order to generate a pressure difference curve; and the direction angle difference values at all sampling time points along the entire time axis were arranged in chronological order to generate a direction angle difference curve. These three difference curves respectively reflect how the user's deviation from the expert model in the three dimensions of velocity, pressure, and direction angle changes over time.
[0034] Finally, the speed difference curve, pressure difference curve, and direction angle difference curve are used together as input data for the three diagnostic channels in step S4, with the speed difference curve input into the speed diagnostic channel, the pressure difference curve input into the pressure diagnostic channel, and the direction angle difference curve input into the direction angle diagnostic channel.
[0035] In a specific embodiment of the present invention, the layered decoupling diagnostic step in step S4 is implemented as follows: First, the speed diagnostic channel extracts the standard speed curve of the current text from the time-series database of famous calligraphers' works. A percentage threshold is then extended above and below the standard speed curve to form a compliant writing speed range. This percentage threshold can be determined by collecting writing data from a large number of calligraphy learners, using calligraphy expert scores as a supervisory signal, and optimizing the threshold parameter to maximize the consistency between the evaluation results and expert scores through a grid search method. This percentage threshold can be adjusted according to different calligraphy styles and writing difficulties; for example, it can be set to 20% for regular script and 30% for running script. All continuous time segments on the speed difference curve whose values exceed the compliant writing speed range are extracted. Each extracted continuous time segment is marked as a speed abnormality time segment, and all speed abnormality time segments are summarized into a speed abnormality time segment set. Speed abnormality time segments reflect whether the user's writing speed is too fast or too slow within that time period, which does not conform to the writing rhythm of famous calligraphers' works.
[0036] Secondly, the pressure diagnosis channel calculates the first derivative of the standard pressure curve in the time series database of master calligraphers' works to obtain the standard pressure change rate curve. The first derivative is calculated as follows: for each point on the standard pressure curve, the difference between the pressure value at that point and the pressure value at the previous point is divided by the time interval between the two points to obtain the pressure change rate at that point. The range between the maximum and minimum values in the standard pressure change rate curve is taken as the normal range of pressure variation. For each time point in the pressure difference curve, the actual pressure change rate corresponding to that time point is calculated. All continuous time segments where the actual pressure change rate exceeds the normal range of pressure variation are extracted, and each extracted continuous time segment is marked as a pressure abnormality time segment. All pressure abnormality time segments are summarized into a pressure abnormality time segment set. Pressure abnormality time segments reflect that the user's pressure variation within that time period does not conform to the brushstroke patterns of the master calligraphers' works—it may be due to excessively forceful or excessively slow pressure.
[0037] Then, the azimuth angle diagnostic channel calculates the absolute value of the second derivative of the standard azimuth angle curve in the expert template time series database, using the maximum value among all absolute values of the second derivative as the threshold for the smoothness of the turning angle. The second derivative is calculated as follows: first, the first derivative of the standard azimuth angle curve is calculated to obtain the azimuth angle change rate curve; then, the first derivative of the azimuth angle change rate curve is calculated to obtain the second derivative of the azimuth angle; the absolute value is then taken to obtain the absolute value of the second derivative. The absolute value of the second derivative reflects the degree of azimuth angle change—a larger value indicates a more abrupt turning point, while a smaller value indicates a smoother turning point. For each time point in the azimuth angle difference curve, the absolute value of the actual azimuth angle's second derivative corresponding to that time point is calculated. All continuous time segments whose absolute values of the actual azimuth angle's second derivative exceed the turning angle smoothness threshold are extracted. Each extracted continuous time segment is marked as an abnormal azimuth angle time segment, and all abnormal azimuth angle time segments are summarized into a set of abnormal azimuth angle time segments. Abnormal azimuth angle time segments reflect that the user's turning points within that time period are not smooth enough.
[0038] Subsequently, the sets of time segments with abnormal speed, abnormal pressure, and abnormal orientation angle are intersected on the time axis. Specifically, the operation is as follows: First, identify time segments where any two of the three sets overlap on the time axis—for example, segments where speed and pressure abnormalities overlap, speed and orientation angle abnormalities overlap, or pressure and orientation angle abnormalities overlap. Then, identify time segments where all three sets overlap—that is, segments where speed, pressure, and orientation angle abnormalities occur simultaneously. All these overlapping segments are then merged into a unified set, generating a comprehensive set of time segments with abnormal handwriting. The significance of this intersection operation is that a temporary deviation in one dimension may simply be normal writing fluctuation, but deviations in multiple dimensions simultaneously indicate a genuine problem with handwriting during that time period. Each segment in the comprehensive set of time segments with abnormal handwriting represents a problem area where the user exhibited abnormal handwriting in at least two dimensions during that time period, requiring focused attention.
[0039] Then, using each abnormal time segment in the comprehensive set of abnormal brushstroke time segments as an index, the starting pixel position corresponding to the start time and the ending pixel position corresponding to the end time of the abnormal time segment in the static calligraphy image are located through the spatial mapping relationship recorded in the joint data structure. Specifically, the start and end times of the abnormal time segment are mapped to pixels with the same timestamp in the joint data structure, the spatial coordinates of these two pixels are obtained, and all pixels between the start and end pixels are marked as abnormal stroke pixels. The areas containing all abnormal stroke pixels are then highlighted in red on the static calligraphy image, generating a visual diagnostic atlas with abnormal markings. This atlas allows users to intuitively see which strokes and positions they have brushstroke problems in.
[0040] Finally, the set of time segments with abnormal strokes is used as the input data for calculating the stroke dimension evaluation score in step S5, and the visual diagnostic map is used as the reference map for locating the abnormal strokes when calculating the structural dimension evaluation score in step S5.
[0041] In a specific embodiment of the present invention, the multi-dimensional quantitative evaluation step S5 is implemented as follows: First, the penmanship dimension evaluation score is calculated. Specifically, the total abnormal time segment duration is calculated by summing the durations of all abnormal time segments in the comprehensive abnormal time segment set; the percentage of the total abnormal time segment to the actual total time of the user's writing process is calculated; a maximum score of 100 is used as the penmanship baseline score, and the penmanship deduction value proportional to the percentage is subtracted from the penmanship baseline score to obtain the penmanship dimension evaluation score. When the percentage is zero, the penmanship deduction value is zero; when the percentage is 100%, the penmanship deduction value is 100. For example, if the total abnormal time segment is 0.5 seconds and the actual total time of the user's writing process is 2 seconds, then the percentage is 25%, the penmanship deduction value is 25, and the penmanship dimension evaluation score is 75.
[0042] Secondly, the structural dimension evaluation score is calculated. Specifically, the centroid coordinates of each stroke in the visual diagnostic atlas are extracted. The centroid coordinates are calculated by averaging the x-coordinates of all pixels within the stroke area and averaging the y-coordinates of all pixels. The standard centroid coordinates of the corresponding stroke are retrieved from a database of famous model texts. The centroid offset distance between the centroid coordinates of each stroke and the standard centroid coordinates is calculated as the square root of the sum of the squares of the x-coordinate and y-coordinate offsets. The average offset distance of all strokes is then calculated. A maximum score of 100 is used as the structural baseline score. The structural baseline score is then subtracted from the deduction value proportional to the average offset distance to obtain the structural dimension evaluation score. For example, if the average offset distance is five pixels and the preset maximum offset deduction distance is twenty pixels, the deduction value is twenty-five points (five divided by twenty multiplied by one hundred), and the structural dimension evaluation score is seventy-five points.
[0043] Then, the rhythm dimension evaluation score is calculated. Specifically, a Fourier transform is performed on the speed difference curve to obtain the speed spectrum of the user's writing process. The Fourier transform converts the time-domain signal into a frequency-domain signal, revealing the periodic rhythm information inherent in the writing speed. The standard speed spectrum corresponding to the currently written text is retrieved from a database of famous calligraphers' works. The absolute value of the amplitude difference between the speed spectrum and the standard speed spectrum at each frequency point is calculated. The absolute values of the amplitude differences at all frequency points are summed to obtain the total value of the spectral energy distribution difference. A maximum score of 100 is used as the rhythm baseline score. The rhythm baseline score is then subtracted from the deduction value, which is proportional to the total value of the spectral energy distribution difference, to obtain the rhythm dimension evaluation score. The larger the total value of the spectral energy distribution difference, the greater the difference between the user's writing speed's periodic rhythm and that of the famous calligraphers' works, and the worse the sense of rhythm.
[0044] Finally, the evaluation scores of the brushwork dimension, structure dimension, and rhythm dimension are used together as the comparison basis for judging whether each dimension is below the passing threshold in step S6. At the same time, the center-of-gravity offset distance of each stroke calculated in step S52 is used as the index data for identifying the largest offset stroke when matching structure practice items in step S6.
[0045] In a specific embodiment of the present invention, the automatic generation step of the practice plan in step S6 is implemented as follows: First, a practice question bank is pre-built. The entries in the practice question bank are pre-compiled by calligraphy education experts based on common brushstroke error types. Each entry includes a description of the practice content, practice objectives, demonstration videos or images, and other teaching resources. The practice question bank contains a large number of practice entries, each with three attribute tags. The first is an error type tag, including speed abnormality tags, pressure abnormality tags, and direction angle abnormality tags, used to identify which type of brushstroke error the practice entry mainly targets. The second is a dimension tag, including brushstroke dimension tags, structure dimension tags, and rhythm dimension tags, used to identify which evaluation dimension the practice entry belongs to. The third is a corresponding stroke position tag, recording the name of the stroke targeted by the practice entry, such as "horizontal stroke," "vertical stroke," "left-falling stroke," "right-falling stroke," etc. The entries in the practice question bank are pre-compiled by calligraphy education experts based on their teaching experience, ensuring that each entry has clear teaching relevance and operability.
[0046] Secondly, the evaluation score for the brushwork dimension is compared with a preset passing threshold for brushwork. The passing threshold for brushwork can be set according to different calligraphy styles and difficulty levels; for example, it can be set to 60 points for regular script. When the evaluation score for the brushwork dimension is lower than the passing threshold, all practice items with the brushwork dimension label are selected from the practice question bank as the first candidate set. From the first candidate set, practice items whose error type labels match the error types recorded in the sets of abnormal speed time segments, abnormal pressure time segments, and abnormal direction angle time segments are further selected—for example, if the set of abnormal speed time segments is not empty, practice items with the error type label "abnormal speed" are selected. All the selected practice items are combined into a brushwork practice scheme.
[0047] Then, the structural dimension evaluation score is compared with the preset structural passing threshold. The structural passing threshold can also be set according to different calligraphy fonts and difficulty levels. When the structural dimension evaluation score is lower than the structural passing threshold, all practice items with the structural dimension label are selected from the practice question bank as the second candidate set; the name of the stroke with the largest center of gravity offset distance is obtained from step S52; practice items whose corresponding stroke position label matches the name of the stroke with the largest center of gravity offset distance are further selected from the second candidate set—for example, if the stroke with the largest center of gravity offset distance is "horizontal stroke", then practice items with the corresponding stroke position label "horizontal stroke" are selected; all selected practice items are combined into a structural practice scheme.
[0048] Subsequently, the rhythm dimension evaluation score is compared with a preset rhythm passing threshold. The rhythm passing threshold can be set according to different calligraphy fonts and difficulty levels. When the rhythm dimension evaluation score is lower than the rhythm passing threshold, all practice items with the rhythm dimension label are selected from the practice question bank as a third candidate set; from the third candidate set, practice items with the speed abnormality label are further selected; and all selected practice items are combined into a rhythm practice scheme.
[0049] Finally, the differences between the brushwork dimension evaluation score and the brushwork passing threshold, the structural dimension evaluation score and the structural passing threshold, and the rhythm dimension evaluation score and the rhythm passing threshold are calculated. The brushwork, structural, and rhythm differences are compared, and the brushwork, structural, and rhythm practice programs are ranked from largest to smallest—the larger the difference, the more serious the problem in that dimension, and the higher the priority for practice. All ranked practice items are then merged and output as a comprehensive practice guidance plan for users to practice in a targeted manner.
[0050] In one specific embodiment of the present invention, the construction process of the time-series database of famous calligraphers' works is implemented as follows: First, authentic ink rubbings of works by several recognized calligraphers are selected, such as authentic ink rubbings of regular script and running script by famous calligraphers like Yan Zhenqing, Ouyang Xun, Liu Gongquan, and Wang Xizhi. Each character in each authentic ink rubbing is then scanned in high definition to obtain a standard static image of each character. It is recommended that the scanning resolution be no less than 600 DPI to ensure image clarity.
[0051] Secondly, several professionals with advanced calligraphy qualifications were invited, and each professional was equipped with the same pressure-sensitive writing device as in step S1. Each professional was instructed to copy the strokes, structure, and rhythm of each character in the original ink rubbing. During the copying process, dynamic temporal data of each professional was collected using the pressure-sensitive writing device. Each professional copied each character at least three times to obtain sufficient sample data.
[0052] Then, for multiple copy samples of the same character, the total writing time for each sample is calculated, and at least three samples with the shortest total writing time are selected. Samples with the shortest total writing time generally indicate that the writing is most fluent and confident by a professional, with fewer hesitations and pauses. These three selected samples are then evaluated by at least three independent calligraphy experts, each providing an independent assessment of "achieving both spirit and form" or "not meeting the standard." The sample unanimously rated as "achieving both spirit and form" by all calligraphy experts is selected as the standard sample for that character. This multi-expert consensus mechanism ensures the authority and reliability of the standard sample in a calligraphic sense.
[0053] Subsequently, the dynamic timing data of the standard sample is extracted as the standard timing data of the single character, and the static image of the standard sample is extracted as the standard static image of the single character. The total writing duration of the standard sample is calculated to obtain the standard total writing duration. A standard velocity curve, a standard pressure curve and a standard direction angle curve are respectively extracted from the standard timing data. Fourier transform is performed on the standard velocity curve to obtain a standard velocity spectrum. The center of gravity coordinate is calculated for each stroke in the standard static image, so as to obtain the standard center of gravity coordinates of each stroke.
[0054] Finally, the standard timing data, the standard static image, the standard total writing duration, the standard velocity curve, the standard pressure curve, the standard direction angle curve, the standard velocity spectrum and the standard center of gravity coordinates of each stroke are taken as the reference data of the single character, stored in the famous calligrapher model timing database indexed by the single character name, for calling and use in step S3 and step S5.
[0055] The complete process of the present invention is described below with a specific application example.
[0056] Suppose a calligraphy learner is practicing writing the regular script character "Yong". The learner writes the character "Yong" using a pressure-sensitive writing device, and the device collects dynamic timing data during the writing process at a sampling frequency of one hundred times per second, while acquiring the static calligraphy image after writing is completed through an image acquisition device.
[0057] The system projects each trajectory coordinate point in the dynamic timing data onto the pixel coordinate system of the static calligraphy image, and after completing spatial matching, binds each pixel with the instantaneous velocity value, instantaneous pressure value and instantaneous direction angle value when the pixel is written, thereby generating a joint data structure.
[0058] The system retrieves the standard timing data of the character "Yong" from the famous calligrapher model timing database, stretches or compresses the actual total duration of the user's writing process to be equal to the standard total writing duration, re-extracts user data and standard data by equal-interval sampling on a unified time axis, calculates the velocity difference value, pressure difference value and direction angle difference value at each sampling point, and generates three difference curves.
[0059] The speed diagnosis channel forms a stroke speed compliance interval by expanding 20% upwards and downwards based on the standard speed curve, and extracts time sections with abnormal speed from the speed difference curve; the pressure diagnosis channel extracts time sections with abnormal pressure from the pressure difference curve based on the standard pressure change rate range; the direction angle diagnosis channel extracts time sections with abnormal direction angle from the direction angle difference curve based on the standard second-order derivative threshold of direction angle. It is assumed that the system detects that abnormal speed and abnormal direction angle occur simultaneously at the turning point of the second stroke "horizontal-folding hook" when writing the character "yong", forming a comprehensive stroke abnormality time section. The system maps the abnormal section back to the static calligraphy image, performs high-light marking in red at the turning point of the "horizontal-folding hook", and generates a visualized diagnosis map.
[0060] The system calculates that the ratio of the total duration of the comprehensive stroke abnormality time section to the total writing duration is 15%, and the evaluation score for the brushstroke dimension is 85; calculates that the average value of the center of gravity offset distance of each stroke of the character "yong" is 3 pixels, and the evaluation score for the structure dimension is 85; performs Fourier transform on the speed difference curve and compares it with the standard speed spectrum, obtains that the total difference of spectrum energy distribution is a small value, and the evaluation score for the rhythm dimension is 90.
[0061] Assume that the passing threshold for brushstrokes is 70, the passing threshold for structure is 70, and the passing threshold for rhythm is 70. The evaluation scores of the three dimensions are all higher than the passing threshold, but the score of the brushstroke dimension is relatively low. The system screens practice entries labeled with the brushstroke dimension from the practice question bank, further screens practice entries whose error types match "abnormal speed" and "abnormal direction angle", and combines them into a brushstroke practice plan. Since the brushstroke difference (85 minus 70 equals 15) is greater than the structure difference (85 minus 70 equals 15, sorted according to the preset priority when they are equal) and the rhythm difference (90 minus 70 equals 20), sorted from largest to smallest by difference, the rhythm practice plan ranks first, followed by the brushstroke practice plan and the structure practice plan. The system merges all sorted practice entries and outputs a comprehensive practice guidance plan, guiding the learner to focus on practicing the control of writing speed and direction at the turning point of the horizontal-folding hook of the character "yong", while taking into account the training of overall writing rhythm.
[0062] After the learner conducts targeted exercises in accordance with the comprehensive practice guidance plan, the learner writes the character "yong" again and submits it for evaluation. The system repeats the above process to form an iterative closed loop of "evaluation → diagnosis → practice → re-evaluation" until the evaluation scores of all dimensions reach above the passing threshold.
[0063] The above description is only a preferred embodiment of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An AI-based intelligent analysis method for calligraphy handwriting, characterized in that, Includes the following steps: Step S1: Synchronously collect dynamic time-series data of the writer during the writing process and static calligraphy image after the writing is completed through the pressure-sensitive writing device; the dynamic time-series data includes the motion trajectory coordinate sequence of the writing tool, the vertical pressure value sequence, the travel speed value sequence, and the travel direction angle change sequence; Step S2: Establish a spatial mapping relationship between each data point in the dynamic time series data and the corresponding stroke position in the static calligraphy image to generate a joint data structure; in the joint data structure, each pixel in the static calligraphy image is bound to the instantaneous velocity value, instantaneous pressure value and instantaneous direction angle value at the moment the pixel is written; Step S3: The time-series database of famous calligraphers' works is pre-constructed as follows: standard static images of single characters from authentic ink works of famous calligraphers are selected, and dynamic time-series data is collected by professionals with senior calligraphy qualifications through copying. After being unanimously evaluated by multiple calligraphy experts, the data is stored in the database as a standard sample. The dynamic time-series data in the joint data structure is aligned with the standard time-series data in the pre-constructed time-series database of famous calligraphers' works on the time axis. At each time point after alignment, the differences between the user's writing data and the data of famous calligraphers' works in the dimensions of speed, pressure, and direction angle are calculated to obtain speed difference curves, pressure difference curves, and direction angle difference curves. Step S4: Input the speed difference curve, pressure difference curve, and direction angle difference curve into three independent diagnostic channels for judgment; the speed diagnostic channel extracts the abnormal speed time segment from the speed difference curve based on the preset compliant stroke speed range; the pressure diagnostic channel extracts the abnormal pressure time segment from the pressure difference curve based on the preset change law of lifting and pressing force; the direction angle diagnostic channel extracts the abnormal direction angle time segment from the direction angle difference curve based on the preset smoothness threshold of turning angle; perform comprehensive calculation on the time axis on the above three types of abnormal time segments to generate a comprehensive set of abnormal stroke time segments, and map each abnormal segment in the comprehensive set of abnormal stroke time segments back to the corresponding stroke area in the static calligraphy image to generate a visual diagnostic atlas with abnormal markings; Step S5: Generate a brushwork dimension evaluation score based on the proportion of the total duration of the comprehensive brushwork anomaly time segment set to the total writing time; generate a structure dimension evaluation score based on the degree of spatial offset between each stroke in the static calligraphy image and the corresponding stroke in the database of famous calligraphers' works; convert the speed difference curve into a speed spectrum, compare the speed spectrum with the standard speed spectrum of the corresponding character in the database of famous calligraphers' works, and generate a rhythm dimension evaluation score based on the degree of difference in energy distribution between the two. Step S6: Determine whether the evaluation scores for the brushwork dimension, the structure dimension, and the rhythm dimension are lower than their respective passing thresholds; for evaluation dimensions that are lower than the passing threshold, based on the specific error type and location identified in steps S4 and S5, select corresponding correction practice items from the preset practice question bank, and combine all the selected correction practice items to output a comprehensive practice guidance scheme.
2. The AI-based intelligent calligraphy handwriting analysis method according to claim 1, characterized in that, The writing data acquisition step in step S1 specifically includes the following sub-steps: Step S11: Set the sampling frequency of the pressure-sensitive writing device to no less than one hundred times per second. During the writer's writing process, continuously collect the horizontal and vertical coordinate values of the writing tool on the writing plane, arrange the horizontal and vertical coordinate values in the order of collection time, and generate a motion trajectory coordinate sequence. Step S12: During the writing process, the vertical pressure value between the writing tool and the writing surface is continuously recorded in analog form by the pressure sensor embedded in the pressure-sensitive writing device. The vertical pressure values are arranged in the order of acquisition time to generate a vertical pressure value sequence. Step S13: Divide the displacement between two adjacent trajectory coordinate points in the motion trajectory coordinate sequence by the corresponding time interval to calculate the travel speed value at each acquisition moment, arrange all travel speed values in chronological order, and generate a travel speed value sequence. Step S14: Calculate the direction angle of the line connecting two adjacent trajectory coordinate points in the motion trajectory coordinate sequence. Subtract the direction angle of the line connecting the current point from the direction angle of the line connecting the previous point to obtain the change in direction angle. Arrange all the changes in direction angle in chronological order to generate a sequence of changes in direction angle. Step S15: After the writer finishes writing, a static calligraphy image is acquired through an image acquisition device. The motion trajectory coordinate sequence, vertical pressure value sequence, travel speed value sequence, and travel direction angle change sequence in the dynamic time series data are timestamped and synchronized with the static calligraphy image using the same clock source. This generates a dynamic time series dataset and a static calligraphy image that are time-stamped and aligned with each other. The dynamic time series dataset and the static calligraphy image together serve as the input data for cross-modal alignment in step S2.
3. The AI-based intelligent calligraphy handwriting analysis method according to claim 1, characterized in that, The cross-modal alignment step in step S2 specifically includes the following sub-steps: Step S21: Using the pixel coordinate system of the static calligraphy image as a spatial reference, project each trajectory coordinate point in the dynamic time series data into the pixel coordinate system through coordinate transformation, so that each trajectory coordinate point obtains a corresponding pixel position in the pixel coordinate system, and completes the one-to-one spatial matching between trajectory coordinate points and pixel points. Step S22: For each pixel in the static calligraphy image, according to the time sequence in which the pixel is covered by the writing tool in the writing sequence, find the trajectory coordinate point that matches the spatial position of the pixel from the dynamic time sequence data, and extract the instantaneous velocity value, instantaneous pressure value and instantaneous direction angle value carried by the trajectory coordinate point. Step S23: Bind the instantaneous velocity value, the instantaneous pressure value, and the instantaneous direction angle value as three attribute components to the corresponding pixel to form the dynamic attribute vector of the pixel, so that each pixel in the static calligraphy image has both spatial coordinate attributes and dynamic attribute vectors. After all pixels are bound, a joint data structure is obtained. Step S24: Use the joint data structure as input data for the dynamic writing process comparison in step S3, wherein the dynamic attribute vector of each pixel in the joint data structure is called according to spatial position when extracting velocity difference value, pressure difference value and orientation angle difference value in step S3.
4. The AI-based intelligent calligraphy handwriting analysis method according to claim 1, characterized in that, The dynamic writing process comparison step in step S3 specifically includes the following sub-steps: Step S31: Retrieve the total standard writing time corresponding to the standard character that is the same as the currently written text from the famous model text time sequence database; Step S32: Stretch or compress the actual total duration of the user's writing process to be equal to the standard total writing duration, and re-extract the user's writing data on the stretched or compressed unified time axis with equal interval sampling, while re-extracting the standard time series data in the famous model time series database with the same sampling interval; Step S33: At each sampling time point, calculate the absolute value of the difference between the speed value of the user's writing data and the speed value of the famous model data, and take the absolute value as the speed difference value at that time point; Calculate the absolute value of the difference between the pressure value of the user's writing data and the pressure value of the famous model data, and use this absolute value as the pressure difference value at that point in time. Calculate the absolute value of the difference between the orientation angle value of the user's writing data and the orientation angle value of the famous calligrapher's model data, and use this absolute value as the orientation angle difference value at that point in time. Step S34: Arrange the velocity difference values of all sampling time points on the entire time axis in chronological order to generate a velocity difference curve; arrange the pressure difference values of all sampling time points on the entire time axis in chronological order to generate a pressure difference curve; arrange the direction angle difference values of all sampling time points on the entire time axis in chronological order to generate a direction angle difference curve. Step S35: Use the speed difference curve, the pressure difference curve, and the direction angle difference curve as input data for the three diagnostic channels in step S4, wherein the speed difference curve is input to the speed diagnostic channel, the pressure difference curve is input to the pressure diagnostic channel, and the direction angle difference curve is input to the direction angle diagnostic channel.
5. The AI-based intelligent calligraphy handwriting analysis method according to claim 1, characterized in that, The hierarchical decoupling diagnostic step in step S4 specifically includes the following sub-steps: Step S41: Extract the standard speed curve of the current text from the database of famous model texts. Extend a percentage threshold above and below the standard speed curve to form a writing speed compliance range. Extract all continuous time segments on the speed difference curve whose values exceed the writing speed compliance range. Mark each extracted continuous time segment as a speed abnormal time segment. Summarize all speed abnormal time segments into a speed abnormal time segment set. Step S42: Calculate the first derivative of the standard pressure curve in the time series database of famous model texts to obtain the standard pressure change rate curve. Take the range between the maximum and minimum values in the standard pressure change rate curve as the normal range of pressure change. For each time point in the pressure difference curve, calculate the actual pressure change rate corresponding to that time point. Extract all continuous time segments where the actual pressure change rate exceeds the normal range of pressure change. Mark each extracted continuous time segment as a pressure abnormal time segment. Summarize all pressure abnormal time segments into a pressure abnormal time segment set. Step S43: Calculate the absolute value of the second derivative of the standard orientation angle curve in the famous model time series database. Use the maximum value among all the absolute values of the second derivative as the threshold for the smoothness of the turning angle. For each time point in the orientation angle difference curve, calculate the absolute value of the second derivative of the actual orientation angle corresponding to that time point. Extract all continuous time segments whose absolute value of the second derivative of the actual orientation angle exceeds the threshold for the smoothness of the turning angle. Mark each extracted continuous time segment as an orientation angle abnormal time segment. Summarize all the orientation angle abnormal time segments into a set of orientation angle abnormal time segments. Step S44: Perform an intersection operation on the time axis on the set of abnormal speed time segments, the set of abnormal pressure time segments, and the set of abnormal direction angle time segments. Specifically, find the time segments on the time axis where any two of the three sets overlap, find the time segments where all three sets overlap, and merge all the overlapping segments into a unified set to generate a comprehensive set of abnormal brushstroke time segments. Step S45: Using each abnormal time segment in the comprehensive set of abnormal time segments of brushstrokes as an index, and through the spatial mapping relationship recorded in the joint data structure, locate the starting pixel position corresponding to the start time of the abnormal time segment in the static calligraphy image and the ending pixel position corresponding to the end time. Mark all pixels between the starting pixel and the ending pixel as abnormal stroke pixels. Mark the area where all abnormal stroke pixels are located on the static calligraphy image with color highlighting to generate a visual diagnostic map with abnormal markings. Step S46: Use the set of comprehensive abnormal stroke time intervals as input data for calculating the stroke dimension evaluation score in step S5, and use the visual diagnostic map as a reference map for locating abnormal stroke positions when calculating the structural dimension evaluation score in step S5.
6. The AI-based intelligent calligraphy handwriting analysis method according to claim 1, characterized in that, The multidimensional quantitative evaluation step in step S5 specifically includes the following sub-steps: Step S51: Calculate the sum of the durations of all abnormal time segments in the comprehensive abnormal time segment set to obtain the total abnormal duration. Calculate the percentage of the total abnormal duration to the user's actual total writing time. Use a maximum score of 100 as the baseline score for penmanship. Subtract the penmanship deduction value proportional to the percentage from the baseline score to obtain the penmanship dimension evaluation score. When the percentage is zero, the penmanship deduction value is zero. When the percentage is 100%, the penmanship deduction value is 100. Step S52: Extract the centroid coordinates of each stroke in the visualized diagnostic atlas, retrieve the standard centroid coordinates of the corresponding stroke from the famous model time series database, calculate the centroid offset distance between the centroid coordinates of each stroke and the standard centroid coordinates, take the average of the centroid offset distances of all strokes to obtain the average offset distance, use a full score of 100 as the structural baseline score, subtract the deduction value proportional to the average offset distance from the structural baseline score to obtain the structural dimension evaluation score; Step S53: Perform a Fourier transform on the speed difference curve to obtain the speed spectrum of the user's writing process. Retrieve the standard speed spectrum corresponding to the currently written text from the famous model time series database. Calculate the absolute value of the amplitude difference between the speed spectrum and the standard speed spectrum at each frequency point. Sum the absolute values of the amplitude differences at all frequency points to obtain the total value of the spectrum energy distribution difference. Use a full score of 100 as the rhythm benchmark score. Subtract the deduction value proportional to the total value of the spectrum energy distribution difference from the rhythm benchmark score to obtain the rhythm dimension evaluation score. Step S54: The evaluation scores of the brushwork dimension, the structure dimension, and the rhythm dimension are used together as the comparison basis for judging whether each dimension is below the passing threshold in step S6. At the same time, the center-of-gravity offset distance of each stroke calculated in step S52 is used as the index data for identifying the largest offset stroke when matching structure practice items in step S6.
7. The AI-based intelligent analysis method for calligraphy handwriting according to claim 1, characterized in that, The automatic generation step of the practice plan in step S6 specifically includes the following sub-steps: Step S61: Pre-build a practice question bank containing multiple practice items. Each practice item has three attribute tags: error type tag, dimension tag, and corresponding stroke position tag. The error type tag includes speed anomaly tag, pressure anomaly tag, and direction angle anomaly tag. The dimension tag includes brushwork dimension tag, structure dimension tag, and rhythm dimension tag. The corresponding stroke position tag records the name of the stroke that the practice item targets. Step S62: Compare the evaluation score of the brushwork dimension with the preset brushwork passing threshold. When the evaluation score of the brushwork dimension is lower than the brushwork passing threshold, select all practice items with the brushwork dimension label from the practice question bank as the first candidate set. Further select practice items from the first candidate set whose error type labels match the error types recorded in the speed abnormal time segment set, the pressure abnormal time segment set, and the direction angle abnormal time segment set. Combine all the selected practice items into a brushwork practice scheme. Step S63: Compare the structural dimension evaluation score with the preset structural passing threshold. When the structural dimension evaluation score is lower than the structural passing threshold, select all practice items with the structural dimension label from the practice question bank as the second candidate set. Obtain the stroke name with the largest center of gravity offset distance from step S52. Further select practice items from the second candidate set whose corresponding stroke position label matches the stroke name with the largest center of gravity offset distance. Combine all the selected practice items into a structural practice scheme. Step S64: Compare the rhythm dimension evaluation score with the preset rhythm passing threshold. When the rhythm dimension evaluation score is lower than the rhythm passing threshold, select all practice items with the rhythm dimension label from the practice question bank as the third candidate set. Further select practice items with the speed abnormality label as the error type label from the third candidate set. Combine all the selected practice items into a rhythm practice scheme. Step S65: Calculate the difference between the brushwork dimension evaluation score and the brushwork passing threshold, the difference between the structure dimension evaluation score and the structure passing threshold, and the difference between the rhythm dimension evaluation score and the rhythm passing threshold. Compare the brushwork difference, the structure difference, and the rhythm difference. Sort the brushwork practice scheme, the structure practice scheme, and the rhythm practice scheme in descending order of the difference. Merge all the sorted practice items and output them as a comprehensive practice guidance scheme.
8. The AI-based intelligent calligraphy handwriting analysis method according to claim 1, characterized in that, The construction process of the famous authors' model time series database specifically includes the following sub-steps: We selected authentic ink rubbings from several recognized calligraphers and performed high-definition scanning on each character in each authentic ink rubbing to obtain a standard static image of each character. Several professionals with senior calligraphy qualifications were invited, and each professional was equipped with the same pressure-sensitive writing device as in step S1. Each professional was instructed to copy the writing of each character in the original ink manuscript according to the stroke direction, structural layout and writing rhythm. During the copying process, the dynamic time data of each professional was collected through the pressure-sensitive writing device. For multiple copy samples of the same character, calculate the total writing time for each copy sample, select at least three copy samples with the shortest total writing time, and submit the at least three copy samples to at least three independent calligraphy experts for evaluation. Each calligraphy expert independently gives an evaluation conclusion of "both spirit and form are correct" or "does not meet the standard". Select the copy sample that is unanimously evaluated by all calligraphy experts as "both spirit and form are correct" as the standard sample of the character. The dynamic temporal data of the standard sample is extracted as the standard temporal data of the single character, and the static image of the standard sample is extracted as the standard static image of the single character. The total writing time of the standard sample is calculated to obtain the standard total writing time. The standard speed curve, standard pressure curve and standard orientation angle curve are extracted from the standard temporal data respectively. The standard speed curve is subjected to Fourier transform to obtain the standard speed spectrum. The centroid coordinates of each stroke in the standard static image are calculated to obtain the standard centroid coordinates of each stroke. The standard time series data, the standard static image, the standard total writing time, the standard speed curve, the standard pressure curve, the standard direction angle curve, the standard speed spectrum, and the standard centroid coordinates of each stroke are used as reference data for the single character. The data are stored in the famous calligraphers' model time series database with the single character name as the index, and are retrieved and used in steps S3 and S5.