Calligraphy data processing method and device based on calligraphy and electronic equipment

By extracting and comparing the handwriting feature data in the brush-word image, and combining psychological and physiological analysis, the problem of low accuracy of existing calligraphy data processing methods is solved, and more accurate calligraphy data processing is achieved.

CN119942564APending Publication Date: 2025-05-06BEIJING SHENGSHI XUANHE CULTURE DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510035658.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The data processing results of existing calligraphy data processing methods are relatively low.

Method used

By obtaining brush calligraphy images, using the trained calligraphy AI model to extract a variety of handwriting feature data, and comparing features with the standard data in the specified database, combining handwriting psychological knowledge graphs and physiological signal data, the psychological and physiological characteristics of the writer are analyzed.

Benefits of technology

It realizes a comprehensive and accurate analysis of the physiological and psychological characteristics of the brush-writing writer, and improves the accuracy of calligraphy data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119942564A_ABST
    Figure CN119942564A_ABST
Patent Text Reader

Abstract

The invention provides a calligraphy data processing method and device based on calligraphy and electronic equipment, relates to the technical field of calligraphy data processing, and solves the technical problem of low accuracy of a data processing result of an existing calligraphy data processing method. The method comprises the following steps: extracting various handwriting feature data through a trained calligraphy AI model based on a calligraphy image; performing feature comparison on the basis of the various handwriting feature data and standard data in a specified database to obtain a feature comparison result; according to a feature comparison result, analyzing psychological feature data of a writer corresponding to the calligraphy image through a specified handwriting psychological knowledge graph; determining a calligraphy completion degree in the calligraphy image according to a feature comparison result, analyzing an arm extension condition of the writer according to the calligraphy completion degree, and obtaining physiological feature data of the writer based on the arm extension condition; and displaying through a graphical user interface based on the psychological feature data and the physiological feature data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of calligraphy data processing, and in particular to a calligraphy data processing method, device and electronic device based on brush calligraphy. Background Art

[0002] The analysis of brush writing handwriting is still in its infancy, and the number of professionals engaged in scientific research and providing related services in this field is very limited. Common handwriting analysis techniques include measurement method, feature method, sensory perception method, line and posture combination method, etc., and these methods are often used in scenarios such as hard pen handwriting analysis. Among them, the measurement method mainly analyzes the shape of the handwriting, treats the handwriting as a plane geometric figure, and accurately measures the shape, size, distance, thickness, angle, curvature, etc. These measurement data are compared and analyzed with the general standard data to draw conclusions. The measurement method is not affected by subjective factors, has objective and fair results, and is easy to be accepted and recognized by the public. However, the analysis method of existing calligraphy data processing methods such as measurement method is relatively single and the data processing flexibility is low, resulting in low accuracy of the data processing results of existing calligraphy data processing methods. Summary of the invention

[0003] The purpose of the present invention is to provide a method, device and electronic device for processing calligraphy data based on brush calligraphy, so as to solve the technical problem that the data processing results of the existing calligraphy data processing methods have low accuracy.

[0004] In a first aspect, the present application provides a method for processing calligraphy data based on brush writing, the method comprising:

[0005] Get the brush calligraphy image;

[0006] Extracting a variety of handwriting feature data based on the brush calligraphy image through a trained calligraphy AI model;

[0007] Perform feature comparison based on the plurality of handwriting feature data and standard data in a specified database to obtain a feature comparison result;

[0008] Analyzing the psychological characteristic data of the writer corresponding to the calligraphy image by specifying the handwriting psychological knowledge map according to the characteristic comparison result;

[0009] Determining the degree of completion of the calligraphy in the calligraphy image according to the feature comparison result, analyzing the arm extension of the writer according to the degree of completion of the calligraphy, and obtaining physiological feature data of the writer based on the arm extension;

[0010] The psychological characteristic data and the physiological characteristic data are displayed through a graphical user interface.

[0011] In a possible implementation, the calligraphy in the calligraphy image is completed on a digital ink screen; the writer wears a smart wearable device during the calligraphy writing process;

[0012] The step of obtaining the calligraphy image comprises:

[0013] The image of the calligraphy completed by the writer on the digital ink screen is obtained through the digital ink screen, and the physiological signal data of the writer is collected through the smart wearable device.

[0014] In a possible implementation, after acquiring the brush calligraphy image, the following steps are included:

[0015] Collecting handwriting data based on the brush calligraphy image; the handwriting data includes at least one of the coordinates of the corresponding points of the brush calligraphy, the timestamps corresponding to each point, the pen pressure value, the tilt angle of the pen, the pen trajectory data, and the contact surface shape of the digital ink screen and the pen;

[0016] Calculate at least one of the writing speed, writing acceleration, writing starting point, writing turning point, writing intersection point, writing end point, writing main stroke segment, writing direction and writing handwriting ink contour based on the handwriting data to obtain a handwriting data preprocessing result;

[0017] Based on the handwriting data preprocessing result, the physiological signal data collected by the smart wearable data device and the handwriting data are aligned and normalized from the start and end time dimensions, and the normalized value is recorded. The fusion result of the physiological signal data and the handwriting data is generated according to the aligned normalized value; wherein the fusion result is used to characterize the mean value of each physiological indicator data and the change value of each physiological indicator data of the writer at the writing time corresponding to the target handwriting data.

[0018] In a possible implementation, the trained calligraphy AI model includes a composition feature classification model, a handwriting psychological classification model, and a handwriting analysis model; the method of extracting a variety of handwriting feature data based on the brush calligraphy image through the trained calligraphy AI model includes:

[0019] According to the handwriting data preprocessing result, the handwriting ink image corresponding to the brush calligraphy image is subjected to feature classification by the composition feature classification model to obtain representational handwriting feature data including handwriting layout, handwriting spacing density, blank space, connected strokes, and row and column directions;

[0020] According to the fusion result, the handwriting ink image is subjected to feature classification by the handwriting psychological classification model to obtain psychological classification handwriting feature data corresponding to the writer; the psychological classification handwriting feature data includes at least one of personality feature handwriting, emotion feature handwriting and thinking feature handwriting;

[0021] Analyzing the handwriting ink image through the handwriting analysis model according to the writing pressure data collected by the digital ink screen to obtain stroke distinguishing geometric contour data including target handwriting character positioning and handwriting stroke splitting;

[0022] A variety of handwriting feature data are obtained based on the representational handwriting feature data, the psychological classification handwriting feature data, and the stroke differentiation geometric contour data.

[0023] In a possible implementation, the feature comparison between the plurality of handwriting feature data and standard data in a specified database to obtain a feature comparison result includes:

[0024] Normalizing the font size data in the plurality of handwriting feature data to obtain a size ratio between the font circumscribed rectangle size and the image size, and comparing the size ratio with the standard size data in a specified database to obtain a font size comparison analysis result;

[0025] Comparing the writing speed data collected by the digital ink screen with the standard writing rhythm data in the specified database, and comparing the writing pressure data collected by the digital ink screen with the standard lifting, pressing and force data in the specified database, to obtain a comparative analysis result of the writing process; the writing speed data includes writing speed and writing acceleration;

[0026] According to the fusion result, the mean value of each physiological indicator data and the change value of each physiological indicator data are compared with the standard physiological indicator data in the specified database to obtain a physiological indicator comparison result, and the data credibility and data accuracy are judged according to the physiological indicator comparison result;

