# US 10,956,748 B2 · Video classification method, information processing method, and server

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

- Number: US 10,956,748 B2
- Document ID: US10956748B2
- Status: Granted
- Kind: B2
- Application number: 16/558,015
- Filed: 2019-08-30
- Published: 2019-12-19
- Granted: 2021-03-23
- Earliest claimed: 2017-09-15
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Yongyi Tang; Lin Ma; Wei Liu
- Web page: https://patentgrep.com/patent/US10956748B2

## CPC

- G06V 20/41: {Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items (segmenting video sequences G06V20/49)}
- G06F 17/15: Correlation function computation {including computation of convolution operations (arithmetic circuits for sum of products per se, e.g. multiply-accumulators G06F7/5443; digital filters, e.g. FIR, IIR, adaptive filters H03H17/00)}
- G06F 18/24: Classification techniques
- G06F 18/2413: based on distances to training or reference patterns
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- 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/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/09: Supervised learning
- G06V 10/764: using classification, e.g. of video objects
- G06V 10/82: using neural networks
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A video classification method is provided for a computer device. The method includes obtaining a to-be-processed video, where the to-be-processed video has a plurality of video frames, and each video frame corresponds to one time feature; and sampling the to-be-processed video according to a time-feature sampling rule, and obtaining at least one video frame feature sequence. The time-feature sampling rule is a correspondence between time features and video frame feature sequences. The method also includes processing the video frame feature sequence by using a first neural network model, to obtain a feature representation result corresponding to the video frame feature sequence, where the first neural network model is a recurrent neural network model; and processing the feature representation result by using a second neural network model, to obtain a prediction result corresponding to the video frame feature sequence.

## Claims

### Claim 1

A video classification method for a computer device, comprising:
obtaining a to-be-processed video, the to-be-processed video having a plurality of video frames, and each video frame corresponding to one time feature;
sampling the to-be-processed video according to a time-feature sampling rule, and obtaining at least one video frame feature sequence, the time-feature sampling rule being a correspondence between time features and video frame feature sequences;
processing the at least one video frame feature sequence by using a first neural network model, to obtain a feature representation result corresponding to the at least one video frame feature sequence, the first neural network model being a recurrent neural network model; and
processing the feature representation result corresponding to the at least one video frame feature sequence by using a second neural network model, to obtain a prediction result corresponding to the at least one video frame feature sequence.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
determining a category of the to-be-processed video according to the prediction result corresponding to the at least one video frame feature sequence.

### Claim 3 (depends on 2)

The method according to claim 2, wherein, after the obtaining a to-be-processed video, the method further comprises:
processing each video frame in the to-be-processed video by using a convolutional neural network CNN, to obtain a time feature corresponding to each video frame; and
determining the at least one time feature sequence of the to-be-processed video according to the time feature corresponding to each video frame, the time feature sequence being configured for sampling.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the sampling the to-be-processed video according to a time-feature sampling rule, and obtaining at least one video frame feature sequence comprises:
determining at least one time-window according to the time-feature sampling rule, each time-window comprising at least one video frame of the to-be-processed video; and
extracting, from the time feature sequence, a video frame feature sequence corresponding to each time-window.

### Claim 5 (depends on 2)

The method according to claim 2, wherein the processing the at least one video frame feature sequence by using a first neural network model, to obtain a feature representation result corresponding to each video frame feature sequence comprises:
inputting the at least one video frame feature sequence into a forward recurrent neural network in the first neural network model, to obtain a first representation result;
inputting the at least one video frame feature sequence into a backward recurrent neural network in the first neural network model, to obtain a second representation result; and
calculating the feature representation result corresponding to the at least one video frame feature sequence according to the first representation result and the second representation result.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the calculating the feature representation result corresponding to the at least one video frame feature sequence according to the first representation result and the second representation result comprises:
calculating the feature representation result corresponding to the at least one video frame feature sequence by using the following formulas:
h=[hT/2f,hT/2b];
htf=GRU(xt,ht−1f) for t∈[1,T/2];
htb=GRU(xt,ht+1b) for t∈[T,T/2]
wherein h represents a feature representation result of a video frame feature sequence, hT/2f represents the first representation result, hT/2b represents the second representation result, xt represents the video frame feature sequence at a tth moment, GRU ( ) represents use of a gated recurrent unit GRU for neural network processing, T represents total time of the to-be-processed video, and t represents an integer in a range of 1 to T.

