Coding acceleration method, device, server and system

文档序号:1864733 发布日期:2021-11-19 浏览:2次 中文

阅读说明:本技术 编码加速方法、设备、服务器及系统 (Coding acceleration method, device, server and system ) 是由 李魁 于 2021-07-14 设计创作,主要内容包括:本公开提供一种编码加速方法、设备、服务器及系统,涉及图像技术领域,所述方法包括在检测到接收端设备接入显示设备时,获取显示设备的当前显示参数;确定物理显卡是否支持显示设备的显示需求;在未支持显示设备的显示需求时,向编码服务器发送显卡资源请求,使得编码服务器向源端设备发送目标显卡资源;根据目标显卡资源和物理显卡的资源对待编码数据进行编码。本公开实现了在不需要更换物理显卡的情况下,提升源端设备端的编码能力的灵活性,同时给用户带来极大的方便。(The invention provides a coding acceleration method, a device, a server and a system, which relate to the technical field of images, wherein the method comprises the steps of acquiring current display parameters of display equipment when detecting that receiving end equipment is connected to the display equipment; determining whether the physical display card supports the display requirement of the display equipment; when the display requirement of the display equipment is not supported, a display card resource request is sent to the coding server, so that the coding server sends a target display card resource to the source end equipment; and coding the data to be coded according to the target display card resources and the resources of the physical display card. The method and the device realize the flexibility of the coding capability of the source end equipment end under the condition that the physical display card does not need to be replaced, and bring great convenience to users.)

1. A coding acceleration method applied to a source device, the method comprising:

when detecting that a receiving terminal device is accessed to a display device, acquiring current display parameters of the display device;

determining whether the physical display card supports the display requirement of the display equipment according to the current display parameter and all display mode parameters supported by the physical display card of the source end equipment;

when it is determined that the physical display card does not support the display requirement of the display device, sending a display card resource request to an encoding server, so that the encoding server sends a target display card resource to the source end device;

receiving the target display card resource sent by the coding server;

and encoding the data to be encoded according to the target display card resources and the resources of the physical display card.

2. The method of claim 1, wherein sending the graphics card resource request to the encoding server comprises:

acquiring the current resource occupancy rate of the physical display card;

and when the current resource occupancy rate is determined to be greater than a first preset threshold value, sending the video card resource request to the coding server.

3. The method of claim 1, wherein the receiving the target graphics card resource sent by the encoding server comprises:

receiving a first preset unit of display card resource sent by the coding server each time;

determining the current resource occupancy rate of the physical display card according to the display card resources of the first preset unit;

and sending the current resource occupancy rate to the coding server, so that the coding server determines whether to continuously send the video card resources of the first preset unit to the source end device according to the current resource occupancy rate.

4. The method of claim 3, further comprising:

receiving a resource return instruction sent by the coding server; the resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit;

and responding to the resource returning instruction, and returning the display card resources of a second preset unit to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value.

5. The method of claim 1, further comprising:

and when the display requirement of the display equipment supported by the physical display card is determined, encoding data to be encoded according to the resources of the physical display card.

6. The method of claim 1, wherein after encoding the data to be encoded according to the resources of the target graphics card and the resources of the physical graphics card, the method further comprises:

determining whether the current display parameter changes;

when the current display parameters are determined to be changed, determining whether the physical display card supports the display requirements of the display equipment according to the changed current display parameters;

and when the fact that the physical display card supports the display requirement of the display equipment is determined, a display card resource release request is sent to the coding server, so that the coding server stores the target display card resource into a resource pool again.

7. The method of claim 1, wherein the current display parameters comprise a current display resolution and a current display frame rate, and wherein the display mode parameters comprise a resolution and a frame rate of the physical graphics card.

8. A coding acceleration method is applied to a coding server, and comprises the following steps:

receiving a display card resource request sent by source-end equipment;

and sending the target display card resource to the source terminal equipment, so that the source terminal equipment encodes the data to be encoded according to the target display card resource and the resource of the display card.

9. The method of claim 8, wherein sending target graphics card resources to the source device comprises:

sending a first preset unit of display card resources to the source end equipment each time according to a first preset frequency;

after the display resources of the first preset unit are sent each time, receiving the current resource occupancy rate of the display card sent by the source end device;

when the current resource occupancy rate is determined to be greater than the first preset threshold, continuously sending the first preset unit of display card resources to the source end device, and stopping sending the first preset unit of display card resources to the source end device until the current resource occupancy rate is less than the first preset threshold.

10. The method of claim 9, after the stopping sending the first preset unit of graphics card resources to the source device, further comprising:

monitoring the current resource occupancy rate of the physical display card;

when the current resource occupancy rate is determined to be smaller than a second preset threshold value, sending a resource return instruction to the source end equipment; the resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit;

