# US 2021/0287379 A1 · Video data processing method and related apparatus

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

- Number: US 2021/0287379 A1
- Document ID: US20210287379A1
- Status: Published application
- Kind: A1
- Application number: 17/334,678
- Filed: 2021-05-28
- Published: 2021-09-16
- Earliest claimed: 2019-04-30
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Yuanli ZHENG; Zelong YIN; Nianhua XIE
- Web page: https://patentgrep.com/patent/US20210287379A1

## CPC

- G06T 7/246: using feature-based methods, e.g. the tracking of corners or segments
- G06T 5/50: using two or more images, e.g. averaging or subtraction
- G06T 7/20: Analysis of motion (motion estimation for coding, decoding, compressing or decompressing digital video signals H04N19/43, H04N19/51)
- G06T 11/60: Creating or editing images; Combining images with text
- G06T 13/80: Two-dimensional [2D] animation, e.g. using sprites
- G06T 2207/10016: Video; Image sequence
- G06T 2207/20101: Interactive definition of point of interest, landmark or seed
- G06T 2207/30196: Human being; Person
- G06T 2207/30241: Trajectory
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Embodiments of this application disclose a video data processing method and apparatus, and a storage medium. The method includes determining, in response to a trigger operation on a target video, a target pixel in a key video frame, and obtaining multimedia information associated with the target pixel, the key video frame being a video frame in which the trigger operation is located, and the target pixel corresponding to the trigger operation in the key video frame; identifying a trajectory obtaining request corresponding to the target pixel based on location information of the target pixel; obtaining target trajectory information associated with the location information of the target pixel, the target trajectory information comprising location information of the target pixel in a next video frame following the key video frame; and displaying the multimedia information based on the location information of the target pixel in the next video frame.

## Claims

### Claim 1

A video data processing method, comprising:
determining, in response to a trigger operation on a target video, a target pixel in a key video frame of the target video, and obtaining multimedia information associated with the target pixel, the key video frame being a video frame in which the trigger operation is located, and the target pixel being a pixel corresponding to the trigger operation in the key video frame;
identifying a trajectory obtaining request corresponding to the target pixel based on location information of the target pixel in the key video frame;
obtaining, based on the trajectory obtaining request, target trajectory information associated with the location information of the target pixel in the key video frame, the target trajectory information comprising location information of the target pixel in a next video frame following the key video frame, the location information of the target pixel in the next video frame being obtained by tracking the target pixel; and
displaying, when the next video frame following the key video frame is played, the multimedia information based on the location information of the target pixel in the next video frame following the key video frame in the target trajectory information.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
obtaining, in response to a trajectory obtaining request for a target pixel in a key video frame, trajectory information associated with the target video, the key video frame being a video frame in the target video, the target pixel being a pixel in the key video frame, the trajectory information being determined by location information of pixels in each video frame of the target video; and
screening the trajectory information associated with the target video to obtain target trajectory information associated with location information of the target pixel in the key video frame, and returning the target trajectory information, the target trajectory information comprising target location information, the target location information being used for triggering display of multimedia information associated with the target pixel in the next video frame following the key video frame.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising:
obtaining a first video frame and a second video frame adjacent to the first video from the target video;
determining an average displacement matrix corresponding to the first video frame based on an optical flow tracking rule corresponding to the target video, pixels in the first video frame, and pixels in the second video frame;
tracking location information of the pixels in the first video frame based on the average displacement matrix, and determining location information of pixels being tracked in the second video frame; and
generating, based on the location information of the pixels in the first video frame and the location information of the pixels being tracked in the second video frame, trajectory information associated with the target video, the trajectory information comprising the target trajectory information used for tracking and displaying multimedia information associated with the target pixel in the target video.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the determining an average displacement matrix corresponding to the first video frame based on an optical flow tracking rule corresponding to the target video, pixels in the first video frame, and pixels in the second video frame comprises:
obtaining the optical flow tracking rule corresponding to the target video, determining the location information of the pixels in the first video frame as first location information, and determining location information of the pixels in the second video frame as second location information;
obtaining a forward displacement matrix corresponding to the first video frame and a backward displacement matrix corresponding to the second video frame based on the optical flow tracking rule, the first location information of the pixels in the first video frame, and the second location information of the pixels in the second video frame;
determining pixels meeting a target screening condition in the pixels as valid pixels based on the first location information of the pixels in the first video frame, the forward displacement matrix, and the backward displacement matrix;
correcting, based on the valid pixels, an initial state matrix corresponding to the first video frame and the forward displacement matrix, to obtain a target state matrix and a target displacement matrix that correspond to the first video frame; and
determining the average displacement matrix corresponding to the first video frame based on the target state matrix and the target displacement matrix.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the obtaining a forward displacement matrix corresponding to the first video frame and a backward displacement matrix corresponding to the second video frame based on the optical flow tracking rule, the first location information of the pixels in the first video frame, and the second location information of the pixels in the second video frame comprises:
forward mapping the pixels in the first video frame to the second video frame based on the first location information of the pixels in the first video frame and the optical flow tracking rule;
determining, in the second video frame, second location information of first mapped points obtained through the mapping, and determining the forward displacement matrix corresponding to the first video frame based on the first location information of the pixels and the second location information of the first mapped points;
backward mapping the pixels in the second video frame to the first video frame based on the second location information of the pixels in the second video frame and the optical flow tracking rule; and
determining, in the first video frame, third location information of second mapped points obtained through the mapping, and determining the backward displacement matrix corresponding to the second video frame based on the second location information of the first mapped points and the third location information of the second mapped points.

