The system and method for the SPICE WAN optimizedTechnical field
The present invention relates to field of computer technology, particularly relate to Display Technique, specifically refer to the system and method for a kind of SPICEWAN of optimization.
Background technology
What the scene of current many use virtual desktops adopted is SPICE agreement, and SPICE project aims to provide the access of high-quality remote virtual desktop, agreement itself employing simultaneously be Transmission Control Protocol communication.
SPICE protocol definition one group of protocol message visits, controls and receives by the operation of network from remote computer devices (as: keyboard, video, mouse), and replys to send and export.Control appliance both can in client, also can in service end.In addition, protocol definition one group supports that remote server moves to another network address from a network address.
SPICE communication session is divided into multiple:
1) main channel is as main SPICE session channel;
2) display channel receives long-range display update (processing graphics order, image and data flow);
3) input channel sends mouse and KeyEvent;
4) cursor channel reception pointer shape and position;
5) channel reception audio stream is play;
6) recording channel sends client audio input.
Summary of the invention
The object of the invention is the shortcoming overcoming above-mentioned prior art, provide the system and method that a kind of agreement by improvement part SPICE improves the SPICEWAN of the optimization of the bandwagon effect of image.
To achieve these goals, the system and method for the SPICEWAN of optimization of the present invention has following formation:
Should replace the system of the optimization SPICEWAN of TCP based on UDP, its main feature is, described system comprises:
SPICE server, in order to judge whether Graphics Processing information is image, if described Graphics Processing information is image, then the image described in being transmitted by UDP is to SPICE client; If described Graphics Processing information is not image, then the image described in being transmitted by TCP is to SPICE client;
SPICE client, in order to judge that described server transmits Graphics Processing information by UDP or transmits Graphics Processing information by TCP, if described SPICE client transmits Graphics Processing information by UDP, then receive this Graphics Processing information and carry out image rendering; If described SPICE client transmits Graphics Processing information by TCP, then receive this Graphics Processing information and show.
The invention still further relates to a kind of method of replacing the optimization SPICEWAN of TCP based on UDP, its main feature is, described method comprises the worker thread of SPICE client and the worker thread of SPICE server:
The worker thread of described SPICE server specifically comprises the following steps:
(1.1) the SPICE server described in judges whether Graphics Processing information is image;
(1.2) if described Graphics Processing information is image, then the image described in described SPICE server is transmitted by UDP is to SPICE client;
(1.3) if described Graphics Processing part is not image, then the image described in described SPICE server is transmitted by TCP is to SPICE client;
The worker thread of described SPICE client specifically comprises the following steps:
(2.1) server described in the SPICE client described in judges transmits Graphics Processing information by UDP or transmits Graphics Processing information by TCP;
(2.2) if described SPICE client transmits Graphics Processing information by UDP, then receive this Graphics Processing information and carry out image rendering;
(2.3) if described SPICE client transmits Graphics Processing information by TCP, then receive this Graphics Processing information and show.
Have employed the system and method for the SPICEWAN of the optimization in this invention, be transformed into udp protocol by the image procossing communication display channel from TCP, had obvious lifting to desktop presentation fluency, it is simple to operate, has wide range of applications.
Accompanying drawing explanation
Fig. 1 is flow chart of steps of replacing the method for the optimization SPICEWAN of TCP based on UDP of the present invention.
Embodiment
In order to more clearly describe technology contents of the present invention, conduct further description below in conjunction with specific embodiment.
The invention belongs to the application when virtual desktop, because present stage many manufacturer production virtual desktops product employing is that SPICE agreement is as desktop presentation agreement, so the present invention is when using SPICE agreement to transmit desktop on WAN, improve a kind of method of video and the experience of Flash animation fluency.
First, because WAN net is different and LAN net, LAN refers in less geographic range, is coupled together by the computer of more than two, realize resource-sharing by transmission cable.The transmission speed of local area network (LAN) is usually between 10Mb/s ~ 1000Mb/s, and trunk 1000Mb/s, desktop 100Mb/s are current mainstream technologys.WAN is by a larger geographic range, multiple stage computer is coupled together mutually carry out communicating, the network of shared resource.Compared with local area network (LAN), the transmission speed of wide area network wants slow many relatively.
Under the environment of LAN net, virtual desktop adopts SPICE agreement to show.But when WAN, there is a lot of uncertainties.
Secondly, because the Transmission Control Protocol that SPICE agreement adopts, and Transmission Control Protocol is the agreement based on connecting, and that is, before formal transceiving data, must set up reliable connection with the other side.A TCP connects and just can must set up through three times " dialogue ", and communication process is wherein complicated.Also just because of have guarantee and the control device of reliability, so efficiency of transmission is lower than UDP, udp protocol is based on connectionless unreliable protocol, does not have control device, and be only send the data to the other side, therefore efficiency is higher than TCP.
Also Just because of this, purport of the present invention is that the biography image section Transmission Control Protocol of SPICE agreement is changed into udp protocol process.
In actual applications, analyze the handling principle of SPICE agreement, SPICE communication session is divided into multiple passage process, the image procossing of consideration display channel is the application that a flow is larger, and at virtual desktop should under scene, general Task work virtual desktop and the virtual desktop of knowledge work are not very high to image request, in these situations, as long as image smooth playing just can meet application.
So consider in a lot of situations of WAN, if (as blocked when network quality is not very high, bandwidth is inadequate, the situations such as the node of wanting is many), transmitting image needs a large amount of network bandwidths, have impact to the quality of desktop, consider that image applications is not necessary in the case, this scheme changes the Transmission Control Protocol communication of the image processing section of display channel as udp protocol communication into.
UDP (UserDataProtocol, User Datagram Protoco (UDP)) is the agreement corresponding with TCP.Although the time is very long, udp protocol still continues to play in mainstream applications and acts on.The many application comprising video phone conference system all demonstrate the existent value of udp protocol.Because relative to reliability, these application focus on actual performance more, so often can sacrifice certain reliability (such as, image quality) to obtain better result of use (such as, higher image frame refresh rate).
As above-mentioned reason, be only that the image processing section in the display channel of communication protocol in SPICE made into udp protocol process by the agreement of TCP process in the present embodiment.Being improved for virtual desktop image shows in some application scenarios of virtual desktop.
Refer to shown in Fig. 1, Fig. 1 is workflow diagram of the present invention, SpiceServer end can judge whether it is image to virtual desktop Graphics Processing part, if image, can utilize this part data of UDPChannel process, if not (as processing graphics order), then keep former SpiceServer handling process constant, and SpiceClient end needs listenUDPport, receive UDP message, then UDP message is processed, error correction etc.Finally the data received equally are carried out exploded view picture by Client program with pre-treatment.
Have employed the system and method for the SPICEWAN of the optimization in this invention, be transformed into udp protocol by the image procossing communication display channel from TCP, had obvious lifting to desktop presentation fluency, it is simple to operate, has wide range of applications.
In this description, the present invention is described with reference to its specific embodiment.But, still can make various amendment and conversion obviously and not deviate from the spirit and scope of the present invention.Therefore, specification and accompanying drawing are regarded in an illustrative, rather than a restrictive.