Calligraphy creation guiding method and device based on human-computer interaction and medium

By establishing a multi-layered semantic ontology of brushstrokes and generating a rule graph, and using multi-dimensional perception data of brushstrokes for semantic mapping and rule triggering, the problem of refined guidance and error correction in complex writing scenarios in calligraphy human-computer interaction in existing technologies has been solved, and more stable and coherent calligraphy creation guidance has been achieved.

CN122087130APending Publication Date: 2026-05-26XIAMEN UNIV OF TECH
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAMEN UNIV OF TECH
Filing Date
2026-04-20
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing calligraphy human-computer interaction technologies have room for improvement in terms of multi-layered brushstroke semantic organization and cross-stage rule linkage. In particular, when there is a lack of a unified semantic ontology structure and rule relationship expression mechanism, it is difficult to stably support refined guidance and error correction presentation in complex writing situations.

Method used

A multi-layered semantic ontology of brushstrokes is established, a rule graph is generated, and semantic mapping and rule triggering are performed through multi-dimensional perception data of brushstrokes to achieve guidance and error correction presentation.

Benefits of technology

It achieves unified convergence of rule entries in terms of mutual exclusion and trigger sequence, reduces the probability of presentation jumps, improves the coherence and consistency of guided presentation and error correction presentation, and has traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087130A_ABST
    Figure CN122087130A_ABST
Patent Text Reader

Abstract

The invention discloses a human-computer interaction-based calligraphy creation guiding method and device and a medium, and relates to the technical field of human-computer interaction, and the method comprises the steps: building a multilayer writing semantic ontology, carrying out the semantic classification and semantic association registration of rule entries in a calligraphy rule library, and generating a rule map; obtaining pen wielding multi-dimensional perception data, performing time identification unified alignment, and performing packaging to generate a pen wielding data packet; executing stroke phase segmentation on the pen wielding data packet, and executing semantic label mapping on a stroke phase segmentation result according to a multilayer writing method semantic ontology to generate a phase semantic mapping table; and performing rule entry retrieval on the phase semantic mapping table in the rule map, performing conflict judgment and rule trigger chain construction on the retrieved rule entries, and generating a rule trigger result packet. According to the method, unified convergence of the rule items between the mutual exclusion relation constraint and the triggering precedence relation constraint is realized through the rule triggering chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of human-computer interaction technology, and in particular to a method, device and medium for guiding calligraphy creation based on human-computer interaction. Background Technology

[0002] With the continuous development of human-computer interaction, digital writing hardware, and high-precision sensing and acquisition technologies, calligraphy creation has gradually evolved from traditional offline copying training to a digital writing form oriented towards real-time interactive guidance. Based on multi-source data acquisition methods such as pressure sensing, motion trajectory acquisition, and posture monitoring, the writing process can be continuously depicted and synchronously presented on display terminals, thus supporting the refined expression of stroke structure, penmanship rhythm, and writing style. Research surrounding the expression of calligraphy knowledge and the construction of guidance logic continues to deepen, gradually forming an interactive framework centered on rule expression, stage division, and feedback presentation. This is driving the evolution of calligraphy creation guidance from static illustration to dynamic collaboration, laying the foundation for building a highly immersive and high-precision human-computer interactive writing environment.

[0003] Existing calligraphy human-computer interaction technologies still have room for improvement in terms of multi-layered semantic organization of brushstrokes and cross-stage rule linkage. In particular, the lack of a unified semantic ontology structure and rule relationship expression mechanism makes it difficult to stably support refined guidance and error correction in complex writing scenarios. Existing technologies mostly rely on isolated rule entries and local stage judgments to complete prompt generation, and have limited ability to close-loop modeling of multi-dimensional brushstroke data and rule evolution relationships. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a calligraphy creation guidance method based on human-computer interaction to solve the problem of unstable support for refined guidance and error correction presentation in complex writing situations.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a calligraphy creation guidance method based on human-computer interaction, which includes, A multi-layered semantic ontology of brushstrokes is established, and semantic classification and semantic association registration are performed on the rule entries in the calligraphy rule base to generate a rule graph; After acquiring multi-dimensional pen movement perception data and aligning it with time stamps, the data is encapsulated to generate a pen movement data package. Stroke phase segmentation is performed on the pen movement data package, and semantic tag mapping is performed on the stroke phase segmentation results based on a multi-layered pen movement semantic ontology to generate a phase semantic mapping table. The multi-dimensional pen movement perception data includes force data, speed data, angle data, and writing trajectory data. In the rule graph, perform rule entry retrieval on the phase semantic mapping table, perform conflict adjudication and rule trigger chain construction on the retrieved rule entries, and generate a rule trigger result package; Based on the rule-triggered result package, guided presentation and error correction presentation are performed on the display terminal to generate guided error correction records. Evidence encapsulation and graph rearrangement are then performed on the guided error correction records to generate a user rule subgraph for the current user.

[0007] As a preferred embodiment of the calligraphy creation guidance method based on human-computer interaction described in this invention, the establishment of a multi-layered brushstroke semantic ontology specifically involves: The hierarchy of the multi-layered semantic ontology of brushstrokes is defined as the basic action layer, phase layer, structure layer, and style layer; Read the set of rule entries from the calligraphy rule base; Semantic classification is performed on the rule entries in the rule entry set, and hierarchical semantic labels are assigned to the rule entries based on the basic action layer, phase layer, structure layer and style layer; Identify the logical connections between rule entries with hierarchical semantic tags, and establish semantic associations based on these logical connections; Encapsulate rule entries with hierarchical semantic tags and semantic relationships to generate a multi-layered penmanship semantic ontology.

