Summary of the invention
(1) technical problem that will solve
In view of this, main purpose of the present invention is to provide a kind of method that clipbook is shared that realizes in the multi-node intelligent network application service system, to realize sharing and transmission of clipbook resource between the isomery service node of multi-node intelligent network application service system.
(2) technical scheme
For achieving the above object, the invention provides a kind of method that clipbook is shared that in the multi-node intelligent network application service system, realizes, this method comprises:
A, in advance the clipbook data content is arranged to unified string format, and uniform communication mechanism is set between a plurality of service nodes, transmits the clipbook data content;
B, on integrated virtual desktop, the application program of first service node is duplicated/shearing manipulation, this is duplicated/shearing manipulation information passes to first service node;
C, first service node receive described duplicating/shearing manipulation information, convert Contents of clipboard to described unified string format, adopt described uniform communication mechanism that Contents of clipboard is sent to second service node by integrated virtual desktop, second service node is with the Contents of clipboard of local clipboard content update for receiving;
D, the application program to second service node on integrated virtual desktop are carried out paste operation, and the Contents of clipboard after second service node will upgrade pastes on the application program of self.
In the such scheme, unified string format is the string string format described in the steps A, and described uniform communication mechanism is SOCKET message communicating mechanism.
In the such scheme, described in the step B this is duplicated/shearing manipulation information passes to first service node and transmits via communication port " the integrated virtual desktop process → Client Agent process → session node master control process → first service node agent process ".
In the such scheme, under WINDOWS operating system, whether first service node described in the step C receives described duplicating/shearing manipulation information and changes and realize by monitoring its local clipboard content, specifically comprises: the message WM_DRAWCLIPBOARD that WINDOWS operating system provides fixing clipbook to change; When first service node listened to the WM_DRAWCLIPBOARD system message, first service node listened to its local clipboard content and changes.
In the such scheme, under WINDOWS operating system, first service node described in the step C adopts described uniform communication mechanism that Contents of clipboard is sent to second service node by integrated virtual desktop to comprise: first service node listens to after its local clipboard content changes, judge by agent process whether the content that clipbook changes is duplicating/shearing manipulation from local application, if, then adopt unified SOCKET message communicating mechanism to send the message that Contents of clipboard changes to integrated virtual desktop, convert the content of clipbook to described unified string format simultaneously and send to integrated virtual desktop via passage " first service node agent process → session node master control process → Client Agent process → integrated virtual desktop process "; Integrated virtual desktop is received the message that the Contents of clipboard of first service node changes, read the content of SOCKET, the content of the clipbook that SOCKET is transmitted is stored with the String form, simultaneously, send the Contents of clipboard of clipbook updating message and reception to second service node in the mode of SOCKET; If not from the duplicating/shearing manipulation of local application, then ignore.
In the such scheme, under WINDOWS operating system, second service node described in the step C comprises the local clipboard content update for the Contents of clipboard that receives: second service node receives clipbook updating message and Contents of clipboard, with the Contents of clipboard of local clipboard content update for receiving; Further according to listening to Contents of clipboard change message WM_DRAWCLIPBOARD, judge whether the content that this clipbook changes is duplicating/shearing manipulation from local application then.
In the such scheme, under LINUX operating system, whether first service node described in the step C receives described duplicating/shearing manipulation information and change and realize by monitoring its local clipboard content, specifically comprises: the X window system utilization is selected shearing cut that selection realizes LINUX text control desk and is pasted the paste function; LINUX operating system predefine two kinds of selection: XA_PRIMARY and XA_CLIPBOARD; Under X Window, start an Xclipboard application program, and apply for that this program is the owner that XA_CLIPBOARD selects; When certain application A was carried out copy operation under the X Window, application A obtained the ownership that XA_CLIPBOARD selects; When Xclipboard loses the ownership of XA_CLIPBOARD selection, call the content of call back function to application A acquisition request XA_CLIPBOARD; Simultaneously, Xclipboard applies for that once more oneself is the owner of XA_CLIPBOARD, and sends the message that Contents of clipboard changes to first service node.
In the such scheme, under LINUX operating system, first service node described in the step C adopts described uniform communication mechanism that Contents of clipboard is sent to second service node by integrated virtual desktop to comprise: first service node listens to after its local clipboard content changes, convert the content of clipbook to described unified string format, adopt unified SOCKET message communicating mechanism to send the message that Contents of clipboard changes via passage " first service node agent process → session node master control process → Client Agent process → integrated virtual desktop process " to integrated virtual desktop then, the content with clipbook sends to integrated virtual desktop simultaneously; Integrated virtual desktop is received the message that the Contents of clipboard of first service node changes, read the content of SOCKET, the content of the clipbook that SOCKET is transmitted is stored with the String form, simultaneously, send the Contents of clipboard of clipbook updating message and reception to second service node in the mode of SOCKET.
In the such scheme, under LINUX operating system, second service node described in the step C comprises the local clipboard content update for the Contents of clipboard that receives: second service node receives clipbook updating message and Contents of clipboard, and agent process sends one to the Xclipboard application program and upgrades clipbook message; After the Xclipboard application program was received message, XA_CLIPBOARD was set to the Contents of clipboard that agent process transmits.
In the such scheme, described step D comprises: the application program to second service node on integrated virtual desktop sends the paste operation request, and the paste operation request sends to second service node by the network interface channel between the integrated virtual desktop and second service node " the integrated virtual desktop process → Client Agent process → session node master control process → second service node agent process "; Second service node is handled the back to this request and is returned feedback message to integrated virtual desktop, and the Contents of clipboard after the renewal sticks on the application program that belongs to second service node.
(3) beneficial effect
From technique scheme as can be seen, the present invention has following beneficial effect:
1, utilizes the present invention, by the clipbook data content is arranged to unified string format, and uniform communication mechanism is set between a plurality of service nodes, transmits the clipbook data content, under integrated virtual desktop, utilize client, between the isomery service node of multi-node intelligent network application service system, realized sharing and transmission of clipbook resource as terminal.
2, utilize the present invention, owing between the isomery service node of multi-node intelligent network application service system, realized sharing and transmission of clipbook resource, so between the application program that provides by different service nodes, can carry out seamless duplicating, operation such as cut and paste.
3, integrated virtual desktop is a stand-alone utility, operating system independent with this locality, therefore the data passes of clipbook of the present invention occurs between each service node of virtual desktop program and this routine access, does not have positive connection with the local operation system at virtual desktop place.
4, the present invention makes the user under integrated virtual desktop, can both carry out seamless clipbook data sharing and transmission between any two application programs, the difference of having ignored service node operating system fully provides more friendly experience and more powerful computing environment to the user.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with specific embodiment, and with reference to accompanying drawing, the present invention is described in more detail.
As shown in Figure 1, Fig. 1 is the method flow diagram that clipbook is shared of realizing in the multi-node intelligent network application service system provided by the invention, and this method may further comprise the steps:
Step 101: in advance the clipbook data content is arranged to unified string format, and uniform communication mechanism is set between a plurality of service nodes, transmits the clipbook data content;
Step 102: on integrated virtual desktop, the application program of first service node is duplicated/shearing manipulation, this is duplicated/shearing manipulation information passes to first service node;
Step 103: first service node receives described duplicating/shearing manipulation information, convert Contents of clipboard to described unified string format, adopt described uniform communication mechanism that Contents of clipboard is sent to second service node by integrated virtual desktop, second service node is with the Contents of clipboard of local clipboard content update for receiving;
Step 104: the application program to second service node on integrated virtual desktop is carried out paste operation, and the Contents of clipboard after second service node will upgrade pastes on the application program of self, realizes that clipbook is shared.
In the above-mentioned steps 101, described unified string format is the string string format, and described uniform communication mechanism is SOCKET message communicating mechanism.
Here, why the clipbook data content is arranged to unified string format, be because in the multi-node intelligent network applied environment, the data format of the clipbook between the isomery service node is not quite identical, and this has also caused the sharing of clipbook data between the isomery service node.Therefore, the present invention is defined as unified string string format with the clipbook data content.
In addition, at present in the multi-node intelligent network application service system, do not have unified message communicating mechanism between each service node yet,, still can't between each service node, realize sharing of clipbook data even the clipbook data content has been arranged to unified string format.Therefore, the present invention also is provided with unified SOCKET message communicating mechanism, be used between a plurality of service nodes, transmitting the clipbook data content, and under integrated virtual desktop, utilize client as terminal, realize clipbook data sharing and data passes between the application program to many service nodes (comprising isomorphism node and heterogeneous nodes) of connecting.Under integrated virtual desktop, make between the application program that provides by different service nodes and can carry out seamless " duplicating ", " stickup " and operations such as " shearings ".
Integrated virtual desktop is a stand-alone utility, operating system independent with this locality, therefore the data passes of clipbook of the present invention occurs between each service node of virtual desktop program and this routine access, does not have positive connection with the local operation system at virtual desktop place.
As shown in Figure 2, Fig. 2 shares schematic diagram according to embodiment of the invention clipbook between many service nodes in the heterogeneous network application service system.In Fig. 2, show the integrated virtual desktop of client and a plurality of service node that application service is provided.Described service station comprises first service node, second service node and the 3rd service node, and the operating system of these service nodes is isomeries.The a plurality of service nodes of need of work that the present invention is all and the integrated virtual desktop program of client are cooperated with each other, and wherein service node and client all are independent operatings, set up to communicate by network SOCKET message communicating mechanism after network connects.
The method that realizes that in the multi-node intelligent network application service system clipbook is shared provided by the invention comprises that the monitoring of design clipbook, clipbook communication and clipbook upgrade three steps, and the necessary message communicating mechanism of design these three steps of realization, specifically comprise:
1, the needed message communicating mechanism of this step is monitored and realized to clipbook.The variation of the agent process monitoring service device end Contents of clipboard of first service node, and judge whether the content that changes is from duplicating or shearing manipulation that this server application carries out.If not, then ignore.Being monitored by service broker's process, is in order to satisfy the application demand of wide area environment.
2, clipbook communication and realize the needed message communicating mechanism of this step.The agent process of first service node sends a message to integrated virtual desktop by communication port " service node agent process → session node master control process → Client Agent process → integrated virtual desktop process ", and the Contents of clipboard of needs transmission is converted to string format send integrated virtual desktop to, by realizing that in the multi-node intelligent network application service system method that clipbook is shared is transmitted to other service node.
3, clipbook upgrades and realizes the needed message communicating mechanism of this step.The Contents of clipboard that the agent process of second service node and the 3rd service node transmits from integrated virtual desktop by the acquisition of " integrated virtual desktop process → Client Agent process → session node master control process → service node agent process " passage, convert character format the data format of local clipbook requirement to, upgrade local clipboard then.
Below in conjunction with accompanying drawing 2 and accompanying drawing 3, embodiments of the present invention and implementation procedure are made functional descriptions.In Fig. 2, the user moves the application program from different service nodes on the client virtual desktop, as window 1 is the application program that first service node provides, and window 2 is application programs that joint second service point provides, the application program that the program of window 3 is provided by the 3rd service node.Fig. 3 describes and realizes the detailed process that clipbook is shared between the isomery operating system service node.
According to the course of work schematic diagram that clipbook between heterogeneous nodes shown in Figure 3 is shared, " duplicating " of the present invention " stickup " specific implementation process is as follows:
1, clipbook is monitored
Clipbook is monitored step and is carried out at first service node, arrives shown in the process 3 as the process among Fig. 31.
Process 1, the application program that the user provides first service node on integrated virtual desktop are carried out " duplicating " operation.
Process 2, the user passes to the application program of first service node via communication port " the integrated virtual desktop process → Client Agent process → session node master control process → first service node agent process " to " duplicating " operation of the application program of first service node under integrated virtual desktop.Under the multi-node intelligent network application service system, the application program on the virtual desktop is actual to be to move on the service node of backstage.In fact " duplicating " operation that process 1 is carried out is equal on the application program of first service node carries out " duplicating " operation.
The agent process of process 3, the first service nodes is monitored the local clipboard content change.Under the WINDOWS operating system and under the LINUX operating system, the mode of monitoring clipbook is different:
A) under WINDOWS operating system, the message that system provides fixing clipbook to change: WM_DRAWCLIPBOARD.When Contents of clipboard changes, also, when the first service node agent process listens to the WM_DRAWCLIPBOARD system message, carry out next step operation.
B) under LINUX operating system, X window system does not provide the clipbook internal memory that reserves an overall situation separately that is similar under the WINDOWS operating system, but realizes the shearing (cut) and stickup (paste) function of LINUX text control desk with " selecting (selection) ".LINUX operating system predefine two kinds of selection: XA_PRIMARY and XA_CLIPBOARD.Under X Window, start an Xclipboard application program, and apply for that this program is the owner that XA_CLIPBOARD selects.When other application programs (as A) under the X Window were carried out " duplicating " operation, A obtained the ownership that XA_CLIPBOARD selects.When Xclipboard loses the ownership of XA_CLIPBOARD selection, call the content of call back function to A acquisition request XA_CLIPBOARD.Simultaneously, Xclipboard applies for that once more oneself is the owner of XA_CLIPBOARD, and sends the message that Contents of clipboard changes to the agent process of first service node.
2, clipbook communication
Clipbook communication is core procedure of the present invention, relates to integrated virtual desktop, session masters process, a plurality of service node, has run through whole application service, shown in the process 4 and process 5 of Fig. 3.Process 4, when the agent process of first service node listens to the message that Contents of clipboard changes:
A) under WINDOWS operating system, need judge whether the content that clipbook changes operates from local application " duplicating " by agent process, if, then send the message that Contents of clipboard changes to virtual desktop by SOCKET passage " service node agent process → session node master control process → Client Agent process → integrated virtual desktop process ", content with clipbook converts string format to simultaneously, sends to client; If not, then ignore.
B) under LINUX operating system, need not to judge, content with clipbook converts string format to earlier, send the message that Contents of clipboard changes by passage " first service node agent process → session node master control process → Client Agent process → integrated virtual desktop process " to virtual desktop then, transmit Contents of clipboard simultaneously and give client.
Process 5, integrated virtual desktop is received the message that the Contents of clipboard of first service node changes, and reads the content of SOCKET, the content of the clipbook that SOCKET is transmitted is stored with the String form.Simultaneously, Client Agent is searched for other service nodes that has connected, send the clipbook updating message to other first service nodes that connected and second service node successively, and the Contents of clipboard that will rigidly connect receipts sends first service node and second service node in the mode of SOCKET.
3. clipbook upgrades
The clipbook step of updating arrives shown in the process 8 as the process 6 of Fig. 3.
Process 6, the second service nodes receive the clipbook updating message that Client Agent sends over:
A) under WINDOWS operating system, upgrade the local clipboard content.At this moment, server agent process listens to the message WM_DRAWCLIPBOARD of the variation of Contents of clipboard, judges that the content of this clipbook variation " is not duplicated " operation from local application, so ignore.
B) under LINUX operating system, agent process sends one to the Xclipboard application program and upgrades clipbook message.After the Xclipboard application program was received message, XA_CLIPBOARD was set to the Contents of clipboard that agent process transmits.
Process 7, the user carries out " stickup " operation at virtual desktop to the application program of affiliated second service node.
Process 8, " stickup " operation requests sends to second service node by the network interface channel " the integrated virtual desktop process → Client Agent process → session node master control process → second service node agent process " between Client Agent and second service node agency.After second service node was handled this request, message feedback was given integrated virtual desktop, and the Contents of clipboard after the renewal sticks on the application program of affiliated second service node.
The present invention institute for this embodiment in, to realize that between heterogeneous nodes " the paste operation process is that example describes " duplicating ".In actual applications, described " shearing " " stickup " operating process and " duplicating " " the paste operation process is consistent, only will " duplicate " to replace to " shearing " and get final product.Such technical scheme is consistent on technical thought with technical scheme provided by the invention, should be included within protection scope of the present invention.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is specific embodiments of the invention; be not limited to the present invention; within the spirit and principles in the present invention all, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.