# US 10,958,598 B2 · Method and apparatus for generating candidate reply message

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

- Number: US 10,958,598 B2
- Document ID: US10958598B2
- Status: Granted
- Kind: B2
- Application number: 16/055,613
- Filed: 2018-08-06
- Published: 2019-03-14
- Granted: 2021-03-23
- Earliest claimed: 2017-09-08
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science and Technology Co., Ltd.
- Inventors: Minqiang Chang; Kefeng Meng; Liang He; Ming Ma
- Web page: https://patentgrep.com/patent/US10958598B2

## CPC

- H04L 51/02: using automatic reactions or user delegation, e.g. automatic replies or chatbot-generated messages
- G06F 40/186: Templates
- G06F 40/30: Semantic analysis
- H04L 51/046: Interoperability with other network applications or services
- H04L 51/216: Handling conversation history, e.g. grouping of messages in sessions or threads
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure discloses a method and apparatus for generating a candidate reply message. A specific embodiment of the method comprises: acquiring a text message of a currently received conversation; determining whether a pre-established conversation template matching the text message exists; and generating, in response to determining a conversation template matching the text message existing, a candidate reply message on the basis of the conversation template. According to the method provided by embodiments of the present disclosure, when the text message of the currently received conversation matches the pre-established conversation template, the candidate reply message is automatically generated, and a user may click the candidate reply message for reply, so that the time for the user to edit a reply message is saved, a period for the user to communicate with others is reduced, and the communication efficiency is improved.

## Claims

### Claim 1

A method for generating a candidate reply message for a first user of a first device, the method comprising:
acquiring a text message of a currently received conversation sent from a second device;
performing semantic analysis on the text message, and determining a keyword of the text message on the basis of a result of the semantic analysis;
determining, in pre-established conversation templates, whether a pre-established conversation template matching the text message exists,
generating, in response to determining the pre-established conversation template matching the text message existing, a candidate reply message on the basis of the pre-established conversation template matching the text message, wherein the pre-established conversation template matching the text message is preset with an interface for calling an associated application associated with the pre-established conversation template, and the generating the candidate reply message on the basis of the pre-established conversation template matching the text message comprises: acquiring the candidate reply message on the basis of an interface of the associated application and the keyword; and
presenting the generated candidate reply message on the first device, for the first user to click on the generated candidate reply message for replying,
wherein the interface for calling the associated application associated with the pre-established conversation template matching the text message comprises an interface for calling a positioning application;
wherein the acquiring the candidate reply message on the basis of the interface of the associated application and the keyword comprises: acquiring latitude and longitude information through the interface for calling the positioning application; and
generating geographical position information based on the latitude and longitude information as the candidate reply message.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the acquiring a text message of a currently received conversation comprises:
acquiring a currently received voice message or picture message; and
converting the voice message or the picture message into the text message.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the determining whether a pre-established conversation template matching the text message exists comprises:
matching the text message with a plurality of pre-established conversation templates; and
using a pre-established conversation template having a matching degree greater than a preset threshold with the text message as the conversation template matching the text message.

### Claim 4 (depends on 3)

The method according to claim 3, wherein
the generating, in response to determining a pre-established conversation template matching the text message existing, a candidate reply message on the basis of the pre-established conversation template comprises:
presenting each candidate reply message in a descending order based on a frequency of appearance of each candidate reply message in the plurality of historical conversations.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the determining whether a pre-established conversation template matching the text message exists comprises:
determining an intention of the text message on the basis of a result of the semantic analysis; and
determining whether a pre-established conversation template matching the text message exists based on the determined intention of the text message.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the performing semantic analysis on the text message comprises:
performing semantic analysis on the text message of the currently received conversation in conjunction with a text message of a historical conversation displayed in a current conversation window.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the pre-established conversation templates are preset with interfaces for calling associated applications associated with the pre-established conversation templates, the interfaces for calling associated applications associated with the pre-established conversation templates comprise:
an interface for calling an address book application;
an interface for calling a picture library;
an interface for calling a calendar application;
an interface for calling a mailbox client;
the interface for calling the positioning application; and
an interface for calling a map application set locally.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the acquiring the candidate reply message on the basis of the interface of the associated application and the keyword comprises:
presenting a prompt of an intention of the text message on the first device;
acquiring the candidate reply message on the basis of the interface of the associated application and the keyword in response to the prompt is clicked.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the acquiring the candidate reply message on the basis of an interface of the associated application and the keyword, comprises:
acquiring, through the interface of the associated application, the candidate reply message related to the keyword from the associated application, and presenting the candidate reply message in a conversation window.

