Electronic pen writing recognition method and system based on ultrasonic transmission trajectory

By constructing a multidimensional dynamic feature sequence and a dual-branch Transformer coding network, the problem of unstable ultrasonic trajectory data was solved, and efficient end-to-end electronic pen writing recognition was achieved, which is suitable for real-time writing scenarios.

CN122369014APending Publication Date: 2026-07-10ZHENJIANG JINZHOU SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHENJIANG JINZHOU SOFTWARE CO LTD
Filing Date
2026-05-12
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing methods for acquiring electronic pen trajectories suffer from problems such as uneven sampling time, missing trajectory points, and positioning jitter, resulting in poor stability of ultrasonic positioning trajectory data and affecting writing recognition accuracy. In particular, it is difficult to accurately recognize continuous trajectories without stroke segmentation or character segmentation.

Method used

Multidimensional dynamic feature sequences are constructed through time alignment and trajectory reconstruction. A two-branch Transformer feature encoding network is used to model the features of continuous trajectory sequences. End-to-end continuous text recognition is achieved through a sequence decoder, which integrates spatial location and motion change features to avoid stroke or character segmentation.

Benefits of technology

It improves the continuity and stability of ultrasonic trajectory data, enhances the ability to express trajectory features, and achieves efficient end-to-end text recognition without stroke or character segmentation, making it suitable for real-time writing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122369014A_ABST
    Figure CN122369014A_ABST
Patent Text Reader

Abstract

This invention discloses an electronic pen handwriting recognition method and system based on ultrasonic transmission trajectory. The method includes: receiving handwriting trajectory data transmitted by an electronic pen via ultrasound and received by a sensor array, the trajectory data including spatial coordinate information and corresponding timestamps; performing time alignment and resampling processing on the trajectory data, and obtaining a continuous trajectory sequence by interpolation to compensate for missing trajectory points; constructing a multidimensional dynamic feature sequence containing spatial location features, kinematic features, and trajectory geometric features based on the continuous trajectory sequence; inputting the multidimensional dynamic feature sequence into a two-branch Transformer feature encoding network to extract trajectory spatial structure features and motion change features respectively, and performing feature fusion through a cross-branch attention mechanism; inputting the fused features into a sequence decoder to generate a corresponding character sequence, thereby achieving text recognition of the continuous handwriting trajectory. This invention is applicable to online handwriting recognition scenarios based on ultrasonically positioned electronic pens.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of handwriting recognition and human-computer interaction technology, and particularly relates to an electronic pen writing recognition method and system based on ultrasonic transmission trajectory, specifically an electronic pen writing recognition method and system that utilizes trajectory dynamic features for end-to-end continuous text recognition. Background Technology

[0002] With the development of smart terminals and digital office technologies, electronic pen writing recognition technology has been widely used in fields such as smart education, mobile office, and human-computer interaction.

[0003] Existing methods for acquiring electronic pen trajectories mainly include optical positioning, electromagnetic induction, and inertial sensing. Among them, optical positioning typically relies on special dot matrix paper or specific optical structures for positioning and recognition, resulting in high system costs; electromagnetic induction usually requires the use of a special sensor board, which limits its application scenarios; and trajectory estimation methods based on inertial sensors are prone to cumulative errors and trajectory drift during long-term writing, thus affecting recognition accuracy.

[0004] In recent years, ultrasonic positioning technology has been increasingly applied to the field of electronic pen trajectory acquisition due to its advantages such as low power consumption, non-contact operation, and high spatial resolution. By emitting ultrasonic signals from the electronic pen and receiving them with an external sensor array, the spatial position during the writing process can be located, thereby reconstructing the writing trajectory.

[0005] However, in practical applications, trajectory data obtained based on ultrasonic positioning often suffers from problems such as uneven sampling time, missing trajectory points, and positioning jitter, resulting in poor trajectory sequence stability and thus affecting subsequent writing recognition performance.

[0006] Furthermore, existing online handwriting recognition methods typically rely on stroke segmentation or character segmentation strategies, dividing continuous trajectories into multiple stroke or character units before recognition. However, when ultrasonic trajectory data suffers from unstable sampling or missing trajectories, stroke boundaries are difficult to determine accurately, which can easily lead to segmentation errors and further reduce recognition accuracy.