### Claim 6 (depends on 4)

The method according to claim 4, wherein the determining pixels meeting a target screening condition in the pixels as valid pixels based on the first location information of the pixels in the first video frame, the forward displacement matrix, and the backward displacement matrix, comprises:
obtaining a first pixel from the pixels in the first video frame, determining first location information of the first pixel in the first video frame, and determining, in the forward displacement matrix, a first transverse displacement and a first longitudinal displacement that correspond to the first pixel;
forward mapping the first pixel to the second video frame based on the first location information of the first pixel and the first transverse displacement and the first longitudinal displacement that correspond to the first pixel, and determining, in the second video frame, second location information of a second pixel obtained through the mapping;
determining, in the backward displacement matrix, a second transverse displacement and a second longitudinal displacement that correspond to the second pixel, backward mapping the second pixel to the first video frame based on the second location information of the second pixel and the second transverse displacement and the second longitudinal displacement that correspond to the second pixel, and determining, in the first video frame, third location information of a third pixel obtained through the mapping;
determining an error distance between the first pixel and the third pixel based on the first location information of the first pixel and the third location information of the third pixel, and determining, according to the first location information of the first pixel and the second location information of the second pixel, a correlation coefficient between an image block comprising the first pixel and an image block comprising the second pixel; and
determining pixels between which the error distance is less than an error distance threshold and the correlation coefficient is greater than or equal to a correlation coefficient threshold in the pixels as the valid pixels.

### Claim 7 (depends on 4)

The method according to claim 4, wherein the correcting, based on the valid pixels, an initial state matrix corresponding to the first video frame and the forward displacement matrix, to obtain a target state matrix and a target displacement matrix that correspond to the first video frame comprises:
obtaining the initial state matrix corresponding to the first video frame, a state value of each matrix element in the initial state matrix being a first value, each matrix element being corresponding to one pixel in the pixels;
switching state values of matrix elements corresponding to the valid pixels from a first value to a second value in the initial state matrix, and determining the initial state matrix comprising the second value as the target state matrix corresponding to the first video frame; and
setting, in the forward displacement matrix, displacements of matrix elements corresponding to the remaining pixels to the first value, and determining the forward displacement matrix comprising the first value as the target displacement matrix, the remaining pixels being pixels other than the valid pixels.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the setting, in the forward displacement matrix, displacements of matrix elements corresponding to the remaining pixels to the first value, and determining the forward displacement matrix comprising the first value as the target displacement matrix comprises:
when the forward displacement matrix comprises an initial transverse displacement matrix and an initial longitudinal displacement matrix, setting, in the initial transverse displacement matrix, first transverse displacements of the matrix elements corresponding to the remaining pixels to the first value, and determining the initial transverse displacement matrix comprising the first value as a transverse displacement matrix corresponding to the first video frame;
setting, in the initial longitudinal displacement matrix, first longitudinal displacements of the matrix elements corresponding to the remaining pixels to the first value, and determining the initial longitudinal displacement matrix comprising the first value as a longitudinal displacement matrix corresponding to the first video frame; and
determining the transverse displacement matrix corresponding to the first video frame and the longitudinal displacement matrix corresponding to the first video frame as the target displacement matrix.