[0008] As a preferred embodiment of the calligraphy creation guidance method based on human-computer interaction described in this invention, the generation of the rule graph specifically involves: Create rule entry nodes based on rule entries with hierarchical semantic tags; Based on semantic relationships, create relation edges between rule entry nodes and register the relation types for the relation edges; Based on the rule entries with hierarchical semantic tags, register the applicable stage attributes and presentation method attributes for the rule entry nodes; Encapsulate the rule entry nodes and relation edges to generate a rule graph.

[0009] As a preferred embodiment of the calligraphy creation guidance method based on human-computer interaction described in this invention, wherein: the generation of the phase semantic mapping table specifically involves, In the pen movement data package, the stroke boundaries are divided according to the writing trajectory data, and the force data, speed data and angle data within the stroke boundaries are extracted to form a stroke segment sequence. Multi-scale change point extraction is performed on velocity and angle data in the stroke segment sequence to form a phase boundary candidate sequence; The candidate sequences for phase boundaries are sorted according to a unified time identifier order, and phase intervals are divided to form a phase interval sequence; In the phase interval sequence, the first phase interval is marked as the starting phase, the last phase interval is marked as the ending phase, and the phase interval between the starting phase and the ending phase is marked as the writing phase. In the stroke phase, the direction of change of angle data is determined to obtain the turning position, and the corresponding phase interval is marked as the turning phase according to the turning position to form the stroke phase segmentation result. Based on the multi-layered stroke semantic ontology, semantic label mapping is performed on the phase labels in the stroke phase segmentation results to form a phase semantic entry sequence; The phase semantic entry sequence is encapsulated using a unified time identifier to generate a phase semantic mapping table.

[0010] As a preferred embodiment of the calligraphy creation guidance method based on human-computer interaction described in this invention, wherein: the generation rule triggering result package specifically includes, Convert the phase semantic mapping table into a search key sequence; In the rule graph, rule entry nodes are located using the search key sequence to form a set of candidate rule entries; In the candidate rule entry set, according to the applicable stage attribute, filter out rule entry nodes that are inconsistent with the stage and retain rule entry nodes that are consistent with the stage to form a consistent candidate set; Perform rule entry retrieval on the rule entry nodes in the consistent candidate set to form a set of matching rule entries; Extract conflict pairs from the set of matching rule entries along the conflict edges, and perform conflict resolution on the conflict pairs to form a set of executable rule entries; The executable rule entries are arranged in the order of execution along the dependency edges to form a rule triggering chain; The phase label, phase semantic mapping table, set of executable rule entries, and rule triggering chain are encapsulated to generate a rule triggering result package.

[0011] As a preferred embodiment of the calligraphy creation guidance method based on human-computer interaction described in this invention, the conflict edge is an edge type that represents the mutual exclusion relationship between rule entry nodes in the rule graph; The dependent edge is an edge type in the rule graph that represents the sequential relationship between rule entry nodes.

[0012] As a preferred embodiment of the calligraphy creation guidance method based on human-computer interaction described in this invention, the generation of guidance and error correction records specifically involves: Decapsulate the rule trigger result package to obtain the phase label, the set of executable rule entries, and the rule trigger chain; Read the rule entries in the executable rule entry set one by one in the order of the rule trigger chain, and bind phase tags to the rule entries to form a rule presentation entry set; Based on the presentation mode attribute, the presentation mode matching is performed on the rule presentation item set to obtain the guidance presentation action set and the error correction presentation action set; The guided presentation action set is mapped into trajectory coverage instructions, phase window instructions, and structure reference marker instructions; The error correction action set is mapped into force prompts, speed prompts, and angle prompts. The trajectory coverage command, phase window command, structure reference mark command, force prompt command, speed prompt command and angle prompt command are summarized to form a presentation command set; The display terminal executes the presentation instruction set to complete the guided presentation and error correction presentation, and generates the guided error correction record.

[0013] As a preferred embodiment of the calligraphy creation guidance method based on human-computer interaction described in this invention, the evidence encapsulation involves encapsulating the phase tags, rule entries, and presentation time identifiers in the guidance and error correction record into an evidence record package in a unified chronological order. The graph rearrangement involves adjusting the arrangement of dependency and conflict edges between rule entry nodes in the rule graph based on the evidence record package, and generating a user rule subgraph.

[0014] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the calligraphy creation guidance method based on human-computer interaction as described in the first aspect of the present invention.

[0015] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the calligraphy creation guidance method based on human-computer interaction as described in the first aspect of the present invention.

[0016] The beneficial effects of this invention are as follows: Through the rule triggering chain, unified convergence of rule entries between mutually exclusive constraints and triggering sequence constraints is achieved. Conflict adjudication ensures that opposite stroke constraints under the same applicable stage attribute do not simultaneously enter the set of executable rule entries. Sequential organization ensures that dependency edge pointing relationships are triggered first and then inherited in the rule triggering chain, thereby providing a stable triggering basis for the generation of instructions for guided presentation and error correction presentation, reducing the probability of presentation jumps, improving the coherence and consistency of guided presentation and error correction presentation, and making the triggering path of rule entries traceable, facilitating the formation of verifiable update basis for dependency edges and conflict edges in the rule graph by guided and error correction records. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a calligraphy creation guidance method based on human-computer interaction.

[0019] Figure 2 The flowchart for generating the rule graph.

[0020] Figure 3 This is a flowchart for stroke phase segmentation.

