# US 2021/0174031 A1 · Method and apparatus for generating natural language description information

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

- Number: US 2021/0174031 A1
- Document ID: US20210174031A1
- Status: Published application
- Kind: A1
- Application number: 17/183,127
- Filed: 2021-02-23
- Published: 2021-06-10
- Earliest claimed: 2018-11-23
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Bairui WANG; Lin MA; Yang FENG; Wei LIU
- Web page: https://patentgrep.com/patent/US20210174031A1

## CPC

- G06F 40/56: Natural language generation
- G06F 18/253: {of extracted features}
- G06F 40/30: Semantic analysis
- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/09: Supervised learning
- G06N 3/092: Reinforcement learning
- G06N 20/00: Machine learning
- G06V 10/806: {of extracted features}
- G06V 20/46: {Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames}
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/08: Learning methods
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

The present disclosure describes methods, devices, and storage medium for generating a natural language description for a media object. The method includes respectively processing, by a device, a media object by using a plurality of natural language description models to obtain a plurality of first feature vectors corresponding to a plurality of feature types. The device includes a memory storing instructions and a processor in communication with the memory. The method also includes fusing, by the device, the plurality of first feature to obtain a second feature vector; and generating, by the device, a natural language description for the media object according to the second feature vector, the natural language description being used for expressing the media object in natural language. The present disclosure resolves the technical problem that natural language description generated for a media object can only give an insufficiently accurate description of the media object.

## Claims

### Claim 1

A method for generating a natural language description (NLD) for a media object, the method comprising:
respectively processing, by a device comprising a memory storing instructions and a processor in communication with the memory, a media object by using a plurality of NLD models to obtain a plurality of first feature vectors corresponding to a plurality of feature types;
fusing, by the device, the plurality of first feature to obtain a second feature vector; and
generating, by the device, a NLD for the media object according to the second feature vector, the NLD being used for expressing the media object in natural language.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the respectively processing the media object by using the plurality of NLD models to obtain the plurality of first feature vectors corresponding to the plurality of feature types comprises:
obtaining the media object;
determining a block comprised in the media object;
inputting the block as input information into each NLD model of the plurality of NLD models; and
respectively generating a first feature vector by using the each NLD model, the first feature vector comprising a first feature corresponding to the block.

### Claim 3 (depends on 2)

The method according to claim 2, wherein:
the media object comprises a plurality of blocks; and
the generating the first feature vector by using the each NLD model comprises:
processing the plurality of blocks by using a feature extraction model comprised in the each NLD model to extract a plurality of first features,
obtaining sequence information of the plurality of blocks, the sequence information indicating a sequence of the plurality of blocks in the media block, and
sequentially encoding the plurality of first features based on the sequence information to obtain the first feature vector.

### Claim 4 (depends on 3)

The method according to claim 3, wherein:
the each NLD model comprises a plurality of feature extraction models;
each of the feature extraction models corresponds to a different feature type; and
the processing the plurality of blocks by using the feature extraction model comprised in the each NLD model to extract the plurality of first features comprises:
inputting the plurality of blocks into each of the plurality of feature extraction models comprised in the each NLD model,
obtaining a set of second features outputted by the each of the feature extraction models, to obtain a plurality of sets of second features, each set of second features in the plurality of sets of second features comprising a feature in a one-to-one correspondence with each of the blocks, and
fusing features corresponding to a same block in the plurality of sets of second features to obtain the plurality of first features.

### Claim 5 (depends on 3)

The method according to claim 3, wherein the sequentially encoding the plurality of first features based on the sequence information to obtain the first feature vector comprises:
inputting the first feature into a sequential encoder according to the sequence information;
generating a time series feature vector by using the sequential encoder;
processing the time series feature vector by using an attention mechanism model, to obtain a plurality of third features, the attention mechanism model being configured to determine a weighted feature corresponding to each block according to a correlation between the each block and a block feature; and
processing the plurality of third features by using a decoder model comprised in the each NLD model to generate the first feature vector.

### Claim 6 (depends on 1)

The method according to claim 1, wherein:
the media object comprises a first quantity of blocks;
the second feature vector comprises a first quantity of features corresponding to the first quantity of blocks; and
the generating the NLD for the media object according to the second feature vector comprises:
processing the first quantity of features to obtain a second quantity of words that maximize an objective function, the objective function being a function for obtaining a word probability distribution, and
integrating the second quantity of words into a sentence, and determining the sentence as the NLD for the media object.