[0027] The final feature analysis result for the calligraphy is obtained based on the font size comparison analysis result, the writing process comparison analysis result, the data credibility and the data accuracy.

[0028] In a possible implementation, before extracting a plurality of handwriting feature data based on the brush calligraphy image through the trained calligraphy AI model, the method further includes:

[0029] Collecting calligraphy work data, performing data cleaning on the calligraphy work data, and labeling the cleaned calligraphy work data, and using the labeled data as training data; wherein the label includes at least one of a calligraphy image classification label, a font category label, a component category label, and a stroke category label;

[0030] The initial PP-YOLOE model is trained using the training data to obtain a trained calligraphy AI model.

[0031] In one possible implementation, the trained calligraphy AI model includes any one or more of the following:

[0032] Text segmentation model, component detection model, stroke splitting model, composition feature classification model, handwriting psychology classification model, handwriting analysis model, character target positioning model, calligraphy style classification model, layout spacing classification model, layout white space classification model, handwriting personality feature classification model, and handwriting physiological feature classification model.

[0033] In a second aspect, the present application provides a calligraphy data processing device based on brush calligraphy, comprising:

[0034] An acquisition module, used for acquiring a brush calligraphy image;

[0035] An extraction module, used to extract a variety of handwriting feature data based on the brush calligraphy image through a trained calligraphy AI model;

[0036] A comparison module, used for performing feature comparison based on the plurality of handwriting feature data and standard data in a specified database to obtain a feature comparison result;

[0037] An analysis module, configured to analyze the psychological characteristic data of the writer corresponding to the calligraphy image through a designated handwriting psychological knowledge graph according to the characteristic comparison result;

[0038] A determination module, configured to determine the degree of completion of the calligraphy in the calligraphy image according to the feature comparison result, analyze the arm extension of the writer according to the degree of completion of the calligraphy, and obtain physiological characteristic data of the writer based on the arm extension;

[0039] A display module is used to display the psychological characteristic data and the physiological characteristic data through a graphical user interface.

[0040] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0041] In a fourth aspect, the present application further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the method described in the first aspect.

[0042] This application brings the following beneficial effects:

[0043] The present application provides a calligraphy data processing method, device and electronic device based on brush calligraphy, which can obtain brush calligraphy images, extract a variety of handwriting feature data based on the brush calligraphy images through a trained calligraphy AI model, perform feature comparison based on the multiple handwriting feature data and standard data in a specified database to obtain feature comparison results, analyze the psychological feature data of the writer corresponding to the brush calligraphy image through a specified handwriting psychological knowledge map based on the feature comparison results, determine the completion of the brush calligraphy in the brush calligraphy image based on the feature comparison results, analyze the arm extension of the writer based on the brush calligraphy completion, and obtain the physiological feature data of the writer based on the arm extension, and obtain the physiological feature data of the writer based on the psychological feature data and the physiological feature data. It is displayed through a graphical user interface. In this solution, a variety of handwriting feature data in the brush calligraphy image are extracted through the trained calligraphy AI model, and then the data are compared with the standard data in the specified database. According to the comparison result, the psychological feature data of the writer corresponding to the brush calligraphy image is analyzed through the specified handwriting psychological knowledge map, and then the completion degree of the brush calligraphy in the brush calligraphy image is determined according to the feature comparison result, and the arm extension of the writer is analyzed, so as to determine the physiological feature data of the writer, thereby realizing the physiological and psychological feature analysis of the brush calligraphy writer, making the analysis of calligraphy data more comprehensive and accurate, improving the accuracy of calligraphy data processing, and solving the technical problem of low accuracy of data processing results of existing calligraphy data processing methods.

[0044] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1 A flowchart of a method for processing calligraphy data based on brush calligraphy provided in an embodiment of the present application;

[0047] Figure 2 An example of an offline writing data processing flow in the calligraphy data processing method based on brush calligraphy provided in an embodiment of the present application;

[0048] Figure 3Another flowchart of the calligraphy data processing method based on brush calligraphy provided in the embodiment of the present application;

[0049] Figure 4 Another flowchart of the calligraphy data processing method based on brush calligraphy provided in the embodiment of the present application;

[0050] Figure 5 A schematic diagram of the structure of a calligraphy data processing device based on brush calligraphy provided in an embodiment of the present application;

[0051] Figure 6 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0053] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0054] At present, the feature method is to first determine the explanation of what kind of psychological and physiological characteristics a large number of (thousands of) handwriting features correspond to, and then analyze and form conclusions according to the specific handwriting. The feature method has a low threshold, is simple and direct, but is prone to one-sided errors. The sensory perception method mainly analyzes the posture of the handwriting, regardless of the shape of the handwriting, does not measure precise data, does not pay attention to the details of the handwriting, and relies solely on the expert's own perception ability, intuitive ability and subjective feelings to analyze and draw conclusions. The shape and state combination method combines shape and state, complements each other's advantages, and combines the method of measuring shape and determining the meaning of key handwriting features with the sensory perception of state to form a new analysis method. The measurement method mainly analyzes the shape of the handwriting, treats the handwriting as a plane geometric figure, and accurately measures the shape, size, distance, thickness, angle, curvature, etc., and compares and analyzes these measurement data with the general standard data to draw conclusions.

[0055] However, the establishment of universal standard data in the measurement method requires the acquisition of a large amount of data and statistical analysis, and small-scale data is difficult to be representative; large-scale data only reflects general situations and cannot express personalized situations; specific handwriting is very complex and changeable, and it is difficult to accurately obtain various shape data of all handwritings with a single or multiple methods; various real-time dynamic data such as strength and speed in the writing process cannot be measured; the analysis conclusion lacks characteristics, is not distinctive, and is vague and general. The actual handwriting in the feature method is rich and varied, and it is often difficult to match the number when analyzing the handwriting. It is common to find no corresponding analysis of handwriting features; the handwriting features of each person are an organic whole that is interconnected. The feature method breaks the connection between various features, and single isolated analysis often makes mistakes. The sensory perception method is difficult to operate and cannot form qualitative and quantitative analysis and conclusions. It depends entirely on the subjective feeling perception of experts, which is prone to very outrageous errors such as very different. The combination of shape and state requires particularly high professionalism and knowledge, high flexibility, and is not easy to grasp. There is still a certain degree of subjective one-sidedness. The data processing results of the existing calligraphy data processing methods are all low in accuracy.

[0056] Based on this, the embodiments of the present application provide a method, device and electronic device for processing calligraphy data based on brush calligraphy, through which the technical problem of low accuracy of data processing results of existing calligraphy data processing methods can be solved.

[0057] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.

[0058] Figure 1 The following is a flow chart of a method for processing calligraphy data based on brush calligraphy provided in an embodiment of the present application. Figure 1 As shown, the method includes:

[0059] Step S110, obtaining a calligraphy image.

[0060] The embodiments of the present application support both offline and online methods for handwriting analysis and evaluation. The online method can participate in the analysis and evaluation by calculating real-time dynamic process data such as writing time, writing speed, and writing strength; the generated evaluation results are more objective, accurate, and comprehensive.