[0021] Figure 4 A flowchart for the interaction of rule triggering and guidance. Detailed Implementation

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0025] Reference Figures 1-4 This is one embodiment of the present invention, which provides a calligraphy creation guidance method based on human-computer interaction, including the following steps: S1. Establish a multi-layered semantic ontology of brushstrokes, and perform semantic classification and semantic association registration on the rule entries in the calligraphy rule base to generate a rule graph.

[0026] The hierarchy of the multi-layered semantic ontology of brushstrokes is defined as the basic action layer, phase layer, structure layer, and style layer; the set of rule entries in the calligraphy rule base is read; wherein, the calligraphy rule base is a set of calligraphy rules pre-stored in the storage medium for subsequent semantic classification and semantic association registration operations.

[0027] Semantic classification is performed on the rule entries in the rule entry set, and hierarchical semantic labels are assigned to the rule entries based on the basic action layer, phase layer, structure layer, and style layer, specifically: For each rule entry in the rule entry set, the text, stroke name, stroke description, and applicable writing stage description of the rule entry are read one by one. Based on the semantic definitions corresponding to the basic action layer, phase layer, structure layer, and style layer, the rule entries are semantically classified and assigned hierarchical semantic tags according to the basic action layer, phase layer, structure layer, and style layer.

[0028] Semantic classification involves performing item-by-item matching between brushstroke descriptions and action descriptions in the rule entry text. When a brushstroke description meets the consistency threshold with the basic action layer semantic definition, a basic action layer semantic label is written. When a brushstroke description meets the consistency threshold with the phase layer semantic definition, a phase layer semantic label is written. When a brushstroke description meets the consistency threshold with the structure layer semantic definition, a structure layer semantic label is written. When a brushstroke description meets the consistency threshold with the style layer semantic definition, a style layer semantic label is written.

[0029] When the brushstroke description does not meet the consistency threshold with the semantic definitions of the basic action layer, phase layer, structure layer, and style layer, the rule entry remains unlabeled and the reason field for unlabeling is recorded. The reason field for unlabeling is filled with "Does not meet the consistency threshold". The consistency threshold is set according to the similarity ratio between the brushstroke description and the semantic definition. For example, the consistency threshold is met when the similarity ratio reaches more than 70%. The setting of more than 70% is based on the matching stability between the brushstroke description and the semantic definition in the calligraphy rule entry text. It is used to avoid too many rule entries entering the unlabeled state while ensuring the reliability of semantic classification.

[0030] Identify the logical relationships between rule entries with hierarchical semantic tags, and establish semantic associations based on these logical relationships, specifically as follows: For each rule entry set with hierarchical semantic tags, the hierarchical semantic tags, applicable writing stage descriptions, and stroke descriptions are read one by one. Logical relationship identification is then performed on any two rule entries. Logical relationship identification includes dependency identification and mutual exclusion identification. Dependency identification is based on the applicable writing stage description to determine whether the applicable writing stage of rule entry A precedes the applicable writing stage of rule entry B, and based on the stroke description, to determine whether the stroke action of rule entry A is a prerequisite for the stroke action of rule entry B.

[0031] When the sequential relationship of the applicable writing stage and the preconditions of the stroke action simultaneously meet the consistency threshold, rule item A and rule item B are registered as a dependency relationship and the relationship type is registered as a dependency edge; the mutual exclusion relationship identification is based on the hierarchical semantic label to determine whether rule item A and rule item B point to opposite stroke constraints in the same applicable writing stage.

[0032] When the same applicable writing stage and opposite stroke constraints simultaneously meet the conflict threshold, rule entry A and rule entry B are registered as mutually exclusive and the relationship type is registered as conflict edge. The consistency threshold and conflict threshold are set according to the matching ratio of the applicable writing stage description and the matching ratio of the hierarchical semantic tag. For example, the consistency threshold is met when both the matching ratio of the applicable writing stage description and the matching ratio of the hierarchical semantic tag reach more than 70%, and the conflict threshold is met when the matching ratio of the applicable writing stage description reaches more than 70% and the proportion of the hierarchical semantic tag with opposite constraints reaches more than 70%.

[0033] When neither the dependency identification nor the mutual exclusion identification satisfies the consistency threshold and the conflict threshold, rule entry A and rule entry B do not establish a semantic association, and the reason field for not establishing the association is recorded. The reason field for not establishing the association is filled in as "neither the consistency threshold nor the conflict threshold is satisfied".

[0034] Encapsulate rule entries with hierarchical semantic tags and their semantic relationships to generate a multi-layered stroke semantic ontology; create rule entry nodes based on the rule entries with hierarchical semantic tags, specifically as follows: For each rule entry with hierarchical semantic tags in the multi-layered penmanship semantic ontology, the rule entry identifier, hierarchical semantic tags, applicable writing stage description, and presentation mode attribute are read one by one, and a rule entry node is created using the rule entry identifier as the node identifier. The rule entry identifier, hierarchical semantic tags, applicable writing stage description, and presentation mode attribute are written into the rule entry node to form a rule entry node record. When the rule entry identifier already exists in the rule entry node record, the rule entry node record remains unchanged and a duplicate reason field is recorded, which is filled with "rule entry identifier duplicated", thus completing the creation of the rule entry node.

[0035] Based on semantic relationships, relationship edges are created between rule entry nodes, and the relationship type is registered for each relationship edge, specifically as follows: For each semantic association, read the association start point rule entry identifier, association end point rule entry identifier, and association type, and locate the rule entry node corresponding to the association start point rule entry identifier and the rule entry node corresponding to the association end point rule entry identifier in the rule entry node record; establish a connection record between the rule entry nodes and register the relationship type field, which is filled with dependency edge or conflict edge; when both the association start point rule entry identifier and the association end point rule entry identifier exist in the rule entry node record, the relationship edge is created; when either the association start point rule entry identifier or the association end point rule entry identifier does not exist in the rule entry node record, the relationship edge is not created, and the reason field for not creating is recorded, which is filled with "rule entry node does not exist".