[0007] Therefore, how to perform end-to-end text recognition on continuous trajectory sequences without relying on precise stroke segmentation, and how to improve the accuracy and stability of writing recognition based on ultrasonic transmission trajectories, has become an urgent technical problem to be solved. Summary of the Invention

[0008] The purpose of this invention is to provide an electronic pen writing recognition method and system based on ultrasonic transmission trajectory. By preprocessing the ultrasonic positioning trajectory of the electronic pen and constructing a multi-dimensional dynamic feature sequence, a dual-branch Transformer feature encoding network is used to model the features of the continuous trajectory sequence, and end-to-end continuous text recognition is achieved through a sequence decoder. This improves the accuracy and robustness of writing recognition without relying on stroke segmentation or character segmentation.

[0009] This invention provides an electronic pen writing recognition method based on ultrasonic transmission trajectory, comprising the following steps: Step 1: Receive writing trajectory data transmitted by the electronic pen via ultrasound and received by the sensor array. The trajectory data includes spatial coordinate information (x, y) arranged in chronological order and the corresponding timestamp information t. Step 2: Perform time alignment and trajectory reconstruction processing on the trajectory data. Use resampling and interpolation algorithms to convert trajectory sequences with unequal time intervals into sequences with equal time steps, thereby obtaining a continuous trajectory sequence. Step 3: Construct a multidimensional dynamic feature sequence based on the continuous trajectory sequence. The multidimensional dynamic feature sequence includes spatial location features, kinematic features, and trajectory geometric features. Step 4: Input the multidimensional dynamic feature sequence into a two-branch Transformer feature encoding network, where the first branch is used to extract trajectory spatial structure features and the second branch is used to extract trajectory motion change features. Step 5: Fuse the features of the two branches through a cross-branch attention mechanism to obtain the fused trajectory semantic feature representation; Step 6: Input the fused trajectory semantic features into the sequence decoder, and output the corresponding continuous text recognition results through sequence generation.

[0010] Preferably, the time alignment and trajectory reconstruction processing in step 2 includes the following steps: Adaptive resampling is performed based on the time interval between adjacent trajectory points, and missing trajectory points are compensated by an interpolation algorithm, so that the trajectory points form a sequence of equal time intervals under a unified time step.

[0011] Preferably, in step 3, the spatial position features include two-dimensional trajectory coordinates; the kinematic features include velocity components and acceleration components; and the geometric features include trajectory curvature or trajectory direction angle.

[0012] Preferably, the velocity component is obtained by calculating the coordinate difference between adjacent trajectory points, and the acceleration component is obtained by calculating the velocity difference; the trajectory curvature is used to characterize the degree of curvature of the trajectory and is obtained by calculating the velocity and acceleration; the trajectory direction angle is obtained by calculating the angle between the line connecting adjacent trajectory points and the horizontal direction.

[0013] Preferably, the dual-branch Transformer feature encoding network in step 4 includes: The first branch is used to encode the spatial location features of the trajectory in order to extract the spatial structure features of the trajectory; The second branch is used to encode the trajectory kinematic features to extract dynamic change features of the trajectory; The feature fusion module is used to fuse the features of the two branches.

[0014] Preferably, the feature fusion module includes a cross-branch attention mechanism to enable information interaction between spatial features and motion features; The cross-branch attention mechanism includes: A query vector is generated based on the first branch features, and a key vector and a value vector are generated based on the second branch features, in order to calculate the cross attention of the first branch features; A query vector is generated based on the features of the second branch, and a key vector and a value vector are generated based on the features of the first branch, so as to calculate the cross attention of the second branch; The cross-attention of the first branch features and the cross-attention of the second branch features are fused to obtain cross-branch fused features. Cross-attention is a well-known technique, and will not be elaborated on in this patent.

[0015] Preferably, in step 6, the sequence decoder adopts a Transformer decoding structure and generates the corresponding character sequence through a self-attention mechanism and an encoder-decoder attention mechanism.

[0016] It should be noted that the self-attention mechanism and the encoder-decoder attention mechanism, as fundamental components of the Transformer model, are known techniques in the art. However, although the self-attention mechanism and the encoder-decoder attention mechanism are themselves known technologies, their input feature construction method and application method for ultrasonic trajectory writing recognition tasks in this application are specifically designed and cannot be directly obtained by those skilled in the art without creative effort. In other words, the application of the self-attention mechanism and the encoder-decoder attention mechanism in this patent is innovative.