and receiving a second preset unit of display card resource returned by the source terminal equipment.

11. A source device, comprising:

the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring the current display parameters of the display device when the receiving end device is detected to be accessed to the display device;

a first determining module, configured to determine whether a physical display card supports a display requirement of the display device according to the current display parameter and all display mode parameters supported by the physical display card of the source device;

a first sending module, configured to send a display card resource request to an encoding server when it is determined that the physical display card does not support the display requirement of the display device, so that the encoding server sends a target display card resource to the source device;

the first receiving module is used for receiving the target display card resource sent by the coding server;

and the first coding module is used for coding the data to be coded according to the target display card resources and the resources of the physical display card.

12. An encoding server, comprising:

the second receiving module is used for receiving a display card resource request sent by the source end device;

and the second sending module is used for sending the target display card resource to the source end equipment, so that the source end equipment encodes the data to be encoded according to the target display card resource and the resource of the display card.

13. A code acceleration system, characterized by comprising at least one sink device, at least one source device of claim 11, and a code server of claim 12.

Technical Field

The present disclosure relates to the field of image technologies, and in particular, to a method, an apparatus, a server, and a system for encoding acceleration.

Background

The basic structure of a conventional VDI (Virtual Desktop Infrastructure) system can be referred to fig. 1. As shown in fig. 1, the system mainly includes a zero terminal (referred to as an R terminal for short) and a cloud server terminal (referred to as an S terminal for short). The R end is used for receiving a virtual desktop image from the cloud end, transmitting local mouse and keyboard information to the cloud end in a reverse mode, injecting the local mouse and keyboard information into a cloud desktop corresponding to the current R end through the cloud end, and generating the virtual desktop image for a virtual machine or a physical machine distributed by the current zero terminal through a cloud server; the S end is an image acquisition and coding module running in the cloud virtual operating system and is responsible for performing the function of injecting data input by a user. Currently, as the display requirements of users continuously increase, the requirements for rendering resources on the cloud server side also increase more and more.

In the related art, if the display card resources of the cloud server cannot meet the display requirements of the display device connected by the user, the physical device (display card) of the cloud server usually needs to be continuously replaced to meet the display requirements, so that the mode of continuously replacing the display card is rigid, and great inconvenience is brought to the user.

Disclosure of Invention

The embodiment of the disclosure provides a coding acceleration method, a server and a system, which can solve the problems that the mode of continuously replacing a display card is rigid and great inconvenience is brought to a user in the prior art. The technical scheme is as follows:

according to a first aspect of the embodiments of the present disclosure, there is provided a coding acceleration method applied to a source device, where the method includes:

when detecting that a receiving terminal device is accessed to a display device, acquiring current display parameters of the display device;

determining whether the physical display card supports the display requirement of the display equipment according to the current display parameter and all display mode parameters supported by the physical display card of the source end equipment;

when it is determined that the physical display card does not support the display requirement of the display device, sending a display card resource request to an encoding server, so that the encoding server sends a target display card resource to the source end device;

receiving the target display card resource sent by the coding server;

and encoding the data to be encoded according to the target display card resources and the resources of the physical display card.

The embodiment of the disclosure provides a coding acceleration method, which determines whether a display card supports the display requirement of a display device according to current display parameters of the display device and all display mode parameters supported by the display card of a source device, and sends a display card resource request to a coding server when determining that the display card does not support the display requirement of the display device, so that the coding server sends a target display card resource to the source device, and thus the source device can code coded data according to the target display card resource and the resource of a physical display card, thereby improving the flexibility of the coding capability of the source device without replacing the physical display card, and bringing great convenience to a user.

In one embodiment, the sending the display card resource request to the encoding server includes:

acquiring the current resource occupancy rate of the physical display card;

and when the current resource occupancy rate is determined to be greater than a first preset threshold value, sending the video card resource request to the coding server.

In one embodiment, the receiving the target graphics card resource sent by the encoding server includes:

receiving a first preset unit of display card resource sent by the coding server each time;

determining the current resource occupancy rate of the physical display card according to the display card resources of the first preset unit;

and sending the current resource occupancy rate to the coding server, so that the coding server determines whether to continuously send the video card resources of the first preset unit to the source end device according to the current resource occupancy rate.

In one embodiment, further comprising:

receiving a resource return instruction sent by the coding server; the resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit;

and responding to the resource returning instruction, and returning the display card resources of a second preset unit to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value.

In one embodiment, further comprising:

and when the display requirement of the display equipment supported by the physical display card is determined, encoding data to be encoded according to the resources of the physical display card.

In one embodiment, after the encoding the data to be encoded according to the target graphics card resource and the resource of the physical graphics card, the method further includes:

determining whether the current display parameter changes;

when the current display parameters are determined to be changed, determining whether the physical display card supports the display requirements of the display equipment according to the changed current display parameters;

