Conversation managing method in a kind of multi-node intelligent network application service system
Technical field
The present invention relates to the multi-node intelligent network application service system, specially refer to the session management in the multi-node intelligent network application service system.
Background technology
Along with developing rapidly of network infrastructure and internet, the kind and the function of various interactive application based on graphical interfaces are increasing, move these and use that needed to administer and maintain cost also more and more higher.
In addition, existing network application service environment, as Citrix ICA, Microsoft RDP, Sun Ray, VNC etc. exist some shortcomings, mainly comprise: at first, the network user's desktop environment mainly is confined on the service node in the system, generally can only use the application service that provides on this node, and be difficult to visit simultaneously the application service on a plurality of nodes, therefore can not make full use of various application services and the resource that exists on the network; Secondly, when using application service on a plurality of nodes of login user in system, for the various resources to whole system are controlled, need a kind of simple and effective administrative mechanism, this administrative mechanism not only needs to provide the management to the various resources of service system, also need the device resource of login user end is control effectively, existing network application service environment lacks a kind of like this mechanism; Present in addition network application service, particularly in the multinode service system, main parallel application service to be developed at particular system, its main target is for the network user provides high-performance calculation, and lacks the support based on the interactive application at traditional graph interface.
Adopt the multi-node intelligent network application service system of intelligent network application service mode to efficiently solve existing deficiency in the existing network application.In the multi-node intelligent network application service system, the user can exempt in the process of the application service of using various feature richness using the maintenance of execution environment; By the network application method of service, a plurality of users can also the share application resource, reduces the use cost of various application services greatly.Therefore adopting the intelligent network application service for a large amount of network users provide various application services, is a kind of important way that information technology strides forward towards low-cost, universality.In the multi-node intelligent network application service system, the method that session management is also adopted in the control of using service routine and related resource and management.
Session management is meant the network user specifically from signing in to the management of application service system until the whole process that logs off, comprising the maintenance of session status, based on the application service management of session, resource management etc.Session management is generally also all arranged in present existing network application, for example Windows TerminalService, utilize the network application of X agreement etc., these conversation managing methods generally all are confined to can not realize the session management to multinode network on the node.In the multinode network service system that has, for example also considered session management in Web service or the grid environment, but this management generally only is applicable to information service or at grid environment application newly developed, narrow application range, and lack the interactive application support based on the traditional graph interface.
Summary of the invention
An object of the present invention is to provide the conversation managing method in a kind of multi-node intelligent network application service system, realize management application service in the multi-node intelligent network application service system and terminal equipment.
Another object of the present invention provides the conversation managing method in a kind of multi-node intelligent network application service system, realizes the support to traditional graphical interfaces application service.
To achieve these goals, the invention provides the conversation managing method in a kind of multi-node intelligent network application service system, the multi-node intelligent network application service system is made up of the service node that communicates each other, the set of all service nodes is called service-domain, and described conversation managing method comprises:
1) each node in the service-domain is created the session masters process, and realizes the issue of application program in service-domain by the communication between each session masters process;
2) user is logined a certain node of multi-node intelligent network application service system first by terminal, the session masters process of node that the user logins is judged the session that does not have this user in the service-domain, for this user creates the session process, this node is a host node, after the establishment session process this session process is done session tokens;
3) this user starts an application program, when the session masters process on the host node judges that this application program is on host node, notifies this this application program of session process initiation, and this application program is mutual by this session process and this user terminal; If this application program is on other nodes, with this node is auxilliary node, described session tokens and application information notice should be assisted node session master control process, the session proxy process of being created this user by this auxilliary node session master control process on described auxilliary node starts this application program, and it is mutual that this application program is passed through this session proxy process, auxilliary node master control process and host node master control process and this session process and this user terminal;
4) after the user ends session, the session masters process of host node at first finishes this node application program relevant with this session and ends this user conversation process, notify the session masters process of all relevant in the described multi-node intelligent network application service system auxilliary nodes then, end application program relevant on each auxilliary node and session proxy process with this session with this session.
In the technique scheme, in described step 3), described application program is on auxilliary node the time, the session masters process of host node sends application start message to the session masters process of auxilliary node, after receiving application start message, the session masters process of auxilliary node judges whether this locality has the session proxy process, if local sessionless agent process, the session masters process of host node sends agent process establishment message to the session masters process of auxilliary node, session masters process by auxilliary node is created the session proxy process on this auxilliary node, at last application start message is sent to the session proxy process, by session proxy process initiation application program.
In the technique scheme, the session masters process of described step 3) host node or auxilliary node is during by session process or session proxy process initiation application program, also write down the corresponding relation of this application program and described session tokens, when application program is opened equipment, the session tokens of the driving of this node agency session under the session masters process inquiry of this node obtains this program, comprise the Datagram equipment connection request of this driving agency according to this mark generation, through host node session masters process, the session process sends to corresponding terminal, this terminal receives that this request back and this driving agency connect, and realize the visit of application program to user terminal.
In the technique scheme, the user disconnects network and connects, when hanging up session, session in the host node is changed into suspended state from running status, and send the session message on hold to described multi-node intelligent network application service system by the session masters process of host node, session masters process on the auxilliary node that every session therewith is relevant in the described multi-node intelligent network application service system changes this node session agent process into suspended state from running status after receiving this session message on hold.
When the user weighs a certain node of login system by terminal, after the session masters process of this node is judged the session that has this user in the service-domain, judge again whether this node is the host node of this session, if host node, activate this user's session process, if this node is not the host node of this session, terminal reconnects to host node and activates the session process that this user has hung up, send session by the session masters process of host node to each auxilliary node then and rerun message, auxilliary node session master control process is received the session proxy process that activates this user on this node after this information.
When the node of heavily logining as the user is not host node, node is responsible for the link information of the corresponding host node of inquiring user in whole service-domain thus, and then login terminal according to this link information to the user and send and to reconnect message, the user logins terminal and realizes and being connected of host node according to reconnecting message.
In the technique scheme, in described step 2) in, described establishment session process is to start graphical interfaces to show service processes and window management process.
In the technique scheme, in described step 2) in, described session tokens comprises the session identifier of login username and user authentication information, host node, the network connection information of login user and the information relevant with the login user graphical interfaces.
In the technique scheme, in described step 2) in, the session masters process of node that described user logins adopts multiple spot message communicating mechanism to judge the session that does not have this user in the service-domain; Described multiple spot message communicating mechanism adopts the T.120 series of canonical of ITU.
The invention has the advantages that:
1, the conversation managing method in the multi-node intelligent network application service system of the present invention has been realized to the transparent access of application program on the multinode with to the management and the use of terminal equipment resource.
2, the conversation managing method in the multi-node intelligent network application service system of the present invention has been realized can directly utilizing existing abundant application resource to the support based on the interactive application at traditional graph interface.
3, the conversation managing method in the multi-node intelligent network application service system of the present invention has guaranteed each internodal function equity in the system, does not need special center control nodes in whole system, is easy to system maintenance and expansion.
4, in the conversation managing method of multi-node intelligent network application service system of the present invention, same session can be set up the session proxy process as required in the system on other nodes, the application that session is started on this node manages, and increases the flexibility of system.
5,, realize the uniqueness of session in whole system, and can use for session proxy management of process on the auxilliary node and provide convenience by the session tokens in the system.
6, the application that the user started in the system is respectively the subprocess of session proxy process on session process or the auxilliary node on the host node, can utilize the management of process mechanism in the existing operating system that application process under the session is managed.
7, session status utilizes multiple spot message communicating mechanism to control by host node session process in the system, so session management mechanism is with good expansibility.
Description of drawings
Fig. 1 is the process schematic diagram in the conversation managing method in the multi-node intelligent network application service system of the present invention;
Fig. 2 is that the message in the conversation managing method in the multi-node intelligent network application service system of the present invention is transmitted schematic diagram;
Fig. 3 is the flow chart of the conversation managing method in the multi-node intelligent network application service system of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments the inventive method is described further.
As shown in Figure 3, the conversation managing method in the multi-node intelligent network application service system comprises:
Each node in step 10, the service-domain is created the session masters process, and the session masters process is used for session management and transmits message between node, and realizes the issue of application program in service-domain by the session masters process.Service-domain described here is meant the set of each service node in the multi-node intelligent network application service system.The issue of application program in service-domain is by realizing by the delivery applications registration message between the session masters process of each node, in the separate case application that is entitled as " application management subsystem and method in the multi-node intelligent network application service system ", the specific implementation of application programs issue has a detailed description, and no longer describes in detail at this.In the issuing process of application program, each application program has been indicated the position of its actual place node.
Step 20, user terminal are logined the multi-node intelligent network application service system first, create session.When a certain node in the user terminal login multi-node intelligent network application service system, the session masters process of node utilizes the inquiry of multiple spot message communicating mechanism whether to have this user's session in service-domain, when user terminal is logined the multi-node intelligent network application service system first, user conversation does not exist, the session masters process of node is created a user's session process at the present node of being logined, and this node is this user's host node.Can create different user conversations on a node, whether a certain node is that host node is relevant with specific user conversation, and for a certain user conversation, a node is a host node, and to another user conversation, this node may not be a host node just.Will do corresponding session tokens to the session process after creating the session process, the particular content of session tokens comprises login username and authentication information, unique session identifier, the network connection information of login user and the information relevant with the login user graphical interfaces on host node.In fact the establishment of session process is exactly to start corresponding graphical interfaces to show service processes and window management process etc.Wherein, graphical interfaces demonstration service processes is responsible for the concrete demonstration output function of process user application program, as setting-out, output pattern image etc.In one embodiment, graphical interfaces shows that service processes is by starting graphical interfaces server X Server realization.
The startup of step 30, node application program.User terminal starts a certain application program, user's session masters process is judged on which node of this application program in the multi-node intelligent network application service system according to the positional information of application program place actual node on the host node, it has two kinds of possibilities, the one, this application program is at local (on the host node), and the 2nd, this application program is in application service system on the node except that host node.When application program was on host node, the startup of this application program was directly finished by the session process on the host node.When application program was on the node except that host node, application program place node can be referred to as auxilliary node.The terminal use goes up according to the session masters process of application information on auxilliary node that starts in icon or the menu at the window manager (being the session process of node 1 among Fig. 2) of host node and sends application start message, and described application start message mainly comprises session tokens and application information; The session masters process of auxilliary node is according to the application start message that receives, check in this locality whether corresponding session proxy process is arranged, if do not have, the session masters process of host node sends session proxy process creation message (being the application corresponding initiation message) to the session masters process of auxilliary node, include session tokens in the session proxy process creation message, the session masters process of auxilliary node is created the session proxy process at local (on the auxilliary node) in view of the above, on the auxilliary node behind the already-existing session agent process, the session masters process of auxilliary node utilizes the pipeline between session masters process and session agent process that application start message is sent to the session proxy process, then by session proxy process initiation corresponding application.When starting application program, also to write down the corresponding relation of this application program and session tokens.
On a node, not only can create different session processes, also can create different session proxy processes, therefore the differentiation of major-minor node is only at specific user, and a node is a host node to a certain user conversation, may be exactly auxilliary node to another user conversation.As shown in Figure 1, on node 1, create session process 1,2 and 3, also created session proxy process 4,5 and 6 in addition.For the user who has created session process 1,2 and 3, node 1 is a host node, and for having created session proxy process 4,5 and 6, node 1 is exactly auxilliary node.From Fig. 1, can also see between master control process on the node and session process or the session proxy process pipeline being arranged, by pipeline master control process and session process or session proxy process pass-along message.Then the master control process pass-along message each other by each node between each node in the system.
The visit of step 40, subscriber terminal equipment.In the implementation of application program, the customer requirements application program is visit to subscriber terminal equipment to the access map of equipment, and the mapping of subscriber terminal equipment is realized by session management.As described in step 30, institute's application program started can be on host node, also can be on auxilliary node, the difference of application program place node location makes application program to the process difference of subscriber terminal equipment visit, below division it.
Application program is to the visit of subscriber terminal equipment on the host node: as shown in Figure 2, when the application program on the host node in the session is opened equipment, at first send the session query messages by the driving on host node agency to the session masters process of host node, the master control process is inquired about session under this program according to the process identification (PID) of application program; If inquire, return correct session tokens, and utilize this mark to generate equipment connection request message; Drive the agency to master control process transmitting apparatus connection request message; This equipment connection request message sends to the session process by the pipeline between session masters process and session process by the session masters process, and is last by session process and being connected of terminal room being transmitted to corresponding terminal device.Terminal is received to parse in the slave unit connection request message after the equipment connection request message to drive and is acted on behalf of address of node, place and relevant listening port number, act on behalf of the transmitting apparatus connection message to corresponding driving then, set up the driving agency and be connected, thereby realize that application program is to the visit of subscriber terminal equipment on the host node with equipment room.
Application program is to the visit of terminal equipment on the auxilliary node: application program is roughly the same to the process of terminal equipment visit to application program on the basic process of terminal equipment visit and the host node on the auxilliary node, but consider the fail safe of network application, the general outwards initiatively initiation connection of node that does not allow in the service-domain, therefore auxilliary node master control process can not directly transmit message to terminal, need transmit corresponding message by host node and set up corresponding the connection.Application program is as follows to the concrete operations of the visit of terminal equipment on the auxilliary node: when assisting the application access terminal equipment on the node, the driving that equipment connection request message sends on the auxilliary node is acted on behalf of, the driving agency of auxilliary node sends the session query messages to the session masters process of auxilliary node, and the session masters process is inquired about session under this program according to the process identification (PID) of application program; If inquire, return correct session tokens, according to session tokens, obtain the host node relevant information of the affiliated session of application program, the driving agency of auxilliary then node connects and transmitting apparatus connection request message with the session masters process of host node, the session masters process of host node receive pass through host node after the equipment connection request message the session process with equipment connection request forwards to relevant terminal; Act on behalf of the transmitting apparatus connection message by terminal to driving at last, and connect, realize that thus application program is to the visit of subscriber terminal equipment on the auxilliary node.
Step 50, hang-up session.After the user logined the multi-node intelligent network application service system, user's network connected and may disconnect, and will hang up session this moment.The state that still keeps whole desktop application when the user disconnects the network connection that is meant is hung up in session, and this moment, session process and this session process institute application program started and other resources still remained in the system.The session pending operation is specifically related to host node relevant with this session in the system and auxilliary node, when the session in the host node when running status is changed into suspended state, host node is responsible for sending the session message on hold to system, session masters process in the system on every auxilliary node that belongs to this session will be hung up session on this node according to this message after receiving this session message on hold.After the node that does not belong to this session in the system is received the session message on hold, ignore this message, do not do any operation.
Step 60, user heavily land.The user logins a certain node in the multi-node intelligent network application service system once more by terminal, the session masters process of node is judged the session that whether has this user in the service-domain, at this moment, there is this user's session in the service-domain, judge according to session identifier unique on the host node in the session tokens whether the node that the user heavily logins is host node, if host node restarts corresponding session process; If this node is not the session host node, then obtain the link information of host node the conversation recording information from this node, reconnect message according to this connection message to the terminal transmission, the session process that terminal directly connects and recovers originally to have hung up to the session host node according to the host node link information that is obtained.After the session process of host node was activated, host node sent session to each auxilliary node and reruns message, and auxilliary node is received the session proxy process that activates this user after this information.
Step 70, session stop.After the user finishes needed all operations, user log off, session stop.Session stop is to discharge all resources that take and end session process.Session stop relates to host node relevant with this session in the system and auxilliary node, when session stop, the session masters process of host node at first finishes on this node with the application program of this user's associated session and ends session process on the host node, send session stop message by multiple spot message communicating mechanism to system then, the session masters process of the auxilliary node of session correspondence therewith is after receiving this message in the system, is the session state setting on this node abort state, end the operation of the application program of associated session on the node by the session proxy process, end the operation of session proxy process by the session masters process on the auxilliary node at last.