[0036] Based on the rule entries with hierarchical semantic tags, register the applicable stage attributes and presentation method attributes for the rule entry nodes, specifically: The hierarchical semantic tags and rule entry text are read one by one for each rule entry node. The applicable stage attributes are determined based on the phase layer semantic tags in the hierarchical semantic tags. The applicable stage attributes include the starting phase, the middle phase, the turning phase, and the ending phase. The presentation mode attributes are determined based on the style layer semantic tags and the structure layer semantic tags. The presentation mode attributes include trajectory coverage, phase window, structural reference, intensity prompt, speed prompt, and angle prompt.

[0037] When a corresponding phase layer semantic tag exists in the hierarchical semantic tag, the applicable stage attribute is registered in the rule entry node record. When a corresponding phase layer semantic tag does not exist in the hierarchical semantic tag, the missing field of the applicable stage attribute is registered in the rule entry node record and filled with "No phase layer semantic tag registered". When a corresponding style layer semantic tag or structure layer semantic tag exists in the hierarchical semantic tag, the presentation method attribute is registered in the rule entry node record. When a corresponding style layer semantic tag and a corresponding structure layer semantic tag do not exist in the hierarchical semantic tag, the missing field of the presentation method attribute is registered in the rule entry node record and filled with "No style layer semantic tag and structure layer semantic tag registered".

[0038] Encapsulate the rule entry nodes and relation edges to generate a rule graph.

[0039] It should be noted that this step of multi-layered calligraphy semantic ontology and rule graph does not involve the training process. The multi-layered calligraphy semantic ontology and rule graph are generated by performing semantic classification and semantic association registration based on the calligraphy rule base pre-stored in the storage medium, and by creating rule entry nodes based on rule entry identifiers and dependency edges and conflict edges based on semantic association relationships. Semantic classification and logical connection identification use consistency threshold and conflict threshold matching judgment rules to complete the writing of hierarchical semantic labels and registration of relationship types, avoiding uncertainty in rule entry node records and relationship edge records caused by training parameter updates.

[0040] S2. Acquire multi-dimensional pen movement perception data, and after uniformly aligning the time markers, encapsulate it to generate a pen movement data package; perform stroke phase segmentation on the pen movement data package, and perform semantic tag mapping on the stroke phase segmentation results according to the multi-layer pen technique semantic ontology to generate a phase semantic mapping table; the multi-dimensional pen movement perception data includes force data, speed data, angle data and writing trajectory data.

[0041] Force, speed, and angle data are acquired through a smart pen, and writing trajectory data is acquired through a pressure-sensitive writing tablet. The force, speed, angle, and writing trajectory data are encapsulated in a unified time identifier order to generate a pen movement data package. The unified time identifier is a label that is written to the force, speed, and angle data collected by the smart pen and the writing trajectory data collected by the pressure-sensitive writing tablet, so as to align the multi-source acquisition results corresponding to the same writing moment.

[0042] In the pen movement data package, the stroke boundaries are divided according to the writing trajectory data. The force data, speed data and angle data within the stroke boundaries are extracted to form a stroke segment sequence. Specifically, the stroke boundaries are divided in the pen movement data package according to the changes in the start and end points of the trajectory and the breaks in the continuity of the strokes in the writing trajectory data. The corresponding force data, speed data and angle data are extracted within each stroke boundary to form a stroke segment sequence.

[0043] In the stroke segment sequence, multi-scale change point extraction is performed on velocity and angle data to form a phase boundary candidate sequence, specifically: Short-time window sequences and long-time window sequences are established for velocity data and angle data respectively. Within the short-time window sequences and long-time window sequences, the positions where the trend of velocity data change and the direction of angle data change change are clearly identified are the time positions where the trend of velocity data change changes from rising to falling or from falling to rising, while the direction of angle data change changes continuously in the opposite direction, and the change stability threshold is met. The short-time window sequence is a time window sequence with a fixed number of sampling points N1 and a time window sequence is a time window sequence with a fixed number of sampling points N2 and N2 > N1, where N is the number of sampling points included in the time window.

[0044] The time positions that simultaneously meet the change stability threshold are registered as phase boundary candidate points. The change stability threshold is set based on the proportion of velocity data change amplitude and the proportion of angle data change direction. For example, when the proportion of velocity data change amplitude and the proportion of angle data change direction both reach more than 70%, they are registered as phase boundary candidate points. The value of more than 70% is set based on the stability of the consistent change trend of velocity data and angle data in the stroke segment sequence. This is used to ensure the reliability of phase boundary recognition while avoiding excessive density of phase boundary candidate points. When neither the change trend of velocity data nor the change direction of angle data meets the change stability threshold, the phase boundary candidate point is not registered and the reason field for not registering is recorded. The reason field for not registering is filled with "not meeting the change stability threshold", thus forming a phase boundary candidate sequence.

[0045] It should be noted that the multi-scale change point extraction is a dual-window change point detection method based on a preset short time window length and a preset long time window length. It performs synchronous screening on the consistent turning point positions of the velocity data change trend and the angle data change direction in the short time window sequence and the long time window sequence, and uses the change stability threshold as the candidate point registration condition to form a phase boundary candidate sequence.