and when the fact that the physical display card supports the display requirement of the display equipment is determined, a display card resource release request is sent to the coding server, so that the coding server stores the target display card resource into a resource pool again.

In one embodiment, the current display parameters include a current display resolution and a current display frame rate, and the display mode parameters include a resolution and a frame rate of the physical display card.

According to a second aspect of the embodiments of the present disclosure, there is provided an encoding acceleration method applied to an encoding server, the method including:

receiving a display card resource request sent by source-end equipment;

and sending the target display card resource to the source terminal equipment, so that the source terminal equipment encodes the data to be encoded according to the target display card resource and the resource of the display card.

In one embodiment, the sending the target graphics card resource to the source device includes:

sending a first preset unit of display card resources to the source end equipment each time according to a first preset frequency;

after the display resources of the first preset unit are sent each time, receiving the current resource occupancy rate of the display card sent by the source end device;

when the current resource occupancy rate is determined to be greater than the first preset threshold, continuously sending the first preset unit of display card resources to the source end device, and stopping sending the first preset unit of display card resources to the source end device until the current resource occupancy rate is less than the first preset threshold.

In one embodiment, after the stopping sending the first preset unit of video card resources to the source device, the method further includes:

monitoring the current resource occupancy rate of the physical display card;

when the current resource occupancy rate is determined to be smaller than a second preset threshold value, sending a resource return instruction to the source end equipment; the resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit;

and receiving a second preset unit of display card resource returned by the source terminal equipment.

According to a third aspect of the embodiments of the present disclosure, there is provided a source device, including:

the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring the current display parameters of the display device when the receiving end device is detected to be accessed to the display device;

a first determining module, configured to determine whether a physical display card supports a display requirement of the display device according to the current display parameter and all display mode parameters supported by the physical display card of the source device;

a first sending module, configured to send a display card resource request to an encoding server when it is determined that the physical display card does not support the display requirement of the display device, so that the encoding server sends a target display card resource to the source device;

the first receiving module is used for receiving the target display card resource sent by the coding server;

and the first coding module is used for coding the data to be coded according to the target display card resources and the resources of the physical display card.

In one embodiment, the first sending module comprises an obtaining submodule and a first sending submodule;

the acquisition submodule is used for acquiring the current resource occupancy rate of the physical display card;

and the first sending submodule is used for sending the display card resource request to the coding server when the current resource occupancy rate is determined to be greater than a first preset threshold value.

In one embodiment, the first receiving module comprises a first receiving submodule, a determining submodule and a second sending submodule;

the first receiving submodule is used for receiving the first preset unit of display card resources sent by the coding server each time;

the determining submodule is used for determining the current resource occupancy rate of the physical display card according to the display card resources of the first preset unit;

the second sending submodule is configured to send the current resource occupancy rate to the coding server, so that the coding server determines whether to continue to send the video card resources of the first preset unit to the source end device according to the current resource occupancy rate.

In one embodiment, the apparatus further comprises a third receiving module and a returning module;

the third receiving module is configured to receive a resource return instruction sent by the encoding server; the resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit;

and the return module is used for responding to the resource return instruction and returning the display card resources of a second preset unit to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value.

In one embodiment, the apparatus further comprises a second encoding module;

and the second coding module is used for coding the data to be coded according to the resources of the physical display card when the display requirement of the display equipment supported by the physical display card is determined.

In one embodiment, the apparatus further comprises a second determining module, a third determining module, and a third sending module;

the second determining module is configured to determine whether the current display parameter changes;

the third determining module is configured to determine, when it is determined that the current display parameter changes, whether the physical display card supports the display requirement of the display device according to the changed current display parameter;

the third sending module is configured to send a display card resource release request to the coding server when it is determined that the physical display card supports the display requirement of the display device, so that the coding server stores the target display card resource in a resource pool again.

In one embodiment, the current display parameters include a current display resolution and a current display frame rate, and the display mode parameters include a resolution and a frame rate of the physical display card.

According to a fourth aspect of the embodiments of the present disclosure, there is provided an encoding server including:

the second receiving module is used for receiving a display card resource request sent by the source end device;

and the second sending module is used for sending the target display card resource to the source end equipment, so that the source end equipment encodes the data to be encoded according to the target display card resource and the resource of the display card.

In one embodiment, the second sending module comprises a third sending submodule, a second receiving submodule and a fourth sending submodule;

the third sending submodule is configured to send, to the source end device, video card resources of a first preset unit each time according to a first preset frequency;

the second receiving submodule is configured to receive the current resource occupancy rate of the display card sent by the source end device after sending the first preset unit of display resources each time;

the fourth sending submodule is configured to, when it is determined that the current resource occupancy rate is greater than the first preset threshold, continuously send the first preset unit of video card resources to the source end device, and stop sending the first preset unit of video card resources to the source end device until the current resource occupancy rate is less than the first preset threshold.

