Data transmission method and system

文档序号:1144482 发布日期:2020-09-11 浏览:21次 中文

阅读说明:本技术 数据传输方法及系统 (Data transmission method and system ) 是由 刘威 范志刚 卢涛 于 2020-05-22 设计创作,主要内容包括:本公开提供一种数据传输方法及系统,涉及电子信息技术领域,能够解决基于虚拟桌面传输时图像传输质量不佳、传输卡顿的问题。具体技术方案为:服务器在获取终端设备发送的图像传输请求后,根据该图像传输请求中的交互区域信息,获取目标区域中交互区域对应的第一图像和非交互区域对应的第二图像;根据预设传输规则和当前网络带宽,确定第一图像中可传输的最大图层和第二图像中可传输的最大图层,对第一图像中可传输的最大图层和第二图像中可传输的最大图层,依次进行编码传输,从而实现了传输目标区域对应图像的技术效果。本公开用于数据传输。(The invention provides a data transmission method and a data transmission system, relates to the technical field of electronic information, and can solve the problems of poor image transmission quality and transmission blockage during transmission based on a virtual desktop. The specific technical scheme is as follows: after acquiring an image transmission request sent by terminal equipment, a server acquires a first image corresponding to an interactive area and a second image corresponding to a non-interactive area in a target area according to interactive area information in the image transmission request; determining a maximum image layer which can be transmitted in the first image and a maximum image layer which can be transmitted in the second image according to a preset transmission rule and the current network bandwidth, and sequentially carrying out coding transmission on the maximum image layer which can be transmitted in the first image and the maximum image layer which can be transmitted in the second image, thereby realizing the technical effect of transmitting the image corresponding to the target area. The present disclosure is for data transmission.)

1. A data transmission system is characterized in that the system comprises a terminal device and a server, the terminal device is connected with the server,

the terminal device is used for determining a target area and an interaction area in the target area according to a target operation instruction, and acquiring interaction area information, wherein the target area comprises the interaction area and a non-interaction area, and the interaction area information comprises coordinate information of each vertex in the interaction area;

generating image transmission request information according to the target area and the interaction area information, and sending the image transmission request information to the server, wherein the image transmission request information is used for requesting the server to transmit the image in the target area;

the server is used for receiving the image transmission request information sent by the terminal equipment;

determining an interactive area and a non-interactive area in the target area according to the image transmission request information, acquiring a first image corresponding to the interactive area and a second image corresponding to the non-interactive area, dividing the first image into n image layers, and dividing the second image into m image layers;

calculating a first transmission layer number corresponding to the first image and a second transmission layer number corresponding to the second image according to a target transmission resource and a preset transmission strategy, wherein the first transmission layer number refers to the layer number which can be used by the target transmission resource for transmitting the first image, and the second transmission layer number refers to the layer number which can be used by the target transmission resource for transmitting the second image after the target transmission resource finishes transmitting the first image;

and coding the first image according to the first transmission layer number, coding the second image according to the second transmission layer number, and sending the coded first image and the coded second image to the terminal equipment.

2. The system of claim 1, wherein the terminal device is further configured to, prior to generating the interaction zone information,

activating an interaction area capturing function, wherein the interaction area capturing function is used for capturing mouse operation events in the target area;

capturing a mouse operation event of a target mouse in a target area according to the interactive area capturing function;

and determining the interaction area according to the mouse operation event.

3. The method of claim 1, wherein the server is further configured to,

coding the first image to obtain a code stream corresponding to n image layers in the first image;

comparing the coded code streams corresponding to the n layers in the first image with the target transmission resource, and acquiring a comparison result;

when the code stream corresponding to the n layers is less than or equal to the target transmission resource, determining the number of the first transmission layer layers to be n;

when the coded code streams corresponding to the n layers are larger than the target transmission resource, comparing the coded code streams corresponding to the n layers with the target transmission resource layer by layer until a preset condition is met, and determining the layer number as the first transmission layer number.

4. The method of claim 3, wherein the server is further configured to,

coding the second image to obtain a coding code stream corresponding to m image layers in the second image;

acquiring the residual transmission resources after the transmission of the first image is finished according to the target transmission resources and the number of the first transmission layer layers;

comparing the residual transmission resources with the coding code streams corresponding to the m layers in the second image;

when the code stream corresponding to the m layers is less than or equal to the residual transmission resource, determining the number of the second transmission layer layers as m;

