# US 2022/0046261 A1 · Encoding method and apparatus for screen sharing, storage medium, and electronic device

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

- Number: US 2022/0046261 A1
- Document ID: US20220046261A1
- Status: Published application
- Kind: A1
- Application number: 17/509,687
- Filed: 2021-10-25
- Published: 2022-02-10
- Earliest claimed: 2019-10-08
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Shitao WANG; Shan LIU; Haijun LIU; Qing ZHANG; Jing GUO; Feijian JIN
- Web page: https://patentgrep.com/patent/US20220046261A1

## CPC

- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- H04N 19/103: Selection of coding mode or of prediction mode
- H04N 19/124: Quantisation
- H04N 19/134: characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N 19/14: Coding unit complexity, e.g. amount of activity or edge presence estimation (H04N19/146 takes precedence)
- H04N 19/156: Availability of hardware or computational resources, e.g. encoding based on power-saving criteria
- H04N 19/172: the region being a picture, frame or field
- H04N 19/59: involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An encoding method and apparatus for screen sharing, a storage medium, and an electronic device. The encoding method includes: capturing an original screen video to be encoded, the original screen video including a plurality of frames of screen images; reading image feature parameters of the plurality of frames of screen images in the original screen video; determining video encoding parameters for the original screen video according to the image feature parameters; acquiring screen display resolution of a screen sharing object; and encoding the original screen video according to the video encoding parameters and with reference to the screen display resolution of the screen sharing object. The technical solution according to the embodiments of the disclosure can increase efficiency of encoding for screen sharing.

## Claims

### Claim 1

An encoding method for screen sharing, performed by an electronic device, the method comprising:
capturing an original screen video to be encoded, the original screen video comprising a plurality of frames of screen images;
reading image feature parameters of the plurality of frames of screen images in the original screen video;
determining video encoding parameters for the original screen video according to the image feature parameters;
acquiring screen display resolution of a screen sharing object; and
encoding the original screen video according to the video encoding parameters and with reference to the screen display resolution of the screen sharing object.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the reading image feature parameters specifically comprise at least one of the following:
reading image fingerprint strings of the plurality of frames of screen images in the original screen video;
reading image vector eigenvalues of the plurality of frames of screen images in the original screen video;
reading image color histograms of the plurality of frames of screen images in the original screen video;
reading image pixel grayscale values of the plurality of frames of screen images in the original screen video; and
reading image complexities of the plurality of frames of screen images in the original screen video.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the image feature parameters comprise image fingerprint strings, and
the determining video encoding parameters for the original screen video according to the image feature parameters comprises:
calculating, based on the image fingerprint strings, similarities between adjacent frames of images in the plurality of frames of screen images in the original screen video; and
determining, according to the similarities between the adjacent frames of images, an encoding frame rate for performing video encoding on the original screen video.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the determining, according to the similarities between the adjacent frames of images, comprises:
detecting whether the similarities between the adjacent frames of images are greater than a predetermined threshold; and
determining the encoding frame rate for performing video encoding on the original screen video as 0, in a case that the similarities between the adjacent frames of images are greater than the predetermined threshold.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the image feature parameters comprise image complexities, and
the determining video encoding parameters for the original screen video according to the image feature parameters comprises:
determining, based on an image complexity of a current frame of screen image, a quantization parameter (QP) for performing video encoding on the original screen video.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the determining, based on an image complexity of a current frame of screen image, comprises:
detecting whether the image complexity of the current frame of screen image is greater or less than an image complexity of a previous frame of screen image; and
correspondingly increasing or decreasing the QP for performing video encoding on the original screen video, in a case that the image complexity of the current frame of screen image is greater or less than the image complexity of the previous frame of screen image.

### Claim 7 (depends on 1)

The method according to claim 1, wherein, before the encoding the original screen video, the method further comprises:
acquiring video capture resolution of the original screen video; and
the encoding the original screen video according to the video encoding parameters and with reference to the screen display resolution of the screen sharing object comprises:
detecting whether the video capture resolution is greater than the screen display resolution; and
encoding the original screen video according to the video encoding parameters by using the screen display resolution as a standard in a case that the video capture resolution is greater than the screen display resolution.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the encoding comprises:
recording, during encoding of the original screen video, an encoding time for each frame of screen image in the original screen video;
calculating an average encoding time of first N frames of screen images, wherein N is an integer greater than 0;
determining an encoding mode based on the average encoding time of the first N frames of screen images; and
encoding the original screen video based on the encoding mode and according to the video encoding parameters.

### Claim 9 (depends on 8)

The method according to claim 8, wherein the determining comprises:
detecting whether the average encoding time of the first N frames of screen images is greater than a time threshold;
using hardware encoding as the determined encoding mode in a case that the average encoding time of the first N frames of screen images is greater than the time threshold; and
using software encoding as the determined encoding mode in a case that the average encoding time of the first N frames of screen images is not greater than the time threshold.

### Claim 10