In one embodiment, the encoding server further comprises a monitoring module, a fourth sending module and a third receiving module;

the monitoring module is used for monitoring the current resource occupancy rate of the physical display card;

the fourth sending module is configured to send a resource return instruction to the source end device when it is determined that the current resource occupancy rate is smaller than a second preset threshold; the resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit;

and the third receiving module is configured to receive the display card resources of the second preset unit returned by the source end device.

According to a fifth aspect of the embodiments of the present disclosure, there is provided a coding acceleration system, which includes at least one sink device, at least one source device described in any one of the above embodiments, and a coding server described in any one of the above embodiments.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.

FIG. 1 is a schematic diagram of a VDI system of the prior art;

fig. 2 is a flowchart of a coding acceleration method provided by an embodiment of the present disclosure;

fig. 3 is a schematic diagram of an effective mode list of a physical graphics card of a source device according to an embodiment of the present disclosure;

fig. 4 is a flowchart of a coding acceleration method provided by an embodiment of the present disclosure;

fig. 5 is a flowchart of a coding acceleration method provided by an embodiment of the present disclosure;

fig. 6 is a flowchart of a coding acceleration method provided by an embodiment of the present disclosure;

fig. 7 is an interaction diagram of a coding acceleration method provided by an embodiment of the present disclosure;

fig. 8a is a block diagram of a source device provided in an embodiment of the present disclosure;

fig. 8b is a block diagram of a source device according to an embodiment of the present disclosure;

fig. 8c is a block diagram of a source device according to an embodiment of the present disclosure;

fig. 8d is a block diagram of a source device according to an embodiment of the present disclosure;

fig. 8e is a structural diagram of a source device according to an embodiment of the present disclosure;

fig. 8f is a block diagram of a source device according to an embodiment of the present disclosure;

fig. 9a is a block diagram of an encoding server provided in an embodiment of the present disclosure;

fig. 9b is a block diagram of an encoding server provided by an embodiment of the present disclosure;

fig. 9c is a block diagram of an encoding server provided by an embodiment of the present disclosure;

fig. 10 is a block diagram of a coding acceleration system according to an embodiment of the present disclosure.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

The embodiment of the present disclosure provides a coding acceleration method, which is applied to a source device, and as shown in fig. 2, the method includes the following steps:

step 201, when it is detected that the receiving end device is accessed to the display device, obtaining the current display parameters of the display device.

Wherein the current display parameters include a current display resolution and a current display frame rate.

For example, the source device includes a virtual machine or a physical machine, the virtual machine runs on a cloud server, the physical machine may be a cloud server, the virtual machine or the physical machine establishes a connection with the receiving end device, and when the receiving end device corresponding to the virtual machine or the physical machine accesses a display device (for example, a display), the receiving end device feeds back the detected Extended Display Identification Data (EDID) to the corresponding virtual machine or physical machine, so that the virtual machine or the physical machine obtains current display parameters of the display device, where the current display parameters include a current display resolution and a current display frame rate.

It should be noted that the resolution and the display frame rate of the display device set by the user may be the maximum display resolution and the maximum display frame rate of the display device, or may be values smaller than the maximum display resolution and the maximum display frame rate, which is not limited in this disclosure.

It should be noted that the purpose of obtaining the current display resolution and the current display frame rate is to implement super-resolution display, for example, a 4K144 display is accessed on a receiving end device, whereas in terms of the existing capability, the S end can only display the resolution and the frame rate of 1K 144 at most, and at this time, if the receiving end device performs resolution and frame rate negotiation with the S end, it can only negotiate the resolution and the frame rate of 1K 144 with the S end at most, which obviously cannot meet the display requirement of the display of the receiving end device, and therefore, the main purpose of the present disclosure is to accelerate by a coding server, so that the receiving end device can negotiate the resolution and the frame rate (e.g., 4K144) as high as possible.

Step 202, determining whether the physical display card supports the display requirement of the display device according to the current display parameter and all display mode parameters supported by the physical display card of the source device.

Wherein the display mode parameters include a resolution and a frame rate of the physical display card.

For example, when the current display parameter of the display device is obtained, searching an effective mode list of a physical display card of the source device, as shown in fig. 3, where all display mode parameters of the physical display card are stored in the effective mode list, and the display mode parameters include a resolution and a frame rate, therefore, if the current display resolution and the current display frame rate of the display device are in the effective mode list of the physical display card of the source device, it is determined that the physical display card supports the display requirement of the display device; if the current display resolution and the current display frame rate of the display device are not found in the effective mode list, it indicates that the physical display card cannot support the display requirement of the display device.