[0061] Among them, offline writing data includes but is not limited to the following methods: calligraphy written with traditional pen, ink, paper and inkstone, calligraphy pictures formed by taking pictures and scanning, or calligraphy videos taken continuously. Traditional calligraphy pictures (videos) acquisition methods: taking pictures and scanning calligraphy pictures; downloading calligraphy pictures (videos) from the Internet; calligraphy pictures (videos) selected from the file system, etc. When writing offline, the input data is a picture containing calligraphy or a series of pictures (video frames).

[0062] For online methods, such as Figure 2 As shown, obtain a brush calligraphy picture or a video (multi-frame picture) of brush calligraphy continuously written. For picture input, obtain the part containing all the contents of the calligraphy as the input picture. For video input, obtain the key frame picture containing all the contents of the calligraphy as the input picture. Then, as Figure 2 As shown in the figure, the input image is preprocessed, such as enhancing some important image features, suppressing unwanted deformation and noise, etc. Common methods include image scaling, image cropping, image denoising, image correction, image enhancement, etc. After preprocessing, the image will reduce noise interference, correct image geometric deformation, and enhance important image features, which is more conducive to the extraction of image feature information.

[0063] For the specific preprocessing process of offline writing data, for example, calligraphy image preprocessing is an important step in computer vision. It performs a series of operations on the input image before performing tasks such as feature extraction, classification, recognition, and segmentation on the calligraphy image to facilitate the input and training of the model. The main purpose of calligraphy image preprocessing is to improve image quality, eliminate noise, and enhance image features.

[0064] As an optional implementation, the calligraphy handwriting image preprocessing method includes: image scaling: the model needs to accept an input image of a fixed size, so the original image needs to be adjusted to a suitable size to facilitate the input of the model; image cropping: the image is cropped according to the aspect ratio of the image to facilitate the extraction of the area of ​​interest of the calligraphy image; image correction: by performing correction operations such as rotation, stretching, distortion, and affine transformation on the image, it is made more visually intuitive and accurate; image denoising: image denoising is performed through median filtering, Gaussian filtering, bilateral filtering and other methods to eliminate noise in the image; image enhancement: the image is enhanced through histogram equalization, sharpening, adding noise and other methods to improve the characteristics of the image.

[0065] Step S120, extracting a variety of handwriting feature data based on the brush calligraphy image through the trained calligraphy AI model.

[0066] Among them, the trained calligraphy AI model includes any one or more of the following: text segmentation model, component detection model, stroke splitting model, composition feature classification model, handwriting psychological classification model, handwriting analysis model, character target positioning model, calligraphy style classification model, layout spacing classification model, layout blank classification model, handwriting personality feature classification model, and handwriting physiological feature classification model.

[0067] The trained calligraphy AI model is a deep learning model that learns the characteristics and patterns of calligraphy by training a large amount of calligraphy data, so that it can extract and identify the features of calligraphy images. By extracting features from calligraphy images through the generalization ability of the calligraphy pre-training model, the details and structural features of calligraphy images can be effectively extracted, which can be used for calligraphy classification, calligraphy style recognition, calligraphy target detection, calligraphy stroke instance segmentation, calligraphy handwriting psychological classification, etc. In practical applications, AI image algorithms are widely used in various fields such as image recognition, face recognition, scene understanding, medical image analysis, etc., and have achieved great success in various image classification scene tasks.

[0068] For the feature extraction process, calligraphy image feature extraction can convert images into representative vectors, which can be used to describe certain attributes or features of calligraphy images. Exemplarily, when extracting features from calligraphy images, the calligraphy images need to be preprocessed first, including image enhancement, cropping, and scaling. Then, the preprocessed calligraphy images are input into the calligraphy pre-training model, and multiple feature representations of the calligraphy images are extracted through multiple convolutional layers, activation functions, and pooling layers of the model. Finally, the extracted feature representations are spliced ​​and converged to obtain the final feature representation of the calligraphy image.

[0069] The feature extraction in the embodiments of the present application includes calligraphy handwriting style classification, calligraphy character target recognition and positioning, calligraphy character component recognition and positioning, calligraphy character stroke instance segmentation, calligraphy handwriting row and column layout feature classification, calligraphy handwriting layout blank feature classification, calligraphy handwriting composition feature classification, calligraphy handwriting psychology-related feature classification, calligraphy handwriting physiological-related feature classification, etc.

[0070] For example, Figure 2 As shown, call the pre-trained calligraphy AI models to infer the pre-processed image and obtain the corresponding feature data. For example, according to the character segmentation model, perform character target detection on the image, and obtain the head information of all characters in the image and the position and size information of the image in which they are located; further according to the component detection model, perform component target detection on the character image to obtain the name, position and size information of each component in each calligraphy character; further according to the stroke splitting model, perform stroke splitting on the character image to obtain the name, position and size information of each stroke in each calligraphy character and its shape contour information; perform feature classification on the image according to the composition feature classification model, and obtain the layout, spacing density, blank space, connected strokes, row and column direction and other features; perform feature classification on the image according to the handwriting psychological classification model (such as personality, temperament, thinking, etc.), and obtain its corresponding personality, temperament, thinking characteristics and other psychological classification features;

[0071] Through the pre-trained calligraphy AI model, the stroke form, radical component characteristics, font size, structural form, writing time, speed, strength, layout of the Chinese characters are analyzed and evaluated at the macro and micro level, and a comprehensive, objective, qualitative, quantitative and accurate prediction, judgment and conclusion are intelligently generated from the writer's psychological and physiological aspects, without human intervention and without professional knowledge. For personalized data, the pre-trained calligraphy AI model can also be fine-tuned to meet the needs.

[0072] Moreover, through mature image classification algorithms, image target positioning algorithms, image segmentation algorithms, image key point detection algorithms, etc., various handwriting features are extracted and trained from massive handwriting images using artificial intelligence technologies such as big data, neural networks, deep learning, and machine learning. Various pre-trained models such as handwriting feature classification models, handwriting feature target detection models, handwriting segmentation models, handwriting psychological classification models, handwriting physiological classification models, etc. are generated, and features of various calligraphy handwritings are extracted through the model generalization ability.

[0073] Step S130, performing feature comparison based on the multiple handwriting feature data and the standard data in the specified database to obtain a feature comparison result.

[0074] like Figure 2 As shown, various feature information and standard data in the database are subjected to feature retrieval, calculation, analysis, comparison, data filtering and other operations to form analysis result data. The evaluation rule engine is responsible for various feature information processing conditions (such as whether to process), processing order, processing logic, etc. The evaluation rule engine parameters are set through external configuration files.

[0075] In this step, the feature comparison content of the various handwriting feature data and the standard data may include the geometric shape and size of the brush calligraphy. For example, for the geometric shape analysis and processing example: such as the character size analysis, according to the obtained character size feature---the circumscribed rectangle of the character, it is normalized (the ratio of the rectangle size to the image size), compared with the standard value in the database, and its size (too large, too large, normal, too small, too small) is judged according to a specific threshold value.

[0076] Among them, the designated database includes the evaluation standard database, the evaluation rule database, the evaluation database, the calligraphy handwriting and psychological knowledge graph database, the calligraphy handwriting and physiological knowledge graph database, etc., which are constructed using relational databases and graph databases respectively. The standard database in the designated database is constructed using the relational database MySql, which mainly includes:

