# US 11,120,078 B2 · Method and device for video processing, electronic device, and storage medium

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

- Number: US 11,120,078 B2
- Document ID: US11120078B2
- Status: Granted
- Kind: B2
- Application number: 16/975,347
- Filed: 2019-08-06
- Published: 2020-12-17
- Granted: 2021-09-14
- Earliest claimed: 2018-08-07
- Assignees: Beijing Sensetime Technology Development Co., Ltd.
- Applicants: Beijing Sensetime Technology Development Co., Ltd.
- Inventors: Xiaoou Tang; Dian Shao; Yu Xiong; Yue Zhao; Qingqiu Huang; Yu Qiao; Dahua Lin
- Web page: https://patentgrep.com/patent/US11120078B2

## CPC

- G06F 16/7844: {using original textual content or text extracted from visual content or transcript of audio data}
- G06F 16/73: Querying
- G06F 16/743: {a collection of video files or sequences}
- G06F 18/22: Matching criteria, e.g. proximity measures
- G06F 40/20: Natural language analysis (semantic analysis of natural language G06F40/30)
- G06F 40/30: Semantic analysis
- G06V 20/46: {Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames}
- H04N 21/251: {Learning process for intelligent management, e.g. learning user preferences for recommending movies (details of learning user preferences for the retrieval of video data in a video database G06F16/739; computer systems using learning methods G06N3/08)}
- H04N 21/4668: {for recommending content, e.g. movies}
- H04N 21/4826: {using recommendation lists, e.g. of programmes or channels sorted out according to their score}
- H04N 21/4828: {for searching programme descriptors (retrieval of video data G06F16/739)}
- H04N 21/232: Content retrieval operation {locally} within server, e.g. reading video streams from disk arrays {(storage management G06F3/0604; details of querying and searching of video data from a database G06F16/739)}
- H04N 21/23418: {involving operations for analysing video streams, e.g. detecting features or characteristics (television picture signal circuitry for scene change detection H04N5/147; filtering for image enhancement G06T5/00; methods or arrangements for recognising scenes G06V20/00; arrangements characterised by components specially adapted for monitoring, identification or recognition of video in broadcast systems H04H60/59)}
- H04N 21/432: Content retrieval operation from a local storage medium, e.g. hard-disk {(details of retrieval of video data and associated meta data in video databases G06F16/739)}
- H04N 21/44008: {involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream (arrangements characterised by components specially adapted for monitoring, identification or recognition of video in broadcast systems H04H60/59)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

The present disclosure relates to a method and device for video processing, an electronic device, and a storage medium. The method comprises: determining, on the basis of paragraph information of a query text paragraph and video information of multiple videos in a video library, preselected videos associated with the query text paragraph in the multiple videos; and determining a target video in the preselected videos on the basis of video frame information of the preselected videos and of sentence information of the query text paragraph. The method for video processing of the embodiments of the present disclosure indexes videos by means of the relevance between the videos and the query text paragraph, allows the pinpointing of the target video, avoids search result redundancy, allows the processing of the query text paragraph in a natural language form, and is not limited by the inherent contents of content labels.

## Claims

### Claim 1

A method for video processing, comprising:
determining preselected videos associated with a query text paragraph in a plurality of videos according to paragraph information of the query text paragraph and video information of the plurality of videos in a video library; and
determining a target video in the preselected videos according to video frame information of the preselected videos and sentence information of the query text paragraph, wherein the sentence information comprises first feature information of one or more sentences of the query text paragraph, and the video frame information comprises fourth feature information of a plurality of video frames of the preselected videos.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the paragraph information comprises second feature information of the query text paragraph, and the video information comprises third feature information of the plurality of videos; and
determining the preselected videos associated with the query text paragraph in the plurality of videos according to the paragraph information of the query text paragraph and the video information of the plurality of videos in the video library comprises:
determining the preselected videos associated with the query text paragraph in the plurality of videos according to the second feature information of the query text paragraph and the third feature information of the plurality of videos in the video library.

### Claim 3 (depends on 2)

The method according to claim 2, wherein determining the preselected videos associated with the query text paragraph in the plurality of videos according to the second feature information of the query text paragraph and the third feature information of the plurality of videos in the video library comprises:
determining first correlation scores between the query text paragraph and the plurality of videos respectively according to the second feature information of the query text paragraph and the third feature information of the plurality of videos in the video library; and
determining the preselected videos in the plurality of videos according to the first correlation scores.

### Claim 4 (depends on 3)

The method according to claim 3, wherein determining the first correlation scores between the query text paragraph and the plurality of videos respectively according to the second feature information of the query text paragraph and the third feature information of the plurality of videos in the video library comprises:
mapping third feature information of a first video and the second feature information of the query text paragraph to a vector space of a same dimension, to obtain a third feature vector of the first video and a second feature vector of the query text paragraph, wherein the first video is any one of the plurality of videos; and
determining a cosine similarity between the second feature vector and the third feature vector as a first correlation score between the query text paragraph and the first video.

### Claim 5 (depends on 1)

The method according to claim 1, wherein
determining the target video in the preselected videos according to the video frame information of the preselected videos and the sentence information of the query text paragraph comprises:
determining the target video in the preselected videos according to the first feature information of the one or more sentences of the query text paragraph and the fourth feature information of the plurality of video frames of the preselected videos.

### Claim 6 (depends on 5)

The method according to claim 5, wherein determining the target video in the preselected videos according to the first feature information of the one or more sentences of the query text paragraph and the fourth feature information of the plurality of video frames of the preselected videos comprises:
determining second correlation scores between the query text paragraph and the preselected videos according to the first feature information of the one or more sentences of the query text paragraph and the fourth feature information of the plurality of video frames of the preselected videos; and
determining the target video in the preselected videos according to first correlation scores and the second correlation scores.

### Claim 7 (depends on 6)

The method according to claim 6, wherein determining the second correlation scores between the query text paragraph and the preselected videos according to the first feature information of the one or more sentences of the query text paragraph and the fourth feature information of the plurality of video frames of the preselected videos comprises:
mapping fourth feature information of a plurality of video frames of a target preselected video and the first feature information of the one or more sentences of the query text paragraph to a vector space of a same dimension, to obtain fourth feature vectors of the plurality of video frames of the target preselected video and first feature vectors of the one or more sentences of the query text paragraph, respectively, wherein the target preselected video is any one of the preselected videos;
determining, from the fourth feature vectors, target feature vectors whose cosine similarities to a first feature vector of a target sentence are greater than or equal to a similarity threshold, wherein the target sentence is any one of the one or more sentences;
aggregating video frames corresponding to the target feature vectors into a video clip corresponding to the target sentence;
determining a fifth feature vector of the video clip corresponding to the target sentence according to the target feature vectors; and
determining a second correlation score between the query text paragraph and the target preselected video according to fifth feature vectors of video clips respectively corresponding to the one or more sentences and the first feature vectors of the one or more sentences.

### Claim 8 (depends on 6)

The method according to claim 6, wherein determining the target video in the preselected videos according to the first correlation scores and the second correlation scores comprises:
determining products of the first correlation scores and the second correlation scores as third correlation scores; and
determining the target video in the preselected videos according to the third correlation scores.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
performing feature extraction processing on a plurality of video frames of a second video respectively to obtain fourth feature information of the plurality of video frames of the second video, wherein the second video is any one of the plurality of videos; and
determining third feature information of the second video according to the fourth feature information of the plurality of video frames of the second video.

### Claim 10 (depends on 1)

The method according to claim 1, further comprising:
performing feature extraction processing on the one or more sentences of the query text paragraph respectively to obtain the first feature information of the one or more sentences of the query text paragraph; and
determining second feature information of the query text paragraph according to the first feature information of the one or more sentences of the query text paragraph.

### Claim 11

An electronic device, comprising:
a processor; and
a memory configured to store processor-executable instructions,
wherein the processor is configured to:
determine preselected videos associated with a query text paragraph in a plurality of videos according to paragraph information of the query text paragraph and video information of the plurality of videos in a video library; and
determine a target video in the preselected videos according to video frame information of the preselected videos and sentence information of the query text paragraph, wherein the sentence information comprises first feature information of one or more sentences of the query text paragraph, and the video frame information comprises fourth feature information of a plurality of video frames of the preselected videos.

### Claim 12

A computer-readable storage medium, having computer program instructions stored thereon, wherein when the computer program instructions are executed by a processor, a method comprising the following operations is implemented:
determining preselected videos associated with a query text paragraph in a plurality of videos according to paragraph information of the query text paragraph and video information of the plurality of videos in a video library; and
determining a target video in the preselected videos according to video frame information of the preselected videos and sentence information of the query text paragraph, wherein the sentence information comprises first feature information of one or more sentences of the query text paragraph, and the video frame information comprises fourth feature information of a plurality of video frames of the preselected videos.

### Claim 13 (depends on 11)

The electronic device according to claim 11, wherein the paragraph information comprises second feature information of the query text paragraph, and the video information comprises third feature information of the plurality of videos; and
the processor is further configured to:
determine the preselected videos associated with the query text paragraph in the plurality of videos according to the second feature information of the query text paragraph and the third feature information of the plurality of videos in the video library.

### Claim 14 (depends on 13)

The electronic device according to claim 13, wherein the processor is further configured to:
determine first correlation scores between the query text paragraph and the plurality of videos respectively according to the second feature information of the query text paragraph and the third feature information of the plurality of videos in the video library; and
determine the preselected videos in the plurality of videos according to the first correlation scores.

### Claim 15 (depends on 14)

The electronic device according to claim 14, wherein the processor is further configured to:
map third feature information of a first video and the second feature information of the query text paragraph to a vector space of a same dimension, to obtain a third feature vector of the first video and a second feature vector of the query text paragraph, wherein the first video is any one of the plurality of videos; and
determine a cosine similarity between the second feature vector and the third feature vector as a first correlation score between the query text paragraph and the first video.

### Claim 16 (depends on 11)

The electronic device according to claim 11, wherein
the processor is further configured to:
determine the target video in the preselected videos according to the first feature information of the one or more sentences of the query text paragraph and the fourth feature information of the plurality of video frames of the preselected videos.

### Claim 17 (depends on 16)

The electronic device according to claim 16, wherein the processor is further configured to:
determine second correlation scores between the query text paragraph and
the preselected videos according to the first feature information of the one or more sentences of the query text paragraph and the fourth feature information of the plurality of video frames of the preselected videos; and
determine the target video in the preselected videos according to first correlation scores and the second correlation scores.

### Claim 18 (depends on 17)

The electronic device according to claim 17, wherein the processor is further configured to:
map fourth feature information of a plurality of video frames of a target preselected video and the first feature information of the one or more sentences of the query text paragraph to a vector space of a same dimension, to obtain fourth feature vectors of the plurality of video frames of the target preselected video and first feature vectors of the one or more sentences of the query text paragraph, respectively, wherein the target preselected video is any one of the preselected videos;
determine, from the fourth feature vectors, target feature vectors whose cosine similarities to a first feature vector of a target sentence are greater than or equal to a similarity threshold, wherein the target sentence is any one of the one or more sentences;
aggregate video frames corresponding to the target feature vectors into a video clip corresponding to the target sentence;
determine a fifth feature vector of the video clip corresponding to the target sentence according to the target feature vectors; and
determine a second correlation score between the query text paragraph and the target preselected video according to fifth feature vectors of video clips respectively corresponding to the one or more sentences and the first feature vectors of the one or more sentences.

### Claim 19 (depends on 17)

The electronic device according to claim 17, wherein the processor is further configured to:
determine products of the first correlation scores and the second correlation scores as third correlation scores; and
determine the target video in the preselected videos according to the third correlation scores.

### Claim 20 (depends on 11)

The electronic device according to claim 11, wherein the processor is further configured to:
perform feature extraction processing on a plurality of video frames of a second video respectively to obtain fourth feature information of the plurality of video frames of the second video, wherein the second video is any one of the plurality of videos; and
determine third feature information of the second video according to the fourth feature information of the plurality of video frames of the second video.