Step 203, when it is determined that the physical display card does not support the display requirement of the display device, sending a display card resource request to an encoding server, so that the encoding server sends a target display card resource to the source device.

Optionally, acquiring the current resource occupancy rate of the physical display card; and when the current resource occupancy rate is determined to be greater than a first preset threshold value, sending the video card resource request to the coding server.

Illustratively, when it is determined that the physical graphics card does not support the display requirement of the display device, the current resource occupancy rate of the physical graphics card is continuously monitored, the current resource occupancy rate is compared with a first preset threshold, and when it is determined that the current resource occupancy rate is greater than the first preset threshold, it is indicated that the current remaining graphics card resources of the physical graphics card are insufficient, at this time, a graphics card resource request is sent to the encoding server for requesting graphics card resources, and the encoding server divides the local graphics card resources in advance, for example, by taking 0.1 as a unit, so that when the graphics card resource request is received, a predetermined number of target graphics card resources can be directly allocated to the source end device.

And step 204, receiving the target display card resource sent by the coding server.

Optionally, a first preset unit of display card resources sent by the encoding server each time is received; determining the current resource occupancy rate of the physical display card according to the display card resources of the first preset unit; and sending the current resource occupancy rate to the coding server, so that the coding server determines whether to continuously send the video card resources of the first preset unit to the source end device according to the current resource occupancy rate.

For example, the method for allocating the predetermined number of target video card resources to the source device by the encoding server may specifically adopt the following method: the method comprises the steps that a coding server allocates resources of a first preset unit of display card to a source end device each time, when the source end device receives the resources of the first preset unit of display card, the resources of the first preset unit of display card and the residual resources of a physical display card are added to obtain the current resource occupancy rate of the physical display card, the current resource occupancy rate of the physical display card is fed back to the coding server in real time, when the coding server determines that the current resource occupancy rate of the physical display card is larger than a first preset threshold value, the resources of the first preset unit of display card are allocated to the source end device continuously until the current resource occupancy rate of the physical display card of the source end device is smaller than the first preset threshold value, and the resources of the first preset unit of display card are stopped being allocated to the source end device continuously.

Further, receiving a resource return instruction sent by the coding server; the resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; and responding to the resource returning instruction, and returning the display card resources of a second preset unit to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value.

Wherein the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit.

Illustratively, in the process of encoding by the source end device, the resource occupancy rate of the display card of the source end device is in a dynamic change, so the encoding server needs to continuously monitor the current resource occupancy rate of the physical display card of the source end device in real time, when it is determined that the current resource occupancy rate of the physical display card is smaller than a second preset threshold, it indicates that there is a surplus of resources of the physical display card of the source end device, at this time, a resource return instruction is sent to the source end device, that is, the source end device is controlled to return second preset unit of display card resources to the encoding server, and the current resource occupancy rate of the physical display card is fed back to the encoding server in real time, when it is determined that the current resource occupancy rate of the physical display card is smaller than the second preset threshold, the encoding server continuously controls the source end device to return second preset unit of display card resources to the encoding server until the current resource occupancy rate of the physical display card of the source end device is larger than the second preset threshold, and prohibiting the source terminal equipment from returning the video card resource to the encoding terminal equipment, and storing the returned video card resource in the resource pool by the encoding server.

And 205, encoding the data to be encoded according to the target display card resources and the resources of the physical display card.

For example, when receiving the target graphics card resource, the source device may encode the data to be encoded according to a combination of the remaining resource of the physical graphics card and the target graphics card resource, so as to accelerate encoding.

Further, as shown in fig. 4, when it is determined that the physical graphics card supports the display requirement of the display device, the method further includes the following step 206:

and step 206, when it is determined that the physical display card supports the display requirement of the display device, encoding data to be encoded according to the resource of the physical display card.

For example, when the source device determines that the physical display card supports the display requirement of the display device, it indicates that the display card resources of the physical display card are sufficient, and at this time, the source device may encode the display card resources of the physical display card.

Further, as shown in fig. 5, after the step 205 is executed, the method further includes the following steps:

and step 207, determining whether the current display parameters are changed.

For example, if a user changes a display device connected to the receiving device or modifies display parameters of the display device, the current display parameters of the display device may be changed.

And 208, when the current display parameters are determined to be changed, determining whether the physical display card supports the display requirements of the display equipment according to the changed current display parameters.

For example, when determining that the current display parameter of the display device changes, the source device needs to search for the changed current display parameter in the valid mode list, and if the changed current display parameter is found in the valid mode list, it indicates that the physical display card supports the display requirement of the display device; if the changed current display parameters are not found in the effective mode list, it indicates that the physical display card cannot support the display requirement of the display device.

Step 209, when it is determined that the physical graphics card supports the display requirement of the display device, sending a graphics card resource release request to the encoding server, so that the encoding server stores the target graphics card resource in a resource pool again.