[0046] The candidate sequences for phase boundaries are sorted according to a unified time identifier, and phase intervals are divided to form a phase interval sequence, specifically as follows: The candidate sequence of phase boundaries is sorted according to a unified time identifier, and the time interval between adjacent candidate points of phase boundaries is used as the dividing criterion. Stroke segments that are continuously distributed between candidate points of phase boundaries are grouped into the same phase interval to form a phase interval sequence. When there are no stroke segments between adjacent candidate points of phase boundaries, a phase interval is not formed and the reason field for not forming is recorded. The reason field for not forming is filled with "insufficient interval between candidate points of phase boundaries".

[0047] In the phase interval sequence, the first phase interval is marked as the starting phase, the last phase interval is marked as the ending phase, and the phase interval between the starting and ending phases is marked as the stroke phase. Within the stroke phase, the direction of change in angle data is determined to obtain the turning point, and the corresponding phase interval is marked as the turning phase based on the turning point, forming the stroke phase segmentation result, specifically: The sequence of angle data change direction corresponding to continuous time positions within the stroke phase is checked. When the angle data change direction changes from a single direction to the opposite direction and meets the turning stability threshold, the changed position is registered as a turning switch position, and the phase interval corresponding to the turning switch position is marked as a turning phase. When the angle data change direction does not meet the turning stability threshold, the turning switch position is not registered and the original phase interval is maintained, thus forming the stroke phase segmentation result. The turning stability threshold is set based on the degree of continuity of the angle data change direction within the stroke phase. For example, when the proportion of angle data change direction that remains consistent in continuous time positions reaches more than 70%, the turning stability threshold is met, which is used to ensure that the turning switch position markings are stable and not excessively dense.

[0048] Based on the multi-layered stroke semantic ontology, semantic label mapping is performed on the phase labels in the stroke phase segmentation results to obtain basic action layer semantic labels, phase layer semantic labels, structure layer semantic labels, and style layer semantic labels, forming a phase semantic entry sequence, specifically: The phase labels and phase interval identifiers of each stroke phase segmentation result are read one by one. The corresponding hierarchical semantic label mapping record is located in the multi-layered stroke semantic ontology using the phase label as the search key. The hierarchical semantic label mapping record includes basic action layer semantic labels, phase layer semantic labels, structural layer semantic labels, and style layer semantic labels. When the hierarchical semantic label mapping record is located successfully, the basic action layer semantic labels, phase layer semantic labels, structural layer semantic labels, and style layer semantic labels and the phase interval identifier are encapsulated into a phase semantic entry and written into the phase semantic entry sequence in a unified time identifier order. When the hierarchical semantic label mapping record is not located, the phase label and the phase interval identifier are encapsulated into an unmapped entry and written into the phase semantic entry sequence. At the same time, the unmapped reason field is registered, which is filled with "multi-layered stroke semantic ontology has not located hierarchical semantic label mapping record".

[0049] The phase semantic entry sequence is encapsulated using a unified time identifier to generate a phase semantic mapping table.

[0050] S3. Perform rule entry retrieval on the phase semantic mapping table in the rule graph, perform conflict adjudication and rule trigger chain construction on the retrieved rule entries, and generate a rule trigger result package.

[0051] The phase semantic mapping table is converted into a retrieval key sequence; rule entry nodes are located in the rule graph using the retrieval key sequence to form a candidate rule entry set; from the candidate rule entry set, rule entry nodes with inconsistent stages are filtered out according to the applicable stage attributes, and rule entry nodes with consistent stages are retained to form a consistent candidate set, specifically: For each candidate rule entry, read the applicable stage attribute registered in the rule entry node and compare it with the corresponding stage of the phase label in the phase semantic mapping table. When the applicable stage attribute in the rule entry node matches the corresponding stage of the phase label in the phase semantic mapping table, write the rule entry node into the consistent candidate set. When the applicable stage attribute in the rule entry node does not match the corresponding stage of the phase label in the phase semantic mapping table, remove the rule entry node from the candidate rule entry set and register the stage inconsistency reason field. The stage inconsistency reason field is filled with "applicable stage attribute does not match the corresponding stage of the phase label".

[0052] Perform rule entry retrieval on the rule entry nodes in the consistent candidate set to form a set of matching rule entries, specifically: For each rule entry node in the consistent candidate set, read its hierarchical semantic tag, applicable stage attribute, and presentation mode attribute. Then, compare these attributes with the basic action layer semantic tags, phase layer semantic tags, structural layer semantic tags, and style layer semantic tags in the phase semantic mapping table. If all three attributes match, the rule entry node is written into the matching rule entry set. If any one of these attributes does not match, the rule entry node is not written into the matching rule entry set, and the non-matching reason field is recorded as "hierarchical semantic tag, applicable stage attribute, or presentation mode attribute is inconsistent with the basic action layer semantic tags, phase layer semantic tags, structural layer semantic tags, and style layer semantic tags in the phase semantic mapping table.

[0053] Extract conflict pairs from the set of matching rule entries along conflict edges, and perform conflict resolution on the conflict pairs to form a set of executable rule entries. Conflict edges are edge types in the rule graph that represent the mutual exclusion relationship between rule entry nodes, specifically: Read the rule entry node pairs connected by conflicting edges one by one from the set of matching rule entries, and perform consistency checks on the hierarchical semantic tags, applicable stage attributes and presentation mode attributes in the rule entry node pairs.