[0017] An electronic pen writing recognition system based on ultrasonic transmission trajectory includes: The trajectory receiving module is used to receive writing trajectory data transmitted by the electronic pen via ultrasound and received by the sensor array; The trajectory reconstruction module is used to perform time alignment and resampling on trajectory data to obtain continuous trajectory sequences; The feature construction module is used to construct multidimensional dynamic feature sequences based on continuous trajectory sequences; The dual-branch feature encoding module is used to encode trajectory features and obtain fused features through a dual-branch Transformer encoding structure; The decoding and recognition module is used to generate corresponding character sequences through a sequence decoder and output continuous text recognition results.

[0018] Preferably, the dual-branch feature encoding module includes a cross-branch attention fusion unit for fusing trajectory spatial features and trajectory motion features.

[0019] The beneficial effects of this invention are: 1) Improve the continuity and stability of ultrasound trajectory data through time alignment and trajectory reconstruction mechanisms; 2) Improve the ability to express trajectory features by constructing a multidimensional dynamic feature sequence that includes spatial location features, kinematic features, and geometric features; 3) The trajectory spatial structure information and motion change information are modeled separately by a two-branch Transformer encoding network, and feature fusion is achieved through a cross-branch attention mechanism to improve the model's expressive power; 4) An encoding-decoding structure is used to achieve end-to-end continuous text recognition, eliminating the need for stroke segmentation or character segmentation, thus improving recognition efficiency and making it suitable for real-time writing scenarios. Attached Figure Description

[0020] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings: Figure 1 This is a schematic diagram of the overall process of the method of the present invention; Figure 2 This is a schematic diagram of the trajectory reconstruction process; Figure 3 This is a schematic diagram of a two-branch Transformer feature encoding network structure; Figure 4 This is a schematic diagram of the sequence decoder structure; Figure 5 This is a block diagram of the handwriting recognition system. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] This invention proposes an electronic pen writing recognition method based on ultrasonic transmission trajectory, comprising the following steps: The system receives writing trajectory data transmitted by an electronic pen via ultrasound and received by a sensor array. The trajectory data includes spatial coordinate information (x, y) arranged in chronological order and corresponding timestamp information t. The trajectory data is subjected to time alignment and trajectory reconstruction processing. An adaptive resampling algorithm is used to convert trajectory sequences with unequal time intervals into sequences with equal time steps, and an interpolation algorithm is used to compensate for missing trajectory points to obtain a continuous trajectory sequence. A multidimensional dynamic feature sequence is constructed based on the continuous trajectory sequence, wherein the multidimensional dynamic features include spatial location features, kinematic features, and trajectory geometric features; The multidimensional dynamic feature sequence is input into a two-branch Transformer feature encoding network, where the first branch is used to extract trajectory spatial structure features and the second branch is used to extract trajectory motion change features. Spatial and motion features are fused through a cross-branch attention fusion module to obtain a fused trajectory semantic feature representation; wherein, the cross-branch attention mechanism includes: A query vector is generated based on the first branch features, and a key vector and a value vector are generated based on the second branch features, in order to calculate the cross attention of the first branch features; A query vector is generated based on the features of the second branch, and a key vector and a value vector are generated based on the features of the first branch, so as to calculate the cross attention of the second branch; The cross-attention of the first branch features and the cross-attention of the second branch features are fused to obtain cross-branch fused features. Cross-attention is a well-known technique, and will not be elaborated on in this patent.

[0023] The fused features are input into a sequence decoder, and the corresponding continuous text recognition results are output through sequence generation.

[0024] Furthermore, the present invention also provides an electronic pen writing recognition system based on ultrasonic transmission trajectory, comprising: a trajectory receiving module, a trajectory reconstruction module, a feature construction module, a dual-branch feature encoding module, and a decoding recognition module.

[0025] Specifically, the trajectory receiving module receives writing trajectory data transmitted by the electronic pen via ultrasound and received by the sensor array; the trajectory reconstruction module performs time alignment and resampling processing on the trajectory data to obtain a continuous trajectory sequence; the feature construction module constructs a multi-dimensional dynamic feature sequence based on the continuous trajectory sequence; the dual-branch feature encoding module encodes the trajectory features using a dual-branch Transformer encoding network and achieves feature fusion; and the decoding and recognition module generates the corresponding character sequence through a sequence decoder and outputs the continuous text recognition result.