and when the coding code stream is larger than the residual transmission resources, comparing and determining the coding code stream corresponding to the m layers and the residual transmission resources layer by layer until a preset condition is met, and determining the layer number as the second transmission layer number.

5. The system of claim 1, wherein the server is further configured to,

acquiring identification information of the interaction area and the layer number of the first transmission map layer;

marking a first image corresponding to the first transmission image layer according to the identification information of the interactive area and the layer number of the first transmission image layer;

and coding the first image corresponding to the marked first transmission layer.

6. A data transmission method, applied to a server, the method comprising:

receiving the image transmission request information sent by terminal equipment, wherein the image transmission request information is used for requesting the server to transmit the image in the target area, the target area comprises an interactive area and a non-interactive area, and the interactive area information comprises coordinate information of each vertex in the interactive area;

determining an interactive area and a non-interactive area in the target area according to the image transmission request information, acquiring a first image corresponding to the interactive area and a second image of the non-interactive area, dividing the first image into n image layers, and dividing the second image into m image layers;

calculating a first transmission layer number corresponding to the first image and a second transmission layer number corresponding to the second image according to a target transmission resource and a preset transmission strategy, wherein the first transmission layer number refers to the layer number which can be used by the target transmission resource for transmitting the first image, and the second transmission layer number refers to the layer number which can be used by the target transmission resource for transmitting the second image after the target transmission resource finishes transmitting the first image;

and coding the first image according to the first transmission layer number, coding the second image according to the second transmission layer number, and transmitting the coded first image and the coded second image to the terminal equipment to realize the transmission of the image in the target area.

7. The method according to claim 6, wherein said calculating a first number of transmission layers corresponding to the first picture comprises:

coding the first image to obtain a code stream corresponding to n image layers in the first image;

comparing the coded code streams corresponding to the n layers in the first image with the target transmission resource, and acquiring a comparison result;

when the code stream corresponding to the n layers is less than or equal to the target transmission resource, determining the number of the first transmission layer layers to be n;

when the coded code streams corresponding to the n layers are larger than the target transmission resource, comparing the coded code streams corresponding to the n layers with the target transmission resource layer by layer until a preset condition is met, and determining the layer number as the first transmission layer number.

8. The method according to claim 7, wherein said calculating a second number of transmission layer layers corresponding to the second image comprises:

coding the second image to obtain a coding code stream corresponding to m image layers in the second image;

acquiring the residual transmission resources after the transmission of the first image is finished according to the target transmission resources and the number of the first transmission layer layers;

comparing the residual transmission resources with the coding code streams corresponding to the m layers in the second image;

when the code stream corresponding to the m layers is less than or equal to the residual transmission resource, determining the number of the second transmission layer layers as m;

and when the coding code stream is larger than the residual transmission resources, comparing the coding code stream corresponding to the m layers with the residual transmission resources layer by layer until a preset condition is met, and determining the number of the layers as the number of second transmission layer layers.

9. The method according to claim 7, wherein said encoding said first picture according to said first transmission layer number comprises:

acquiring identification information of the interaction area and the layer number of the first transmission map layer;

marking a first image corresponding to the first transmission image layer according to the identification information of the interactive area and the layer number of the first transmission image layer;

and coding the first image corresponding to the marked first transmission layer.

10. A data transmission method is applied to a terminal device, and the method comprises the following steps:

determining a target area and an interactive area in the target area according to a target operation instruction, and acquiring interactive area information, wherein the target area comprises an interactive area and a non-interactive area, and the interactive area information comprises coordinate information of each vertex in the interactive area;

generating image transmission request information according to the target area and the interaction area information, and sending the image transmission request information to the server, wherein the image transmission request information is used for requesting the server to transmit an image in the target area;

and acquiring an image corresponding to the interactive area and an image corresponding to the non-interactive area according to the image transmission request information, and acquiring an image corresponding to the target area according to the image corresponding to the interactive area and the image corresponding to the non-interactive area.

Technical Field

The present disclosure relates to the field of electronic information technologies, and in particular, to a data transmission method and system.

Background