[0054] When the applicable stage attributes of a pair of rule entries are the same and the hierarchical semantic labels point to opposite stroke constraints, the pair of rule entries is registered as a conflict pair. The rule entry pairs in the conflict pair set are read one by one, and the adjudication is performed according to the consistency between the priority of the applicable stage attributes and the phase labels in the phase semantic mapping table. When the consistency between one rule entry node in the pair and the phase label in the phase semantic mapping table meets the adjudication stability threshold, the rule entry node is written into the executable rule entry set and the other rule entry node is removed from the matching rule entry set. When neither of the two rule entry nodes in the pair meets the adjudication stability threshold, the rule entry node is not written into the executable rule entry set and the non-adjudication reason field is registered. The non-adjudication reason field is filled with "adjudication stability threshold not met".

[0055] The adjudication stability threshold is set based on the proportion of consistency between the rule entry node and the phase label in the phase semantic mapping table. For example, the adjudication stability threshold is met when the consistency proportion reaches 70% or more. The setting of 70% or more is based on the stability of the consistency relationship between the rule entry node and the phase label in the phase semantic mapping table. This is used to ensure the reliability of conflict adjudication while avoiding frequent changes in the set of executable rule entries.

[0056] The executable rule entries are arranged in the order of execution along the dependency edges to form a rule triggering chain; the dependency edge is the edge type in the rule graph that represents the order of triggering between rule entry nodes, specifically: Read each rule entry node in the executable rule entry set one by one, and establish a trigger sequence record based on the dependency edge relationships registered in the rule graph. When rule entry node A points to rule entry node B through a dependency edge, rule entry node A is placed before rule entry node B in the rule trigger chain. For rule entry nodes in the executable rule entry set that do not have dependency edge associations, write the rule entry node to the end of the rule trigger chain and register the no dependency edge reason field. The no dependency edge reason field is filled with "no associated dependency edge", thus forming the rule trigger chain.

[0057] The phase label, phase semantic mapping table, set of executable rule entries, and rule triggering chain are encapsulated to generate a rule triggering result package.

[0058] S4. Based on the rule-triggered result package, perform guided presentation and error correction presentation on the display terminal, generate guided error correction records, and perform evidence encapsulation and graph rearrangement on the guided error correction records to generate user rule subgraphs for the current user.

[0059] The rule trigger result package is decapsulated to obtain the phase tag, the set of executable rule entries, and the rule trigger chain. The rule entries in the set of executable rule entries are read one by one in the order of the rule trigger chain, and the phase tag is bound to the rule entries to form the rule presentation entry set.

[0060] Based on the presentation mode attribute, presentation mode matching is performed on the rule presentation item set to obtain the guidance presentation action set and the error correction presentation action set, specifically: The system reads the presentation mode attribute and phase label of each rule presentation item set and associates the corresponding writing stage with the presentation mode attribute and phase label. When the presentation mode attribute points to trajectory coverage, phase window, or structural reference, the rule presentation item is written into the guided presentation action set. When the presentation mode attribute points to force hint, speed hint, or angle hint, the rule presentation item is written into the error correction presentation action set. When the presentation mode attribute contains multiple of the following, the rule presentation item is written into both the guided presentation action set and the error correction presentation action set. When the presentation mode attribute does not contain any of the following, the rule presentation item is not written into either the guided presentation action set or the error correction presentation action set, and the mismatch reason field is registered. The mismatch reason field is filled with "The presentation mode attribute does not point to a guided presentation action or an error correction presentation action".

[0061] The guided rendering action set is mapped to trajectory coverage instructions, phase window instructions, and structure reference marker instructions, specifically: The system reads the rule entry identifier, phase label, and presentation mode attribute of each guided presentation action set, and generates a presentation instruction record based on the correspondence between trajectory coverage, phase window, and structural reference in the presentation mode attribute.

[0062] When the presentation mode attribute points to trajectory coverage, a trajectory coverage instruction is written into the presentation instruction record, and the coverage area field and presentation time field are registered. The coverage area field includes the stroke trajectory path and start and end positions, and the presentation time field is determined according to the writing stage corresponding to the phase label. When the presentation mode attribute points to phase window, a phase window instruction is written into the presentation instruction record, and the phase interval field and presentation time field are registered. The phase interval field includes the corresponding items among the starting phase, the stroke phase, the turning phase, and the ending phase.

[0063] When the presentation mode attribute points to a structural reference, a structural reference mark instruction is written into the presentation instruction record, and the structural reference position field and presentation time field are registered. The structural reference position field includes the stroke combination position and the character layout position. When the presentation mode attribute does not point to trajectory coverage, phase window, or structural reference, trajectory coverage instruction, phase window instruction, and structural reference mark instruction are not generated, and the unmapped reason field is registered. The unmapped reason field is filled with "The presentation mode attribute does not point to the guided presentation action type".

[0064] The error correction action set is mapped to force, speed, and angle prompts, specifically: For each error correction presentation action set, read the rule entry identifier, phase label, and presentation mode attribute, and generate a presentation instruction record based on the correspondence between the force prompt, speed prompt, and angle prompt in the presentation mode attribute. When the presentation mode attribute points to the force prompt, write the force prompt instruction into the presentation instruction record and register the target force range field and the presentation time field. The target force range field is determined according to the force constraint description registered in the rule entry.

[0065] When the presentation mode attribute points to speed hint, a speed hint instruction is written into the presentation instruction record, and the target speed range field and presentation time field are registered. The target speed range field is determined according to the speed constraint description registered in the rule entry. When the presentation mode attribute points to angle hint, an angle hint instruction is written into the presentation instruction record, and the target angle range field and presentation time field are registered. The target angle range field is determined according to the angle constraint description registered in the rule entry.

[0066] When the presentation mode attribute does not point to force, speed, or angle, no force, speed, or angle instruction will be generated, and the unmapped reason field will be registered. The unmapped reason field should be filled with "The presentation mode attribute does not point to the error correction presentation action type".

