# US 2022/0284187 A1 · Language model based writing aid method, device and system

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

- Number: US 2022/0284187 A1
- Document ID: US20220284187A1
- Status: Published application
- Kind: A1
- Application number: 17/531,543
- Filed: 2021-11-19
- Published: 2022-09-08
- Earliest claimed: 2021-03-02
- Assignees: Beijing Colorfulclouds Technology Co., Ltd.; Colorfulclouds Pacific Technology Co., Ltd.
- Applicants: Beijing ColorfulClouds Technology Co., Ltd.; ColorfulClouds Pacific Technology Co., Ltd.
- Inventors: XINGYUAN YUAN; SHENGPING LI; DA XIAO; HE YU
- Web page: https://patentgrep.com/patent/US20220284187A1

## CPC

- G06F 40/253: Grammatical analysis; Style critique
- G06F 40/56: Natural language generation
- G06F 40/166: Editing, e.g. inserting or deleting
- G06F 40/216: using statistical methods
- G06F 40/30: Semantic analysis
- G06F 40/44: Statistical methods, e.g. probability models
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure provides a language model based writing aid method, apparatus and system. The method includes: a server acquiring original text, where the original text may be writing text already generated and/or user input text; the server inputting the original text into a language model to generate a preset number of pieces of writing text, where the writing text and the original text have a correlation; the server sending the preset number of pieces of writing text to a frontend interface. The method of the present disclosure enables a computer to aide a user in text creating so that intelligence for writing aid is improved.

## Claims

### Claim 1

A language model based writing aid method, comprising:
acquiring original text, wherein the original text comprises at least one of writing text already generated and user input text, wherein the writing text already generated is one piece out of a preset number of pieces of writing text which are generated in a most recent time;
inputting the original text into a language model trained beforehand to generate a preset number of pieces of writing text, wherein contents of the writing text comprise text contents obtained based on an extension of the original text; and
outputting the preset number of pieces of writing text.

### Claim 2 (depends on 1)

The method according to claim 1, wherein when the original text comprises the writing text already generated, the acquiring the original text comprises:
acquiring a selecting instruction, wherein the selecting instruction is used to select one piece from the preset number of pieces of writing text which have already been output to be the original text, wherein the writing text which has already been output is the writing text already generated; and
determining target writing text according to the selecting instruction and the preset number of pieces of writing text, wherein the target writing text is the original text.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the selecting instruction is a selecting instruction input by a user, or, the selecting instruction is a selecting instruction generated by a backend server according to a preset rule.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the inputting the original text into the language model trained beforehand to generate the preset number of pieces of writing text comprises:
determining a model probability of each word in a vocabulary list according to the original text and the language model;
determining a smoothed probability of each word in the vocabulary list according to the model probability and a preset smoothing algorithm; and
selecting a preset number of words randomly from the vocabulary list according to the smoothed probability, and generating a preset number of pieces of writing text.

### Claim 5 (depends on 1)

The method according to claim 1, further comprising:
acquiring a modification instruction, wherein the modification instruction comprises writing text to be modified and modification contents, wherein the writing text to be modified is one piece of writing text out of the preset number of pieces of writing text; and
modifying the writing text to be modified according to the modification contents in the modification instruction.

### Claim 6 (depends on 1)

The method according to claim 1, when the language model comprises multiple language models for different subjects, the method further comprises:
acquiring a subject instruction, wherein the subject instruction is used to indicate a target subject selected by a user; and
determining a language model according to the subject instruction, wherein the language model is to be used to generate writing text of the target subject.

### Claim 7 (depends on 1)

The method according to claim 1, when the language model comprises multiple language models for different language types, the method further comprises:
acquiring a language type instruction, wherein the language type instruction is used to indicate a language type of input text and a language type of writing text that are selected by a user; and
determining a language model according to the language type instruction, wherein the language model is capable of generating, according to input text of a language type that is specified by the language type instruction, writing text of the language type that is specified by the language type instruction.

### Claim 8

A language model based writing aid apparatus, comprising:
a memory, a processor and a communication interface interconnected via a bus;
the memory storing thereon a computer program, wherein the processor is configured to execute the computer program to:
acquire original text, wherein the original text comprises at least one of writing text already generated and user input text, wherein the writing text already generated is one piece out of a preset number of pieces of writing text which are generated in a most recent time;
input the original text into a language model trained beforehand to generate a preset number of pieces of writing text, wherein contents of the writing text comprise text contents obtained based on an extension of the original text; and
output the preset number of pieces of writing text.

### Claim 9 (depends on 8)

The apparatus according to claim 8, wherein the processor is configured to:
acquire a selecting instruction, where the selecting instruction is used to select one piece from the preset number of pieces of writing text which have already been output to be the original text, where the writing text which has already been output is the writing text already generated; and
determine target writing text according to the selecting instruction and the preset number of pieces of writing text, where the target writing text is the original text.

### Claim 10 (depends on 8)

The apparatus according to claim 8, wherein the processor is configured to:
the selecting instruction is a selecting instruction input by a user, or, the selecting instruction is a selecting instruction generated by a backend server according to a preset rule.

### Claim 11 (depends on 8)

The apparatus according to claim 8, wherein the processor is configured to:
determine a model probability of each word in a vocabulary list according to the original text and the language model;
determine a smoothed probability of each word in the vocabulary list according to the model probability and a preset smoothing algorithm; and
select a preset number of words randomly from the vocabulary list according to the smoothed probability, and generate a preset number of pieces of writing text.

### Claim 12 (depends on 8)

The apparatus according to claim 8, wherein the processor is configured to:
acquire a modification instruction, where the modification instruction includes writing text to be modified and modification contents, where the writing text to be modified is one piece of writing text out of the preset number of pieces of writing text; and
modify the writing text to be modified according to the modification contents in the modification instruction.

### Claim 13 (depends on 8)

The apparatus according to claim 8, wherein the processor is configured to:
acquire a subject instruction, where the subject instruction is used to indicate a target subject selected by a user; and
determine a language model according to the subject instruction, where the language model is to be used to generate writing text of the target subject.

### Claim 14 (depends on 8)

The apparatus according to claim 8, wherein the processor is configured to:
acquire a language type instruction, where the language type instruction is used to indicate a language type of input text and a language type of writing text that are selected by a user; and
determine a language model according to the language type instruction, where the language model is capable of generating, according to input text of a language type that is specified by the language type instruction, writing text of the language type that is specified by the language type instruction.

### Claim 15

A language model based writing aid system, comprising: a frontend interface and a backend server;
wherein the frontend interface is configured to upload acquired original text to the backend server, and display writing text fed back by the backend server;
the backend server is configured to generate a preset number of pieces of writing text according to the original text, and feedback the writing text to the frontend interface.

### Claim 16 (depends on 15)

The system according to claim 15, wherein the backend server is configured to:
acquire the original text uploaded from the frontend interface, wherein the original text comprises at least one of writing text already generated and user input text, wherein the writing text already generated is one piece out of the preset number of pieces of writing text which are generated in a most recent time;
input the original text into a language model trained beforehand to generate the preset number of pieces of writing text, wherein contents of the writing text comprise text contents obtained based on an extension of the original text; and
output the preset number of pieces of writing text.

### Claim 17 (depends on 1)

A non-transitory computer readable storage medium, storing thereon a computer program which, when being executed by a processor, implements the language model based writing aid method according to claim 1.