[0026] The system can be deployed on computing devices, mobile terminals, or server platforms to achieve real-time recognition and processing of electronic pen writing trajectories.

[0027] The trajectory reconstruction method in the above technical solution is as follows: The original writing trajectory data transmitted by the electronic pen via ultrasound and received by the sensor array is time-aligned and reconstructed to obtain a continuous and stable trajectory sequence.

[0028] The original writing trajectory data consists of multiple trajectory sampling points, each containing two-dimensional spatial coordinate information and corresponding timestamp information. It can be represented as: in, and Represents the spatial coordinates of the i-th trajectory point. This represents the corresponding timestamp.

[0029] Because ultrasonic signals may be affected by environmental noise, multipath effects, and sampling errors during propagation and positioning, the time intervals between adjacent trajectory points in the original trajectory sequence may be inconsistent, and trajectory points may be missing. Therefore, time alignment and resampling processing of the trajectory sequence are necessary.

[0030] First, a uniform time step Δt is set according to the time interval between adjacent trajectory points, and a new time series is constructed based on this time step.

[0031] When the time interval between the original trajectory points is greater than the time step Δt, new trajectory points are generated between adjacent trajectory points through an interpolation algorithm, thereby achieving equal time interval resampling of the trajectory sequence.

[0032] Preferably, the interpolation algorithm can employ linear interpolation, cubic spline interpolation, or other continuous interpolation methods to estimate the spatial coordinates at the missing time points.

[0033] After the above time alignment and resampling processes, a continuous and smooth trajectory sequence can be obtained: Where N is the length of the trajectory sequence.

[0034] The trajectory sequence is arranged according to a uniform time step and contains continuous spatial coordinates and time information, which can be used as input data for subsequent feature construction steps.

[0035] The multi-dimensional dynamic feature construction method in the above technical solution is as follows: After obtaining a continuous trajectory sequence, it is necessary to construct features from the trajectory data to enhance the ability to express trajectory information.

[0036] For each trajectory point P in the trajectory sequence j In this embodiment, a multidimensional dynamic feature vector is constructed: in: x j , y j Represents two-dimensional spatial coordinates; v xj , v yj Represents velocity components; a xj , a yj Indicates acceleration components; k j Indicates the curvature of the trajectory; θ j Indicates the trajectory direction angle.

[0037] The above features can be calculated by the difference between adjacent trajectory points. For example, the velocity component can be calculated as follows: , The acceleration component can be obtained by further differentiating the velocity.

[0038] The trajectory curvature can be calculated from velocity and acceleration, as follows: The trajectory direction angle is obtained by calculating the angle between the line connecting adjacent trajectory points and the horizontal direction, as follows: Using the above method, multidimensional dynamic feature sequences can be constructed: The feature sequence contains spatial location information, kinematic information, and geometric morphological information, which can significantly enhance the trajectory representation ability and improve the ability of subsequent recognition models to distinguish writing patterns.

[0039] In the above technical solution, the dual-branch Transformer feature encoding method is as follows: To model the spatial structure features and motion change features of the writing trajectory respectively, this embodiment constructs a dual-branch Transformer coding network.

[0040] The coding network includes two feature extraction branches: a trajectory space feature branch and a motion feature branch.

[0041] The trajectory space feature branch takes two-dimensional trajectory coordinates (x,y) as input and is used to extract the spatial structure features of the written trajectory.

[0042] First, spatial features are embedded using linear mapping to obtain the embedded features. Where d is the feature dimension. This step is a standard feature embedding operation in Transformer, and its main function in this scheme is to map the input features to a unified feature space for subsequent encoding processing.

[0043] Then, position encoding is added to preserve time sequence information: Here, PE represents the positional encoding matrix. Positional encoding is a standard operation in Transformer. This case uses the standard Transformer positional encoding method, which generates the positional encoding matrix using a fixed-positional encoding method based on sine and cosine functions. .

[0044] Zs is then input into the Transformer encoder for feature modeling to obtain spatial feature representation. .

[0045] Motion characteristic branches include dynamic features such as velocity, acceleration, curvature, and orientation angle. As input.

[0046] First, motion features are embedded using a linear mapping to obtain the embedded features. .