### Claim 10

An apparatus for generating a candidate reply message for a first user of a first device, the apparatus comprising:
at least one processor; and
a memory storing instructions, the instructions when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising:
acquiring a text message of a currently received conversation sent from a second device;
performing semantic analysis on the text message, and determining a keyword of the text message on the basis of a result of the semantic analysis;
determining, in pre-established conversation templates, whether a pre-established conversation template matching the text message exists; and
generating, in response to determining the pre-established conversation template matching the text message existing, a candidate reply message on the basis of the pre-established conversation template matching the text message, wherein the pre-established conversation template matching the text message is preset with an interface for calling an associated application associated with the pre-established conversation template, and the generating the candidate reply message on the basis of the pre-established conversation template matching the text message comprises: acquiring the candidate reply message on the basis of the interface of the associated application and the keyword; and
presenting the generated candidate reply message on the first device, for the first user to click on the generated candidate reply message for replying,
wherein the interface for calling the associated application associated with the pre-established conversation template matching the text message comprises an interface for calling a positioning application;
wherein the acquiring the candidate reply message on the basis of the interface of the associated application and the keyword comprises: acquiring latitude and longitude information through the interface for calling the positioning application; and
generating geographical position information based on the latitude and longitude information as the candidate reply message.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the acquiring a text message of a currently received conversation comprises:
acquiring a currently received voice message or picture message; and
converting the voice message or the picture message into the text message.

### Claim 12 (depends on 10)

The apparatus according to claim 10, wherein the determining whether a pre-established conversation template matching the text message exists comprises:
matching the text message with a plurality of pre-established conversation templates; and
using the pre-established conversation template having a matching degree greater than a preset threshold with the text message as the pre-established conversation template matching the text message.

### Claim 13 (depends on 12)

The apparatus according to claim 12, wherein
the generating, in response to determining the pre-established conversation template matching the text message existing, a candidate reply message on the basis of the pre-established conversation template comprises:
presenting each candidate reply message in a descending order based on a frequency of appearance of each candidate reply message in the plurality of historical conversations.

### Claim 14 (depends on 10)

The apparatus according to claim 10, wherein the determining whether a pre-established conversation template matching the text message exists comprises:
determining an intention of the text message on the basis of a result of the semantic analysis; and
determining whether a pre-established conversation template matching the text message exists based on the determined intention of the text message.

### Claim 15 (depends on 14)

The apparatus according to claim 14, wherein the performing semantic analysis on the text message comprises:
performing semantic analysis on the text message of the currently received conversation in conjunction with a text message of a historical conversation displayed in a current conversation window.

### Claim 16

A non-transitory computer storage medium storing a computer program, the computer program when executed by one or more processors, causes the one or more processors to perform operations; the operations comprising:
acquiring a text message of a currently received conversation sent from a second user via a second device;
performing semantic analysis on the text message, and determining a keyword of the text message on the basis of a result of the semantic analysis;
determining whether a pre-established conversation template matching the text message exists;
generating, in response to determining the pre-established conversation template matching the text message existing, a candidate reply message on the basis of the per-established conversation template matching the text message, wherein the pre-established conversation template is preset with an interface for calling an associated application associated with the pre-established conversation template matching the text message, and the generating the candidate reply message on the basis of the pre-established conversation template matching the text message comprises: acquiring the candidate reply message on the basis of the interface of the associated application and the keyword; and
presenting the generated candidate reply message on a first device, for a first user to click on the generated candidate reply message for replying,
wherein the interface for calling the associated application associated with the pre-established conversation template matching the text message comprises an interface for calling a positioning application;
wherein the acquiring the candidate reply message on the basis of the interface of the associated application and the keyword comprises: acquiring latitude and longitude information through the interface for calling the positioning application; and
generating geographical position information based on the latitude and longitude information as the candidate reply message.