With the increasingly higher personalization requirements of enterprises, VDI (Virtual Desktop Infrastructure) is popular with more and more enterprises. The VDI can virtualize a plurality of virtual machines VM (virtual machine) on a server with strong performance through a desktop virtualization technology, a user and an administrator can install an operating system, an application program and the like in the VM, and the administrator can allocate one or more VMs to one or more users as required. And a user desktop does not need to deploy a personal computer with strong performance, and only needs to deploy a safe and easily managed zero terminal to connect to the VM of the data center. And the zero terminal is connected with the display, sends the keyboard and mouse event input by the user to the VM, executes the operation according to the keyboard and mouse event, and transmits the display picture after the operation to the display of the zero terminal to be displayed to the user.

In a VDI system, the remote desktop transmission definition is affected by network bandwidth or image parameters. Especially in a network with poor environment or a narrow-band network, even if the coding algorithm with the highest compression ratio in the industry is adopted, the clear transmission of each frame of picture can not be ensured. The bandwidth limitation directly limits the picture data size that can be transmitted every second. For such problems, picture layered coding transmission and strategy frame loss are generally adopted, but the problems brought about are picture sharpness reduction and picture stuttering.

Disclosure of Invention

The embodiment of the disclosure provides a data transmission method and system, which can solve the problem of low image definition in the transmission process of a virtual desktop. The technical scheme is as follows:

according to a first aspect of the embodiments of the present disclosure, there is provided a data transmission method applied to a server, the method including:

receiving the image transmission request information sent by the terminal equipment, wherein the image transmission request information is used for requesting the server to transmit the image in the target area, the target area comprises an interactive area and a non-interactive area, and the interactive area information comprises coordinate information of each vertex in the interactive area;

determining an interactive area and a non-interactive area in the target area according to the image transmission request information, acquiring a first image corresponding to the interactive area and a second image of the non-interactive area, dividing the first image into n image layers, and dividing the second image into m image layers;

calculating a first transmission layer number corresponding to the first image and a second transmission layer number corresponding to the second image according to a target transmission resource and a preset transmission strategy, wherein the first transmission layer number refers to the layer number which can be transmitted by the target transmission resource, the first transmission layer number refers to the layer number in the first image which can be transmitted by the target transmission resource, the second transmission layer number refers to the layer number in the second image which can be transmitted by the target transmission resource, and the preset transmission strategy comprises the steps of transmitting the first image first and then transmitting the second image

And coding the first image according to the first transmission layer number, coding the second image according to the second transmission layer number, and transmitting the coded first image and the coded second image to the terminal equipment to realize the transmission of the image in the target area.

According to a second aspect of the embodiments of the present disclosure, there is provided a data transmission method applied to a terminal device, the method including:

determining a target area and an interactive area in the target area according to a target operation instruction, and acquiring interactive area information, wherein the target area comprises an interactive area and a non-interactive area, and the interactive area information comprises coordinate information of each vertex in the interactive area;

generating image transmission request information according to the target area and the interaction area information, and sending the image transmission request information to the server, wherein the image transmission request information is used for requesting the server to transmit the image in the target area;

and acquiring an image corresponding to the interactive area and an image corresponding to the non-interactive area according to the image transmission request information, and acquiring an image corresponding to the target area according to the image corresponding to the interactive area and the image corresponding to the non-interactive area.

According to a third aspect of the embodiments of the present disclosure, there is provided a data transmission system including: a terminal device and a server, the terminal device and the server being connected,

the terminal device is used for determining a target area and an interaction area in the target area according to a target operation instruction, and acquiring interaction area information, wherein the target area comprises the interaction area and a non-interaction area, and the interaction area information comprises coordinate information of each vertex in the interaction area;

generating image transmission request information according to the target area and the interaction area information, and sending the image transmission request information to the server, wherein the image transmission request information is used for requesting the server to transmit the image in the target area;

the server is used for receiving the image transmission request information sent by the terminal equipment;

determining an interactive area and a non-interactive area in the target area according to the image transmission request information, acquiring a first image corresponding to the interactive area and a second image of the non-interactive area, dividing the first image into n image layers, and dividing the second image into m image layers;

calculating a first transmission layer number corresponding to the first image and a second transmission layer number corresponding to the second image according to a target transmission resource and a preset transmission strategy, wherein the first transmission layer number refers to the layer number of the first image which can be transmitted by the target transmission resource, and the preset transmission strategy comprises the steps of transmitting the first image first and then transmitting the second image;

and coding the first image according to the first transmission layer number, coding the second image according to the second transmission layer number, and sending the coded first image and the coded second image to the terminal equipment.

In one embodiment, the terminal device in the system is further configured to, prior to generating the interactive area information,

activating an interactive area capturing function, wherein the interactive area capturing function is used for capturing mouse operation events in the target area;