### Claim 7 (depends on 1)

The method according to claim 1, wherein, before the respectively processing the media object by using the plurality of NLD models, the method further comprises:
training each model of a plurality of initial NLD models by using a sample, to obtain a plurality of first models whose first loss function meets a first preset condition, the first loss function being a loss function configured according to the each model of the plurality of initial NLD models;
training each joint model of a plurality of joint models by using the sample, to obtain a plurality of second models whose second loss function meets a second preset condition, the each joint model of the plurality of joint models being a model obtained by cascading one of the first models and a reconstructor model, the reconstructor model being configured to reconstruct a feature of the sample according to a description result outputted by the first model, and the second loss function being a loss function configured according to the each joint model; and
training the plurality of second models, to obtain a plurality of NLD models whose evaluation parameter meets a third preset condition.

### Claim 8

An apparatus for generating a natural language description (NLD) for a media object, the apparatus comprising:
a memory storing instructions; and
a processor in communication with the memory, wherein, when the processor executes the instructions, the processor is configured to cause the apparatus to:
respectively process a media object by using a plurality of natural language description (NLD) models to obtain a plurality of first feature vectors corresponding to a plurality of feature types,
fuse the plurality of first feature to obtain a second feature vector, and
generate a NLD for the media object according to the second feature vector, the NLD being used for expressing the media object in natural language.

### Claim 9 (depends on 8)

The apparatus according to claim 8, wherein, when the processor is configured to cause the apparatus to respectively process the media object by using the plurality of NLD models to obtain the plurality of first feature vectors corresponding to the plurality of feature types, the processor is configured to cause the apparatus to:
obtain the media object;
determine a block comprised in the media object;
input the block as input information into each NLD model of the plurality of NLD models; and
respectively generate a first feature vector by using the each NLD model, the first feature vector comprising a first feature corresponding to the block.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein:
the media object comprises a plurality of blocks; and
when the processor is configured to cause the apparatus to generate the first feature vector by using the each NLD model, the processor is configured to cause the apparatus to:
process the plurality of blocks by using a feature extraction model comprised in the each NLD model to extract a plurality of first features,
obtain sequence information of the plurality of blocks, the sequence information indicating a sequence of the plurality of blocks in the media block, and
sequentially encode the plurality of first features based on the sequence information to obtain the first feature vector.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein:
the each NLD model comprises a plurality of feature extraction models;
each of the feature extraction models corresponds to a different feature type; and
when the processor is configured to cause the apparatus to process the plurality of blocks by using the feature extraction model comprised in the each NLD model to extract the plurality of first features, the processor is configured to cause the apparatus to:
input the plurality of blocks into each of the plurality of feature extraction models comprised in the each NLD model,
obtain a set of second features outputted by the each of the feature extraction models, to obtain a plurality of sets of second features, each set of second features in the plurality of sets of second features comprising a feature in a one-to-one correspondence with each of the blocks, and
fuse features corresponding to a same block in the plurality of sets of second features to obtain the plurality of first features.

### Claim 12 (depends on 10)

The apparatus according to claim 10, wherein, when the processor is configured to cause the apparatus to sequentially encode the plurality of first features based on the sequence information to obtain the first feature vector, the processor is configured to cause the apparatus to:
input the first feature into a sequential encoder according to the sequence information;
generate a time series feature vector by using the sequential encoder;
process the time series feature vector by using an attention mechanism model, to obtain a plurality of third features, the attention mechanism model being configured to determine a weighted feature corresponding to each block according to a correlation between the each block and a block feature; and
process the plurality of third features by using a decoder model comprised in the each NLD model to generate the first feature vector.

### Claim 13 (depends on 8)

The apparatus according to claim 8, wherein:
the media object comprises a first quantity of blocks;
the second feature vector comprises a first quantity of features corresponding to the first quantity of blocks; and
when the processor is configured to cause the apparatus to generate the NLD for the media object according to the second feature vector, the processor is configured to cause the apparatus to:
process the first quantity of features to obtain a second quantity of words that maximize an objective function, the objective function being a function for obtaining a word probability distribution, and
integrate the second quantity of words into a sentence, and determine the sentence as the NLD for the media object.

### Claim 14 (depends on 8)