### Claim 7 (depends on 2)

The method according to claim 2, wherein the processing the feature representation result corresponding to the at least one video frame feature sequence by using a second neural network model, to obtain a prediction result corresponding to the at least one video frame feature sequence comprises:
inputting the feature representation result corresponding to the at least one video frame feature sequence into a first sub-model in the second neural network model, to obtain a third representation result;
inputting the feature representation result corresponding to the at least one video frame feature sequence into a second sub-model in the second neural network model, to obtain a fourth representation result; and
calculating the prediction result corresponding to the at least one video frame feature sequence according to the third representation result and the fourth representation result.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the calculating the prediction result corresponding to the at least one video frame feature sequence according to the third representation result and the fourth representation result comprises:
calculating the prediction result corresponding to the at least one video frame feature sequence by using the following formulas:
lable
=
∑
n
=
1
N
⁢
g
n
⁢
a
n
;
g
n
=
σ
g
⁡
(
W
g
⁢
h
+
b
g
)
,
n
∈
[
1
,
N
]
;
a
n
=
σ
a
⁡
(
W
a
⁢
h
+
b
a
)
,
n
∈
[
1
,
N
]
;
wherein lable represents a prediction result of a video frame feature sequence, gn represents the third representation result, an represents the fourth representation result, σg represents a softmax function, σa represents a sigmoid function, h represents the feature representation result of the video frame feature sequence, Wg and bg represent parameters in the first sub-model, Wa and ba represent parameters of the second sub-model, N represents a calculation total number obtained after non-linear transformation is performed on the feature representation result, and n represents an integer in a range of 1 to N.

### Claim 9 (depends on 2)

The method according to claim 2, wherein after the processing the feature representation result corresponding to the at least one video frame feature sequence by using a second neural network model, to obtain a prediction result corresponding to the at least one video frame feature sequence, the method further comprises:
calculating the category of the to-be-processed video according to the prediction result corresponding to the at least one video frame feature sequence and a weight value corresponding to the at least one video frame feature sequence; and
classifying the to-be-processed video according to the category of the to-be-processed video.

### Claim 10

A non-transitory computer-readable storage medium storing computer program instructions executable by at least one processor to perform:
obtaining a to-be-processed video, the to-be-processed video having a plurality of video frames, and each video frame corresponding to one time feature;
sampling the to-be-processed video according to a time-feature sampling rule, and obtaining at least one video frame feature sequence, the time-feature sampling rule being a correspondence between time features and video frame feature sequences;
processing the at least one video frame feature sequence by using a first neural network model, to obtain a feature representation result corresponding to the at least one video frame feature sequence, the first neural network model being a recurrent neural network model; and
processing the feature representation result corresponding to the at least one video frame feature sequence by using a second neural network model, to obtain a prediction result corresponding to the at least one video frame feature sequence.

### Claim 11 (depends on 10)

The non-transitory computer-readable storage medium according to claim 10, wherein the computer program instructions are executable by the processor to further perform:
determining a category of the to-be-processed video according to the prediction result corresponding to the at least one video frame feature sequence.

### Claim 12 (depends on 11)

The non-transitory computer-readable storage medium according to claim 11, wherein the computer program instructions are executable by the processor to, after the obtaining a to-be-processed video, further perform:
processing each video frame in the to-be-processed video by using a convolutional neural network CNN, to obtain a time feature corresponding to each video frame; and
determining the at least one time feature sequence of the to-be-processed video according to the time feature corresponding to each video frame, the time feature sequence being configured for sampling.

### Claim 13 (depends on 12)

The non-transitory computer-readable storage medium according to claim 12, wherein the sampling the to-be-processed video according to a time-feature sampling rule, and obtaining at least one video frame feature sequence comprises:
determining at least one time-window according to the time-feature sampling rule, each time-window comprising at least one video frame of the to-be-processed video; and
extracting, from the time feature sequence, a video frame feature sequence corresponding to each time-window.

### Claim 14 (depends on 11)