For example, when it is determined that a physical display card supports a display requirement of a display device, it indicates that the computing power of the source device is sufficient, at this time, a display card resource release request needs to be sent to the encoding server, so that the encoding server releases a target display card resource transferred to the source device when receiving the display card resource release request, the released display card resource returns to the resource pool again, and can be subsequently allocated to other source devices, and meanwhile, the encoding server does not monitor and adjust the display card resource occupancy rate of the physical display card of the source device any more.

It should be noted that, in order to ensure normal communication between the code server and the source device, it is usually required that the source device and the code server are preferably in one network segment, and a gigabit local area network is preferred because high-speed communication is required.

The disclosed embodiment provides a coding acceleration method, which determines whether a display card supports the display requirement of display equipment according to the current display parameters of the display equipment and all display mode parameters supported by the display card of source equipment, and when determining that the display card does not support the display requirement of the display equipment, sends a display card resource request to a coding server, so that the coding server sends a target display card resource to the source equipment, and thus the source equipment can code data to be coded according to the target display card resource and the resource of a physical display card, thereby improving the flexibility of the coding capability of the source equipment under the condition of not replacing the physical display card, and bringing great convenience to a user; with the increase of the computing power requirement of the source-end equipment, only the display card needs to be added in the resource pool of the coding server, and the physical display card does not need to be continuously replaced.

The embodiment of the present disclosure provides a coding acceleration method, which is applied to a coding server, and as shown in fig. 6, the method includes the following steps:

step 601, receiving a display card resource request sent by a source end device.

Step 602, sending a target graphics card resource to the source device, so that the source device encodes data to be encoded according to the target graphics card resource and the resource of the graphics card.

Optionally, a first preset unit of display card resources are sent to the source end device each time according to a first preset frequency; after the display resources of the first preset unit are sent each time, receiving the current resource occupancy rate of the display card sent by the source end device; when the current resource occupancy rate is determined to be greater than the first preset threshold, continuously sending the first preset unit of display card resources to the source end device, and stopping sending the first preset unit of display card resources to the source end device until the current resource occupancy rate is less than the first preset threshold.

Illustratively, the encoding server divides the local video card resources in advance, for example, by 0.1, so that when receiving a video card resource request, the encoding server can allocate a predetermined number of target video card resources to the source end device directly, that is, the encoding server allocates a first preset unit of video card resources to the source end device each time, the source end device adds the first preset unit of video card resources and the remaining resources of the physical video card to obtain the current resource occupancy rate of the physical video card when receiving the first preset unit of video card resources, and feeds back the current resource occupancy rate of the physical video card to the encoding server in real time, when determining that the current resource occupancy rate of the physical video card is greater than a first preset threshold, the encoding server continuously allocates the first preset unit of video card resources to the source end device until the current resource occupancy rate of the physical video card of the source end device is less than the first preset threshold, and stopping continuously allocating the first preset unit of display card resources to the source end equipment. For example, the display device needs to obtain 4K144 display resources, the current resource occupancy rate of the physical display card is 100%, at this time, the display card resources of the encoding server are called to accelerate, the encoding server may divide the display card resources in the resource pool into integer equal parts, give 1 equal part or multiple equal parts to the source device each time, and if the integer equal parts or multiple equal parts are not enough, give 1 equal part or multiple equal parts again until the current resource occupancy rate of the physical display card is lower than a first preset threshold (for example, 80%).

Further, monitoring the current resource occupancy rate of the physical display card; and when the current resource occupancy rate is determined to be smaller than a second preset threshold value, sending a resource return instruction to the source end equipment, and receiving a second preset unit of display card resources returned by the source end equipment.

The resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit.

Illustratively, in the process of encoding by the source end device, the resource occupancy rate of the display card of the source end device is in a dynamic change, so the encoding server needs to continuously monitor the current resource occupancy rate of the physical display card of the source end device in real time, when it is determined that the current resource occupancy rate of the physical display card is smaller than a second preset threshold, it indicates that there is a surplus of resources of the physical display card of the source end device, at this time, a resource return instruction is sent to the source end device, that is, the source end device is controlled to return second preset unit of display card resources to the encoding server, and the current resource occupancy rate of the physical display card is fed back to the encoding server in real time, when it is determined that the current resource occupancy rate of the physical display card is smaller than the second preset threshold, the encoding server continuously controls the source end device to return second preset unit of display card resources to the encoding server until the current resource occupancy rate of the physical display card of the source end device is larger than the second preset threshold, and prohibiting the source terminal equipment from returning the video card resource to the encoding terminal equipment, and storing the returned video card resource in the resource pool by the encoding server. The current resource occupancy rate of the physical display card of the source end equipment can be stabilized between a first preset threshold (80%) and a second preset threshold (60%), namely, the current resource occupancy rate is stabilized in a [ 60%, 80% ] interval, the source end equipment is controlled to return the display card resource which is released to the coding server once the current resource occupancy rate is less than 60%, and the display card resource which is released to the source end equipment is increased once the current resource occupancy rate is greater than 80%, so that the display card resource of the physical display card of the source end equipment can meet the display requirement of the display equipment and can be in a relatively reasonable interval range, and the reasonable utilization of the resource of the coding server is realized.