### Claim 9 (depends on 4)

The method according to claim 4, wherein the determining the average displacement matrix corresponding to the first video frame based on the target state matrix and the target displacement matrix comprises:
performing a displacement integral operation on the target state matrix in the first video frame, to obtain a state integral matrix corresponding to the pixels in the first video frame;
performing a displacement integral operation on a transverse displacement matrix in the target state matrix in the first video frame, to obtain a transverse displacement integral matrix corresponding to the pixels in the first video frame;
performing a displacement integral operation on a longitudinal displacement matrix in the target state matrix in the first video frame, to obtain a longitudinal displacement integral matrix corresponding to the pixels in the first video frame; and
determining, in the first video frame, a differential region corresponding to a displacement differential operation, and determining the average displacement matrix corresponding to the first video frame based on size information of the differential region, the state integral matrix, the transverse displacement integral matrix, and the longitudinal displacement integral matrix.

### Claim 10 (depends on 9)

The method according to claim 9, wherein the determining the average displacement matrix corresponding to the first video frame based on size information of the differential region, the state integral matrix, the transverse displacement integral matrix, and the longitudinal displacement integral matrix comprises:
performing a displacement differential operation on the state integral matrix based on length information and width information that correspond to the differential region, to obtain a state differential matrix corresponding to the first video frame;
performing a displacement differential operation on the transverse displacement integral matrix and the longitudinal displacement integral matrix respectively based on the length information and the width information that correspond to the differential region, to obtain a transverse displacement differential matrix and a longitudinal displacement differential matrix that correspond to the first video frame;
determining a ratio of the transverse displacement differential matrix to the state differential matrix as a transverse average displacement matrix, and determining a ratio of the longitudinal displacement differential matrix to the state differential matrix as a longitudinal average displacement matrix; and
determining the transverse average displacement matrix and the longitudinal average displacement matrix as the average displacement matrix corresponding to the first video frame.

### Claim 11

A computer device, comprising a processor, a memory, and a network interface,
the processor being connected to the memory and the network interface, the network interface being configured to provide a data communication function, the memory being configured to store a computer program, the processor being configured to invoke the computer program to perform:
determining, in response to a trigger operation on a target video, a target pixel in a key video frame of the target video, and obtaining multimedia information associated with the target pixel, the key video frame being a video frame in which the trigger operation is located, and the target pixel being a pixel corresponding to the trigger operation in the key video frame;
identifying a trajectory obtaining request corresponding to the target pixel based on location information of the target pixel in the key video frame;
obtaining, based on the trajectory obtaining request, target trajectory information associated with the location information of the target pixel in the key video frame, the target trajectory information comprising location information of the target pixel in a next video frame following the key video frame, the location information of the target pixel in the next video frame following the key video frame being obtained by tracking the target pixel; and
displaying, when the next video frame following the key video frame is played, the multimedia information based on the location information of the target pixel in the next video frame following the key video frame in the target trajectory information.

### Claim 12

A non-transitory computer-readable storage medium, storing a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, implement a method comprising:
determining, in response to a trigger operation on a target video, a target pixel in a key video frame of the target video, and obtaining multimedia information associated with the target pixel, the key video frame being a video frame in which the trigger operation is located, and the target pixel being a pixel corresponding to the trigger operation in the key video frame;
identifying a trajectory obtaining request corresponding to the target pixel based on location information of the target pixel in the key video frame;
obtaining, based on the trajectory obtaining request, target trajectory information associated with the location information of the target pixel in the key video frame, the target trajectory information comprising location information of the target pixel in a next video frame following the key video frame, the location information of the target pixel in the next video frame following the key video frame being obtained by tracking the target pixel; and
displaying, when the next video frame following the key video frame is played, the multimedia information based on the location information of the target pixel in the next video frame following the key video frame in the target trajectory information.