[0047] Then, position encoding is added to preserve time sequence information: Zm is then input into the Transformer encoder for feature modeling to obtain motion feature representations. .

[0048] To achieve information interaction between spatial and motion features, this embodiment introduces a cross-branch attention mechanism. Cross-attention calculation is used to associate features between the two branches and obtain a fused feature representation H. f .

[0049] First, based on spatial features H s As the query vector, with motion feature H m As key and value vectors, calculate cross-attention: Among them, Q_H s Indicates H s Perform a convolution operation, and use the result of the convolution operation as the query vector, K_H m and V_H m Indicates that for H respectively m Perform a convolution operation, and use the results of the convolution operation as the key vector and the value vector, respectively.

[0050] At the same time, with motion characteristics H m As a query vector, with spatial feature H s As keys and values, calculate cross-attention: Among them, Q_H m Indicates H m Perform a convolution operation, and use the result of the convolution operation as the query vector, K_H s and V_H s Indicates that for H respectively s Perform a convolution operation, and use the results of the convolution operation as the key vector and the value vector, respectively.

[0051] The cross-attention result A sm and A ms By splicing and merging, the fused feature representation is obtained: , .

[0052] To further capture long-range contextual dependencies in the trajectory sequence, the fused features are input into a global Transformer encoder for deep semantic modeling, thereby obtaining the final trajectory semantic feature representation Hg: , .

[0053] The continuous text generation method based on the Transformer decoder is as follows: The trajectory feature representation H output during the encoding stage is obtained. gAfter that, the feature sequence is decoded by the Transformer decoder to generate the corresponding character sequence, realizing the text recognition of the continuous writing trajectory.

[0054] In the training stage, the input to the decoder is the sequence obtained by shifting the target character sequence one position to the right; in the inference stage, the input to the decoder is the character sequence that has been generated before the current time step: Among them, C<t represents the character sequence accessible to the decoder at time step t, which only contains the character information before the current time step.

[0055] The character sequence is first linearly mapped through the embedding layer to obtain the character embedding representation: , where L represents the length of the character sequence and d represents the feature dimension.

[0056] To introduce the sequence position information, positional encoding is added to the character embedding representation: Input the feature Z c into the Transformer decoder, and successively pass through structures such as the masked multi-head self-attention layer, residual connection, and layer normalization to obtain the character sequence feature representation F c .

[0057] At the same time, the Transformer decoder receives the trajectory feature representation H g output in the encoding stage, and performs associated modeling on the trajectory feature and the character sequence feature through the encoder-decoder cross-attention mechanism, enabling each character to focus on its corresponding trajectory segment. Among them, the associated modeling refers to the encoder-decoder cross-attention mechanism in the Transformer decoder, which is used to realize the information interaction between the encoded features and the decoded sequence.

[0058] Subsequently, the decoder output feature is projected from dimension d to the character vocabulary space through the linear mapping layer to obtain the unnormalized character score vector , where V is the size of the character vocabulary. It is used to represent the matching degree of each candidate character at the current time step.

[0059] Subsequently, the unnormalized character score vector Ot is input into the softmax function for normalization processing to obtain the character probability distribution at the current time step: Among them, c t represents the character generated at time step t, and X represents the input trajectory sequence. In the inference stage, the output character is determined according to the probability distribution, and the character with the highest probability is selected as the output character at time t.

[0060] Through the above decoding process, end-to-end text recognition of continuous writing trajectories can be achieved without stroke segmentation or character segmentation.

[0061] As described above, this invention improves the continuity and stability of ultrasound trajectory data through time alignment and trajectory reconstruction mechanisms; enhances the expressive power of trajectory features by constructing a multi-dimensional dynamic feature sequence containing spatial location features, kinematic features, and geometric features; improves the expressive power of the model by modeling trajectory spatial structure information and motion change information separately through a two-branch Transformer coding network and achieving feature fusion through a cross-branch attention mechanism; and achieves end-to-end continuous text recognition using an encoder-decoder structure, eliminating the need for stroke segmentation or character segmentation, thus improving recognition efficiency and making it suitable for real-time writing scenarios.