[0077] Script evaluation standard data: including script classification information, character classification information, character information, character component information, character stroke information, chapter information, layout information, etc. Script classification, according to seal script, official script, regular script, running script, and cursive script. Calligraphy character classification is divided into single structure and composite structure from the structural point of view, and also includes attribute information such as stele, author, etc. Character information includes name, code, list of components, list of strokes and order, and various statistical standard values. Character component information includes component name, code, list of strokes, etc., and various statistical standard values. Character stroke information includes stroke name, code, outline data, and various statistical standard values.

[0078] Common physiological indicator information data: including standard values ​​of blood pressure, mean arterial pressure, central venous pressure, pulmonary artery pressure, pulmonary capillary wedge pressure, portal vein pressure, heart rate, pulse volume, cardiac output, cardiac index, vital capacity, blood lipids, body temperature, etc. for different populations, different genders, and different age groups.

[0079] In addition, for the evaluation rule database, the multi-dimensional evaluation rule database includes a rule base and calligraphy handwriting rule mapping information, etc. The calligraphy handwriting evaluation consists of multiple rules corresponding to multiple dimensions; the rule base includes calligraphy handwriting geometric morphology evaluation rules, calligraphy handwriting writing process evaluation rules, calligraphy handwriting overall style characteristics evaluation rules, calligraphy handwriting psychology-related evaluation rules, calligraphy handwriting physiological-related evaluation rules, etc. For the pre-processed data, the multi-dimensional evaluation rule engine will execute the evaluation items corresponding to the evaluation rules in parallel or serially in a specific order. Through the arrangement and combination of multi-dimensional rules, differentiated evaluations of different user groups in the same or different scenarios can be achieved.

[0080] The geometric form evaluation rules include: evaluation rules for the thickness, length, angle, direction, positional relationship, and appearance characteristics of handwriting strokes; evaluation rules for the size, height, width, spacing, positional relationship, and appearance characteristics (such as rigid, straight, soft, smooth, rough, and trembling) of handwriting components; and evaluation rules for the size, shape, positional relationship, and structure of handwriting characters.

[0081] The evaluation rules for the writing process include: evaluation rules for speed, acceleration, time, strength, etc. when writing online; evaluation rules for heart rate, respiration, blood pressure, blood oxygen, electrocardiogram, electromyography, electroencephalogram, etc. when writing online; evaluation rules for the order, direction, starting and ending of writing characters when writing online.

[0082] The evaluation rules for the overall style characteristics of calligraphy handwriting include: the ink color of handwriting, the spacing between the start and end of the line, the spacing between the lines and the margins, the signature, etc. The evaluation rules for the psychology of calligraphy handwriting include the psychological evaluation rules for lines, structure, character formation, composition and character, intelligence, thinking, temperament, morality, emotion, behavior and personality, etc. The evaluation rules for the physiology of calligraphy handwriting include the evaluation rules for electrocardiogram, breathing, electromyography, blood pressure, electroencephalogram, mental state, etc.

[0083] As an optional implementation, the evaluation database stores various data in the calligraphy character evaluation process, including not only input data and output result data, but also various intermediate data generated in the evaluation process.

[0084] By analyzing and mining the evaluation data of a writer in a certain period, we can accurately obtain the average values ​​of various indicators of the user to create a user portrait, and at the same time, we can know the changes in various data and generate various month-on-month and year-on-year analysis charts. Furthermore, by analyzing and mining all data, we can obtain the average values ​​of various data for different groups of people and regularly update various constant items in the standard database.

[0085] Step S140, analyzing the psychological characteristic data of the writer corresponding to the calligraphy image through a designated handwriting psychological knowledge graph according to the feature comparison result.

[0086] For knowledge graph databases, such as Figure 3 As shown in the figure, the calligraphy psychology and physiology knowledge graph describes the concepts, entities and their relationships in calligraphy, psychology and physiology in a structured form, expresses various information in a form closer to the human cognitive world, and provides a better ability to organize, manage and understand massive information. For example, in the handwriting psychology analysis example, such as the calligraphy character analysis, the extracted handwriting features are retrieved through the handwriting psychology knowledge graph to obtain their corresponding character features.

[0087] The embodiment of the present application uses knowledge graph technology to collect unstructured, semi-structured, structured psychological, physiological and other related data from massive calligraphy handwriting images, text data and handwriting analysis theory, extracts knowledge elements such as entities, relationships, attributes, etc. according to business needs and graph design, and eliminates ambiguity between indicators such as entities, relationships, attributes and factual objects through knowledge cleaning solutions such as entity disambiguation and relationship fusion, forming a high-quality handwriting and psychological knowledge graph and handwriting and physiological knowledge graph database. The graph database of this project uses the graph database neo4j, and provides high-performance knowledge analysis and knowledge retrieval functions. This project uses knowledge engineering to add semantics to calligraphy handwriting analysis big data, making the data intelligent, thereby achieving insight into calligraphy handwriting big data, and providing simple, efficient, accurate and intelligent matching support for subsequent psychological and physiological analysis reasoning of calligraphy handwriting features.

[0088] Step S150, determining the degree of completion of the calligraphy in the calligraphy image according to the feature comparison result, analyzing the arm extension of the writer according to the degree of completion of the calligraphy, and obtaining the writer's physiological feature data based on the arm extension.

[0089] As a possible implementation, in the handwriting physiological analysis example, for example, the degree of completion of large characters in brush calligraphy can be analyzed to determine the arm extension, and whether the brush handwriting shakes a lot can be analyzed to determine tremor symptoms and other emotions, etc.

[0090] Step S160: displaying the psychological characteristic data and the physiological characteristic data through a graphical user interface.

[0091] like Figure 2 As shown, the assessment report and rehabilitation suggestions are output to the output device for display. The output device includes but is not limited to: LCD display devices, projection display devices, printing terminal devices, etc. The output device performs reasoning and analysis on the various data generated by the input device, and then outputs and displays the generated analysis results and adjustment methods, and provides an overall overview from the perspectives of calligraphy, psychology, physiology, etc. The possible problems of the writer are separately displayed and analyzed, and the possible causes, guidance suggestions, and rehabilitation training methods are analyzed.

[0092] It should be noted that the handwriting of calligraphy is the trace left by the writer when using the brush to write, and is a composite information carrier of the writer's conscious and subconscious mind. The handwriting of the brush can not only reflect the writer's writing habits, but also reflect his inner world, such as psychological information such as personality, ability, thinking, temperament, and interpersonal relationships, and physiological information such as electrocardiogram, breathing, electromyography, blood pressure, EEG, and mental state, and then analyze and evaluate the physiological mechanism and psychological mechanism of the writer to form the writing habit. The psychological and physiological analysis and evaluation method of calligraphy handwriting provided in the embodiment of the present application is based on artificial intelligence technologies such as neural networks, deep learning, and machine learning, and big data to analyze calligraphy handwriting.

[0093] In an embodiment of the present application, a variety of handwriting feature data are extracted from the brush calligraphy image through the trained calligraphy AI model, and then the feature is compared with the standard data in the specified database. According to the comparison result, the psychological feature data of the writer corresponding to the brush calligraphy image is analyzed through the specified handwriting psychological knowledge map, and then the completion degree of the brush calligraphy in the brush calligraphy image is determined according to the feature comparison result and the arm extension of the writer is analyzed, so as to determine the physiological feature data of the writer, thereby realizing the physiological and psychological feature analysis of the brush calligraphy writer, making the analysis of calligraphy data more comprehensive and accurate, and improving the accuracy of calligraphy data processing.