### Claim 13 (depends on 12)

The computer-readable storage medium according to claim 12, the method further comprising:
obtaining a first video frame and a second video frame adjacent to the first video from the target video;
determining an average displacement matrix corresponding to the first video frame based on an optical flow tracking rule corresponding to the target video, pixels in the first video frame, and pixels in the second video frame;
tracking location information of the pixels in the first video frame based on the average displacement matrix, and determining location information of pixels being tracked in the second video frame; and
generating, based on the location information of the pixels in the first video frame and the location information of the pixels being tracked in the second video frame, trajectory information associated with the target video, the trajectory information comprising the target trajectory information used for tracking and displaying multimedia information associated with the target pixel in the target video.

### Claim 14 (depends on 13)

The computer-readable storage medium according to claim 13, wherein the determining an average displacement matrix corresponding to the first video frame based on an optical flow tracking rule corresponding to the target video, pixels in the first video frame, and pixels in the second video frame comprises:
obtaining the optical flow tracking rule corresponding to the target video, determining the location information of the pixels in the first video frame as first location information, and determining location information of the pixels in the second video frame as second location information;
obtaining a forward displacement matrix corresponding to the first video frame and a backward displacement matrix corresponding to the second video frame based on the optical flow tracking rule, the first location information of the pixels in the first video frame, and the second location information of the pixels in the second video frame;
determining pixels meeting a target screening condition in the pixels as valid pixels based on the first location information of the pixels in the first video frame, the forward displacement matrix, and the backward displacement matrix;
correcting, based on the valid pixels, an initial state matrix corresponding to the first video frame and the forward displacement matrix, to obtain a target state matrix and a target displacement matrix that correspond to the first video frame; and
determining the average displacement matrix corresponding to the first video frame based on the target state matrix and the target displacement matrix.

### Claim 15 (depends on 14)

The computer-readable storage medium according to claim 14, wherein the obtaining a forward displacement matrix corresponding to the first video frame and a backward displacement matrix corresponding to the second video frame based on the optical flow tracking rule, the first location information of the pixels in the first video frame, and the second location information of the pixels in the second video frame comprises:
forward mapping the pixels in the first video frame to the second video frame based on the first location information of the pixels in the first video frame and the optical flow tracking rule;
determining, in the second video frame, second location information of first mapped points obtained through the mapping, and determining the forward displacement matrix corresponding to the first video frame based on the first location information of the pixels and the second location information of the first mapped points;
backward mapping the pixels in the second video frame to the first video frame based on the second location information of the pixels in the second video frame and the optical flow tracking rule; and
determining, in the first video frame, third location information of second mapped points obtained through the mapping, and determining the backward displacement matrix corresponding to the second video frame based on the second location information of the first mapped points and the third location information of the second mapped points.

### Claim 16 (depends on 14)

The computer-readable storage medium according to claim 14, wherein the determining pixels meeting a target screening condition in the pixels as valid pixels based on the first location information of the pixels in the first video frame, the forward displacement matrix, and the backward displacement matrix, comprises:
obtaining a first pixel from the pixels in the first video frame, determining first location information of the first pixel in the first video frame, and determining, in the forward displacement matrix, a first transverse displacement and a first longitudinal displacement that correspond to the first pixel;
forward mapping the first pixel to the second video frame based on the first location information of the first pixel and the first transverse displacement and the first longitudinal displacement that correspond to the first pixel, and determining, in the second video frame, second location information of a second pixel obtained through the mapping;
determining, in the backward displacement matrix, a second transverse displacement and a second longitudinal displacement that correspond to the second pixel, backward mapping the second pixel to the first video frame based on the second location information of the second pixel and the second transverse displacement and the second longitudinal displacement that correspond to the second pixel, and determining, in the first video frame, third location information of a third pixel obtained through the mapping;
determining an error distance between the first pixel and the third pixel based on the first location information of the first pixel and the third location information of the third pixel, and determining, according to the first location information of the first pixel and the second location information of the second pixel, a correlation coefficient between an image block comprising the first pixel and an image block comprising the second pixel; and
determining pixels between which the error distance is less than an error distance threshold and the correlation coefficient is greater than or equal to a correlation coefficient threshold in the pixels as the valid pixels.

