# US 2023/0267756 A1 · Handwriting recognition method and apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0267756 A1
- Document ID: US20230267756A1
- Status: Published application
- Kind: A1
- Application number: 18/138,376
- Filed: 2023-04-24
- Published: 2023-08-24
- Earliest claimed: 2020-12-31
- Assignees: Beijing Sogou Technology Development Co., Ltd.
- Applicants: Beijing Sogou Technology Development Co., Ltd.
- Inventors: Xiaozhe XIN; Bo QIN; Zhiyong ZHAO; Yingjun WANG; Jie WANG; Xuefeng SU; Wei CHEN
- Web page: https://patentgrep.com/patent/US20230267756A1

## CPC

- G06V 30/36: {Matching; Classification}
- G06V 30/19147: {Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting}
- G06V 30/226: of cursive writing
- G06V 30/333: {Preprocessing; Feature extraction}
- G06V 30/347: {Sampling; Contour coding; Stroke extraction}
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

A handwriting recognition method is provided, which includes: obtaining handwritten original trajectory data in real-time; compressing the handwritten original trajectory data, to obtain compressed handwritten trajectory data; and inputting the compressed handwritten trajectory data into a compressed handwriting recognition model for recognition, to obtain a text recognition result corresponding to the handwritten original trajectory data. A handwriting recognition model is obtained by training with handwritten trajectory data of each piece of training data in a training data set, and the compressed handwriting recognition model is obtained by performing model compression on the handwriting recognition model. The handwriting recognition method can address the problem in the related art that the handwriting recognition accuracy is low caused by incorrect segmentation, thereby effectively improving the handwriting recognition accuracy.

## Claims

### Claim 1

A handwriting recognition method, comprising:
obtaining handwritten original trajectory data in real-time;
compressing the handwritten original trajectory data, to obtain compressed handwritten trajectory data; and
inputting the compressed handwritten trajectory data into a compressed handwriting recognition model for recognition, to obtain a text recognition result corresponding to the handwritten original trajectory data, a handwriting recognition model being obtained by training with handwritten trajectory data of each piece of training data in a training data set, and the compressed handwriting recognition model being obtained by performing model compression on the handwriting recognition model.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the obtaining the handwritten original trajectory data in real-time comprises:
performing data preprocessing on handwritten input data that is obtained in real-time, the data preprocessing comprising re-sampling; and
obtaining the handwritten original trajectory data in real-time according to the preprocessed handwritten input data.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the compressing the handwritten original trajectory data to obtain the compressed handwritten trajectory data comprises:
performing dimensional compression on the handwritten original trajectory data, to obtain the compressed handwritten trajectory data, a correlation between data of each dimension in the compressed handwritten trajectory data and a model recognition result of the handwriting recognition model being not lower than a predetermined threshold.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the handwriting recognition model is an end-to-end model.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the training of the handwriting recognition model comprises:
obtaining the training data set and a pre-selected training model corresponding to the training data set;
obtaining the handwritten trajectory data for each piece of training data in the training data set; and
training the pre-selected training model with the handwritten trajectory data for each piece of training data, to obtain the pre-selected training model that has been trained as the handwriting recognition model.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the obtaining the training data set comprises:
obtaining a historical handwritten trajectory data set, the historical handwritten trajectory data set comprising at least one of horizontal handwritten trajectory data, vertical handwritten trajectory data, overlapping handwritten trajectory data, and rotating handwritten trajectory data; and
performing data augmentation on handwritten data in the historical handwritten trajectory data set, and using the data-augmented historical handwritten trajectory data set as the training data set.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the training the pre-selected training model with the handwritten trajectory data of each piece of training data to obtain the handwriting recognition model comprises:
obtaining a difficult sample and an easy sample in each piece of training data; and
training the pre-selected training model in a mode of first training the difficult sample and then training the easy sample.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the training the pre-selected training model with the handwritten trajectory data of each piece of training data to obtain the handwriting recognition model comprises:
fine-tuning the pre-selected training model during a process of training the pre-selected model, and using the pre-selected training model that has been trained as the handwriting recognition model.