capturing a mouse operation event of a target mouse in a target area according to the interactive area capturing function;

and determining the interaction area according to the mouse operation event.

In one embodiment, the server in the system is further configured to,

coding the first image to obtain a code stream corresponding to n image layers in the first image;

comparing the coded code streams corresponding to the n layers in the first image with the target transmission resource, and acquiring a comparison result;

when the coded code stream corresponding to the n layers is less than or equal to the target transmission resource, determining the number of the first transmission layer layers as n;

when the coded code streams corresponding to the n layers are larger than the target transmission resource, comparing and determining the coded code streams corresponding to the layers and the target transmission resource layer by layer until a preset condition is met, and determining the layer number as the first transmission layer number.

In one embodiment, the server in the system is further configured to,

coding the second image to obtain a code stream corresponding to m image layers in the second image;

acquiring the residual transmission resources after the transmission of the first image is finished according to the target transmission resources and the number of the first transmission layer layers;

comparing the residual transmission resources with the coding code streams corresponding to the m layers in the second image;

when the coded code stream corresponding to the m layers is less than or equal to the residual transmission resource, determining the number of the second transmission layer layers as m;

and when the coding code stream is larger than the residual transmission resource, comparing and determining the coding code stream corresponding to the layer and the residual transmission resource layer by layer until a preset condition is met, and determining the layer number of the layer as a second transmission layer.

In one embodiment, the server in the system is further configured to,

acquiring identification information of the interaction area and the layer number of the first transmission map layer;

marking a first image corresponding to the first transmission layer according to the identification information of the interactive area and the layer number of the first transmission layer;

and carrying out coding processing on the first image corresponding to the marked first transmission layer.

The data transmission system comprises a terminal device and a server, wherein the terminal device selects a self-defined interaction area in a target area according to a keyboard and mouse event, then sends an image transmission request to the server according to the interaction area and the target area, requests the server to send an image of the target area, and after the server obtains the image transmission request sent by the terminal device, obtains a first image corresponding to the interaction area in the target area and a second image corresponding to a non-interaction area according to interaction area information in the image transmission request; determining a maximum image layer which can be transmitted in the first image and a maximum image layer which can be transmitted in the second image according to a preset transmission rule and the current network bandwidth, and sequentially carrying out coding transmission on the maximum image layer which can be transmitted in the first image and the maximum image layer which can be transmitted in the second image, thereby realizing the technical effect of transmitting the image corresponding to the target area. In the transmission method provided by the disclosure, when the server performs coding transmission, the server can perform the coding transmission on the non-interactive area on the premise that the bandwidth is still remained by performing the priority transmission on the interactive area according to the preset transmission strategy and the interactive area information. Therefore, on the premise of preferentially ensuring the definition and the fluency of the interactive area, the definition of the display picture of the zero terminal is gradually improved.

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 transmission diagram of a data transmission method provided by an embodiment of the present disclosure;

fig. 2 is a flowchart 1 of a data transmission method provided by an embodiment of the present disclosure;

fig. 3 is a flowchart 2 of a data transmission method provided by an embodiment of the present disclosure;

fig. 4 is a structural diagram of a data transmission 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 systems and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

As shown in fig. 1, a terminal device 101 and a server 102 are connected in a communication manner for image transmission in the present disclosure.

The server may virtualize several virtual machines VM (virtual machine), and a user and an administrator may install an operating system, an application program, and the like in the VM, and the administrator may allocate one or more VMs to one or more users as needed. And the zero terminal is connected with the display, sends the keyboard and mouse event input by the user to the VM, executes the operation according to the keyboard and mouse event, and transmits the display picture after the operation to the display of the zero terminal to be displayed to the user. The user can connect to the VM of the data center through the terminal device without deploying a powerful personal computer.

Because of the characteristics of the desktop for human-computer interaction, namely: no matter how large the current screen is, the small area which is operated is the most concerned by the user when interacting, namely the interactive area in the invention. From the angle, when the remote desktop transmission is carried out under the narrow-band network, the clear and smooth transmission of the interactive area is preferentially ensured, while the best-effort transmission strategy under the condition of limited bandwidth is adopted for the non-interactive area,

therefore, it is necessary to determine an interactive area and a non-interactive area in the terminal device, and transmit an image of a target area in the server by transmitting an image of the interactive area and an image of the non-interactive area.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于应用流的预取的编码

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类