[0094] The above steps are described in detail below.

[0095] In some embodiments, the calligraphy in the calligraphy image is completed on a digital ink screen; the writer wears a smart wearable device during the calligraphy writing process; the above step S110 may specifically include the following steps: obtaining the calligraphy image completed by the writer on the digital ink screen through the digital ink screen, and collecting the writer's physiological signal data through the smart wearable device.

[0096] like Figure 4 As shown, the user data input method includes offline writing method and online writing method. When writing online, it can be combined with (optional) smart wearable devices to provide real-time physiological data. The embodiment of the present application supports access to but is not limited to third-party smart wearable devices (such as bracelets, watches, rings, glasses, earrings), professional-grade signal acquisition instruments, etc., to obtain the writer's physiological signals, physiological information, etc. for analysis and evaluation; it can analyze and identify various abnormal or disguised situations through physiological data, and the generated evaluation results are more objective, accurate and comprehensive.

[0097] Among them, the data generated by the smart wearable input device refers to the physiological signal data generated synchronously by the wearable smart device (such as smart bracelet, smart watch, smart ring, smart glasses, smart earrings, etc.) when the writer writes digitally with an electronic brush. The physiological signal data refers to data such as bioelectric signals or optical signals that can be directly collected by sensors or electrodes, including but not limited to electrocardiogram signals, electroencephalogram signals, electromyography signals, electrooculogram signals, heart rate, respiration, blood oxygen, blood pressure, skin electrical signals, blood oxygen saturation, pulse wave, body temperature, body movement, etc. Physiological signal data can be reported to the data preprocessing module after being processed by a unified data access layer interface via Bluetooth, and the online writing brush trajectory data and physiological signal data are aligned and normalized by the data collaborative alignment module of the preprocessing module. Among them, physiological signal data acquisition is an optional module. In the absence of smart wearable devices, these signal data can be input without access to the system. For example, smart wearable data is an optional data input device that provides various physiological signal data. The physiological signal data will be reported to the data preprocessing module after being processed by a unified data access layer interface via Bluetooth.

[0098] As a possible implementation, an electronic pen is used to write using digital ink technology to collect handwriting data, and the data of the smart wearable device is connected according to the specific implementation. The handwriting data includes: the coordinates of the point (x, y) timestamp t pen pressure value p pen tilt angle (tiltX, tiltY) and other trajectory data lists or the center point coordinates of the contact surface shape (x, y) timestamp t shape contour c and other trajectory data lists.

[0099] Real-time online writing includes but is not limited to writing with an electronic pen and writing with a real hair writing device. For writing with an electronic pen, real-time writing handwriting data is obtained by digitally writing on a touch device with an electronic pen. For writing with a real hair writing device, a real brush is dipped in water to write on a specific display device and the writing handwriting data is collected in real time. Equipment for digital writing and collecting brush handwriting data includes but is not limited to: electromagnetic pressure sensing input devices, such as electromagnetic pressure sensing integrated machines, displays, handwriting tablets, and other infrared input devices, such as infrared teaching whiteboards, integrated machines, etc.; active capacitive pen input devices; ultrasonic technology supporting pen input devices; resistive pen input devices; customized pen devices, such as customized pens with various pressure, position, inclination, speed, acceleration, inertial sensors, etc.; online writing data mainly includes a list of trajectory data of points or shapes (when writing with real hair and other devices), specifically the coordinates (x, y) of the point, the timestamp t, the pen pressure value p, the pen tilt angle (tiltX, tiltY), etc.; the coordinates of the center point of the shape (x, y) timestamp t, the shape contour c, etc.

[0100] In some embodiments, after step S110, the method may further include the following steps:

[0101] Collecting handwriting data based on the brush calligraphy image; the handwriting data includes at least one of the coordinates of the corresponding points of the brush calligraphy, the timestamps corresponding to each point, the pen pressure value, the tilt angle of the pen, the pen trajectory data, and the contact surface shape of the digital ink screen and the pen;

[0102] Calculating at least one of the writing speed, writing acceleration, writing starting point, writing turning point, writing intersection point, writing end point, writing main stroke segment, writing direction and writing ink contour based on the handwriting data to obtain a handwriting data preprocessing result;

[0103] Based on the handwriting data preprocessing results, the physiological signal data and handwriting data collected by the smart wearable data device are aligned and normalized in terms of the start and end time dimensions, and the normalized values ​​are recorded. The fusion results of the physiological signal data and the handwriting data are generated according to the aligned normalized values; wherein the fusion results are used to characterize the mean values ​​of various physiological indicator data and the change values ​​of various physiological indicator data of the writer at the writing time corresponding to the target handwriting data.

[0104] like Figure 4 As shown, the handwriting data is preprocessed, and if there is smart wearable data, it is merged and aligned with the handwriting data. The preprocessing process of handwriting data can include: generating and marking various auxiliary data in the trajectory data list, such as speed, acceleration, starting point, turning point, intersection point, closing point, main stroke segment, stroke direction, handwriting ink contour, etc., and calculating the hidden and exposed tip of the handwriting starting and ending strokes.

[0105] Smart wearable data alignment processing refers to aligning and normalizing its data with specific handwriting data from the start and end time dimensions and recording the normalized data value. Through this processing, the mean and detailed value list of various physiological indicators of the writer when writing in a specific handwriting can be obtained, such as the mean blood pressure and detailed value list of blood pressure changes, etc.

[0106] In the process of data preprocessing using online writing, it mainly includes handwriting trajectory data preprocessing and smart wearable device data preprocessing. Exemplarily, handwriting trajectory data preprocessing includes: various auxiliary data calculations and markings on the trajectory data list, including calculating the pressure value, speed, acceleration, starting point, ending point, turning point, intersection point, timestamp, main stroke segment, stroke direction, starting and ending strokes, writing time, speed average, acceleration average, pressure average, ink contour, external rectangular frame, etc. of the trajectory list data; marking strokes, components, characters, etc. on the trajectory data list; calligraphy strokes include a series of calculated trajectory points and marking information, calligraphy components include a series of strokes marked in order, calligraphy characters include multiple calligraphy components, rows and columns include calligraphy character marking information, chapter row and column information, etc.

[0107] Preprocessing of smart wearable device data: If there is a smart wearable device in the input device, it will be fused and aligned with the handwriting trajectory data in the time dimension. Smart wearable data alignment processing refers to aligning and normalizing its data with the specific handwriting data from the start and end time dimensions and recording the normalized data values. Through this processing, the mean and detailed value list of various physiological indicators of the writer on a specific handwriting object (strokes, components, characters, entire handwriting) can be obtained, such as the mean blood pressure and a detailed value list of blood pressure changes, etc.

[0108] In some embodiments, the trained calligraphy AI model includes a composition feature classification model, a handwriting psychological classification model, and a handwriting analysis model; the above step S120 may specifically include the following steps:

[0109] According to the handwriting data preprocessing result, the handwriting ink image corresponding to the brush calligraphy image is feature classified by the composition feature classification model to obtain the representational handwriting feature data including handwriting layout, handwriting spacing density, blank space, connected strokes, and row and column direction;