### Claim 17 (depends on 14)

The computer-readable storage medium according to claim 14, wherein the correcting, based on the valid pixels, an initial state matrix corresponding to the first video frame and the forward displacement matrix, to obtain a target state matrix and a target displacement matrix that correspond to the first video frame comprises:
obtaining the initial state matrix corresponding to the first video frame, a state value of each matrix element in the initial state matrix being a first value, each matrix element being corresponding to one pixel in the pixels;
switching state values of matrix elements corresponding to the valid pixels from a first value to a second value in the initial state matrix, and determining the initial state matrix comprising the second value as the target state matrix corresponding to the first video frame; and
setting, in the forward displacement matrix, displacements of matrix elements corresponding to the remaining pixels to the first value, and determining the forward displacement matrix comprising the first value as the target displacement matrix, the remaining pixels being pixels other than the valid pixels.

### Claim 18 (depends on 17)

The computer-readable storage medium according to claim 17, wherein the setting, in the forward displacement matrix, displacements of matrix elements corresponding to the remaining pixels to the first value, and determining the forward displacement matrix comprising the first value as the target displacement matrix comprises:
when the forward displacement matrix comprises an initial transverse displacement matrix and an initial longitudinal displacement matrix, setting, in the initial transverse displacement matrix, first transverse displacements of the matrix elements corresponding to the remaining pixels to the first value, and determining the initial transverse displacement matrix comprising the first value as a transverse displacement matrix corresponding to the first video frame;
setting, in the initial longitudinal displacement matrix, first longitudinal displacements of the matrix elements corresponding to the remaining pixels to the first value, and determining the initial longitudinal displacement matrix comprising the first value as a longitudinal displacement matrix corresponding to the first video frame; and
determining the transverse displacement matrix corresponding to the first video frame and the longitudinal displacement matrix corresponding to the first video frame as the target displacement matrix.

### Claim 19 (depends on 14)

The computer-readable storage medium according to claim 14, wherein the determining the average displacement matrix corresponding to the first video frame based on the target state matrix and the target displacement matrix comprises:
performing a displacement integral operation on the target state matrix in the first video frame, to obtain a state integral matrix corresponding to the pixels in the first video frame;
performing a displacement integral operation on a transverse displacement matrix in the target state matrix in the first video frame, to obtain a transverse displacement integral matrix corresponding to the pixels in the first video frame;
performing a displacement integral operation on a longitudinal displacement matrix in the target state matrix in the first video frame, to obtain a longitudinal displacement integral matrix corresponding to the pixels in the first video frame; and
determining, in the first video frame, a differential region corresponding to a displacement differential operation, and determining the average displacement matrix corresponding to the first video frame based on size information of the differential region, the state integral matrix, the transverse displacement integral matrix, and the longitudinal displacement integral matrix.

### Claim 20 (depends on 19)

The computer-readable storage medium according to claim 19, the method further comprising, wherein the determining the average displacement matrix corresponding to the first video frame based on size information of the differential region, the state integral matrix, the transverse displacement integral matrix, and the longitudinal displacement integral matrix comprises:
performing a displacement differential operation on the state integral matrix based on length information and width information that correspond to the differential region, to obtain a state differential matrix corresponding to the first video frame;
performing a displacement differential operation on the transverse displacement integral matrix and the longitudinal displacement integral matrix respectively based on the length information and the width information that correspond to the differential region, to obtain a transverse displacement differential matrix and a longitudinal displacement differential matrix that correspond to the first video frame;
determining a ratio of the transverse displacement differential matrix to the state differential matrix as a transverse average displacement matrix, and determining a ratio of the longitudinal displacement differential matrix to the state differential matrix as a longitudinal average displacement matrix; and
determining the transverse average displacement matrix and the longitudinal average displacement matrix as the average displacement matrix corresponding to the first video frame.
