Video processing collaboration method, apparatus, device, and storage medium
A video processing collaboration method includes transmitting a video processing capability request and a video analysis capability request to a terminal device, receiving video processing capability information and video analysis capability information from the terminal device based on the video processing capability request and the video analysis capability request, determining a video processing collaboration configuration based on the video processing capability information and a video analysis collaboration configuration based on the video analysis capability information, allocating an image processing task to the terminal device, to the cloud server, or to both the terminal device and the cloud server, based on the video processing collaboration configuration, and allocating an image analysis task to the terminal device, to the cloud server, or to both the terminal device and the cloud server, based on the video analysis collaboration configuration.
1 . A video processing collaboration method, performed by a cloud server, the video processing collaboration method comprising:
transmitting a video processing capability request and a video analysis capability request to a terminal device;
receiving video processing capability information and video analysis capability information from the terminal device based on the video processing capability request and the video analysis capability request;
determining a video processing collaboration configuration based on the video processing capability information and a video analysis collaboration configuration based on the video analysis capability information;
allocating at least one image processing task to the terminal device, to the cloud server, or to both the terminal device and the cloud server, based on the video processing collaboration configuration, and
allocating at least one image analysis task to the terminal device, to the cloud server, or to both the terminal device and the cloud server, based on the video analysis collaboration configuration,
wherein the determining the video analysis collaboration configuration comprises:
determining whether the terminal device meets a software capability condition or a hardware capability condition, based on the video analysis capability information; and
determining whether an image analysis algorithm used when the terminal device executes an image analysis task meets a performance requirement of a target video corresponding to the at least one image analysis task.
2 . The video processing collaboration method according to claim 1 , wherein determining the video processing collaboration configuration includes:
based on the video processing capability information indicating that the terminal device has a full video processing capability for the at least one image processing task, generating the video processing collaboration configuration that allocates the at least one image processing task to the terminal device;
based on the video processing capability information indicating that the terminal device has a local video processing capability for the at least one image processing task, generating the video processing collaboration configuration that allocates the at least one image processing task to both the terminal device and the cloud server; and
based on the video processing capability information indicating that the terminal device does not having the video processing capability, generating the video processing collaboration configuration that allocates the at least one image processing task to the cloud server.
3 . The video processing collaboration method according to claim 1 , wherein determining the video analysis collaboration configuration includes:
based on the video analysis capability information indicating that the terminal device has a full video analysis capability for the at least one image analysis task, generating the video analysis collaboration configuration that allocates the at least one image analysis task to the terminal device; and
based on the video analysis capability information indicating that the terminal device has the full video analysis capability for the at least one image analysis task, generating the video analysis collaboration configuration that allocates the at least one image analysis task to the cloud server.
4 . The video processing collaboration method according to claim 3 , wherein the determination on whether the image analysis algorithm used when the terminal device executes the image analysis task meets the performance requirement of the target video corresponding to the at least one image analysis task is based on the determination on the terminal device meets the software capability condition or the hardware capability condition.
5 . The video processing collaboration method according to claim 4 , wherein determining whether the image analysis algorithm meets the performance requirement of the target video includes:
determining that the image analysis algorithm meets the performance requirement when a performance of the image analysis algorithm meets a resolution requirement and a frame rate requirement of the target video, and
determining that the image analysis algorithm does not meet the performance requirement when the performance of the image analysis algorithm does not meet the resolution requirement or does not meet the frame rate requirement of the target video.
6 . The video processing collaboration method according to claim 1 , further comprising:
transmitting an identifier of a first image analysis task and first indication information to the terminal device when the video analysis collaboration configuration allocates the at least one image analysis task to the terminal device,
wherein the first image analysis task is allocated to the terminal device, and the first indication information indicates to the terminal device to perform image analysis on the allocated at least one image analysis task.
7 . The video processing collaboration method according to claim 1 , wherein before determining the video analysis collaboration configuration, the video processing collaboration method further comprises obtaining a code attribute of the at least one image analysis task, and
wherein the video analysis collaboration configuration is determined based on the code attribute of the at least one image analysis task and the video analysis capability information of the terminal device.
8 . The video processing collaboration method according to claim 7 , wherein determining the video analysis collaboration configuration based on the code attribute comprises:
based on determining that an image analysis task that is to be allocated to the cloud server exists in the at least one image analysis task, allocating the image analysis task to the cloud server, and determining whether a remaining image analysis task exists in the at least one image analysis task;
determining a video analysis collaboration configuration for the remaining image analysis task when the remaining image analysis task exists, and
determining the video analysis collaboration configuration based on the video analysis capability information when the image analysis task that is to be allocated to the cloud server does not exist in the at least one image analysis task.
9 . The video processing collaboration method according to claim 8 , wherein the video processing collaboration method further comprises:
determining, as the image analysis task that is to be allocated to the cloud server, an image analysis task in the at least one image analysis task whose code attribute meets a preset condition.
10 . The video processing collaboration method according to claim 9 , wherein the code attribute comprises a coding quality; and when the coding quality of the image analysis task is greater than a preset coding quality threshold, determining that the code attribute of the image analysis task meets the preset condition.
11 . A video processing collaboration apparatus, comprising:
at least one memory configured to store computer program code; and
at least one processor configured to operate as instructed by the computer program code, the computer program code comprising:
transmitting code configured to cause the at least one processor to transmit a video processing capability request and a video analysis capability request to a terminal device;
receiving code configured to cause the at least one processor to receive video processing capability information and video analysis capability information from the terminal device based on the video processing capability request and the video analysis capability request;
determining code configured to cause the at least one processor to determine a video processing collaboration configuration based on the video processing capability information and a video analysis collaboration configuration based on the video analysis capability information;
first allocating code configured to cause the at least one processor to allocate at least one image processing task to the terminal device, to a cloud server, or to both the terminal device and the cloud server, based on the video processing collaboration configuration, and
second allocating code configured to cause the at least one processor to allocate at least one image analysis task to the terminal device, to the cloud server, or to both the terminal device and the cloud server, based on the video analysis collaboration configuration,
wherein the determining code is configured to further cause the at least one processor to:
determine whether the terminal device meets a software capability condition or a hardware capability condition, based on the video analysis capability information; and
determine whether an image analysis algorithm used when the terminal device executes an image analysis task meets a performance requirement of a target video corresponding to the at least one image analysis task.
12 . The video processing collaboration apparatus according to claim 11 , wherein the determining code is further configured to cause the at least one processor to:
based on the video processing capability information indicating that the terminal device has a full video processing capability for the at least one image processing task, generate the video processing collaboration configuration that allocates the at least one image processing task to the terminal device;
based on the video processing capability information indicating that the terminal device has a local video processing capability for the at least one image processing task, generate the video processing collaboration configuration that allocates the at least one image processing task to both the terminal device and the cloud server; and
based on the video processing capability information indicating that the terminal device does not having the video processing capability, generate the video processing collaboration configuration that allocates the at least one image processing task to the cloud server.
13 . The video processing collaboration apparatus according to claim 11 , wherein the determining code is further configured to cause the at least one processor to:
based on the video analysis capability information indicating that the terminal device has a full video analysis capability for the at least one image analysis task, generate the video analysis collaboration configuration that allocates the at least one image analysis task to the terminal device; and
based on the video analysis capability information indicating that the terminal device has the full video analysis capability for the at least one image analysis task, generate the video analysis collaboration configuration that allocates the at least one image analysis task to the cloud server.
14 . The video processing collaboration apparatus according to claim 13 , wherein the determination on whether the image analysis algorithm used when the terminal device executes the image analysis task meets the performance requirement of the target video corresponding to the at least one image analysis task is based on the determination on the terminal device meets the software capability condition or the hardware capability condition.
15 . The video processing collaboration apparatus according to claim 14 , wherein the determining code is configured to further cause the at least one processor to:
determine that the image analysis algorithm meets the performance requirement when a performance of the image analysis algorithm meets a resolution requirement and a frame rate requirement of the target video, and
determine that the image analysis algorithm does not meet the performance requirement when the performance of the image analysis algorithm does not meet the resolution requirement or does not meet the frame rate requirement of the target video.
16 . The video processing collaboration apparatus according to claim 11 , wherein the receiving code is further configured to cause the at least one processor to obtain a code attribute of the at least one image analysis task, and
wherein the video analysis collaboration configuration is determined based on the code attribute of the at least one image analysis task and the video analysis capability information of the terminal device.
17 . The video processing collaboration apparatus according to claim 16 , wherein determining the video analysis collaboration configuration based on the code attribute comprises:
based on determining that an image analysis task that is to be allocated to the cloud server exists in the at least one image analysis task, allocating the image analysis task to the cloud server, and determining whether a remaining image analysis task exists in the at least one image analysis task;
determining a video analysis collaboration configuration for the remaining image analysis task when the remaining image analysis task exists, and
determining the video analysis collaboration configuration based on the video analysis capability information when the image analysis task that is to be allocated to the cloud server does not exist in the at least one image analysis task.
18 . The video processing collaboration apparatus according to claim 17 , wherein the determining code is further configured to cause the at least one processor to:
determine, as the image analysis task that is to be allocated to the cloud server, an image analysis task in the at least one image analysis task whose code attribute meets a preset condition.
19 . The video processing collaboration apparatus according to claim 18 , wherein the code attribute comprises a coding quality; and when the coding quality of the image analysis task is greater than a preset coding quality threshold, determining that the code attribute of the image analysis task meets the preset condition.
20 . A non-transitory computer-readable-medium having stored thereon a computer program for video processing, the computer program configured to cause one or more computer processors to:
transmit a video processing capability request and a video analysis capability request to a terminal device;
receive video processing capability information and video analysis capability information from the terminal device based on the video processing capability request and the video analysis capability request;
determine a video processing collaboration configuration based on the video processing capability information and a video analysis collaboration configuration based on the video analysis capability information;
allocate at least one image processing task to the terminal device, to a cloud server, or to both the terminal device and the cloud server, based on the video processing collaboration configuration, and
allocate at least one image analysis task to the terminal device, to the cloud server, or to both the terminal device and the cloud server, based on the video analysis collaboration configuration,
wherein the video analysis collaboration configuration is determined based on:
a determination on whether the terminal device meets a software capability condition or a hardware capability condition, based on the video analysis capability information; and
a determination on whether an image analysis algorithm used when the terminal device executes an image analysis task meets a performance requirement of a target video corresponding to the at least one image analysis task.