The disclosed embodiment provides a coding acceleration method, wherein a coding server sends target video card resources to a source end device when receiving a video card resource request sent by the source end device, so that the source end device can code data to be coded according to the target video card resources and the resources of a physical video card, thereby improving the flexibility of the coding capability of the source end device without replacing the physical video card and bringing great convenience to a user; with the increase of the computing power requirement of the source-end equipment, only the display card needs to be added in the resource pool of the coding server, and the physical display card does not need to be continuously replaced.

The embodiment of the present disclosure provides a coding acceleration method, which is applied to a source device and a coding server, and as shown in fig. 7, the method includes the following steps:

step 701, when detecting that a receiving end device accesses a display device, a source end device acquires current display parameters of the display device.

Wherein the current display parameters include a current display resolution and a current display frame rate.

Step 702, the source device determines whether the physical display card supports the display requirement of the display device according to the current display parameter and all display mode parameters supported by the physical display card of the source device.

Wherein the display mode parameters include a resolution and a frame rate of the physical display card.

Step 703, when determining that the physical display card does not support the display requirement of the display device, the source device obtains the current resource occupancy rate of the physical display card.

Step 704, when determining that the current resource occupancy rate is greater than a first preset threshold, the source device sends the video card resource request to the encoding server.

Step 705, the encoding server sends a first preset unit of video card resources to the source end device each time according to a first preset frequency.

Step 706, after the encoding server sends the first preset unit of display resources each time, receiving the current resource occupancy rate of the display card sent by the source end device.

And 707, when determining that the current resource occupancy rate is greater than the first preset threshold, the encoding server continuously sends the first preset unit of video card resources to the source end device, and when determining that the current resource occupancy rate is less than the first preset threshold, the encoding server stops sending the first preset unit of video card resources to the source end device.

Step 708, the coding server monitors the current resource occupancy rate of the physical display card.

Step 709, the coding server sends a resource return instruction to the source end device when determining that the current resource occupancy rate is smaller than a second preset threshold.

The resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit.

Step 710, the source end device responds to the resource return instruction, and returns a second preset unit of video card resources to the encoding server each time according to a second preset frequency until the current resource occupancy rate is greater than the second preset threshold.

Step 711, the source device determines whether the current display parameter changes.

Step 712, when determining that the current display parameter changes, the source device determines whether the physical display card supports the display requirement of the display device according to the changed current display parameter.

Step 713, when determining that the physical display card supports the display requirement of the display device, the source device sends a display card resource release request to the encoding server, so that the encoding server stores the target display card resource in a resource pool again.

The disclosed embodiment provides a coding acceleration method, which determines whether a display card supports the display requirement of display equipment according to the current display parameters of the display equipment and all display mode parameters supported by the display card of source equipment, and when determining that the display card does not support the display requirement of the display equipment, sends a display card resource request to a coding server, so that the coding server sends a target display card resource to the source equipment, and thus the source equipment can code data to be coded according to the target display card resource and the resource of a physical display card, thereby improving the flexibility of the coding capability of the source equipment under the condition of not replacing the physical display card, and bringing great convenience to a user; with the increase of the computing power requirement of the source-end equipment, only the display card needs to be added in the resource pool of the coding server, and the physical display card does not need to be continuously replaced.

Based on the encoding acceleration method described in the above embodiments, the following is an embodiment of the apparatus of the present disclosure, which can be used to execute the embodiment of the method of the present disclosure.

The embodiment of the present disclosure provides a source device, as shown in fig. 8a, the source device 80 includes: an obtaining module 801, a first determining module 802, a first sending module 803, a first receiving module 804 and a first encoding module 805.

The obtaining module 801 is configured to obtain a current display parameter of a display device when it is detected that a receiving end device accesses the display device.

A first determining module 802, configured to determine whether the physical display card supports the display requirement of the display device according to the current display parameter and all display mode parameters supported by the physical display card of the source device.

A first sending module 803, configured to send a display card resource request to an encoding server when it is determined that the physical display card does not support the display requirement of the display device, so that the encoding server sends a target display card resource to the source device.

A first receiving module 804, configured to receive the target graphics card resource sent by the encoding server.

The first encoding module 805 is configured to encode data to be encoded according to the target graphics card resource and the resource of the physical graphics card.

In one embodiment, as shown in fig. 8b, the first sending module 803 includes an acquisition sub-module 8031 and a first sending sub-module 8032.