### Claim 9 (depends on 5)

The method according to claim 5, wherein the method further comprises:
performing model distillation on the pre-selected training model that has been trained, to obtain the distillated pre-selected training model, and using the distillated pre-selected training model as the compressed handwriting recognition model.

### Claim 10

A handwriting recognition apparatus, comprising:
a memory operable to store computer-readable instructions; and
a processor circuitry operable to read the computer-readable instructions, the processor circuitry when executing the computer-readable instructions is configured to:
obtain handwritten original trajectory data in real-time;
compress the handwritten original trajectory data, to obtain compressed handwritten trajectory data; and
input the compressed handwritten trajectory data into a compressed handwriting recognition model for recognition, to obtain a text recognition result corresponding to the handwritten original trajectory data, a handwriting recognition model being obtained by training with handwritten trajectory data of each piece of training data in a training data set, and the compressed handwriting recognition model being obtained by performing model compression on the handwriting recognition model.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the processor circuitry is configured to:
perform data preprocessing on handwritten input data that is obtained in real-time, the data preprocessing comprising re-sampling; and
obtain the handwritten original trajectory data in real-time according to the preprocessed handwritten input data.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein the processor circuitry is configured to:
perform dimensional compression on the handwritten original trajectory data, to obtain the compressed handwritten trajectory data, a correlation between data of each dimension in the compressed handwritten trajectory data and a model recognition result of the handwriting recognition model being not lower than a predetermined threshold.

### Claim 13 (depends on 10)

The apparatus according to claim 10, wherein the handwriting recognition model is an end-to-end model.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein the processor circuitry is configured to:
obtain the training data set and a pre-selected training model corresponding to the training data set;
obtain the handwritten trajectory data for each piece of training data in the training data set; and
train the pre-selected training model with the handwritten trajectory data for each piece of training data, to obtain the pre-selected training model that has been trained as the handwriting recognition model.

### Claim 15 (depends on 14)

The apparatus according to claim 14, wherein the processor circuitry is configured to:
obtain a historical handwritten trajectory data set, the historical handwritten trajectory data set comprising at least one of horizontal handwritten trajectory data, vertical handwritten trajectory data, overlapping handwritten trajectory data, and rotating handwritten trajectory data; and
perform data augmentation on handwritten data in the historical handwritten trajectory data set, and use the data-augmented historical handwritten trajectory data set as the training data set.

### Claim 16 (depends on 15)

The apparatus according to claim 15, wherein the processor circuitry is configured to:
obtain a difficult sample and an easy sample in each piece of training data; and
train the pre-selected training model in a mode of first training the difficult sample and then training the easy sample.

### Claim 17 (depends on 16)

The apparatus according to claim 16, wherein the processor circuitry is configured to:
fine-tune the pre-selected training model during a process of training the pre-selected model, and use the pre-selected training model that has been trained as the handwriting recognition model.

### Claim 18 (depends on 14)

The apparatus according to claim 14, wherein the processor circuitry is further configured to:
perform model distillation on the pre-selected training model that has been trained, to obtain the distillated pre-selected training model, and use the distillated pre-selected training model as the compressed handwriting recognition model.

### Claim 19

A non-transitory machine-readable media, having instructions stored on the machine-readable media, the instructions configured to, when executed, cause a machine to:
obtain handwritten original trajectory data in real-time;
compress the handwritten original trajectory data, to obtain compressed handwritten trajectory data; and
input the compressed handwritten trajectory data into a compressed handwriting recognition model for recognition, to obtain a text recognition result corresponding to the handwritten original trajectory data, a handwriting recognition model being obtained by training with handwritten trajectory data of each piece of training data in a training data set, and the compressed handwriting recognition model being obtained by performing model compression on the handwriting recognition model.

### Claim 20 (depends on 19)

The non-transitory machine-readable media according to claim 19, wherein the instructions are configured to cause the machine to:
perform data preprocessing on handwritten input data that is obtained in real-time, the data preprocessing comprising re-sampling; and
obtain the handwritten original trajectory data in real-time according to the preprocessed handwritten input data.