[0067] The trajectory coverage command, phase window command, structure reference mark command, force prompt command, speed prompt command, and angle prompt command are summarized to form a presentation command set. The summary does not include normalization processing. The summary is to write the trajectory coverage command, phase window command, structure reference mark command, force prompt command, speed prompt command, and angle prompt command into the presentation command set according to the presentation time field and the rule trigger chain order.

[0068] The display terminal executes the presentation instruction set in chronological order to complete the guided presentation and error correction presentation, and generates a guided error correction record, specifically as follows: The presentation time field and instruction type field are read one by one from the presentation instruction set, and the trajectory coverage instruction, phase window instruction, structure reference mark instruction, force prompt instruction, speed prompt instruction and angle prompt instruction are triggered in sequence according to the presentation time field and presented synchronously in the corresponding display area of ​​the display terminal.

[0069] When the trajectory overlay command is active, reference trajectory lines are overlaid on the writing trajectory display layer. When the phase window command is active, the current phase interval is marked on the time axis display layer. When the structure reference mark command is active, the stroke position relationship is marked on the character structure display layer. When the force prompt command is active, a force deviation direction prompt is given on the force prompt display layer. When the speed prompt command is active, a speed deviation direction prompt is given on the speed prompt display layer. When the angle prompt command is active, an angle deviation direction prompt is given on the angle prompt display layer.

[0070] Once all instructions in the instruction set have been presented, the execution time field, phase label, rule entry identifier, and user pen input feedback status of each presentation instruction are summarized to form a guidance and error correction record. When a presentation instruction is not presented on the display terminal, the reason for non-completion is recorded and written into the guidance and error correction record.

[0071] Evidence encapsulation and graph rearrangement are performed on the guidance and correction records to generate a user rule subgraph. Evidence encapsulation involves packaging the phase tags, rule entries, and presentation time identifiers in the guidance and correction records into evidence record packages in a unified chronological order. Graph rearrangement involves adjusting the arrangement of dependency and conflict edges between rule entry nodes in the rule graph based on the evidence record packages and generating a user rule subgraph. Specifically: The system reads the phase label, rule entry identifier, and presentation time identifier from each guidance and correction record, and writes them into the evidence record package field set in the order of presentation time identifier. The evidence record package field set includes the phase label field, rule entry identifier field, presentation time identifier field, and execution result field. When there are missing fields in the guidance and correction record, the missing reason field is registered in the evidence record package field set and filled with the corresponding missing description, thereby completing the evidence encapsulation.

[0072] After the evidence is encapsulated, the evidence record packages are read one by one in the rule graph, and the corresponding rule entry nodes are located based on the phase label field and rule entry identifier field in the evidence record package.

[0073] In the rule graph, the trigger sequence reflected by the evidence record package is compared with the original dependency edge arrangement. When the trigger sequence reflected by the evidence record package is consistent with the original dependency edge arrangement, the dependency edge arrangement between the corresponding rule entry nodes remains unchanged in the rule graph. When the trigger sequence reflected by the evidence record package is inconsistent with the original dependency edge arrangement, the dependency edge arrangement between the corresponding rule entry nodes is adjusted in the rule graph.

[0074] In the rule graph, the conflict triggering situation reflected by the evidence record package is compared with the original conflict edge arrangement. When the conflict triggering situation reflected by the evidence record package is consistent with the original conflict edge arrangement, the conflict edge arrangement between the corresponding rule entry nodes remains unchanged in the rule graph. When the conflict triggering situation reflected by the evidence record package is inconsistent with the original conflict edge arrangement, the conflict edge arrangement between the corresponding rule entry nodes is adjusted in the rule graph.

[0075] Determine whether the order and mutual exclusion relationships between rules reflected in the evidence record package are consistent with the existing dependency and conflict edge arrangements in the rule graph. If they are consistent, the rule graph remains unchanged. If they are inconsistent, adjust the arrangement of dependency and conflict edges according to the evidence record package. Based on the updated rule entry nodes and relationship edges, encapsulate and generate a user rule subgraph for the current user.

[0076] This embodiment also provides a computer device applicable to the case of a calligraphy creation guidance method based on human-computer interaction, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the calligraphy creation guidance method based on human-computer interaction as proposed in the above embodiment.

[0077] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0078] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the calligraphy creation guidance method based on human-computer interaction as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0079] In summary, this invention achieves unified convergence of rule entries across mutual exclusion constraints and trigger sequence constraints through a rule trigger chain. Conflict adjudication ensures that opposite stroke constraints under the same applicable stage attribute do not simultaneously enter the set of executable rule entries. Sequential arrangement ensures that dependency edge pointing relationships are triggered first and then inherited in the rule trigger chain, thereby providing a stable triggering basis for the generation of instructions for guided presentation and error correction presentation, reducing the probability of presentation jumps, improving the coherence and consistency of guided presentation and error correction presentation, and making the trigger path of rule entries traceable, facilitating the formation of verifiable update basis for dependency edges and conflict edges in the rule graph by guided and error correction records.