The obtaining submodule 8031 is configured to obtain the current resource occupancy rate of the physical graphics card.

The first sending submodule 8032 is configured to send the graphics card resource request to the coding server when it is determined that the current resource occupancy rate is greater than a first preset threshold.

In one embodiment, as shown in fig. 8c, the first receiving module 804 includes a first receiving submodule 8041, a determining submodule 8042, and a second transmitting submodule 8043.

The first receiving submodule 8041 is configured to receive the first preset unit of graphics card resources sent by the encoding server each time.

The determining submodule 8042 is configured to determine the current resource occupancy rate of the physical graphics card according to the graphics card resources of the first preset unit.

The second sending submodule 8043 is configured to send the current resource occupancy rate to the coding server, so that the coding server determines whether to continue sending the video card resources of the first preset unit to the source end device according to the current resource occupancy rate.

In one embodiment, as shown in fig. 8d, the apparatus further comprises a third receiving module 806 and a returning module 807.

The third receiving module 806 is configured to receive a resource return instruction sent by the encoding server; the resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit.

The returning module 807 is configured to, in response to the resource returning instruction, return a second preset unit of video card resources to the encoding server each time according to a second preset frequency until the current resource occupancy rate is greater than the second preset threshold.

In one embodiment, as shown in fig. 8e, the apparatus further comprises a second encoding module 808.

The second encoding module 808 is configured to encode the data to be encoded according to the resource of the physical graphics card when it is determined that the physical graphics card supports the display requirement of the display device.

In one embodiment, as shown in fig. 8f, the apparatus further comprises a second determining module 809, a third determining module 810 and a third transmitting module 811.

Wherein the second determining module 809 is configured to determine whether the current display parameter changes.

The third determining module 810 is configured to determine, when it is determined that the current display parameter changes, whether the physical display card supports the display requirement of the display device according to the changed current display parameter.

The third sending module 811 is configured to send a display card resource release request to the encoding server when it is determined that the physical display card supports the display requirement of the display device, so that the encoding server stores the target display card resource in a resource pool again.

In one embodiment, the current display parameters include a current display resolution and a current display frame rate, and the display mode parameters include a resolution and a frame rate of the physical display card.

The embodiment of the present disclosure provides an encoding server, as shown in fig. 9a, the encoding server 90 includes: a second receiving module 901 and a second sending module 902.

The second receiving module 901 is configured to receive a display card resource request sent by a source device.

A second sending module 902, configured to send a target graphics card resource to the source device, so that the source device encodes to-be-encoded data according to the target graphics card resource and a resource of a graphics card.

In one embodiment, as shown in fig. 9b, the second sending module 902 includes a third sending submodule 9021, a second receiving submodule 9022 and a fourth sending submodule 9023.

The third sending submodule 9021 is configured to send, to the source end device, a first preset unit of video card resources each time according to a first preset frequency.

The second receiving submodule 9022 is configured to receive the current resource occupancy rate of the display card sent by the source end device after sending the display resources of the first preset unit each time.

The fourth sending submodule 9023 is configured to, when it is determined that the current resource occupancy rate is greater than the first preset threshold, continuously send the first preset unit of video card resources to the source end device, and stop sending the first preset unit of video card resources to the source end device until the current resource occupancy rate is smaller than the first preset threshold.

In one embodiment, as shown in fig. 9c, the encoding server further comprises a monitoring module 903, a fourth transmitting module 904, and a third receiving module 905.

The monitoring module 903 is configured to monitor the current resource occupancy rate of the physical graphics card.

The fourth sending module 904 is configured to send a resource return instruction to the source end device when it is determined that the current resource occupancy is smaller than a second preset threshold; the resource returning instruction is used for indicating that a second preset unit of display card resources are returned to the coding server every time according to a second preset frequency until the current resource occupancy rate is greater than a second preset threshold value; the second preset threshold is smaller than the first preset threshold; the second preset unit is smaller than the first preset unit.

The third receiving module 905 is configured to receive the display card resources of the second preset unit returned by the source end device.

Fig. 10 is a block diagram of a coding acceleration system according to an embodiment of the present disclosure, where the coding acceleration system shown in fig. 10 includes at least one sink device 1001, at least one source device 1002 according to any of the above embodiments, and a coding server 1003 according to any of the above embodiments.

Based on the encoding acceleration method described in the embodiment corresponding to fig. 2, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the encoding acceleration method described in the embodiment corresponding to fig. 2, which is not described herein again.

Based on the encoding acceleration method described in the embodiment corresponding to fig. 6, the embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a read-only memory, a random access memory, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the encoding acceleration method described in the embodiment corresponding to fig. 6, which is not described herein again.

It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

29页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:设备间的通话方法、装置、设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类