The apparatus according to claim 8, wherein, before the processor is configured to cause the apparatus to respectively process the media object by using the plurality of NLD models, the processor is configured to further cause the apparatus to:
train each model of a plurality of initial NLD models by using a sample, to obtain a plurality of first models whose first loss function meets a first preset condition, the first loss function being a loss function configured according to the each model of the plurality of initial NLD models;
train each joint model of a plurality of joint models by using the sample, to obtain a plurality of second models whose second loss function meets a second preset condition, the each joint model of the plurality of joint models being a model obtained by cascading one of the first models and a reconstructor model, the reconstructor model being configured to reconstruct a feature of the sample according to a description result outputted by the first model, and the second loss function being a loss function configured according to the each joint model; and
train the plurality of second models, to obtain a plurality of NLD models whose evaluation parameter meets a third preset condition.

### Claim 15

A non-transitory computer readable storage medium, storing computer readable instructions, wherein, the computer readable instructions, when executed by a processor, are configured to cause the processor to perform:
respectively processing a media object by using a plurality of natural language description (NLD) models to obtain a plurality of first feature vectors corresponding to a plurality of feature types;
fusing the plurality of first feature to obtain a second feature vector; and
generating a NLD for the media object according to the second feature vector, the NLD being used for expressing the media object in natural language.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium according to claim 15, wherein, when the computer readable instructions are configured to cause the processor to perform respectively processing the media object by using the plurality of NLD models to obtain the plurality of first feature vectors corresponding to the plurality of feature types, the computer readable instructions are configured to cause the processor to perform:
obtaining the media object;
determining a block comprised in the media object;
inputting the block as input information into each NLD model of the plurality of NLD models; and
respectively generating a first feature vector by using the each NLD model, the first feature vector comprising a first feature corresponding to the block.

### Claim 17 (depends on 16)

The non-transitory computer readable storage medium according to claim 16, wherein:
the media object comprises a plurality of blocks; and
when the computer readable instructions are configured to cause the processor to perform generating the first feature vector by using the each NLD model, the computer readable instructions are configured to cause the processor to perform:
processing the plurality of blocks by using a feature extraction model comprised in the each NLD model to extract a plurality of first features,
obtaining sequence information of the plurality of blocks, the sequence information indicating a sequence of the plurality of blocks in the media block, and
sequentially encoding the plurality of first features based on the sequence information to obtain the first feature vector.

### Claim 18 (depends on 17)

The non-transitory computer readable storage medium according to claim 17, wherein:
the each NLD model comprises a plurality of feature extraction models;
each of the feature extraction models corresponds to a different feature type; and
when the computer readable instructions are configured to cause the processor to perform processing the plurality of blocks by using the feature extraction model comprised in the each NLD model to extract the plurality of first features, the computer readable instructions are configured to cause the processor to perform:
inputting the plurality of blocks into each of the plurality of feature extraction models comprised in the each NLD model,
obtaining a set of second features outputted by the each of the feature extraction models, to obtain a plurality of sets of second features, each set of second features in the plurality of sets of second features comprising a feature in a one-to-one correspondence with each of the blocks, and
fusing features corresponding to a same block in the plurality of sets of second features to obtain the plurality of first features.

### Claim 19 (depends on 17)

The non-transitory computer readable storage medium according to claim 17, wherein, when the computer readable instructions are configured to cause the processor to perform sequentially encoding the plurality of first features based on the sequence information to obtain the first feature vector, the computer readable instructions are configured to cause the processor to perform:
inputting the first feature into a sequential encoder according to the sequence information;
generating a time series feature vector by using the sequential encoder;
processing the time series feature vector by using an attention mechanism model, to obtain a plurality of third features, the attention mechanism model being configured to determine a weighted feature corresponding to each block according to a correlation between the each block and a block feature; and
processing the plurality of third features by using a decoder model comprised in the each NLD model to generate the first feature vector.

### Claim 20 (depends on 15)

The non-transitory computer readable storage medium according to claim 15, wherein:
the media object comprises a first quantity of blocks;
the second feature vector comprises a first quantity of features corresponding to the first quantity of blocks; and
when the computer readable instructions are configured to cause the processor to perform generating the NLD for the media object according to the second feature vector, the computer readable instructions are configured to cause the processor to perform:
processing the first quantity of features to obtain a second quantity of words that maximize an objective function, the objective function being a function for obtaining a word probability distribution, and
integrating the second quantity of words into a sentence, and determining the sentence as the NLD for the media object.