[0110] According to the fusion result, the handwriting ink image is subjected to feature classification through the handwriting psychological classification model to obtain the psychological classification handwriting feature data corresponding to the writer; the psychological classification handwriting feature data includes at least one of personality feature handwriting, emotion feature handwriting and thinking feature handwriting;

[0111] Analyze the handwriting ink image through the handwriting analysis model according to the writing pressure data collected by the digital ink screen to obtain the stroke distinguishing geometric contour data including the positioning of the target handwriting characters and the handwriting stroke splitting;

[0112] A variety of handwriting feature data are obtained based on representational handwriting feature data, psychological classification handwriting feature data, and stroke distinction geometric contour data.

[0113] like Figure 4 As shown, the pre-trained relevant calligraphy AI model is called to infer the pre-processed handwriting ink image to obtain the corresponding feature data. For example, the handwriting ink image is feature classified according to the composition feature classification model, and the layout, spacing density, blank space, connected strokes, row and column direction and other features are obtained respectively; the handwriting ink image is feature classified according to the handwriting psychological classification model (such as personality, temperament, thinking, etc.), and the corresponding personality, temperament, thinking characteristics and other psychological classification features are obtained; because the electronic pen digital ink technology is used for writing, the geometric contour data such as handwriting target positioning and handwriting stroke splitting can be distinguished according to the pressing of the electronic pen to start writing and the lifting of the pen to end writing, and calculated or obtained by calling the corresponding calligraphy AI model for reasoning. In the above way, a variety of handwriting feature data are made more comprehensive and accurate.

[0114] In some embodiments, the above step S130 may specifically include the following steps:

[0115] Normalizing the font size data in the multiple handwriting feature data to obtain the size ratio of the font circumscribed rectangle size to the image size, and comparing the size ratio with the standard size data in the specified database to obtain the font size comparison analysis result;

[0116] Compare the writing speed data collected by the digital ink screen with the standard writing rhythm data in the specified database, and compare the writing pressure data collected by the digital ink screen with the standard lifting, pressing and force data in the specified database to obtain the comparative analysis results of the writing process; the writing speed data includes the writing speed and the writing acceleration;

[0117] According to the fusion results, the mean values ​​of various physiological index data and the change values ​​of various physiological index data are compared with the standard physiological index data in the specified database to obtain the physiological index comparison results, and the data credibility and data accuracy are judged according to the physiological index comparison results;

[0118] The final feature analysis results for brush calligraphy are obtained based on the font size comparison analysis results, writing process comparison analysis results, data credibility and data accuracy.

[0119] like Figure 4 As shown, various feature information and standard data in the database are subjected to feature retrieval, calculation, analysis, comparison, data filtering and other operations to form analysis result data. The evaluation rule engine is responsible for various feature information processing conditions (such as whether to process), processing order, processing logic, etc. The evaluation rule engine parameters are set through external configuration files.

[0120] For example, in the case of geometric shape analysis and processing, such as character size analysis, the character size features such as the character's enclosing rectangle are normalized (the ratio of the rectangle size to the image size), compared with the standard value in the database, and the size is judged based on a specific threshold (too large, too large, normal, too small, too small), etc.

[0121] For example, analysis of calligraphy process, such as analysis and comparison of writing speed, acceleration, etc., which reflect writing rhythm, and analysis and comparison of writing pressure changes, which reflect writing lifting, pressing, and strength. For example, analysis of handwriting psychology, such as character analysis of calligraphy characters, the extracted handwriting features are retrieved through handwriting psychology knowledge graph to obtain their corresponding character features. For example, analysis of handwriting physiology, such as analysis of the completion of large characters in brush calligraphy to determine the arm extension, analysis of whether the brush handwriting shakes a lot to determine tremor symptoms and other emotions, etc.

[0122] As an optional implementation, with the participation of smart wearable devices, the mean and change of handwriting physiological indicator data are compared and analyzed with the standard values ​​in the database to determine the credibility and accuracy of the data.

[0123] Exemplarily, various feature information and standard data in the database are subjected to feature retrieval, calculation, analysis, comparison, data filtering and other operations to form analysis result data. Specifically, the following processes are included:

[0124] Geometric shape analysis and processing. Including size analysis: calculate the size characteristics of the circumscribed rectangle area of ​​the acquired target (character, component, stroke), normalize it (the ratio of the rectangle size to the image or character size), compare it with the standard value in the database, and judge its size (too large, too large, normal, too small, too small) according to a specific threshold. Size analysis is often used for character size analysis, size analysis of each component in a character, size analysis of strokes in a character, etc. Shape analysis: compare the shape of the acquired character with the standard shape in the database to determine the degree of conformity (similarity) of the shape. Spacing analysis: calculate the center line of the minimum circumscribed rectangle feature of the acquired target (character, component, stroke), calculate the normalized value of the distance between adjacent items, compare it with the standard value of the indicator item in the database, and judge its spacing (too large, too large, normal, too small, too small) according to a specific threshold. Angle analysis: Calculate the inclination angle between the center line of the minimum circumscribed rectangle feature of the target (character, component, stroke) and the horizontal or vertical direction, compare it with the standard value of the indicator item in the database, and judge its inclination angle based on a specific threshold.

[0125] Writing process analysis and processing, writing process analysis includes the following contents: writing time analysis: calculating the total writing time of all characters, the writing time of a single character, the writing time of the strokes in a single character, etc. and analyzing and comparing them with the corresponding standard values ​​in the database.

[0126] Writing rhythm analysis: calculate the average writing speed and acceleration of all characters, individual characters, and each stroke in a single character, and compare them with the corresponding standard values ​​in the database to determine the speed of the writing rhythm; writing force analysis: calculate the average pen pressure and pen pressure change curve of all characters, individual characters, and each stroke in a single character, and compare them with the corresponding standard values ​​in the database to determine the writing pressure, writing force, etc.; writing direction analysis: calculate the directional feature values ​​of the key strokes in the handwriting and compare them with the corresponding standard values ​​in the database to determine the consistency of the directional characteristics of the important strokes of the characters; writing starting and ending stroke concealment and exposure analysis: calculate the starting and ending stroke concealment and exposure of each stroke in all characters and compare them with the corresponding standard values ​​in the database to determine the consistency of the starting and ending stroke characteristics of the characters.

[0127] Analysis and processing of physiological signal data during writing: Analysis of real-time physiological data collected and normalized by wearable devices, including but not limited to: blood pressure analysis: the maximum, minimum and average blood pressure corresponding to the handwriting of all characters, the handwriting of a single character, and the strokes of a single character, that is, the blood pressure change curve, is analyzed and compared with the standard value in the database; other collected electrocardiogram signals, electroencephalogram signals, electromyography signals, electrooculogram signals, heart rate, respiration, blood oxygen, skin electrical signals, blood oxygen saturation, pulse wave, body temperature, body movement and other data are also processed similarly.

[0128] Handwriting psychology analysis: After the handwriting psychology classification is extracted through the calligraphy pre-training model, the label is converted and used as input for handwriting psychology knowledge map retrieval to obtain the corresponding psychological feature fact description and correlation relationship description, etc. Handwriting psychology analysis can analyze and evaluate the handwriting from multiple aspects such as personality, temperament, thinking, and ability.