The non-transitory computer-readable storage medium according to claim 11, wherein the processing the at least one video frame feature sequence by using a first neural network model, to obtain a feature representation result corresponding to each video frame feature sequence comprises:
inputting the at least one video frame feature sequence into a forward recurrent neural network in the first neural network model, to obtain a first representation result;
inputting the at least one video frame feature sequence into a backward recurrent neural network in the first neural network model, to obtain a second representation result; and
calculating the feature representation result corresponding to the at least one video frame feature sequence according to the first representation result and the second representation result.

### Claim 15 (depends on 14)

The non-transitory computer-readable storage medium according to claim 14, wherein the calculating the feature representation result corresponding to the at least one video frame feature sequence according to the first representation result and the second representation result comprises:
calculating the feature representation result corresponding to the at least one video frame feature sequence by using the following formulas:
h=[hT/2f,hT/2b];
htf=GRU(xt,ht−1f) for t∈[1,T/2];
htb=GRU(xt,ht+1b) for t∈[1,T/2]
wherein h represents a feature representation result of a video frame feature sequence, hT/2f represents the first representation result, hT/2b represents the second representation result, xt represents the video frame feature sequence at a tth moment, GRU ( ) represents use of a gated recurrent unit GRU for neural network processing, T represents total time of the to-be-processed video, and t represents an integer in a range of 1 to T.

### Claim 16 (depends on 11)

The non-transitory computer-readable storage medium according to claim 11, wherein the processing the feature representation result corresponding to the at least one video frame feature sequence by using a second neural network model, to obtain a prediction result corresponding to the at least one video frame feature sequence comprises:
inputting the feature representation result corresponding to the at least one video frame feature sequence into a first sub-model in the second neural network model, to obtain a third representation result;
inputting the feature representation result corresponding to the at least one video frame feature sequence into a second sub-model in the second neural network model, to obtain a fourth representation result; and
calculating the prediction result corresponding to the at least one video frame feature sequence according to the third representation result and the fourth representation result.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium according to claim 16, wherein the calculating the prediction result corresponding to the at least one video frame feature sequence according to the third representation result and the fourth representation result comprises:
calculating the prediction result corresponding to the at least one video frame feature sequence by using the following formulas:
lable
=
∑
n
=
1
N
⁢
g
n
⁢
a
n
;
g
n
=
σ
g
⁡
(
W
g
⁢
h
+
b
g
)
,
n
∈
[
1
,
N
]
;
a
n
=
σ
a
⁡
(
W
a
⁢
h
+
b
a
)
,
n
∈
[
1
,
N
]
;
wherein lable represents a prediction result of a video frame feature sequence, gn represents the third representation result, an represents the fourth representation result, σg represents a softmax function, σa represents a sigmoid function, h represents the feature representation result of the video frame feature sequence, Wg and bg represent parameters in the first sub-model, Wa and ba represent parameters of the second sub-model, N represents a calculation total number obtained after non-linear transformation is performed on the feature representation result, and n represents an integer in a range of 1 to N.

### Claim 18 (depends on 11)

The non-transitory computer-readable storage medium according to claim 11, wherein after the processing the feature representation result corresponding to the at least one video frame feature sequence by using a second neural network model, to obtain a prediction result corresponding to the at least one video frame feature sequence, the computer program instructions are executable by the processor to further perform:
calculating the category of the to-be-processed video according to the prediction result corresponding to the at least one video frame feature sequence and a weight value corresponding to the at least one video frame feature sequence; and
classifying the to-be-processed video according to the category of the to-be-processed video.

### Claim 19

A server, comprising:
a memory storing computer program instructions; and
a processor coupled to the memory and, when executing the computer program instructions, configured to perform:
obtaining a to-be-processed video, the to-be-processed video having a plurality of video frames, and each video frame corresponding to one time feature;
sampling the to-be-processed video according to a time-feature sampling rule, and obtaining at least one video frame feature sequence, the time-feature sampling rule being a correspondence between time features and video frame feature sequences;
processing the at least one video frame feature sequence by using a first neural network model, to obtain a feature representation result corresponding to the at least one video frame feature sequence, the first neural network model being a recurrent neural network model; and
processing the feature representation result corresponding to the at least one video frame feature sequence by using a second neural network model, to obtain a prediction result corresponding to the at least one video frame feature sequence.

### Claim 20 (depends on 19)

The server according to claim 19, wherein the processor is further configured to perform:
determining a category of the to-be-processed video according to the prediction result corresponding to the at least one video frame feature sequence.