An encoding apparatus for screen sharing, comprising:
at least one memory configured to store computer program code;
at least one processor configured to operate as instructed by the computer program code, the computer program code including:
capturing code configured to cause the at least one processor to capture an original screen video to be encoded, the original screen video comprising a plurality of frames of screen images;
reading code configured to cause the at least one processor to read image feature parameters of the plurality of frames of screen images in the original screen video;
first determining code configured to cause the at least one processor to determine video encoding parameters for the original screen video according to the image feature parameters;
acquiring code configured to cause the at least one processor to acquire screen display resolution of a screen sharing object; and
encoding code configured to cause the at least one processor to encode the original screen video according to the video encoding parameters and with reference to the screen display resolution of the screen sharing object.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the reading code specifically comprises at least one of the following:
reading image fingerprint strings of the plurality of frames of screen images in the original screen video;
reading image vector eigenvalues of the plurality of frames of screen images in the original screen video;
reading image color histograms of the plurality of frames of screen images in the original screen video;
reading image pixel grayscale values of the plurality of frames of screen images in the original screen video; and
reading image complexities of the plurality of frames of screen images in the original screen video.

### Claim 12 (depends on 10)

The apparatus according to claim 10, wherein the image feature parameters comprise image fingerprint strings, and
the first determining code is further comprises:
calculating code configured to cause the at least one processor to calculate, based on the image fingerprint strings, similarities between adjacent frames of images in the plurality of frames of screen images in the original screen video; and
second determining code configured to cause the at least one processor to determine, according to the similarities between the adjacent frames of images, an encoding frame rate for performing video encoding on the original screen video.

### Claim 13 (depends on 12)

The apparatus according to claim 12, wherein the second determining code is further configured to cause the at least processor to:
detect whether the similarities between the adjacent frames of images are greater than a predetermined threshold; and
determine the encoding frame rate for performing video encoding on the original screen video as 0, in a case that the similarities between the adjacent frames of images are greater than the predetermined threshold.

### Claim 14 (depends on 10)

The apparatus according to claim 10, wherein the image feature parameters comprise image complexities, and
the first determining code further comprises:
third determining code configured to cause the at least one processor to determine, based on an image complexity of a current frame of screen image, a quantization parameter (QP) for performing video encoding on the original screen video.

### Claim 15 (depends on 14)

The apparatus according to claim 14, wherein the third determining code is further configured to cause the at least one processor to:
detect whether the image complexity of the current frame of screen image is greater or less than an image complexity of a previous frame of screen image; and
correspondingly increase or decrease the QP for performing video encoding on the original screen video, in a case that the image complexity of the current frame of screen image is greater or less than the image complexity of the previous frame of screen image.

### Claim 16 (depends on 10)

The apparatus according to claim 10, wherein, before the encoding the original screen video, the apparatus further comprises:
acquiring video capture resolution of the original screen video; and
the encoding code is further configured to cause the at least one processor to:
detect whether the video capture resolution is greater than the screen display resolution; and
encode the original screen video according to the video encoding parameters by using the screen display resolution as a standard in a case that the video capture resolution is greater than the screen display resolution.

### Claim 17 (depends on 10)

The apparatus according to claim 10, wherein the encoding code is further comprises:
recording code configured to cause that at least one processor to record, during encoding of the original screen video, an encoding time for each frame of screen image in the original screen video;
calculating code configured to cause the at least one processor to calculate an average encoding time of first N frames of screen images, wherein N is an integer greater than 0;
fourth determining code configured to cause the at least one processor to determine an encoding mode based on the average encoding time of the first N frames of screen images; and
second encoding code configured to cause the at least one processor to encode the original screen video based on the encoding mode and according to the video encoding parameters.

### Claim 18 (depends on 17)

The apparatus according to claim 17, wherein the fourth determining code is configured to cause the at least one processor to:
detect whether the average encoding time of the first N frames of screen images is greater than a time threshold;
use hardware encoding as the determined encoding mode in a case that the average encoding time of the first N frames of screen images is greater than the time threshold; and
use software encoding as the determined encoding mode in a case that the average encoding time of the first N frames of screen images is not greater than the time threshold.

### Claim 19

A nontransitory computer-readable memory storage medium, storing a computer code that when executed by at least one processor causes the at least one processor to:
capture an original screen video to be encoded, the original screen video comprising a plurality of frames of screen images;
read image feature parameters of the plurality of frames of screen images in the original screen video;
determine video encoding parameters for the original screen video according to the image feature parameters;
acquire screen display resolution of a screen sharing object; and
encode the original screen video according to the video encoding parameters and with reference to the screen display resolution of the screen sharing object.

### Claim 20 (depends on 19)

The memory storage medium according to claim 19, wherein the read image feature parameters specifically comprises at least one of the following:
reading image fingerprint strings of the plurality of frames of screen images in the original screen video;
reading image vector eigenvalues of the plurality of frames of screen images in the original screen video;
reading image color histograms of the plurality of frames of screen images in the original screen video;
reading image pixel grayscale values of the plurality of frames of screen images in the original screen video; and
reading image complexities of the plurality of frames of screen images in the original screen video.