[0080] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for guiding calligraphy creation based on human-computer interaction, characterized in that: include, A multi-layered semantic ontology of brushstrokes is established, and semantic classification and semantic association registration are performed on the rule entries in the calligraphy rule base to generate a rule graph; After acquiring multi-dimensional perception data of pen strokes and aligning it with unified time stamps, the data is packaged to generate a pen stroke data package. The pen movement data package is segmented into stroke phases, and semantic label mapping is performed on the stroke phase segmentation results based on the multi-layer pen movement semantic ontology to generate a phase semantic mapping table; the multi-dimensional pen movement perception data includes force data, speed data, angle data and writing trajectory data; In the rule graph, perform rule entry retrieval on the phase semantic mapping table, perform conflict adjudication and rule trigger chain construction on the retrieved rule entries, and generate a rule trigger result package; Based on the rule-triggered result package, guided presentation and error correction presentation are performed on the display terminal to generate guided error correction records. Evidence encapsulation and graph rearrangement are performed on the guided error correction records to generate user rule subgraphs for the current user. The establishment of a multi-layered semantic ontology of brushstrokes specifically involves... The hierarchy of the multi-layered semantic ontology of brushstrokes is defined as the basic action layer, phase layer, structure layer, and style layer; Read the set of rule entries from the calligraphy rule base; Semantic classification is performed on the rule entries in the rule entry set, and hierarchical semantic labels are assigned to the rule entries based on the basic action layer, phase layer, structure layer and style layer; Identify the logical connections between rule entries with hierarchical semantic tags, and establish semantic associations based on these logical connections; Encapsulate rule entries with hierarchical semantic tags and semantic relationships to generate a multi-layered penmanship semantic ontology.

2. The calligraphy creation guidance method based on human-computer interaction as described in claim 1, characterized in that: The generated rule graph specifically refers to... Create rule entry nodes based on rule entries with hierarchical semantic tags; Based on semantic relationships, create relation edges between rule entry nodes and register the relation types for the relation edges; Based on the rule entries with hierarchical semantic tags, register the applicable stage attributes and presentation method attributes for the rule entry nodes; Encapsulate the rule entry nodes and relation edges to generate a rule graph.

3. The calligraphy creation guidance method based on human-computer interaction as described in claim 1, characterized in that: The generation of the phase semantic mapping table specifically involves... In the pen movement data package, the stroke boundaries are divided according to the writing trajectory data, and the force data, speed data and angle data within the stroke boundaries are extracted to form a stroke segment sequence. Multi-scale change point extraction is performed on velocity and angle data in the stroke segment sequence to form a phase boundary candidate sequence; The candidate sequences for phase boundaries are sorted according to a unified time identifier order, and phase intervals are divided to form a phase interval sequence; In the phase interval sequence, the first phase interval is marked as the starting phase, the last phase interval is marked as the ending phase, and the phase interval between the starting phase and the ending phase is marked as the writing phase. In the stroke phase, the direction of change of angle data is determined to obtain the turning position, and the corresponding phase interval is marked as the turning phase according to the turning position to form the stroke phase segmentation result. Based on the multi-layered stroke semantic ontology, semantic label mapping is performed on the phase labels in the stroke phase segmentation results to form a phase semantic entry sequence; The phase semantic entry sequence is encapsulated using a unified time identifier to generate a phase semantic mapping table.

4. The calligraphy creation guidance method based on human-computer interaction as described in claim 1, characterized in that: The generation rule triggers the result package, specifically as follows: Convert the phase semantic mapping table into a search key sequence; In the rule graph, rule entry nodes are located using the search key sequence to form a set of candidate rule entries; In the candidate rule entry set, according to the applicable stage attribute, filter out rule entry nodes that are inconsistent with the stage and retain rule entry nodes that are consistent with the stage to form a consistent candidate set; Perform rule entry retrieval on the rule entry nodes in the consistent candidate set to form a set of matching rule entries; Extract conflict pairs from the set of matching rule entries along the conflict edges, and perform conflict resolution on the conflict pairs to form a set of executable rule entries; The executable rule entries are arranged in the order of execution along the dependency edges to form a rule triggering chain; The phase label, phase semantic mapping table, set of executable rule entries, and rule triggering chain are encapsulated to generate a rule triggering result package.

5. The calligraphy creation guidance method based on human-computer interaction as described in claim 4, characterized in that: The conflicting edge is an edge type in the rule graph that represents the mutual exclusion relationship between rule entry nodes; The dependent edge is an edge type in the rule graph that represents the sequential relationship between rule entry nodes.

6. The calligraphy creation guidance method based on human-computer interaction as described in claim 1, characterized in that: The generation of the guidance and error correction record specifically involves... Decapsulate the rule trigger result package to obtain the phase label, the set of executable rule entries, and the rule trigger chain; Read the rule entries in the executable rule entry set one by one in the order of the rule trigger chain, and bind phase tags to the rule entries to form a rule presentation entry set; Based on the presentation mode attribute, the presentation mode matching is performed on the rule presentation item set to obtain the guidance presentation action set and the error correction presentation action set; The guided presentation action set is mapped into trajectory coverage instructions, phase window instructions, and structure reference marker instructions; The error correction action set is mapped into force prompts, speed prompts, and angle prompts. The trajectory coverage command, phase window command, structure reference mark command, force prompt command, speed prompt command and angle prompt command are summarized to form a presentation command set; The display terminal executes the presentation instruction set to complete the guided presentation and error correction presentation, and generates the guided error correction record.

7. The calligraphy creation guidance method based on human-computer interaction as described in claim 1, characterized in that: The evidence encapsulation involves encapsulating the phase tags, rule entries, and presentation time identifiers in the guidance and error correction record into an evidence record package in a unified chronological order. The graph rearrangement involves adjusting the arrangement of dependency and conflict edges between rule entry nodes in the rule graph based on the evidence record package, and generating a user rule subgraph.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the calligraphy creation guidance method based on human-computer interaction as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the calligraphy creation guidance method based on human-computer interaction as described in any one of claims 1 to 7.