[0062] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for electronic pen writing recognition based on ultrasonic transmission trajectory, characterized in that, Includes the following steps: Step 1: Receive writing trajectory data transmitted by the electronic pen via ultrasound and received by the sensor array. The trajectory data includes spatial coordinate information (x, y) arranged in chronological order and the corresponding timestamp information t. Step 2: Perform time alignment and trajectory reconstruction processing on the trajectory data. Use resampling and interpolation algorithms to convert trajectory sequences with unequal time intervals into sequences with equal time steps, thereby obtaining a continuous trajectory sequence. Step 3: Construct a multidimensional dynamic feature sequence based on the continuous trajectory sequence. The multidimensional dynamic feature sequence includes spatial location features, kinematic features, and trajectory geometric features. Step 4: Input the multidimensional dynamic feature sequence into a two-branch Transformer feature encoding network, where the first branch is used to extract trajectory spatial structure features and the second branch is used to extract trajectory motion change features. Step 5: Fuse the features of the two branches through a cross-branch attention mechanism to obtain the fused trajectory semantic feature representation; Step 6: Input the fused trajectory semantic features into the sequence decoder, and output the corresponding continuous text recognition results through sequence generation.

2. The electronic pen writing recognition method based on ultrasonic transmission trajectory according to claim 1, characterized in that, Step 2, the time alignment and trajectory reconstruction process, includes the following steps: Adaptive resampling is performed based on the time interval between adjacent trajectory points, and missing trajectory points are compensated by an interpolation algorithm, so that the trajectory points form a sequence of equal time intervals under a unified time step.

3. The electronic pen writing recognition method based on ultrasonic transmission trajectory according to claim 2, characterized in that, In step 3, the spatial position features include two-dimensional trajectory coordinates; the kinematic features include velocity components and acceleration components. Geometric features include trajectory curvature or trajectory direction angle.

4. The electronic pen writing recognition method based on ultrasonic transmission trajectory according to claim 3, characterized in that, The velocity component is obtained by calculating the coordinate difference between adjacent trajectory points, and the acceleration component is obtained by calculating the velocity difference; the trajectory curvature is used to characterize the degree of curvature of the trajectory and is obtained by calculating the velocity and acceleration; the trajectory direction angle is obtained by calculating the angle between the line connecting adjacent trajectory points and the horizontal direction.

5. The electronic pen writing recognition method based on ultrasonic transmission trajectory according to claim 4, characterized in that, The dual-branch Transformer feature encoding network in step 4 includes: The first branch is used to encode the spatial location features of the trajectory in order to extract the spatial structure features of the trajectory; The second branch is used to encode the trajectory kinematic features to extract dynamic change features of the trajectory; The feature fusion module is used to fuse the features of the two branches.

6. The electronic pen writing recognition method based on ultrasonic transmission trajectory according to claim 5, characterized in that, The feature fusion module includes a cross-branch attention mechanism to enable information interaction between spatial features and motion features.

7. The electronic pen writing recognition method based on ultrasonic transmission trajectory according to claim 6, characterized in that, The cross-branch attention mechanism includes: A query vector is generated based on the first branch features, and a key vector and a value vector are generated based on the second branch features, in order to calculate the cross attention of the first branch features; A query vector is generated based on the features of the second branch, and a key vector and a value vector are generated based on the features of the first branch, so as to calculate the cross attention of the second branch; The cross-attention of the first branch feature and the cross-attention of the second branch feature are fused to obtain cross-branch fused features.

8. The electronic pen writing recognition method based on ultrasonic transmission trajectory according to claim 7, characterized in that, In step 6, the sequence decoder adopts the Transformer decoding structure and generates the corresponding character sequence through a self-attention mechanism and an encoder-decoder attention mechanism.

9. An electronic pen writing recognition system based on ultrasonic transmission trajectory, characterized in that, include: The trajectory receiving module is used to receive writing trajectory data transmitted by the electronic pen via ultrasound and received by the sensor array; The trajectory reconstruction module is used to perform time alignment and resampling on trajectory data to obtain continuous trajectory sequences; The feature construction module is used to construct multidimensional dynamic feature sequences based on continuous trajectory sequences; The dual-branch feature encoding module is used to encode trajectory features and obtain fused features through a dual-branch Transformer encoding structure; The decoding and recognition module is used to generate corresponding character sequences through a sequence decoder and output continuous text recognition results.

10. The electronic pen writing recognition system based on ultrasonic transmission trajectory according to claim 9, characterized in that, The dual-branch feature encoding module includes a cross-branch attention fusion unit, which is used to fuse trajectory spatial features and trajectory motion features.