[0129] Handwriting physiological analysis: After the corresponding feature extraction is performed through the calligraphy pre-training model, the handwriting physiological classification is converted into a label, and combined with the handwriting physiological knowledge map retrieval, the corresponding physiological feature fact description and correlation relationship description, etc. Handwriting physiological analysis can be used to analyze and evaluate the handwriting from multiple aspects such as electrocardiogram, respiration, electromyography, blood pressure, electroencephalogram, and mental state. In the case of the participation of smart wearable devices, the mean and change of handwriting physiological indicator data will be compared with the standard value in the database, and the credibility and accuracy of the data can be judged.

[0130] For the evaluation rule engine, the evaluation rule engine includes the creation and management of various evaluation rules, the creation of rule module libraries, etc. Creation and management of evaluation rules: create, edit, delete and view evaluation rules. Each rule can set parameters to adapt to different evaluation scenarios. Rule template library: provides a series of preset rule templates to quickly start and run some common evaluation tasks. The evaluation rule engine is responsible for various feature information processing parameters (such as whether to process, parameter input value), processing order, processing logic, etc. The evaluation rule engine parameters are set through external configuration files.

[0131] For the data filtering engine, the data filtering function is the ability to screen and clean features during the feature data processing process. Feature filtering removes invalid, abnormal, erroneous, missing, duplicated or unnecessary feature process data, thereby improving the quality and availability of feature data. Feature data filtering can be used to filter out qualified feature data according to needs, thereby improving the pertinence and effectiveness of data analysis.

[0132] For the template generation engine, the main function of the template engine is to generate output with specific format and content based on the given template and data. The functions of the template engine mainly include template parsing, data binding, output generation, etc. According to the template parameter Id corresponding to the rule engine, the corresponding template is searched, the variables, tags and control structures in the template are identified and parsed, and the data in the inference result is replaced with the corresponding variables in the template to generate output with specific psychological and physiological template format and content. The output includes various data and forms such as text, images, and audio.

[0133] In some embodiments, before step S120, the method may further include the following steps: collecting calligraphy work data, performing data cleaning on the calligraphy work data, and labeling the cleaned calligraphy work data, and using the labeled data as training data; wherein the label includes at least one of a calligraphy image classification label, a font category label, a component category label, and a stroke category label; and using the training data to train the initial PP-YOLOE model to obtain a trained calligraphy AI model.

[0134] For the establishment of calligraphy AI model, Figure 4 As shown, the calligraphy AI model includes but is not limited to a character target positioning model, a component target positioning model, a stroke instance segmentation model, a calligraphy style classification model, a layout spacing classification model, a layout blank classification model, a composition feature classification model, a handwriting personality feature classification model, a handwriting physiological feature classification model, etc. The advantage of the calligraphy pre-trained AI model is that it can automatically learn the features of calligraphy images without human intervention, and at the same time has good generalization ability and can be applied to different calligraphy data sets. As an example, the calligraphy AI model training process is as follows:

[0135] Data collection: Collect a large amount of calligraphy data as training data, including calligraphy inscriptions or calligraphy works from different periods, styles, and calligraphers from ancient times to the present. It can be obtained from calligraphers' inscriptions, collections, calligraphy exhibitions, the Internet, and other channels, or students' practice calligraphy characters and works can be extracted from the data generated by calligraphy application software.

[0136] Data cleaning: Data cleaning refers to the screening, processing, correction, cropping, resizing, and noise removal of the collected calligraphy image data to ensure the quality and accuracy of the data. Data cleaning specifically includes deleting duplicate data, processing missing data, correcting erroneous data, and standardizing data formats. Data cleaning is very important and can improve the reliability and accuracy of the results of subsequent data analysis and mining.

[0137] Model selection: According to the nature of the calligraphy image dataset, select a model architecture and algorithm suitable for the calligraphy task. Commonly used models include convolutional neural network (CNN), recurrent neural network (RNN), R-CNN, Fast-R-CNN, PP-YOLOE, SSD, FPN, Mask-RCNN, etc. The embodiment of this application adopts the PP-YOLOE model.

[0138] Label data: Label the cleaned high-quality calligraphy image data manually or with semi-automatic tools. Different feature network extraction models have different labeling contents. For feature classification networks, each image can be labeled with a corresponding label or category. For example, different calligraphy images can be classified according to font style or author. For target positioning feature detection network models, different targets (such as characters, components, etc.) need to be labeled with rectangular boxes in each image and labeled with corresponding label categories. For image instance segmentation network models, different targets (such as strokes) need to be accurately labeled with polygonal labels in each image and labeled with corresponding label categories. Finally, the labeling format is converted into a format acceptable to the PP-YOLOE model. For example, target detection models and instance segmentation models require data normalization.

[0139] Model training: The entire annotated data set is divided into a training set, a validation set, and a test set. The training set is used for model training and parameter update, the validation set is used for model tuning and selection, and the test set is used to evaluate the performance and generalization ability of the model. In the embodiment of the present application, there are nearly 30 million pictures in the data set, and the training set, validation set, and test set are divided according to the ratio of 7:2:1. After setting the model configuration file, model hyperparameters, model data set paths, number of training epochs, etc., you can start calligraphy AI model training. During the training process, it is necessary to define the loss function, select the optimization algorithm, and update the model parameters through the back propagation algorithm, so that the model can gradually learn the characteristics and laws of calligraphy pictures. In the embodiment of the present application, the data set is fully prepared, and it is chosen not to reuse the low-level feature parameter values ​​to restart training the entire network.

[0140] Model evaluation: Use evaluation indicators to evaluate the trained model. You can use indicators such as accuracy, recall rate, F1 value, PR curve, AP, mAP, detection speed, floating point operation amount, etc. to evaluate the performance of the model.

[0141] Model optimization: Based on the evaluation results, the model can be optimized by adjusting the model structure, hyperparameter tuning, increasing the amount of training data, improving feature extraction, and other methods to improve the performance of the model. The above methods can further improve the data processing efficiency and accuracy of the calligraphy AI model.

[0142] Figure 5 A schematic diagram of a calligraphy data processing device based on brush calligraphy is provided. Figure 5 As shown, the calligraphy data processing device 500 based on brush calligraphy includes:

[0143] An acquisition module 501 is used to acquire a brush calligraphy image;

[0144] An extraction module 502 is used to extract a variety of handwriting feature data based on the brush calligraphy image through a trained calligraphy AI model;

[0145] A comparison module 503, configured to perform feature comparison based on the plurality of handwriting feature data and standard data in a specified database to obtain a feature comparison result;

[0146] An analysis module 504 is used to analyze the psychological characteristic data of the writer corresponding to the calligraphy image by specifying a handwriting psychological knowledge map according to the characteristic comparison result;

[0147] A determination module 505 is used to determine the degree of completion of the calligraphy in the calligraphy image according to the feature comparison result, analyze the arm extension of the writer according to the degree of completion of the calligraphy, and obtain the physiological characteristic data of the writer based on the arm extension;

[0148] The display module 506 is used to display the psychological characteristic data and the physiological characteristic data through a graphical user interface.

[0149] The calligraphy data processing device based on brush calligraphy provided in the embodiment of the present application has the same technical features as the calligraphy data processing method based on brush calligraphy provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0150] An electronic device provided in an embodiment of the present application is Figure 6 As shown, the electronic device 600 includes a processor 602 and a memory 601, wherein the memory stores a computer program that can be run on the processor, and the processor implements the steps of the method provided in the above embodiment when executing the computer program.

[0151] See also Figure 6 The electronic device further includes: a bus 603 and a communication interface 604, a processor 602, a communication interface 604 and a memory 601 are connected via the bus 603; the processor 602 is used to execute an executable module stored in the memory 601, such as a computer program.

[0152] The memory 601 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 604 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0153] The bus 603 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0154] Among them, the memory 601 is used to store programs, and the processor 602 executes the program after receiving the execution instruction. The method executed by the device defined by the process disclosed in any embodiment of the present application can be applied to the processor 602 or implemented by the processor 602.

[0155] The processor 602 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 602. The above processor 602 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined to execute. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 601, and the processor 602 reads the information in the memory 601 and completes the steps of the above method in combination with its hardware.

[0156] Corresponding to the above-mentioned calligraphy data processing method based on brush calligraphy, an embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the steps of the above-mentioned calligraphy data processing method based on brush calligraphy.

[0157] The calligraphy data processing device based on brush calligraphy provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The device provided in the embodiment of the present application has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. It can be clearly understood by technicians in the relevant field that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0158] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0159] For another example, the flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0160] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0161] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0162] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the calligraphy data processing method based on brush calligraphy described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0163] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0164] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solution of the present application, rather than to limit it. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solution recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiment of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for processing calligraphy data based on brush writing, characterized in that: The method comprises: Get the brush calligraphy image; Extracting a variety of handwriting feature data based on the brush calligraphy image through a trained calligraphy AI model; Perform feature comparison based on the plurality of handwriting feature data and standard data in a specified database to obtain a feature comparison result; Analyzing the psychological characteristic data of the writer corresponding to the calligraphy image by specifying the handwriting psychological knowledge map according to the characteristic comparison result; Determining the degree of completion of the calligraphy in the calligraphy image according to the feature comparison result, analyzing the arm extension of the writer according to the degree of completion of the calligraphy, and obtaining physiological feature data of the writer based on the arm extension; The psychological characteristic data and the physiological characteristic data are displayed through a graphical user interface.

2. The method according to claim 1, characterized in that The calligraphy in the calligraphy image is completed on the digital ink screen; The writer wears a smart wearable device during the writing process of the calligraphy; The step of obtaining the calligraphy image comprises: The image of the calligraphy completed by the writer on the digital ink screen is obtained through the digital ink screen, and the physiological signal data of the writer is collected through the smart wearable device.

3. The method according to claim 2, characterized in that After obtaining the brush calligraphy image, the method further comprises: Collecting handwriting data based on the brush calligraphy image; the handwriting data includes at least one of the coordinates of the corresponding points of the brush calligraphy, the timestamps corresponding to each point, the pen pressure value, the tilt angle of the pen, the pen trajectory data, and the contact surface shape of the digital ink screen and the pen; Calculate at least one of the writing speed, writing acceleration, writing starting point, writing turning point, writing intersection point, writing end point, writing main stroke segment, writing direction and writing handwriting ink contour based on the handwriting data to obtain a handwriting data preprocessing result; Based on the handwriting data preprocessing result, the physiological signal data collected by the smart wearable data device and the handwriting data are aligned and normalized from the start and end time dimensions, and the normalized value is recorded. The fusion result of the physiological signal data and the handwriting data is generated according to the aligned normalized value; wherein the fusion result is used to characterize the mean value of each physiological indicator data and the change value of each physiological indicator data of the writer at the writing time corresponding to the target handwriting data.

4. The method according to claim 3, characterized in that: The trained calligraphy AI model includes a composition feature classification model, a handwriting psychological classification model and a handwriting analysis model; the plurality of handwriting feature data are extracted based on the brush calligraphy image through the trained calligraphy AI model, including: According to the handwriting data preprocessing result, the handwriting ink image corresponding to the brush calligraphy image is subjected to feature classification by the composition feature classification model to obtain representational handwriting feature data including handwriting layout, handwriting spacing density, blank space, connected strokes, and row and column directions; According to the fusion result, the handwriting ink image is subjected to feature classification by the handwriting psychological classification model to obtain psychological classification handwriting feature data corresponding to the writer; the psychological classification handwriting feature data includes at least one of personality feature handwriting, emotion feature handwriting and thinking feature handwriting; Analyzing the handwriting ink image through the handwriting analysis model according to the writing pressure data collected by the digital ink screen to obtain stroke distinguishing geometric contour data including target handwriting character positioning and handwriting stroke splitting; A variety of handwriting feature data are obtained based on the representational handwriting feature data, the psychological classification handwriting feature data, and the stroke differentiation geometric contour data.

5. The method according to claim 3, characterized in that: The feature comparison based on the plurality of handwriting feature data and the standard data in a specified database is performed to obtain a feature comparison result, including: Normalizing the font size data in the plurality of handwriting feature data to obtain a size ratio between the font circumscribed rectangle size and the image size, and comparing the size ratio with the standard size data in a specified database to obtain a font size comparison analysis result; Comparing the writing speed data collected by the digital ink screen with the standard writing rhythm data in the specified database, and comparing the writing pressure data collected by the digital ink screen with the standard lifting, pressing and force data in the specified database, to obtain a comparative analysis result of the writing process; the writing speed data includes writing speed and writing acceleration; According to the fusion result, the mean value of each physiological indicator data and the change value of each physiological indicator data are compared with the standard physiological indicator data in the specified database to obtain a physiological indicator comparison result, and the data credibility and data accuracy are judged according to the physiological indicator comparison result; The final feature analysis result for the calligraphy is obtained based on the font size comparison analysis result, the writing process comparison analysis result, the data credibility and the data accuracy.

6. The method according to claim 1, characterized in that Before extracting a plurality of handwriting feature data based on the brush calligraphy image through the trained calligraphy AI model, the method further includes: Collecting calligraphy work data, performing data cleaning on the calligraphy work data, and labeling the cleaned calligraphy work data, and using the labeled data as training data; wherein the label includes at least one of a calligraphy image classification label, a font category label, a component category label, and a stroke category label; The initial PP-YOLOE model is trained using the training data to obtain a trained calligraphy AI model.

7. The method according to claim 1, characterized in that The trained calligraphy AI model includes any one or more of the following: Text segmentation model, component detection model, stroke splitting model, composition feature classification model, handwriting psychology classification model, handwriting analysis model, character target positioning model, calligraphy style classification model, layout spacing classification model, layout white space classification model, handwriting personality feature classification model, and handwriting physiological feature classification model.

8. A calligraphy data processing device based on brush writing, characterized in that: include: An acquisition module, used for acquiring a brush calligraphy image; An extraction module, used to extract a variety of handwriting feature data based on the brush calligraphy image through a trained calligraphy AI model; A comparison module, used for performing feature comparison based on the plurality of handwriting feature data and standard data in a specified database to obtain a feature comparison result; An analysis module, configured to analyze the psychological characteristic data of the writer corresponding to the calligraphy image through a designated handwriting psychological knowledge map according to the characteristic comparison result; A determination module, configured to determine the degree of completion of the calligraphy in the calligraphy image according to the feature comparison result, analyze the arm extension of the writer according to the degree of completion of the calligraphy, and obtain physiological characteristic data of the writer based on the arm extension; A display module is used to display the psychological characteristic data and the physiological characteristic data through a graphical user interface.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the method according to any one of claims 1 to 7.