WO2013071766A1 - 异常处理方法、装置和客户端 - Google Patents

异常处理方法、装置和客户端 Download PDF

Info

Publication number
WO2013071766A1
WO2013071766A1 PCT/CN2012/078524 CN2012078524W WO2013071766A1 WO 2013071766 A1 WO2013071766 A1 WO 2013071766A1 CN 2012078524 W CN2012078524 W CN 2012078524W WO 2013071766 A1 WO2013071766 A1 WO 2013071766A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
application
data
identifier
client
Prior art date
Application number
PCT/CN2012/078524
Other languages
English (en)
French (fr)
Inventor
秦晋
党沛
狄龙
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP12849883.9A priority Critical patent/EP2712119B1/en
Publication of WO2013071766A1 publication Critical patent/WO2013071766A1/zh
Priority to US14/143,946 priority patent/US9740515B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • H04L41/0661Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/40Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities

Definitions

  • the present invention relates to the field of online applications, and in particular, to an exception processing method, apparatus, and client. Background technique
  • the online application server can be deployed with various third-party developed applications, and the client can remotely connect to the online application platform to experience these applications.
  • the general interaction process between the online application platform and the client is as follows: The client uploads the input event generated by the user operation to the server, and the server calculates and processes the event after receiving the event, and sends the processed screen response result to the client, the client. Displayed locally after receiving the screen.
  • all applications run and process on the server, and the client is only responsible for uploading the user's operation input to the server and receiving the screen for decoding and display; but from the user's side, it is like
  • the local application of the operation is the same.
  • the existing remote desktop system supports automatic reconnection after abnormality, taking the remote desktop mstsc provided by the Microsoft Windows operating system as an example.
  • Automatic reconnection means that in the event of a network anomaly, the client can reconnect to the same session that was last connected without resending the authentication information.
  • the server sends an automatic reconnection cookie to the client. This cookie is bound to the current session and stored on the client.
  • the client encrypts the cookie and sends it to the server.
  • the server verifies the cookie. If the verification succeeds, the server is restored if the currently connected client and the disconnected device are connected to the same client. The same session, causing the client to continue the last session and continue to operate the remote desktop.
  • the inventors found that the prior art has at least the following disadvantages: For an online application system, since a virtual machine can be allocated to multiple users for simultaneous use, when an abnormal disconnection occurs, if the virtual machine remains The app continues to run to wait for the user to connect, not releasing The resource is not saved, and the operation of the application is not saved. It not only occupies the virtual machine resources, but also reduces the capacity and efficiency of the online application system. It also makes it impossible for the client to continue the operation when the connection is reconnected. Summary of the invention
  • the embodiment of the invention provides an exception processing method, device and client.
  • the technical solution is as follows:
  • An exception handling method including:
  • the virtual management server receives the abnormality notification sent by the virtual machine that interacts with the first client, where the abnormality notification carries at least the user identifier and the application identifier.
  • the normal processing mode saves the virtual machine data or the application corresponding to the application identifier. Apply data and release the virtual machine resources.
  • the virtual management server receives the abnormality notification sent by the virtual machine, and the method includes:
  • the virtual management server Receiving, by the virtual management server, the first connection request sent by the first client, where the first connection request carries at least a user identifier and an application identifier;
  • the virtual management server determines, according to the first connection request, an exception processing manner corresponding to the user identifier and the application identifier.
  • the virtual management server determines, according to the first connection request, an exception processing manner corresponding to the user identifier and the application identifier, specifically:
  • the first connection request carries an application identifier and a user identifier, and obtains an exception processing mode list that the application can support according to the application identifier; sending the exception processing mode list to the first client, so that the first connection request a client selects an exception handling mode from the exception handling list, and determines, by using the exception processing mode selected by the first client, an exception processing manner corresponding to the user identifier and the application identifier; or
  • the virtual management server When the first connection request carries the application identifier, the user identifier, and the specified exception handling mode, the virtual management server obtains an exception processing mode list that the application can support according to the application identifier, and determines the abnormal processing mode list. Whether the exception handling mode corresponding to the specified exception handler application identifier is included; otherwise, the virtual management server will be the exception Sending the method list to the first client, receiving an exception handling mode selected by the first client from the exception handling list, and determining an abnormal processing mode selected by the first client to determine the first connection
  • the virtual management server determines and saves the specified exception processing manner as an exception processing manner corresponding to the user identifier and the application identifier.
  • the processing of the virtual machine data, or the application data of the application corresponding to the application identifier, and releasing the virtual machine resource including:
  • the virtual management server determines, according to preset logic of the application, that the application needs to save running data according to the preset logic of the application, and according to the configuration file of the application, when the exception processing manner corresponding to the user identifier and the application identifier is an application save mode.
  • Obtaining the user personal data indicated by the configuration file from the virtual machine storing the user personal data, the application identifier, and the user identifier to the data storage server, closing the application, releasing the virtual machine resource, and updating the virtual machine state.
  • the virtual management server In the mode, the virtual management server generates virtual machine snapshot data according to the current state of the virtual machine, and stores the generated virtual machine snapshot data, application identifier, virtual machine information, virtual machine identifier, and user identifier to the data.
  • the storage server releases the virtual machine resources and updates the state of the virtual machine.
  • the method further includes:
  • the virtual management server sends an abnormal recovery inquiry message to the second client;
  • the virtual management server receives the abnormality recovery request of the second client, and selects the destination virtual machine according to the user identifier and the application identifier carried in the second connection request; " ⁇
  • the determining, by the second connection request, that the application needs to perform the abnormality recovery specifically: the virtual management server determines that the data storage server stores the to-be-recovered data corresponding to the application identifier and the user identifier.
  • the virtual management server receives the abnormality recovery request of the second client, and selects the destination virtual machine according to the user identifier and the application identifier carried in the second connection request, specifically: the virtual management server obtains the data from the data storage server. Data to be recovered corresponding to the application identifier and the user identifier;
  • the virtual management server selects a destination virtual machine according to the virtual machine data
  • the virtual management server selects the destination virtual machine according to the application identifier.
  • the data to be restored When the data to be restored is virtual machine data, the data to be restored includes: virtual machine snapshot data, virtual machine information, and virtual machine identifier.
  • the virtual management server selects the destination virtual machine according to the virtual machine data, and the method includes: determining, by the virtual management server, whether the virtual machine corresponding to the virtual machine identifier is idle, and if not, selecting an idle that matches the virtual machine information.
  • the virtual machine acts as the destination virtual machine.
  • the selecting, by the virtual management server, the destination virtual machine according to the application identifier specifically: when the data to be restored is application data, selecting the first virtual machine from the idle virtual machine as the destination virtual machine according to the application identifier,
  • the first virtual machine is a virtual machine running to support an application indicated by the application identifier.
  • Complex including:
  • the virtual machine snapshot data is started according to the virtual machine snapshot data, and the target virtual machine is directly restored to the abnormally interrupted application;
  • the virtual machine When the data to be restored is application data, the virtual machine is started, and the application data is copied to the application that is abnormally interrupted.
  • the method further includes:
  • An abnormal processing device includes:
  • a receiving module configured to receive an abnormality notification sent by a virtual machine that interacts with the first client, where the abnormality notification carries at least a user identifier and an application identifier; and a normal processing manner, where the virtual machine data is saved or corresponding to the application identifier Apply application data and release the virtual machine resources.
  • the receiving module is further configured to receive a first connection request sent by the first client, where the first connection request carries at least a user identifier and an application identifier;
  • the device also includes:
  • a determining module configured to determine, according to the first connection request, an exception handling manner corresponding to the user identifier and the application identifier.
  • the determining module includes:
  • a first determining unit configured to: carry the application identifier and the user identifier, and obtain, according to the application identifier, a list of exception handling modes that the application can support; send the exception processing mode list to the first Determining, by the client, the abnormality processing mode from the exception processing list, and determining, by the first client, an abnormal processing manner, a second determining unit, configured to carry the first connection request carrying application And the identifier, the user identifier, and the specified exception processing manner, obtaining an exception processing mode list that the application can support according to the application identifier, and determining whether the abnormal processing mode list includes the specified abnormal processing mode;
  • the exception handling mode is sent; otherwise, the exception processing mode list is sent to the first client, and the first client receives the exception processing mode selected from the exception handling list, and the first client is The selected exception handling mode is determined and saved as the user identifier and application identifier Corresponds to exception handling; or,
  • the second determining unit is further configured to: when the first connection request carries an application identifier, a user identifier, and a specified exception handling manner, the virtual management server processes the specified exception
  • the exception processing module includes:
  • a first exception processing unit configured to: when the exception processing manner corresponding to the user identifier and the application identifier is an application save mode, determine, according to preset logic of the application, that the application needs to save operation data, and according to the application a configuration file, obtaining user personal data indicated by the configuration file from the virtual machine, storing the user personal data, an application identifier, and a user identifier to a data storage server, closing the application, releasing virtual machine resources, and updating a virtual machine state;
  • the second exception processing unit is configured to: when the exception processing mode corresponding to the user identifier and the application identifier is to save the virtual machine state mode, generate virtual machine snapshot data according to the current state of the virtual machine, and The generated virtual machine snapshot data, the application identifier, the virtual machine information, the virtual machine identifier, and the user identifier are stored to the data storage server, the virtual machine resources are released, and the state of the virtual machine is updated.
  • the receiving module is further configured to receive a second connection request sent by the second client, where the second connection request carries the user identifier and the application identifier;
  • the device also includes:
  • An abnormality recovery determining module configured to determine, according to the second connection request, that an application indicated by the second connection request needs to perform abnormal recovery
  • a sending module configured to send an abnormal recovery inquiry message to the second client
  • a virtual machine selection module configured to: when receiving an abnormal recovery request of the second client, select a destination virtual machine according to the user identifier and the application identifier carried in the second connection request;
  • a recovery module configured to restore, by the virtual management server, an abnormally interrupted application on the destination virtual machine.
  • the abnormality recovery determining module is specifically configured to determine that the data to be restored corresponding to the application identifier and the user identifier is stored in the data storage server.
  • the virtual machine selection module includes:
  • An obtaining unit configured to obtain, from the data storage server, data to be restored corresponding to the application identifier and the user identifier;
  • a selecting unit configured to: when the data to be restored is virtual machine data, select a destination virtual machine according to the virtual machine data;
  • the selecting unit is further configured to: when the data to be restored is application data, select a destination virtual machine according to the application identifier.
  • the data to be restored includes: virtual machine snapshot data, virtual machine information, and virtual machine identifier.
  • the selecting unit is specifically configured to determine whether the virtual machine corresponding to the virtual machine identifier is idle, the virtual machine corresponding to the virtual machine identifier is idle, and the virtual machine corresponding to the virtual machine identifier is used as the destination virtual machine;
  • the selecting unit is further configured to: the virtual machine corresponding to the virtual machine identifier is not idle, and select an idle virtual machine that matches the virtual machine information as the destination virtual machine.
  • the selecting unit is further configured to: when the data to be restored is the application data, select the first virtual machine from the idle virtual machine as the destination virtual machine according to the application identifier, where the first virtual machine supports the application identifier. Indicates the virtual machine that the application is running on.
  • the recovery module includes:
  • a first recovery unit configured to: when the data to be restored is virtual machine data, recover according to the virtual state
  • a second recovery unit configured to: when the data to be restored is application data, start a virtual machine, copy the application data to the destination virtual machine, and run according to the application data on the destination virtual machine The application of the abnormal interruption.
  • the sending module is further configured to send the virtual machine identifier to the client, so that the client establishes a communication connection with the virtual machine according to the virtual machine identifier and performs data interaction with the virtual machine.
  • An abnormal recovery method including:
  • the client sends a connection request to the virtual management server, where the connection request carries at least the user identifier and the application identifier;
  • the client receives a list of exception handling modes corresponding to the application identifier sent by the virtual management server;
  • the client sends the exception handling mode selected by the client to the virtual management server, so that the virtual management server determines and saves the abnormal processing mode selected by the client as the application identifier and the user identifier. Corresponding exception handling.
  • the connection request carries a user identifier, an application identifier, and a specified exception handling manner.
  • the client receives the exception processing mode list corresponding to the application identifier sent by the virtual management server, and specifically includes: When the virtual management server determines that the specified exception handling mode is not included in the exception processing mode list, the client receives the abnormal processing mode list sent by the virtual management server.
  • the method further includes:
  • a client that includes:
  • a sending module configured to send a connection request to the virtual management server, where the connection request carries at least a user identifier and an application identifier;
  • a receiving module configured to receive a list of exception handling modes corresponding to the application identifier sent by the virtual management server
  • the sending module is further configured to send the abnormal processing mode selected by the client to the virtual management server, so that the virtual management server determines the abnormal processing mode selected by the client as the application identifier and The exception handling method corresponding to the user ID.
  • the connection request carries a user identifier, an application identifier, and a specified exception handling manner.
  • the receiving module is specifically configured to receive when the virtual management server determines that the abnormal processing mode is not included in the exception processing mode list.
  • the exception processing mode list sent by the virtual management server.
  • the sending module is further configured to: when the receiving module receives the abnormal recovery query message sent by the virtual management server, send an abnormal recovery request or an abnormal recovery rejection message to the virtual management server, so that the virtual management server can be configured according to the virtual management server
  • the abnormal recovery request or the abnormal recovery rejection message performs a corresponding operation.
  • the virtual management server receives the exception notification of the abnormal interruption, and saves the application data or the virtual machine data according to the exception handling method corresponding to the client, and releases the virtual machine resource, thereby Different applications and different users can customize different exception handling methods according to their needs, and also enable the client to save not only the time when the abnormality occurs but also the user's use state at the time when the abnormality occurs, and improve the capacity of the online application system. And efficiency.
  • FIG. 1 is a structural diagram of an online application system according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention
  • FIG. 7 is an abnormality processing apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention;
  • FIG. 9 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention;
  • FIG. 11 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention;
  • FIG. 12 is a flowchart of an abnormality processing method according to an embodiment of the present invention;
  • FIG. 13 is a schematic structural diagram of a client according to an embodiment of the present invention. detailed description
  • the application can be divided into applications that need to save running data and applications that do not need to save running data according to their preset logic. For applications that do not need to save running data, directly close the application and release the virtual machine resources. The next time the user connects, the application runs from the beginning; for the application that needs to save the running data: first close the application, then save the user's personal running data to the running data storage server, and release the virtual machine resources. Since the online application platform also provides various Use, but mainly for game applications, so in the following introduction will directly discuss the game as an example of the application.
  • the game application can be classified as follows according to whether the game running data is saved: There is no need to save the application that runs the data and the application that needs to save the running data. Among them, applications that do not need to save running data can be represented by various flash games. Users play from the beginning every time, and no running data needs to be saved; for example, "dig gold”, "blocking bricks" and other games.
  • FIG. 1 is a structural diagram of an online application system according to an embodiment of the present invention.
  • the online application system includes: a virtual management server, a virtual machine, and a data storage server.
  • the virtual management server is used to manage the virtual machine, including the establishment, deletion, and startup of the virtual machine.
  • the virtual machine is used to allocate different system resources according to different business requirements, install different operating systems and application software, and provide services for remote clients.
  • FIG. 2 is a flowchart of an exception processing method according to an embodiment of the present invention. The method is based on the architecture shown in FIG. 1.
  • the execution entity is a virtual management server. Referring to FIG. 2, the embodiment specifically includes:
  • the virtual management server receives the abnormal notification sent by the virtual machine that interacts with the first client, where the abnormality notification carries at least the user identifier and the application identifier.
  • the first client is a client of an online application.
  • the virtual machine when a connection disconnection or abnormal connection occurs between the first client and the virtual machine, causing a failure to disconnect from the client, the virtual machine sends an exception notification to the virtual management server.
  • the exception notification carries the user identifier of the user using the first client and the application identifier of the application in which the exception occurred.
  • the virtual management server saves the virtual machine data or the application data of the application corresponding to the application identifier according to the saved exception handling manner corresponding to the user identifier and the identifier, and releases the virtual machine. Resources.
  • the quotient can be performed when the client connects to the virtual management server for the first time and uses the application corresponding to the application ID, and can also be performed each time the client and the virtual management server are connected.
  • the abnormality processing mode corresponding to the user identifier and the application identifier is queried according to the user identifier and the application identifier: when the exception processing mode is the application save mode, the virtual management server is based on the application pre- Setting a logic to determine whether the application needs to save data; when the application needs to save data, the virtual management server acquires the user indicated by the configuration file from the virtual machine according to the configuration file of the application.
  • the personal data stores the user personal data, the application identifier, and the user identifier to the data storage server, closes the application, releases the virtual machine resource, and updates the virtual machine state for subsequent allocation by the virtual management server.
  • the virtual management server automatically generates virtual machine snapshot data according to the current state of the virtual machine, and the generated virtual machine snapshot data,
  • the application identifier, the virtual machine information, the virtual machine identifier, and the user identifier are stored to the data storage server, the virtual machine resources are released, and the state of the virtual machine is updated. Since the server of the online application platform uses the virtual machine technology, the state of the virtual machine can be saved in real time using the snapshot technology in the virtual machine.
  • the snapshot is a "copy" of the virtual machine at a certain point in time, and the "copy” is Instead of copying the virtual disk file of the virtual machine, it keeps the state of the disk file and system memory at that point in time so that the virtual machine can recover to that point in time at any time.
  • the virtual management server receives the abnormal notification of the abnormal interruption, and saves the application data or the virtual machine data according to the exception handling method corresponding to the application identifier and the user identifier, and The virtual machine resources are released, so that different applications and different users can customize different exception handling methods according to their requirements, and the client can not only save the time when the abnormality occurs or the user's use state closest to the time when the abnormality occurs, but also improve The capacity and efficiency of online application systems.
  • FIG. 3 is a flowchart of an exception processing method according to an embodiment of the present invention. The method is based on the architecture shown in FIG. 1.
  • the two parties in the embodiment are the virtual management server and the first client.
  • the embodiment specifically includes:
  • the first client sends a first connection request to the virtual management server, where the first connection request carries an application identifier and a user identifier of a user using the first client.
  • the first connection request carries at least an application identifier and a user identifier; the application identifier is used to indicate an application that the first client is ready to use remotely, and the user identifier is used to identify a user who uses the first client.
  • the first client connects to the virtual management server.
  • the step 302 includes: a process in which the first client establishes a connection with the virtual management server, performs security authentication, and performs capability negotiation, which is not described in the prior art.
  • the virtual management server obtains, according to the application identifier carried in the connection request, a list of exception handling modes that the application can support, and sends the exception processing mode list to the first client.
  • the exception handling mode list that the application can support is pre-stored in the configuration file of the application, and the virtual management server can read the configuration file of the application corresponding to the application identifier according to the application identifier, so as to obtain the application supportable by the application.
  • List of exception handling methods This list can contain various exception handling methods, such as application save mode, save virtual machine state mode, and not save application mode. The application mode is not saved, that is, the application is not saved.
  • the virtual management server may also confirm whether the exception handling mode corresponding to the user identifier and the application identifier carried in the first connection request is saved, and if so, the subsequent negotiation determines the abnormal processing mode. step.
  • the step of determining the abnormal processing mode after performing the subsequent negotiation is performed only when the abnormality processing mode corresponding to the user identifier and the application identifier carried in the first connection request is not saved.
  • the first client selects an exception handling mode from the exception processing mode list.
  • the exception handling mode can be further selected according to the capabilities or settings of the client. Depending on the client's capabilities and settings, different clients can choose different exception handling methods from the exception handling mode list. the way.
  • the application save mode refers to first closing the application, and then saving the user personal data, the application identifier, and the user identifier to the data storage server, and releasing the virtual machine resources.
  • the virtual machine state saving mode refers to generating snapshot data of the virtual machine, and storing the generated virtual machine snapshot data, application identifier, virtual machine information, virtual machine identifier, and user identifier to the data storage server, releasing the The virtual machine resource is described so that when the user reconnects next time, according to the snapshot data, the time point when the user disconnects is restored.
  • the virtual machine A when virtual machine A generates virtual machine snapshot data during the running application, the virtual machine can be restarted according to the snapshot file at any time thereafter. If the virtual machine runs the application again, and the running time of the application can be the moment when the virtual machine snapshot data is generated.
  • Steps 303-305 are processes in which the first client negotiates with the virtual management server for exception handling.
  • the process of determining the abnormal processing mode may determine one or more exception processing manners, and determine a priority order of the multiple exception processing manners while determining a plurality of exception processing manners. For example, set the priority of the app save mode to the highest, save The priority of the virtual machine state mode is the second.
  • the first client and the virtual management server preferentially apply the application save mode to save the running state of the application.
  • the connection request sent by the client to the virtual management server carries the application identifier, the user identifier, and the specified exception handling mode.
  • the specified exception handling mode may be the exception handling mode set by the client or the default exception handling mode of the client.
  • Step 303 is specifically: the virtual management server receives the first connection request, and step 304-
  • the 305 may be replaced by the following: the virtual management server acquires a list of exception handling modes that the application can support according to the application identifier, and determines whether the exception processing mode list includes the specified exception processing mode; And determining, by the virtual management server, the exception processing mode list to the first client, where the specified exception processing mode is determined and saved as the exception processing manner corresponding to the user identifier for the secondary connection; And receiving, by the first client, an exception processing manner from the exception processing list, and determining, by using the exception processing manner selected by the first client, an exception processing manner corresponding to the user identifier.
  • step 303 when the first connection request carries the application identifier, the user identifier, and the specified exception handling mode, step 303 is specific.
  • the virtual management server receives the first connection request, and the steps 304-305 can be replaced by the following:
  • the virtual management server determines and saves the specified exception handling manner as an exception handling manner corresponding to the user identifier and the application identifier.
  • the specified exception handling mode is used as the exception handling mode corresponding to the user identifier at the time of the connection, and when the exception occurs subsequently, the specified exception handling mode is applied to perform the exception processing.
  • the virtual management server determines, according to the application identifier and the user identifier carried in the first connection request, that the application indicated by the first connection request does not need to perform abnormal recovery.
  • the virtual management server determines that the to-be-recovered data corresponding to the application identifier and the user identifier is not saved in the data storage server, and determines that the application indicated by the first connection request does not need to perform abnormal recovery.
  • only the first connection request indicates that the application does not need to perform abnormal recovery as an example.
  • the virtual management server performs the step 306, it is also possible to directly confirm whether the exception handling mode corresponding to the user identifier and the application identifier carried in the first connection request is saved and whether an abnormality needs to be performed. restore. 307.
  • the virtual management server selects an idle virtual machine, so that the first client runs the application on the selected virtual machine.
  • the virtual machine that can support the application corresponding to the application identifier is selected from the idle virtual machine according to the application identifier, so that the first client runs the application on the selected virtual machine.
  • the virtual management server selects an idle virtual machine capable of supporting the application from the idle virtual machine according to the application identifier. Update the state of the corresponding virtual machine, send the application identifier to the virtual machine, enable the virtual machine to start the application corresponding to the application identifier, and send the virtual machine address to the first client, so that the first client sends the virtual server according to the virtual management server.
  • the virtual machine address establishes a communication channel with the virtual machine, and the virtual machine sends audio and video data to the first client to display the running of the application, and the first client uploads the control command to operate the application.
  • the establishment of the connection and operation process is prior art, and the present invention will not be described again.
  • the virtual management server When the virtual management server receives the abnormality notification sent by the virtual machine that interacts with the first client, the abnormality notification is used to query the abnormality processing mode corresponding to the user identifier and the application identifier.
  • the virtual management server determines the user identifier and After the exception handling mode corresponding to the identifier is applied, the user identifier, the application identifier, and the exception handling mode are saved. Therefore, in this step, when an abnormality occurs, the virtual management server can identify the user identifier and the application according to the abnormality.
  • step 310 If yes, go to step 310;
  • This embodiment is described by taking an example in which the application needs to save the running data.
  • the virtual management server learns the preset logic of the application by reading the configuration file of the application, and according to the preset logic of the application, it can be known whether the application whose abnormal interruption is an application that needs to save the running data.
  • the virtual management server acquires user personal data indicated by the configuration file from the virtual machine, and stores the user personal data, an application identifier, and a user identifier to a data storage server.
  • the virtual management server can learn the save path and file name of the user personal data in the application by reading the configuration file of the application, and according to the learned save path and The file name retrieves the user's personal data from the virtual machine and stores the user's personal data, application identification, and user ID to the data storage server.
  • the virtual management server closes the application, releases the virtual machine resource, and updates the virtual machine state, and ends.
  • step 309-step 311 is a process in which the virtual management server saves the running data of the application on the virtual machine according to the application saving manner, and releases the virtual machine resource.
  • the virtual machine snapshot data is generated according to the current state of the virtual machine, and the generated virtual machine snapshot data, application identifier, and virtual The machine information, the virtual machine identifier, and the user identifier are stored to the data storage server;
  • the virtual management server stores the generated virtual machine snapshot data, the application identifier, the virtual machine information, the virtual machine identifier, and the user identifier to the data storage server, and saves the storage path on the data storage server in the user information.
  • the user information table records personal related information of the user.
  • the virtual machine information includes related performances of the virtual machine, such as memory size, CPU information, and hard disk information.
  • step 312-step 313 is a process in which the virtual management server saves the virtual machine snapshot data according to the state of saving the virtual machine state, and releases the virtual machine resource.
  • the virtual management server when the client and the virtual machine interacting with the virtual machine are abnormally interrupted, receives the abnormality interrupt notification, and saves the application data or the virtual machine data according to the abnormal processing manner corresponding to the client.
  • the virtual machine resources are released, so that different applications and different users can customize different exception processing methods according to their requirements, and the client can not only save the time when the abnormality occurs or the user's use state when the abnormality occurs. It avoids taking up virtual machine resources for a long time and increases the capacity and efficiency of online application systems.
  • FIG. 4 is a flowchart of an exception processing method according to an embodiment of the present invention. This embodiment is performed on the basis of the embodiment shown in FIG. 3.
  • the application is run on the virtual machine according to the first connection request, and when the application is abnormal, the virtual management server negotiates Determine the exception handling method, save the virtual machine data or application data, and then package Includes:
  • the virtual management server receives a second connection request sent by the second client, where the second connection request carries the user identifier and the application identifier.
  • the second client may be the client where the application is abnormal, that is, the first client, or another client, and the user may not use the first client to perform the connection. Instead, the connection is made from the second client.
  • the virtual management server determines, according to the second connection request, that an application indicated by the second connection request needs to perform abnormal recovery.
  • the virtual management server determines that the to-be-recovered data corresponding to the application identifier and the user identifier is saved in the data storage server, and determines that the application indicated by the second connection request needs to perform abnormal recovery.
  • the virtual management server determines, according to the user identifier in the second connection request, whether the data corresponding to the user identifier is saved on the data storage server, if the data corresponding to the user identifier is saved on the data storage server, and then according to the application identifier and The data is used to determine whether there is data to be restored corresponding to the application identifier.
  • the application indicated by the second connection request needs to perform abnormal recovery.
  • the virtual management server determines, according to the user identifier, that the data corresponding to the user identifier is stored on the data storage server, and then determines, according to the application identifier and the data, that the data is not corresponding to the application identifier.
  • the data to be restored, but the data to be restored of another application may prompt the second client to connect abnormally, and the second client may choose to continue the application of the last exception, or may abandon the last application. Continue to select this application.
  • the virtual management server sends an abnormal recovery query message to the second client.
  • the abnormal recovery query message carries an application identifier and a user identifier.
  • the abnormality recovery inquiry message is used to prompt the second client that the application has been abnormally interrupted, and the data to be restored saved when the abnormal interruption is saved on the data storage server, so that the second client selects whether to recover the abnormal interruption.
  • the data is used to prompt the second client that the application has been abnormally interrupted, and the data to be restored saved when the abnormal interruption is saved on the data storage server, so that the second client selects whether to recover the abnormal interruption.
  • the virtual management service According to;
  • the abnormality recovery request carries a user identifier and an application identifier. Specifically, the abnormality recovery request may have a flag for identifying that the second client agrees to perform abnormal recovery.
  • the second client sends an abnormality recovery request, and the abnormality recovery request is used to instruct the virtual management server to recover the abnormally interrupted application according to the to-be-recovered data saved on the data storage server.
  • the data to be recovered may be virtual machine data or application data.
  • the virtual machine data is saved when the virtual management server receives the exception notification according to the state of saving the virtual machine state.
  • the virtual machine data includes: virtual machine snapshot data generated during the abnormality, application identifier, and virtual machine. Information, virtual machine ID, and user ID.
  • the application data is saved when the virtual management server receives the exception notification according to the application save mode, and the application data specifically includes: user personal data indicated by the application profile, and the user personal data, the application ID and user ID.
  • step 406 is performed;
  • step 410 is performed;
  • the determining includes: determining whether the virtual machine information is included in the to-be-recovered data, and if the to-be-recovered data includes the virtual machine information, the to-be-recovered data is virtual machine data; if the to-be-recovered data does not include the virtual machine Information, the data to be restored is application data.
  • the virtual machine data includes at least a virtual machine snapshot data file, virtual machine information, and a virtual machine identifier.
  • the virtual management server determines whether the virtual machine corresponding to the virtual machine identifier is idle. ;
  • the corresponding virtual machine is queried according to the virtual machine identifier.
  • the virtual machine corresponding to the virtual machine identifier is preferentially selected as the destination virtual machine. If the virtual machine corresponding to the virtual machine identifier is not idle, the virtual machine that matches the virtual machine information is further queried as the destination virtual machine according to the virtual machine information.
  • the match refers to the performance of the virtual machine is the same as the virtual machine information, such as memory size, CPU information, and hard disk information.
  • the idle virtual machine that matches the virtual machine information is selected as the destination virtual machine, and step 407 is performed;
  • step 409 when the data to be restored is virtual machine data, start the target virtual machine to recover the abnormally interrupted application according to the virtual machine snapshot data in the virtual machine data, and skip to step 412;
  • the virtual machine data includes the virtual machine snapshot data information, and the destination virtual machine is started according to the virtual machine snapshot data information, and the application and the virtual machine can be restored to the scenario where the abnormality occurs.
  • Step 410 Select, according to the application identifier, a first virtual machine from the idle virtual machine as a destination virtual machine, where the first virtual machine is a virtual machine that supports an application indicated by the application identifier;
  • each virtual machine can support different applications depending on the platform or system. Therefore, the virtual machine needs to be matched according to the application identifier to obtain the virtual machine supporting the application indicated by the application identifier.
  • the application is installed first, then the user's personal data is copied, and then the application is started.
  • the virtual management server copies the application data corresponding to the user identifier and the application identifier to the corresponding directory of the application of the destination virtual machine.
  • the application data is data that has been saved when the virtual machine runs normally before the abnormality occurs, and the save is performed every preset time. Therefore, when the abnormality recovery is performed according to the application data, the restored scene is not necessarily It is the operational data of the application at the time of the abnormality. For example, if the preset duration of an application's automatic incremental save is 30 minutes, the virtual machine running the application saves the user's personal data every 30 minutes. If an abnormality occurs 15 minutes after the Nth save, The application data saved during the abnormality is the user data, user ID, and application identifier of the previous N saves.
  • the virtual management server sends the virtual machine identifier to the second client, so that the client establishes a communication connection with the virtual machine according to the virtual machine identifier, and performs data interaction with the virtual machine, and ends.
  • the process of establishing a connection between the virtual machine and the second client is a prior art, and details are not described herein again.
  • the second client receives the audio and video data sent by the server, and receives the application on the virtual machine in real time. The status of the run, and upload control commands to control the operation of the application on the virtual machine.
  • the input events of the user operation may specifically refer to keyboard and mouse events (clients of the PC model), button or touch screen events (mobile phone or PDA type client), remote control or game handle operation events ( TV-type client), etc.; server-side sending screen and client receiving screen display generally adopts the method of server-side to efficiently compress audio and video data (for example, adopt video compression technology) and then send it to the client, after the client receives the compression After the picture is decoded and displayed locally.
  • the virtual management server receives the exception notification of the abnormal interruption, and saves the application data or the virtual machine data according to the exception handling method corresponding to the client, and releases the virtual machine resource, thereby Different applications and different users can customize different exception handling methods according to their needs. It also enables the client to save not only the moment when the exception occurs or the user's usage state when the exception occurs, but also avoids occupying the virtual machine for a long time. Resources, and increase the capacity and efficiency of online applications. Further, when recovery is required according to the saved data, the client may determine the manner of abnormal recovery according to the type of data to be restored, so that the client can continue to run the application from the moment when the abnormality occurs or the time when the abnormality occurs most. The user experience.
  • FIG. 5 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention.
  • the device includes:
  • the receiving module 501 is configured to receive an abnormality notification sent by the virtual machine that interacts with the first client, where the abnormality notification carries at least a user identifier and an application identifier, and an abnormal processing manner, where the virtual machine data is saved or corresponding to the application identifier. Application data of the application, and release the virtual machine resources.
  • FIG. 6 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention.
  • the device includes: a receiving module 501 and an exception handling module 502,
  • the receiving module 501 is further configured to receive a first connection request sent by the first client, where the first connection request carries at least a user identifier and an application identifier;
  • the device also includes:
  • the determining module 503 is configured to determine, according to the first connection request, an exception handling manner corresponding to the user identifier and the application identifier.
  • FIG. 7 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention.
  • the device The method includes: a receiving module 501, an exception processing module 502, and a determining module 503,
  • the determining module 503 includes:
  • the first determining unit 503a is configured to: the first connection request carries an application identifier and a user identifier, and obtains, according to the application identifier, an exception processing manner list that the application can support; sending the exception processing manner list to the first a client, causing the first client to select an exception handling mode from the exception handling list, and using the exception processing mode determined by the first client to determine a second determining unit 503b for the first connection request
  • the exception processing mode list that the application can support is obtained according to the application identifier, and whether the abnormal processing mode list includes the specified abnormal processing mode; Identifying the corresponding exception handling mode; otherwise, sending the exception processing mode list to the first client, receiving the exception processing mode selected by the first client from the exception processing list, and the first The exception handling mode selected by the client is determined and saved as the user identifier and the application identifier. Know the corresponding exception handling method; or,
  • the second determining unit 503b is further configured to: when the first connection request carries an application identifier, a user identifier, and a specified exception processing manner, the virtual management server uses the specified abnormality
  • FIG. 8 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention.
  • the device includes: a receiving module 501 and an exception handling module 502,
  • the exception processing module 502 includes:
  • the first exception processing unit 502a determines that the application needs to save the running data according to the preset logic of the application when the exception processing manner corresponding to the user identifier and the application identifier is an application save mode, and according to the application, a configuration file, obtaining user personal data indicated by the configuration file from the virtual machine, storing the user personal data, an application identifier, and a user identifier to a data storage server, closing the application, releasing virtual machine resources, and updating the virtual
  • the second abnormality processing unit 502b is configured to generate a virtual state according to the current state of the virtual machine when the exception processing manner corresponding to the user identifier and the application identifier is to save the virtual machine state mode.
  • Compiling the virtual machine snapshot data storing the generated virtual machine snapshot data, the application identifier, the virtual machine information, the virtual machine identifier, and the user identifier to the data storage server, releasing the virtual machine resource, and updating the state of the virtual machine .
  • FIG. 9 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention.
  • the device includes: a receiving module 501 and an exception handling module 502,
  • the receiving module 501 is further configured to receive a second connection request sent by the second client, where the second connection request carries the user identifier and the application identifier;
  • the device also includes:
  • the abnormality recovery determining module 504 is configured to determine, according to the second connection request, that the application indicated by the second connection request needs to perform abnormal recovery;
  • the sending module 505 is configured to send an abnormal recovery query message to the second client.
  • the virtual machine selection module 506 is configured to: when receiving the abnormality recovery request of the second client, select a destination virtual machine according to the user identifier and the application identifier carried in the second connection request; wherein the abnormality recovery determining module 504 is specifically configured to: It is determined that the data to be restored corresponding to the application identifier and the user identifier is saved in the data storage server.
  • FIG. 10 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention.
  • the device includes: a receiving module 501, an exception handling module 502, an abnormality recovery determining module 504, a sending module 505, a virtual machine selecting module 506, and a recovery module 507,
  • the virtual machine selection module 506 includes:
  • the obtaining unit 506a is configured to obtain data to be restored corresponding to the application identifier and the user identifier from the data storage server.
  • the selecting unit 506b is configured to: when the data to be restored is virtual machine data, select a destination virtual machine according to the virtual machine data;
  • the selecting unit 506b is further configured to: when the data to be restored is application data, select a destination virtual machine according to the application identifier.
  • the data to be restored When the data to be restored is virtual machine data, the data to be restored includes: virtual machine snapshot data, virtual machine information, and virtual machine identifier.
  • the selecting unit 506b is specifically configured to determine whether the virtual machine corresponding to the virtual machine identifier is idle, the virtual machine corresponding to the virtual machine identifier is idle, and the virtual machine corresponding to the virtual machine identifier is used as the destination virtual machine; The selecting unit 506b is further configured to: the virtual machine corresponding to the virtual machine identifier is not idle, and select an idle virtual machine that matches the virtual machine information as the destination virtual machine.
  • the selecting unit 506b is further configured to: when the data to be restored is the application data, select the first virtual machine from the idle virtual machine as the destination virtual machine according to the application identifier, where the first virtual machine supports the application Identifies the virtual machine on which the indicated application is running.
  • FIG. 11 is a schematic structural diagram of an abnormality processing apparatus according to an embodiment of the present invention.
  • the device includes: a receiving module 501, an exception handling module 502, an abnormality recovery determining module 504, a sending module 505, a virtual machine selecting module 506, and a recovery module 507,
  • the recovery module 507 includes:
  • the first recovery unit 507a is configured to: when the data to be restored is virtual machine data, start the target virtual machine to directly recover the application of the abnormal interruption according to the virtual machine snapshot data in the virtual machine data;
  • a second recovery unit 507b configured to: when the data to be restored is application data, start a virtual machine, copy the application data to the destination virtual machine, and use the application data on the destination virtual machine The application that runs the abort.
  • the sending module 505 is further configured to send the virtual machine identifier to the client, so that the client establishes a communication connection with the virtual machine according to the virtual machine identifier and performs data interaction with the virtual machine.
  • the embodiment of the invention further provides a virtual management server, which comprises the exception processing device of any of the above embodiments.
  • the virtual management server or the exception processing apparatus provided in the embodiment of the present invention is the same as the method embodiment, and can be used to perform any step performed by the virtual management server in FIG. 2 to FIG. See the method embodiment for details, and details are not described here.
  • the virtual management server or the exception handling device provided by the embodiment of the present invention may be any device including a memory and/or a processor, such as a computer, a pen computer, a large workstation, a network device, etc., and the present invention does not specifically limited.
  • Each module of the present invention may be a module or unit running on a processor or a module or unit running on the processor.
  • FIG. 12 is a flowchart of an exception processing method according to an embodiment of the present invention. Referring to FIG. 12, the embodiment specifically includes:
  • the client sends a connection request to the virtual management server, where the connection request carries at least a user identifier and an application identifier.
  • the client receives an abnormality corresponding to an application identifier sent by a virtual management server. List of processing methods;
  • the client sends the exception handling mode selected by the client to the virtual management server, so that the virtual management server determines and saves the abnormal processing mode selected by the client as the application identifier and The exception handling method corresponding to the user ID.
  • the connection request carries a user identifier, an application identifier, and a specified exception handling mode.
  • the client receives the exception handling mode list corresponding to the application identifier sent by the virtual management server, and specifically includes:
  • the client receives the abnormal processing mode list sent by the virtual management server.
  • the method further includes:
  • the method provided in this embodiment determines the exception handling mode used when the abnormality occurs by the client and the virtual management server, so that the virtual management server can receive the exception notification of the abnormal interruption early, and save the application according to the abnormal processing manner corresponding to the client.
  • Data or virtual machine data, and release virtual machine resources so that different applications and different users can customize different exception handling methods according to their needs, and also enable the client to save not only the time when the abnormality occurs but also the time when the abnormality occurs. The user's usage status, and the capacity and efficiency of the online application system is improved.
  • FIG. 13 is a flowchart of a client provided by an embodiment of the present invention. Referring to Figure 13, the embodiment specifically includes:
  • the sending module 1301 is configured to send a connection request to the virtual management server, where the connection request carries at least a user identifier and an application identifier.
  • the receiving module 1302 is configured to receive a list of abnormal processing manners corresponding to the application identifier sent by the virtual management server;
  • the sending module 1301 is further configured to send the abnormal processing mode selected by the client to the virtual management server, so that the virtual management server determines the abnormal processing mode selected by the client as the application identifier.
  • the exception handling method corresponding to the user ID.
  • the connection request carries a user identifier, an application identifier, and a specified exception handling mode.
  • the receiving module 1302 is specifically configured to: when the virtual management server determines that the abnormal processing mode is not included in the exception handling mode list, Receiving the exception processing mode list sent by the virtual management server.
  • the sending module 1301 is further configured to: when the receiving module receives the abnormal recovery query message sent by the virtual management server, send an abnormal recovery request or an abnormal recovery rejection message to the virtual management server, so that the virtual management server can Corresponding operations are performed according to the abnormality recovery request or the abnormality recovery rejection message.
  • the client in the embodiment of the present invention may be a client in an online application, specifically a PC, a mobile phone, a PDA, a TV connected to a remote controller (or a game controller), or the like.
  • the transmitting module and the receiving module of the client may be transceivers of each client device.
  • the client provided in this embodiment is the same as the method embodiment, and may perform any step performed by the client (including the first client and the second client) in FIG. 2 to FIG. 4 and FIG.
  • the implementation process is detailed in the method embodiment, and will not be described here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)
  • Hardware Redundancy (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种异常处理方法、装置和客户端,属于在线应用领域。该方法包括:虚拟管理服务器接收与第一客户端交互的虚拟机发送的异常通知,所述异常通知至少携带用户标识和应用标识;所述虚拟管理服务器根据保存的与所述用户标识及应用标识对应的异常处理方式,保存所述虚拟机数据或与所述应用标识对应的应用的应用数据,并释放所述虚拟机资源。该装置包括:接收模块和异常处理模块。本发明使得不同应用、不同用户可以根据其需求定制不同的异常处理方法,也使得客户端不但可保存异常发生时的时刻或最接近异常发生时的时刻用户的使用状态,而且提高了在线应用系统的容量和效率。

Description

异常处理方法、 装置和客户端 本申请要求于 201 1年 1 1月 14 日提交中国专利局、 申请号为
201110359792. 8 , 发明名称为 "异常处理方法、 装置和客户端,,, 以及要求 于 2011年 12月 12 日提交中国专利局, 申请号为 201110412168. X,发明名 称为 "异常处理方法、 装置和客户端" 的中国专利申请的优先权, 其全部 内容通过引用结合在本申请中。
技术领域
本发明涉及在线应用领域, 特别涉及一种异常处理方法、 装置和客户 端。 背景技术
在线应用的服务器, 一般可以称为在线应用平台, 在其上可以部署各 种各样第三方开发的应用, 客户端可以远程连接到在线应用平台上体验这 些应用。 在线应用平台与客户端的一般交互过程为: 客户端将用户操作产 生的输入事件上传到服务器端, 服务器收到事件后进行计算和处理, 并将 处理后的画面响应结果发送到客户端, 客户端收到画面后在本地显示。 在 这种在线应用场景中, 所有应用的运行和处理都在服务器进行, 而客户端 只负责将用户的操作输入上传到服务器端和接收画面进行解码显示; 但从 用户侧来看, 就像在操作的本地的应用一样。
现有的远程桌面系统支持异常后自动重连, 以微软 windows操作系统 提供的远程桌面 mstsc为例。 自动重连指在发生网络异常时,客户端可重新 连接到上次连接的同一会话, 且不用重新发送验证信息。 当客户端与服务 器端成功建立连接后, 服务器端会发送给客户端一个自动重连 cookies, 此 cookie 绑定于当前会话并存储在客户端。 当发生连接异常时, 客户端将 cookies加密后发送给服务器端,服务器端对此 cookies进行验证,如果验证 通过, 说明当前连接的客户端与断线是连接的为同一客户端, 则服务器会 恢复同一会话, 使得客户端继续上次的会话继续操作远程桌面。
在对现有技术进行分析后, 发明人发现现有技术至少具有如下缺点: 对于在线应用系统, 由于虚拟机是可以分配给多个用户同时使用的, 当发生了异常断开, 如果虚拟机保持应用继续运行以等待用户连接, 不释 放资源, 也不对应用的运行进行任何保存, 不仅占用了虚拟机资源, 降低 了在线应用系统的容量和效率, 也使得客户端在重新连接时有可能无法继 续异常发生时的操作。 发明内容
本发明实施例提供了一种异常处理方法、 装置和客户端。 所述技术方 案如下:
一种异常处理方法, 包括:
虚拟管理服务器接收与第一客户端交互的虚拟机发送的异常通知, 所 述异常通知至少携带用户标识和应用标识; 常处理方式, 保存所述虚拟机数据或与所述应用标识对应的应用的应用数 据, 并释放所述虚拟机资源。
所述虚拟管理服务器接收与虚拟机发送的异常通知, 之前, 所述方法 包括:
所述虚拟管理服务器接收所述第一客户端发送的第一连接请求, 所述 第一连接请求至少携带用户标识和应用标识;
所述虚拟管理服务器根据所述第一连接请求, 确定并保存与所述用户 标识及应用标识对应的异常处理方式。
所述虚拟管理服务器根据所述第一连接请求, 确定并保存与所述用户 标识及应用标识对应的异常处理方式, 具体包括:
所述第一连接请求携带应用标识和用户标识, 根据所述应用标识获取 所述应用能够支持的异常处理方式列表; 将所述异常处理方式列表发送给 所述第一客户端, 使得所述第一客户端从所述异常处理列表中选择异常处 理方式, 将所述第一客户端选择的异常处理方式确定并保存为与所述用户 标识及应用标识对应的异常处理方式; 或,
所述第一连接请求携带应用标识、 用户标识和指定的异常处理方式时, 所述虚拟管理服务器根据所述应用标识获取所述应用能够支持的异常处理 方式列表, 并判断所述异常处理方式列表是否包含所述指定的异常处理方 应用标识对应的异常处理方式; 否则, 所述虚拟管理服务器将所述异常处 理方式列表发送给所述第一客户端, 接收所述第一客户端从所述异常处理 列表中选择的异常处理方式, 将所述第一客户端选择的异常处理方式确定 所述第一连接请求携带应用标识、 用户标识和指定的异常处理方式时, 所述虚拟管理服务器将所述指定的异常处理方式确定并保存为与所述用户 标识及应用标识对应的异常处理方式。 常处理方式, 保存所述虚拟机数据或与所述应用标识对应的的应用的应用 数据, 并释放所述虚拟机资源, 具体包括:
当与所述用户标识及应用标识对应的异常处理方式为应用保存方式 时, 所述虚拟管理服务器依据所述应用的预设逻辑确定所述应用需要保存 运行数据, 并根据所述应用的配置文件, 从所述虚拟机获取所述配置文件 指示的用户个人数据, 将所述用户个人数据、 应用标识和用户标识存储至 数据存储服务器, 关闭所述应用, 释放虚拟机资源, 并更新虚拟机状态; 方式时, 所述虚拟管理服务器根据所述虚拟机当前的状态生成虚拟机快照 数据, 并将所述生成的虚拟机快照数据、 应用标识、 虚拟机信息、 虚拟机 标识和用户标识存储至数据存储服务器, 释放所述虚拟机资源, 并更新所 述虚拟机的状态。
所述虚拟管理服务器根据所述用户标识对应的异常处理方式, 保存所 述虚拟机数据或所述应用标识指示的应用的应用数据, 并释放所述虚拟机 资源之后, 所述方法还包括:
所述虚拟管理服务器接收第二客户端发送的第二连接请求; 所述第二 连接请求携带所述用户标识和应用标识;
所述虚拟管理服务器根据所述第二连接请求, 确定所述第二连接请求 指示的应用需要进行异常恢复;
所述虚拟管理服务器向第二客户端发送异常恢复询问消息;
所述虚拟管理服务器接收到所述第二客户端的异常恢复请求, 根据所 述第二连接请求携带的用户标识和应用标识选择目的虚拟机; 复。 " ^ 所述确定所述第二连接请求指示的应用需要进行异常恢复, 具体包括: 虚拟管理服务器确定数据存储服务器中保存有与所述应用标识和用户 标识对应的待恢复数据。
所述虚拟管理服务器接收到所述第二客户端的异常恢复请求, 根据所 述第二连接请求携带的用户标识和应用标识选择目的虚拟机, 具体包括: 所述虚拟管理服务器从数据存储服务器上获取与所述应用标识及用户 标识对应的待恢复数据;
当所述待恢复数据为虚拟机数据时, 所述虚拟管理服务器根据所述虚 拟机数据选择目的虚拟机;
当所述待恢复数据为应用数据时, 所述虚拟管理服务器根据所述应用 标识选择目的虚拟机。
当所述待恢复数据为虚拟机数据时, 所述待恢复数据包括: 虚拟机快 照数据、 虚拟机信息、 虚拟机标识,
所述虚拟管理服务器根据所述虚拟机数据选择目的虚拟机, 具体包括: 所述虚拟管理服务器判断所述虚拟机标识对应的虚拟机是否空闲, 如果否, 选择与所述虚拟机信息匹配的空闲虚拟机作为目的虚拟机。 所述虚拟管理服务器根据所述应用标识选择目的虚拟机, 具体包括: 当所述待恢复数据为应用数据时, 根据所述应用标识从空闲虚拟机中 选择第一虚拟机作为目的虚拟机, 所述第一虚拟机为支持所述应用标识指 示的应用运行的虚拟机。 复, 具体包括:
当所述待恢复数据为虚拟机数据时, 根据所述虚拟机数据中的虚拟机 快照数据启动所述目的虚拟机直接对异常中断的应用进行恢复;
当所述待恢复数据为应用数据时, 启动虚拟机, 将所述应用数据复制 异常中断的应用。
所述虚拟管理服务器在所述目的虚拟机上对异常中断的应用进行恢复 之后, 该方法还包括:
所述虚拟管理服务器将所述虚拟机标识发送给客户端, 使得所述客户 端根据所述虚拟机标识与虚拟机建立通信连接并与所述虚拟机进行数据交 互。 一种异常处理装置, 包括:
接收模块, 用于接收与第一客户端交互的虚拟机发送的异常通知, 所 述异常通知至少携带用户标识和应用标识; 常处理方式, 保存所述虚拟机数据或与所述应用标识对应的应用的应用数 据, 并释放所述虚拟机资源。
所述接收模块, 还用于接收所述第一客户端发送的第一连接请求, 所 述第一连接请求至少携带用户标识和应用标识;
所述装置还包括:
确定模块, 用于根据所述第一连接请求, 确定并保存与所述用户标识 及应用标识对应的异常处理方式。
所述确定模块包括:
第一确定单元, 用于所述第一连接请求携带应用标识和用户标识, 根 据所述应用标识获取所述应用能够支持的异常处理方式列表; 将所述异常 处理方式列表发送给所述第一客户端, 使得所述第一客户端从所述异常处 理列表中选择异常处理方式, 将所述第一客户端选择的异常处理方式确定 第二确定单元, 用于所述第一连接请求携带应用标识、 用户标识和指 定的异常处理方式时, 根据所述应用标识获取所述应用能够支持的异常处 理方式列表, 并判断所述异常处理方式列表是否包含所述指定的异常处理 方式; 应用标识对应的异常处理方式; 否则, 将所述异常处理方式列表发送给所 述第一客户端, 接收所述第一客户端从所述异常处理列表中选择的异常处 理方式, 将所述第一客户端选择的异常处理方式确定并保存为与所述用户 标识及应用标识对应的异常处理方式; 或,
所述第二确定单元, 还用于所述第一连接请求携带应用标识、 用户标 识和指定的异常处理方式时, 所述虚拟管理服务器将所述指定的异常处理 所述异常处理模块包括:
第一异常处理单元, 用于当与所述用户标识及应用标识对应的异常处 理方式为应用保存方式时, 依据所述应用的预设逻辑确定所述应用需要保 存运行数据, 并根据所述应用的配置文件, 从所述虚拟机获取所述配置文 件指示的用户个人数据, 将所述用户个人数据、 应用标识和用户标识存储 至数据存储服务器, 关闭所述应用, 释放虚拟机资源, 并更新虚拟机状态; 第二异常处理单元, 用于当与所述用户标识及应用标识对应的异常处 理方式为保存虚拟机状态方式时, 根据所述虚拟机当前的状态生成虚拟机 快照数据, 并将所述生成的虚拟机快照数据、 应用标识、 虚拟机信息、 虚 拟机标识和用户标识存储至数据存储服务器, 释放所述虚拟机资源, 并更 新所述虚拟机的状态。
所述接收模块, 还用于接收第二客户端发送的第二连接请求; 所述第 二连接请求携带所述用户标识和应用标识;
所述装置还包括:
异常恢复确定模块, 用于根据所述第二连接请求, 确定所述第二连接 请求指示的应用需要进行异常恢复;
发送模块, 用于向第二客户端发送异常恢复询问消息;
虚拟机选择模块, 用于当接收到所述第二客户端的异常恢复请求, 根 据所述第二连接请求携带的用户标识和应用标识选择目的虚拟机;
恢复模块, 用于所述虚拟管理服务器在所述目的虚拟机上对异常中断 的应用进行恢复。
异常恢复确定模块具体用于确定数据存储服务器中保存有与所述应用 标识和用户标识对应的待恢复数据。
虚拟机选择模块包括:
获取单元, 用于从数据存储服务器上获取与所述应用标识及用户标识 对应的待恢复数据;
选择单元, 用于当所述待恢复数据为虚拟机数据时, 根据所述虚拟机 数据选择目的虚拟机;
所述选择单元, 还用于当所述待恢复数据为应用数据时, 根据所述应 用标识选择目的虚拟机。 当所述待恢复数据为虚拟机数据时, 所述待恢复数据包括: 虚拟机快 照数据、 虚拟机信息、 虚拟机标识,
所述选择单元, 具体用于判断所述虚拟机标识对应的虚拟机是否空闲, 所述虚拟机标识对应的虚拟机空闲, 将所述虚拟机标识对应的虚拟机作为 目的虚拟机;
所述选择单元, 还用于所述虚拟机标识对应的虚拟机不空闲, 选择与 所述虚拟机信息匹配的空闲虚拟机作为目的虚拟机。
所述选择单元还用于当所述待恢复数据为应用数据时, 根据所述应用 标识从空闲虚拟机中选择第一虚拟机作为目的虚拟机, 所述第一虚拟机为 支持所述应用标识指示的应用运行的虚拟机。
所述恢复模块包括:
第一恢复单元, 用于当所述待恢复数据为虚拟机数据时, 根据所述虚 进行恢复;
第二恢复单元, 用于当所述待恢复数据为应用数据时, 启动虚拟机, 将所述应用数据复制到所述目的虚拟机上, 并在所述目的虚拟机上根据所 述应用数据运行所述异常中断的应用。
所述发送模块还用于将所述虚拟机标识发送给客户端, 使得所述客户 端根据所述虚拟机标识与虚拟机建立通信连接并与所述虚拟机进行数据交 互。
一种异常恢复方法, 包括:
客户端向虚拟管理服务器发送连接请求, 所述连接请求至少携带用户 标识和应用标识;
所述客户端接收虚拟管理服务器发送的与应用标识对应的异常处理方 式列表;
所述客户端向所述虚拟管理服务器发送所述客户端选择的异常处理方 式, 以便于所述虚拟管理服务器将所述客户端选择的异常处理方式确定并 保存为与所述应用标识和用户标识对应的异常处理方式。
所述连接请求携带用户标识、 应用标识和指定的异常处理方式; 所述客户端接收虚拟管理服务器发送的与应用标识对应的异常处理方 式列表具体包括: 当所述虚拟管理服务器确定所述异常处理方式列表中不包含所述指定 的异常处理方式时, 客户端接收所述虚拟管理服务器发送的所述异常处理 方式列表。
所述方法还包括:
所述客户端接收到所述虚拟管理服务器发送的异常恢复询问消息, 向 所述虚拟管理服务器发送异常恢复请求或异常恢复拒绝消息, 使得所述虚 拟管理服务器能够根据所述异常恢复请求或异常恢复拒绝消息进行相应的 操作。
一种客户端, 包括:
发送模块, 用于向虚拟管理服务器发送连接请求, 所述连接请求至少 携带用户标识和应用标识;
接收模块, 用于接收虚拟管理服务器发送的与应用标识对应的异常处 理方式列表;
所述发送模块, 还用于向所述虚拟管理服务器发送所述客户端选择的 异常处理方式, 以便于所述虚拟管理服务器将所述客户端选择的异常处理 方式确定为与所述应用标识和用户标识对应的异常处理方式。
所述连接请求携带用户标识、 应用标识和指定的异常处理方式; 所述接收模块具体用于当所述虚拟管理服务器确定所述异常处理方式 列表中不包含所述指定的异常处理方式时, 接收所述虚拟管理服务器发送 的所述异常处理方式列表。
所述发送模块还用于当所述接收模块接收到所述虚拟管理服务器发送 的异常恢复询问消息, 向所述虚拟管理服务器发送异常恢复请求或异常恢 复拒绝消息, 使得所述虚拟管理服务器能够根据所述异常恢复请求或异常 恢复拒绝消息进行相应的操作。
本发明实施例提供的技术方案的有益效果是:
通过当客户端和与其交互的虚拟机发生异常中断时, 虚拟管理服务器 接收到异常中断的异常通知, 并根据客户端对应的异常处理方式保存应用 数据或虚拟机数据, 并释放虚拟机资源, 从而使得不同应用、 不同用户可 以根据其需求定制不同的异常处理方法, 也使得客户端不但可保存异常发 生时的时刻或最接近异常发生时的时刻用户的使用状态, 而且提高了在线 应用系统的容量和效率。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员 来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的 附图。
图 1是本发明实施例提供的在线应用系统的架构图;
图 2是本发明实施例提供的一种异常处理方法的流程图;
图 3是本发明实施例提供的一种异常处理方法的流程图;
图 4是本发明实施例提供的一种异常处理方法的流程图;
图 5是本发明实施例提供的一种异常处理装置的结构示意图; 图 6是本发明实施例提供的一种异常处理装置的结构示意图; 图 7是本发明实施例提供的一种异常处理装置的结构示意图; 图 8是本发明实施例提供的一种异常处理装置的结构示意图; 图 9是本发明实施例提供的一种异常处理装置的结构示意图; 图 10是本发明实施例提供的一种异常处理装置的结构示意图; 图 11是本发明实施例提供的一种异常处理装置的结构示意图; 图 12是本发明实施例提供的一种异常处理方法的流程图;
图 13是本发明实施例提供的一种客户端的结构示意图。 具体实施方式
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本 发明实施方式作进一步地详细描述。
为了便于理解, 在描述本发明提供的异常处理方法之前, 先对本发明 涉及到的基础知识进行描述:
应用根据其预设逻辑可以分为需要保存运行数据的应用和不需要保存 运行数据的应用。 对于不需要保存运行数据的应用, 直接关闭应用后释放 虚拟机资源。 用户下次连接时, 则从头开始运行应用; 而对于需要保存运 行数据的应用: 先关闭应用程序, 再将用户个人运行数据保存至运行数据 存储服务器后, 释放虚拟机资源。 由于在线应用平台中虽然也提供各种应 用, 但主要针对的还是游戏应用, 所以在以下的介绍中将直接以游戏作为 应用的实例进行论述。 根据游戏运行数据是否保存可以对游戏应用作如下 分类: 无需保存运行数据的应用和需保存运行数据的应用。 其中, 无需保 存运行数据的应用可以各种 flash游戏为代表, 用户每次都从最初开始玩, 无运行数据需要保存; 例如 "挖金子", "打砖块" 等游戏。
图 1是本发明实施例提供的在线应用系统的架构图。 参见图 1 , 该在线 应用系统包括: 虚拟管理服务器、 虚拟机和数据存储服务器。 其中, 虚拟 管理服务器用于对虚拟机进行管理, 包括虚拟机的建立, 删除, 启动等。 虚拟机用于根据不同的业务需求, 分配不同的系统资源, 安装不同的操作 系统和应用软件, 并为远端的客户端提供服务。
图 2是本发明实施例提供的一种异常处理方法的流程图。 该方法基于 图 1所示的架构, 其执行主体为虚拟管理服务器, 参见图 2, 该实施例具体 包括:
201、 虚拟管理服务器接收与第一客户端交互的虚拟机发送的异常通 知, 所述异常通知至少携带用户标识和应用标识;
在本实施例中, 第一客户端即为在线应用的客户端。
在本实施例中, 当第一客户端与虚拟机之间发生连接断开或连接异常 等导致与客户端断开连接的故障, 虚拟机向虚拟管理服务器发送异常通知。 该异常通知携带使用该第一客户端的用户的用户标识和发生异常的应用的 应用标识。
202、 所述虚拟管理服务器根据保存的与所述用户标识及用应标识对应 的异常处理方式, 保存所述虚拟机数据或与所述应用标识对应的应用的应 用数据, 并释放所述虚拟机资源。 商可以在客户端第一次连接虚拟管理服务器并使用与应用标识对应的应用 时进行, 还可以在每次客户端和虚拟管理服务器进行连接时进行。
当虚拟管理服务器接收到该异常通知时, 根据用户标识及应用标识查 询与该用户标识及应用标识对应的异常处理方式: 当异常处理方式为应用 保存方式时, 所述虚拟管理服务器依据应用的预设逻辑判断所述应用是否 需要进行数据保存; 当所述应用需要进行数据保存时, 所述虚拟管理服务 器根据所述应用的配置文件, 从所述虚拟机获取所述配置文件指示的用户 个人数据, 将所述用户个人数据、 应用标识和用户标识存储至数据存储服 务器, 关闭所述应用, 释放虚拟机资源, 并更新虚拟机状态, 以便后续由 虚拟管理服务器进行分配。 当所述用户标识对应的异常处理方式为保存虚 拟机状态方式时, 所述虚拟管理服务器将自动根据所述虚拟机当前的状态 生成虚拟机快照数据, 并将所述生成的虚拟机快照数据、 应用标识、 虚拟 机信息、 虚拟机标识和用户标识存储至数据存储服务器, 释放所述虚拟机 资源, 并更新所述虚拟机的状态。 由于在线应用平台的服务器使用了虚拟 机技术, 因此可以使用虚拟机中的快照技术对虚拟机的状态实时进行保存, 快照是对虚拟机在某个时间点的 "拷贝", 这个 "拷贝" 并不是对虚拟机的 虚拟磁盘文件的复制, 而是保持磁盘文件和系统内存在该时间点的状态, 以便虚拟机在任何时刻能够恢复到该时间点。
通过当客户端和与其交互的虚拟机发生异常而中断连接时, 虚拟管理 服务器接收到异常中断的异常通知, 并根据与应用标识和用户标识对应的 异常处理方式保存应用数据或虚拟机数据, 并释放虚拟机资源, 从而使得 不同应用、 不同用户可以根据其需求定制不同的异常处理方法, 也使得客 户端不但可保存异常发生时的时刻或最接近异常发生时的时刻用户的使用 状态, 而且提高了在线应用系统的容量和效率。
图 3是本发明实施例提供的一种异常处理方法的流程图。 该方法基于 图 1所示的架构, 该实施例中的交互双方为虚拟管理服务器和第一客户端, 参见图 3 , 该实施例具体包括:
301、 第一客户端向虚拟管理服务器发送第一连接请求, 所述第一连接 请求携带应用标识和使用该第一客户端的用户的用户标识;
其中, 所述第一连接请求至少携带应用标识和用户标识; 该应用标识 用于表示该第一客户端准备远程使用的应用, 用户标识用于标识使用该第 一客户端的用户。
302、 第一客户端与虚拟管理服务器进行连接;
本领域技术人员可以获知, 该步骤 302 包括: 第一客户端与虚拟管理 服务器建立连接、 进行安全认证和进行能力协商的过程, 为现有技术, 不 再赘述。
303、 虚拟管理服务器根据该连接请求携带的应用标识获取该应用能够 支持的异常处理方式列表, 将异常处理方式列表发送给所述第一客户端; 在本实施例中, 该应用能够支持的异常处理方式列表预先保存在应用 的配置文件中, 虚拟管理服务器可根据该应用标识读取与应用标识对应的 应用的配置文件, 从而获取应用能够支持的异常处理方式列表, 该列表中 可以包含多种异常处理方式, 如应用保存方式、 保存虚拟机状态方式、 不 保存应用方式等。 其中不保存应用方式, 即是指不对应用进行保存。
当然, 在执行本步骤之前, 虚拟管理服务器还可以确认是否保存有与 第一连接请求中携带的用户标识及应用标识对应的异常处理方式, 如果有, 则不执行后续的协商确定异常处理方式的步骤。 而只有在没有保存第一连 接请求中携带的用户标识及应用标识对应的异常处理方式时, 执行后续的 协商确定异常处理方式的步骤。
304、 第一客户端从异常处理方式列表中选择异常处理方式;
该异常处理方式可以进一步根据客户端的能力或设置进行选择, 根据 客户端能力的不同和设置不同, 不同的客户端从异常处理方式列表中选择 的异常处理方式可有所不同。 方式。
其中, 应用保存方式是指先关闭应用程序, 再将用户个人数据、 应用 标识和用户标识保存至数据存储服务器后, 释放虚拟机资源。
另一方面, 虚拟机状态保存方式是指生成虚拟机的快照数据, 并将所 述生成的虚拟机快照数据、 应用标识、 虚拟机信息、 虚拟机标识和用户标 识存储至数据存储服务器, 释放所述虚拟机资源, 以便在用户下次重新连 接时, 根据快照数据, 恢复到用户断线时的时间点。 例如, 虚拟机 A在运 行应用过程中, 生成虚拟机快照数据, 则在此后的任何时刻, 都可以根据 快照文件重新启动虚拟机。 如果虚拟机再次运行此应用, 且应用的运行时 刻可以就是生成虚拟机快照数据的时刻。 用标识对应的异常处理方式;
步骤 303-305 是第一客户端与虚拟管理服务器进行异常处理方式协商 的过程。 需要说明的是, 该交互确定异常处理方式的过程可以确定一个或 多个异常处理方式, 在确定多个异常处理方式的同时, 也确定该多个异常 处理方式的优先级次序。 例如, 将应用保存方式的优先级设为最高, 保存 虚拟机状态方式的优先级次之, 则当发生异常时, 第一客户端和虚拟管理 服务器优先应用应用保存方式保存应用的运行状态。
在另一方案中, 当客户端有指定的异常处理方式时, 客户端向虚拟管 理服务器发送的连接请求中携带应用标识、 用户标识和指定的异常处理方 式。 该指定的异常处理方式可以为客户端本次设置的异常处理方式或该客 户端默认的异常处理方式, 则步骤 303具体为: 所述虚拟管理服务器接收 所述第一连接请求, 而步骤 304-305可以由下述内容替代: 所述虚拟管理服 务器根据所述应用标识获取所述应用能够支持的异常处理方式列表, 并判 断所述异常处理方式列表是否包含所述指定的异常处理方式; 如果是, 将 所述指定的异常处理方式确定并保存为针对该次连接时所述用户标识对应 的异常处理方式; 如果否, 所述虚拟管理服务器将所述异常处理方式列表 发送给所述第一客户端, 接收所述第一客户端从所述异常处理列表中选择 异常处理方式, 将所述第一客户端选择的异常处理方式确定并保存为所述 用户标识对应的异常处理方式。 在该方案中, 执行了对指定的异常处理方 式进行判断的过程, 而在一更筒化的方案中, 当第一连接请求携带应用标 识、 用户标识和指定的异常处理方式时, 步骤 303具体为: 虚拟管理服务 器接收第一连接请求, 而步骤 304-305可以由下述内容替代: 虚拟管理服务 器将指定的异常处理方式确定并保存为与用户标识及应用标识对应的异常 处理方式。 在该筒化的方案中, 将指定的异常处理方式作为该次连接时该 用户标识对应的异常处理方式, 并在后续发生异常时, 应用该指定的异常 处理方式进行异常处理。
306、 虚拟管理服务器根据第一连接请求携带的应用标识及用户标识, 确定该第一连接请求指示的应用不需要进行异常恢复;
所述虚拟管理服务器确定数据存储服务器中未保存所述应用标识和用 户标识对应的待恢复数据, 则确定所述第一连接请求指示的应用不需要进 行异常恢复。
本实施例仅以该第一连接请求指示应用不需要进行异常恢复为例进行 说明。
当然,虚拟管理服务器在执行步骤 306时,还可以不用先执行步骤 303 到 305 ,而直接确认是否保存有与第一连接请求中携带的用户标识及应用标 识对应的异常处理方式以及是否需要进行异常恢复。 307、 虚拟管理服务器选择空闲虚拟机, 使得第一客户端在该选择的虚 拟机上运行该应用;
在本实施例中, 根据应用标识从空闲虚拟机中选择能够支持该应用标 识对应的应用的虚拟机, 使得第一客户端在该选择的虚拟机上运行该应用。
具体地, 虚拟管理服务器根据应用标识从空闲虚拟机中选择能够支持 该应用的空闲虚拟机。 更新相应的虚拟机的状态, 将应用标识发送给虚拟 机, 让虚拟机启动应用标识对应的应用, 并将虚拟机地址发送给第一客户 端, 使得该第一客户端根据虚拟管理服务器发送来的虚拟机地址, 与虚拟 机建立通信信道, 虚拟机向第一客户端发送音视频数据以展示应用的运行, 第一客户端上传控制指令操作应用的运行。 该建立连接和运行过程为现有 技术, 本发明不再赘述。
308、 当虚拟管理服务器接收到与第一该客户端交互的虚拟机发送的异 常通知时, 根据异常通知查询该用户标识及应用标识对应的异常处理方式; 由于虚拟管理服务器在确定与用户标识及应用标识对应的异常处理方 式后, 将该用户标识、 应用标识及异常处理方式对应保存。 因此, 本步骤 中, 在出现异常时, 虚拟管理服务器能够根据出现异常的用户标识及应用
309、 当根据异常通知携带的用户标识及应用标识获知与该用户标识及 据应用的预设逻辑判断所述应用是否需要保存运行数据,
如果是, 执行步骤 310;
如果否, 结束。
本实施例仅以该应用需要保存运行数据为例进行说明。
虚拟管理服务器通过读取应用的配置文件, 获知应用的预设逻辑, 根 据该应用的预设逻辑可以获知该发生异常中断的应用是否为需要保存运行 数据的应用。
310、 所述虚拟管理服务器从所述虚拟机获取所述配置文件指示的用户 个人数据, 将所述用户个人数据、 应用标识和用户标识存储至数据存储服 务器;
在本实施例中, 虚拟管理服务器通过读取应用的配置文件, 可以获知 该应用中用户个人数据的保存路径和文件名称, 并根据获知的保存路径和 文件名称从虚拟机中获取该用户个人数据, 并将用户个人数据、 应用标识 和用户标识存储至数据存储服务器。
311、 虚拟管理服务器关闭所述应用, 释放虚拟机资源, 并更新虚拟机 状态, 结束;
步骤 309-步骤 311的过程为虚拟管理服务器根据应用保存方式, 保存 虚拟机上应用的运行数据, 并释放所述虚拟机资源的过程。
312、 当根据异常通知携带的用户标识及应用标识获知与该用户标识及 务器根据所述虚拟机当前的状态生成虚拟机快照数据, 并将所述生成的虚 拟机快照数据、 应用标识、 虚拟机信息、 虚拟机标识和用户标识存储至数 据存储服务器;
在本实施例中, 虚拟管理服务器将生成的虚拟机快照数据、 应用标识、 虚拟机信息、 虚拟机标识和用户标识存储至数据存储服务器, 并将在数据 存储服务器上的存储路径保存在用户信息表中, 该用户信息表记录用户的 个人相关信息。
其中, 虚拟机信息包括虚拟机的相关性能, 如内存大小、 CPU信息和 硬盘信息等。
313、 释放所述虚拟机资源, 并更新所述虚拟机的状态。
步骤 312-步骤 313的过程为虚拟管理服务器根据保存虚拟机状态方式, 保存虚拟机快照数据, 并释放所述虚拟机资源的过程。
本实施例提供的方法, 通过当客户端和与其交互的虚拟机发生异常中 断时, 虚拟管理服务器接收到异常中断的异常通知, 并根据客户端对应的 异常处理方式保存应用数据或虚拟机数据, 并释放虚拟机资源, 从而使得 不同应用、 不同用户可以根据其需求定制不同的异常处理方法, 也使得客 户端不但可保存异常发生时的时刻或最接近异常发生时的时刻用户的使用 状态, 不仅避免了长时间占据虚拟机资源, 而且提高了在线应用系统的容 量和效率。
图 4是本发明实施例提供的一种异常处理方法的流程图。 该实施例是 在图 3所示实施例的基础上进行的, 在图 3所示实施例中, 根据第一连接 请求, 在虚拟机上运行应用, 当该应用发生异常, 虚拟管理服务器根据协 商确定的异常处理方式, 对该虚拟机数据或应用数据进行了保存, 之后包 括:
401、 所述虚拟管理服务器接收第二客户端发送的第二连接请求; 所述 第二连接请求携带所述用户标识和应用标识;
需要说明的是, 该第二客户端可以是该应用发生异常时所在的客户端, 即第一客户端, 也可以是另一客户端, 用户本次可以不使用第一客户端进 行该连接, 而是从该第二客户端进行连接。
402、 所述虚拟管理服务器根据所述第二连接请求, 确定所述第二连接 请求指示的应用需要进行异常恢复;
所述虚拟管理服务器确定数据存储服务器中保存有所述应用标识和用 户标识对应的待恢复数据, 则确定所述第二连接请求指示的应用需要进行 异常恢复。
具体地, 虚拟管理服务器根据第二连接请求中的用户标识判断数据存 储服务器上是否保存有该用户标识对应的数据, 如果该数据存储服务器上 保存有该用户标识对应的数据, 再根据应用标识和该数据判断是否有该应 用标识对应的待恢复数据, 当该数据中有该应用标识对应的待恢复数据时, 则第二连接请求指示的应用需要进行异常恢复。
在另一方案中, 即当第二客户端连接后, 虚拟管理服务器根据用户标 识确定数据存储服务器上保存有该用户标识对应的数据, 再根据应用标识 和该数据确定该数据不是该应用标识对应的待恢复数据, 而是另一应用的 待恢复数据, 则可以提示第二客户端上次连接异常, 此时第二客户端可以 选择继续上次异常的应用, 也可放弃上次的应用, 继续选择本次的应用。
403、 所述虚拟管理服务器向第二客户端发送异常恢复询问消息; 优选地, 该异常恢复询问消息携带应用标识和用户标识。
该异常恢复询问消息用于提示第二客户端该应用曾经异常中断, 并且 在数据存储服务器上保存有该异常中断时所保存的待恢复数据, 以便于第 二客户端选择是否需要恢复异常中断时的数据。
需要说明的是, 本实施例是基于用户标识及应用标识共同来判断是否 有异常中断时保存的数据可以恢复。
在本实施例中, 仅以所述应用标识和用户标识指示的应用需要进行异 常恢复为例进行说明。
404、 当接收到所述第二客户端的异常恢复请求时, 所述虚拟管理服务 据;
其中, 该异常恢复请求携带用户标识和应用标识, 具体地, 该异常恢 复请求可以有一标志位, 用于标识第二客户端同意进行异常恢复。
在本实施例中, 第二客户端发出异常恢复请求, 该异常恢复请求用于 指示虚拟管理服务器根据数据存储服务器上保存的待恢复数据对异常中断 的应用进行恢复。
其中, 该待恢复数据可以为虚拟机数据或应用数据。 该虚拟机数据是 虚拟管理服务器在接收到异常通知时, 按照保存虚拟机状态方式进行异常 处理时保存的, 该虚拟机数据具体包括: 异常发生时生成的虚拟机快照数 据、 应用标识、 虚拟机信息、 虚拟机标识和用户标识。 该应用数据是虚拟 管理服务器在接收到异常通知时, 按照应用保存方式进行异常处理时保存 的, 该应用数据具体包括: 该应用的配置文件指示的用户个人数据, 将所 述用户个人数据、 应用标识和用户标识。
405、 判断该待恢复数据的类型,
当所述待恢复数据为虚拟机数据时, 执行步骤 406;
当所述待恢复数据为应用数据时, 执行步骤 410;
具体地, 该判断包括: 判断该待恢复数据中是否包括虚拟机信息, 如 果该待恢复数据中包括虚拟机信息, 则该待恢复数据为虚拟机数据; 如果 该待恢复数据中不包括虚拟机信息, 则该待恢复数据为应用数据。
406、 当所述待恢复数据为虚拟机数据时, 虚拟机数据至少包括虚拟机 快照数据文件、 虚拟机信息和虚拟机标识; 所述虚拟管理服务器判断所述 虚拟机标识对应的虚拟机是否空闲;
如果是, 执行步骤 407;
如果否, 执行步骤 408;
在本实施例中, 为了保证运行环境最优, 根据虚拟机标识查询对应虚 拟机, 当该虚拟机标识对应的虚拟机空闲, 则优先选择该虚拟机标识对应 的虚拟机作为目的虚拟机, 当该虚拟机标识对应的虚拟机不是空闲的, 则 根据虚拟机信息进一步查询与该虚拟机信息匹配的虚拟机作为目的虚拟 机。 该匹配是指虚拟机的相关性能与虚拟机信息相同, 如内存大小、 CPU 信息和硬盘信息等。 407、将所述虚拟机标识对应的虚拟机作为目的虚拟机,执行步骤 409;
408、 选择与所述虚拟机信息匹配的空闲虚拟机作为目的虚拟机, 执行 步骤 407;
409、 当所述待恢复数据为虚拟机数据时, 根据所述虚拟机数据中的虚 拟机快照数据启动所述目的虚拟机直接对异常中断的应用进行恢复, 跳至 步骤 412;
在本实施例中, 虚拟机数据包括虚拟机快照数据信息, 目的虚拟机根 据该虚拟机快照数据信息启动, 可以将应用和虚拟机恢复到异常发生时刻 的场景。
410、 根据所述应用标识从空闲虚拟机中选择第一虚拟机作为目的虚拟 机, 所述第一虚拟机为支持所述应用标识指示的应用的虚拟机;
对于虚拟机来说, 由于平台或系统的不同, 每个虚拟机能够支持的应 用不同, 因此需要根据应用标识匹配虚拟机, 以得到支持该应用标识指示 的应用的虚拟机。
411、 启动虚拟机, 将所述应用数据复制到所述目的虚拟机上, 并在所 述目的虚拟机上根据所述应用数据运行所述异常中断的应用;
需要说明的是, 如果虚拟机上没有此应用, 则先安装应用, 再拷贝用 户个人数据, 再启动应用。
具体地, 虚拟管理服务器将用户标识及应用标识对应的应用数据复制 到目的虚拟机的应用的对应目录中。 需要说明的是, 该应用数据是异常发 生前该虚拟机正常运行时已保存的数据, 该保存每隔预设时长进行, 因此, 在根据应用数据进行异常恢复时, 其恢复的场景并不一定是异常发生时刻 应用的运行数据。 例如, 某应用自动进行增量保存的预设时长为 30分钟, 则每隔 30分钟, 运行该应用的虚拟机对用户个人数据进行保存, 假设在第 N次保存后 15分钟发生异常,则该异常时所保存的应用数据为前 N次保存 的用户个人数据、 用户标识和应用标识。
412、 所述虚拟管理服务器将所述虚拟机标识发送给第二客户端, 使得 所述客户端根据所述虚拟机标识与虚拟机建立通信连接并与所述虚拟机进 行数据交互, 结束。
虚拟机与第二客户端建立连接的过程为现有技术, 在此不再赘述。 第二客户端接收服务器端下发的音视频数据, 实时接收虚拟机上应用 运行的状况, 并上传控制指令, 用于控制虚拟机上应用的运行。 在以上交 互过程中, 用户操作的输入事件具体可以指键盘和鼠标事件(PC机型的客 户端)、 按键或触摸屏事件(手机或 PDA型的客户端)、 遥控器或者游戏手 柄的操作事件(电视型的客户端)等; server端发送画面和 client接收画面 显示一般采取的方式是 server端将音视频数据进行高效压缩 (例如采取视 频压缩技术)后发送到客户端, 客户端收到压缩后的画面后在本地先解码 再展示。
通过当客户端和与其交互的虚拟机发生异常中断时, 虚拟管理服务器 接收到异常中断的异常通知, 并根据客户端对应的异常处理方式保存应用 数据或虚拟机数据, 并释放虚拟机资源, 从而使得不同应用、 不同用户可 以根据其需求定制不同的异常处理方法, 也使得客户端不但可保存异常发 生时的时刻或最接近异常发生时的时刻用户的使用状态, 不仅避免了长时 间占据虚拟机资源, 而且提高了在线应用系统的容量和效率。 进一步地, 当需要根据保存的数据进行恢复时, 客户端可根据待恢复数据的类型确定 异常恢复的方式, 从而使得客户端可以从异常发生的时刻或最接近异常发 生的时刻继续运行应用, 提升了用户体验。
图 5是本发明实施例提供的一种异常处理装置的结构示意图。 该装置 包括:
接收模块 501 , 用于接收与第一客户端交互的虚拟机发送的异常通知, 所述异常通知至少携带用户标识和应用标识; 异常处理方式, 保存所述虚拟机数据或与所述应用标识对应的应用的应用 数据, 并释放所述虚拟机资源。
图 6是本发明实施例提供的一种异常处理装置的结构示意图。 该装置 包括: 接收模块 501和异常处理模块 502,
其中, 所述接收模块 501 ,还用于接收所述第一客户端发送的第一连接 请求, 所述第一连接请求至少携带用户标识和应用标识;
所述装置还包括:
确定模块 503 , 用于根据所述第一连接请求, 确定并保存与所述用户标 识及应用标识对应的异常处理方式。
图 7是本发明实施例提供的一种异常处理装置的结构示意图。 该装置 包括: 接收模块 501、 异常处理模块 502和确定模块 503 ,
其中, 所述确定模块 503包括:
第一确定单元 503a,用于所述第一连接请求携带应用标识和用户标识, 根据所述应用标识获取所述应用能够支持的异常处理方式列表; 将所述异 常处理方式列表发送给所述第一客户端, 使得所述第一客户端从所述异常 处理列表中选择异常处理方式, 将所述第一客户端选择的异常处理方式确 第二确定单元 503b, 用于所述第一连接请求携带应用标识、 用户标识 和指定的异常处理方式时, 根据所述应用标识获取所述应用能够支持的异 常处理方式列表, 并判断所述异常处理方式列表是否包含所述指定的异常 处理方式; 应用标识对应的异常处理方式; 否则, 将所述异常处理方式列表发送给所 述第一客户端, 接收所述第一客户端从所述异常处理列表中选择的异常处 理方式, 将所述第一客户端选择的异常处理方式确定并保存为与所述用户 标识及应用标识对应的异常处理方式; 或,
所述第二确定单元 503b, 还用于所述第一连接请求携带应用标识、 用 户标识和指定的异常处理方式时, 所述虚拟管理服务器将所述指定的异常
图 8是本发明实施例提供的一种异常处理装置的结构示意图。 该装置 包括: 接收模块 501和异常处理模块 502,
其中, 所述异常处理模块 502包括:
第一异常处理单元 502a, 当与所述用户标识及应用标识对应的异常处 理方式为应用保存方式时, 依据所述应用的预设逻辑确定所述应用需要保 存运行数据, 并根据所述应用的配置文件, 从所述虚拟机获取所述配置文 件指示的用户个人数据, 将所述用户个人数据、 应用标识和用户标识存储 至数据存储服务器, 关闭所述应用, 释放虚拟机资源, 并更新虚拟机状态; 第二异常处理单元 502b, 用于当与所述用户标识及应用标识对应的异 常处理方式为保存虚拟机状态方式时, 根据所述虚拟机当前的状态生成虚 拟机快照数据, 并将所述生成的虚拟机快照数据、 应用标识、 虚拟机信息、 虚拟机标识和用户标识存储至数据存储服务器, 释放所述虚拟机资源, 并 更新所述虚拟机的状态。
图 9是本发明实施例提供的一种异常处理装置的结构示意图。 该装置 包括: 接收模块 501和异常处理模块 502,
其中,所述接收模块 501 ,还用于接收第二客户端发送的第二连接请求; 所述第二连接请求携带所述用户标识和应用标识;
所述装置还包括:
异常恢复确定模块 504, 用于根据所述第二连接请求, 确定所述第二连 接请求指示的应用需要进行异常恢复;
发送模块 505 , 用于向第二客户端发送异常恢复询问消息;
虚拟机选择模块 506, 用于当接收到所述第二客户端的异常恢复请求, 根据所述第二连接请求携带的用户标识和应用标识选择目的虚拟机; 其中, 异常恢复确定模块 504具体用于确定数据存储服务器中保存有 与所述应用标识和用户标识对应的待恢复数据。
图 10是本发明实施例提供的一种异常处理装置的结构示意图。 该装置 包括: 接收模块 501、 异常处理模块 502、 异常恢复确定模块 504、 发送模 块 505、 虚拟机选择模块 506和恢复模块 507,
其中, 虚拟机选择模块 506包括:
获取单元 506a, 用于从数据存储服务器上获取与所述应用标识及用户 标识对应的待恢复数据;
选择单元 506b, 用于当所述待恢复数据为虚拟机数据时, 根据所述虚 拟机数据选择目的虚拟机;
所述选择单元 506b, 还用于当所述待恢复数据为应用数据时, 根据所 述应用标识选择目的虚拟机。
当所述待恢复数据为虚拟机数据时, 所述待恢复数据包括: 虚拟机快 照数据、 虚拟机信息、 虚拟机标识,
所述选择单元 506b, 具体用于判断所述虚拟机标识对应的虚拟机是否 空闲, 所述虚拟机标识对应的虚拟机空闲, 将所述虚拟机标识对应的虚拟 机作为目的虚拟机; 所述选择单元 506b, 还用于所述虚拟机标识对应的虚拟机不空闲, 选 择与所述虚拟机信息匹配的空闲虚拟机作为目的虚拟机。
所述选择单元 506b还用于当所述待恢复数据为应用数据时, 根据所述 应用标识从空闲虚拟机中选择第一虚拟机作为目的虚拟机, 所述第一虚拟 机为支持所述应用标识指示的应用运行的虚拟机。
图 11是本发明实施例提供的一种异常处理装置的结构示意图。 该装置 包括: 接收模块 501、 异常处理模块 502、 异常恢复确定模块 504、 发送模 块 505、 虚拟机选择模块 506和恢复模块 507,
所述恢复模块 507包括:
第一恢复单元 507a, 用于当所述待恢复数据为虚拟机数据时, 根据所 述虚拟机数据中的虚拟机快照数据启动所述目的虚拟机直接对异常中断的 应用进行恢复;
第二恢复单元 507b, 用于当所述待恢复数据为应用数据时, 启动虚拟 机, 将所述应用数据复制到所述目的虚拟机上, 并在所述目的虚拟机上根 据所述应用数据运行所述异常中断的应用。
所述发送模块 505还用于将所述虚拟机标识发送给客户端, 使得所述 客户端根据所述虚拟机标识与虚拟机建立通信连接并与所述虚拟机进行数 据交互。
本发明实施例还提供了一种虚拟管理服务器, 包括上述任一实施例所 述的异常处理装置。 本发明图 5-图 11的实施例提供的虚拟管理服务器或异 常处理装置, 与方法实施例属于同一构思, 可用于执行图 2到图 4中虚拟 管理服务器执行的任一步骤, 其具体实现过程详见方法实施例, 这里不再 赘述。 本发明实施例提供的虚拟管理服务器或异常处理装置可以为包含存 储器和 /或处理器的任一设备, 如计算机、 笔计本电脑、 大型工作站、 网络 设备等, 本发明在此不做具体的限定。 本发明的各模块可以为运行于处理 器的模块或各单元为运行于处理器的模块或单元。
图 12是本发明实施例提供的一种异常处理方法的流程图。 参见图 12, 该实施例具体包括:
1201、 客户端向虚拟管理服务器发送连接请求, 所述连接请求至少携 带用户标识和应用标识;
1202、 所述客户端接收虚拟管理服务器发送的与应用标识对应的异常 处理方式列表;
1203、 所述客户端向所述虚拟管理服务器发送所述客户端选择的异常 处理方式, 以便于所述虚拟管理服务器将所述客户端选择的异常处理方式 确定并保存为与所述应用标识和用户标识对应的异常处理方式。
所述连接请求携带用户标识、 应用标识和指定的异常处理方式; 所述客户端接收虚拟管理服务器发送的与应用标识对应的异常处理方 式列表具体包括:
当所述虚拟管理服务器确定所述异常处理方式列表中不包含所述指定 的异常处理方式时, 客户端接收所述虚拟管理服务器发送的所述异常处理 方式列表。
所述方法还包括:
所述客户端接收到所述虚拟管理服务器发送的异常恢复询问消息, 向 所述虚拟管理服务器发送异常恢复请求或异常恢复拒绝消息, 使得所述虚 拟管理服务器能够根据所述异常恢复请求或异常恢复拒绝消息进行相应的 操作。
本实施例提供的方法, 通过客户端与虚拟管理服务器确定发生异常时 所使用的异常处理方式, 使得该虚拟管理服务器能够早接收到异常中断的 异常通知, 根据客户端对应的异常处理方式保存应用数据或虚拟机数据, 并释放虚拟机资源, 从而使得不同应用、 不同用户可以根据其需求定制不 同的异常处理方法, 也使得客户端不但可保存异常发生时的时刻或最接近 异常发生时的时刻用户的使用状态, 而且提高了在线应用系统的容量和效 率。
图 13是本发明实施例提供的一种客户端的流程图。 参见图 13, 该实施 例具体包括:
发送模块 1301 , 用于向虚拟管理服务器发送连接请求, 所述连接请求 至少携带用户标识和应用标识;
接收模块 1302, 用于接收虚拟管理服务器发送的与应用标识对应的异 常处理方式列表;
所述发送模块 1301 , 还用于向所述虚拟管理服务器发送所述客户端选 择的异常处理方式, 以便于所述虚拟管理服务器将所述客户端选择的异常 处理方式确定为与所述应用标识和用户标识对应的异常处理方式。 所述连接请求携带用户标识、 应用标识和指定的异常处理方式; 所述接收模块 1302具体用于当所述虚拟管理服务器确定所述异常处理 方式列表中不包含所述指定的异常处理方式时, 接收所述虚拟管理服务器 发送的所述异常处理方式列表。
所述发送模块 1301还用于当所述接收模块接收到所述虚拟管理服务器 发送的异常恢复询问消息, 向所述虚拟管理服务器发送异常恢复请求或异 常恢复拒绝消息, 使得所述虚拟管理服务器能够根据所述异常恢复请求或 异常恢复拒绝消息进行相应的操作。
本发明实施例中的客户端可以为在线应用中的客户端, 具体为 PC机、 手机、 PDA、 连接遥控器(或游戏手柄) 的电视等。 客户端的发送模块和 接收模块可以为各客户端设备的收发器。 本实施例提供的客户端, 与方法 实施例属于同一构思, 可以执行图 2至图 4以及图 12中的客户端(包括第 一客户端和第二客户端)执行的任一步骤, 其具体实现过程详见方法实施 例, 这里不再赘述。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以 通过硬件来完成, 也可以通过程序来指令相关的硬件完成, 所述的程序可 以存储于一种计算机可读存储介质中, 上述提到的存储介质可以是只读存 储器, 磁盘或光盘等。 以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发 明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在 本发明的保护范围之内。

Claims

权利要求
1、 一种异常处理方法, 其特征在于, 包括:
虚拟管理服务器接收与第一客户端交互的虚拟机发送的异常通知, 所 述异常通知至少携带用户标识和应用标识; 常处理方式, 保存所述虚拟机数据或与所述应用标识对应的应用的应用数 据, 并释放所述虚拟机资源。
2、 根据权利要求 1所述的方法, 其特征在于, 所述虚拟管理服务器接 收与虚拟机发送的异常通知, 之前, 所述方法包括:
所述虚拟管理服务器接收所述第一客户端发送的第一连接请求, 所述 第一连接请求至少携带用户标识和应用标识;
所述虚拟管理服务器根据所述第一连接请求, 确定并保存与所述用户 标识及应用标识对应的异常处理方式。
3、 根据权利要求 2所述的方法, 其特征在于, 所述虚拟管理服务器根 处理方式, 具体包括:
所述第一连接请求携带应用标识和用户标识, 根据所述应用标识获取 所述应用能够支持的异常处理方式列表; 将所述异常处理方式列表发送给 所述第一客户端, 使得所述第一客户端从所述异常处理列表中选择异常处 理方式, 将所述第一客户端选择的异常处理方式确定并保存为与所述用户 标识及应用标识对应的异常处理方式; 或,
所述第一连接请求携带应用标识、 用户标识和指定的异常处理方式时, 所述虚拟管理服务器根据所述应用标识获取所述应用能够支持的异常处理 方式列表, 并判断所述异常处理方式列表是否包含所述指定的异常处理方 应用标识对应的异常处理方式; 否则, 所述虚拟管理服务器将所述异常处 理方式列表发送给所述第一客户端, 接收所述第一客户端从所述异常处理 列表中选择的异常处理方式, 将所述第一客户端选择的异常处理方式确定 所述第一连接请求携带应用标识、 用户标识和指定的异常处理方式时, 所述虚拟管理服务器将所述指定的异常处理方式确定并保存为与所述用户 标识及应用标识对应的异常处理方式。
4、 根据权利要求 1-3任一项所述的方法, 其特征在于, 所述虚拟管理 所述虚拟机数据或与所述应用标识对应的的应用的应用数据, 并释放所述 虚拟机资源, 具体包括:
当与所述用户标识及应用标识对应的异常处理方式为应用保存方式 时, 所述虚拟管理服务器依据所述应用的预设逻辑确定所述应用需要保存 运行数据, 并根据所述应用的配置文件, 从所述虚拟机获取所述配置文件 指示的用户个人数据, 将所述用户个人数据、 应用标识和用户标识存储至 数据存储服务器, 关闭所述应用, 释放虚拟机资源, 并更新虚拟机状态; 方式时, 所述虚拟管理服务器根据所述虚拟机当前的状态生成虚拟机快照 数据, 并将所述生成的虚拟机快照数据、 应用标识、 虚拟机信息、 虚拟机 标识和用户标识存储至数据存储服务器, 释放所述虚拟机资源, 并更新所 述虚拟机的状态。
5、 根据权利要求 1-4任一项所述的方法, 其特征在于, 所述虚拟管理 服务器根据所述用户标识对应的异常处理方式, 保存所述虚拟机数据或所 述应用标识指示的应用的应用数据, 并释放所述虚拟机资源之后, 所述方 法还包括:
所述虚拟管理服务器接收第二客户端发送的第二连接请求; 所述第二 连接请求携带所述用户标识和应用标识;
所述虚拟管理服务器根据所述第二连接请求, 确定所述第二连接请求 指示的应用需要进行异常恢复;
所述虚拟管理服务器向第二客户端发送异常恢复询问消息;
所述虚拟管理服务器接收到所述第二客户端的异常恢复请求, 根据所 述第二连接请求携带的用户标识和应用标识选择目的虚拟机; 复。
6、 根据权利要求 5所述的方法, 其特征在于, 所述确定所述第二连接 请求指示的应用需要进行异常恢复, 具体包括:
虚拟管理服务器确定数据存储服务器中保存有与所述应用标识和用户 标识对应的待恢复数据。
7、 根据权利要求 5所述的方法, 其特征在于, 所述虚拟管理服务器接 收到所述第二客户端的异常恢复请求, 根据所述第二连接请求携带的用户 标识和应用标识选择目的虚拟机, 具体包括:
所述虚拟管理服务器从数据存储服务器上获取与所述应用标识及用户 标识对应的待恢复数据;
当所述待恢复数据为虚拟机数据时, 所述虚拟管理服务器根据所述虚 拟机数据选择目的虚拟机;
当所述待恢复数据为应用数据时, 所述虚拟管理服务器根据所述应用 标识选择目的虚拟机。
8、 根据权利要求 7所述的方法, 其特征在于, 当所述待恢复数据为虚 拟机数据时, 所述待恢复数据包括: 虚拟机快照数据、 虚拟机信息、 虚拟 机标识,
所述虚拟管理服务器根据所述虚拟机数据选择目的虚拟机, 具体包括: 所述虚拟管理服务器判断所述虚拟机标识对应的虚拟机是否空闲, 如果否, 选择与所述虚拟机信息匹配的空闲虚拟机作为目的虚拟机。
9、 根据权利要求 7所述的方法, 其特征在于, 所述虚拟管理服务器根 据所述应用标识选择目的虚拟机, 具体包括:
当所述待恢复数据为应用数据时, 根据所述应用标识从空闲虚拟机中 选择第一虚拟机作为目的虚拟机, 所述第一虚拟机为支持所述应用标识指 示的应用运行的虚拟机。
10、 根据权利要求 7-9任一所述的方法, 其特征在于, 所述虚拟管理 服务器在所述目的虚拟机上对异常中断的应用进行恢复, 具体包括:
当所述待恢复数据为虚拟机数据时, 根据所述虚拟机数据中的虚拟机 快照数据启动所述目的虚拟机直接对异常中断的应用进行恢复;
当所述待恢复数据为应用数据时, 启动虚拟机, 将所述应用数据复制 异常中断的应用。
11、 根据权利要求 5-10任一项所述的方法, 其特征在于, 所述虚拟管 理服务器在所述目的虚拟机上对异常中断的应用进行恢复之后, 该方法还 包括:
所述虚拟管理服务器将所述虚拟机标识发送给客户端, 使得所述客户 端根据所述虚拟机标识与虚拟机建立通信连接并与所述虚拟机进行数据交 互。
12、 一种异常处理装置, 其特征在于, 包括:
接收模块, 用于接收与第一客户端交互的虚拟机发送的异常通知, 所 述异常通知至少携带用户标识和应用标识; 常处理方式, 保存所述虚拟机数据或与所述应用标识对应的应用的应用数 据, 并释放所述虚拟机资源。
13、 根据权利要求 12所述的装置, 其特征在于,
所述接收模块, 还用于接收所述第一客户端发送的第一连接请求, 所 述第一连接请求至少携带用户标识和应用标识;
所述装置还包括:
确定模块, 用于根据所述第一连接请求, 确定并保存与所述用户标识 及应用标识对应的异常处理方式。
14、 根据权利要求 13所述的装置, 其特征在于, 所述确定模块包括: 第一确定单元, 用于所述第一连接请求携带应用标识和用户标识, 根 据所述应用标识获取所述应用能够支持的异常处理方式列表; 将所述异常 处理方式列表发送给所述第一客户端, 使得所述第一客户端从所述异常处 理列表中选择异常处理方式, 将所述第一客户端选择的异常处理方式确定 第二确定单元, 用于所述第一连接请求携带应用标识、 用户标识和指 定的异常处理方式时, 根据所述应用标识获取所述应用能够支持的异常处 理方式列表, 并判断所述异常处理方式列表是否包含所述指定的异常处理 方式; 应用标识对应的异常处理方式; 否则, 将所述异常处理方式列表发送给所 述第一客户端, 接收所述第一客户端从所述异常处理列表中选择的异常处 理方式, 将所述第一客户端选择的异常处理方式确定并保存为与所述用户 标识及应用标识对应的异常处理方式; 或,
所述第二确定单元, 还用于所述第一连接请求携带应用标识、 用户标 识和指定的异常处理方式时, 所述虚拟管理服务器将所述指定的异常处理
15、根据权利要求 12-14任一项所述的装置, 其特征在于, 所述异常处 理模块包括:
第一异常处理单元, 用于当与所述用户标识及应用标识对应的异常处 理方式为应用保存方式时, 依据所述应用的预设逻辑确定所述应用需要保 存运行数据, 并根据所述应用的配置文件, 从所述虚拟机获取所述配置文 件指示的用户个人数据, 将所述用户个人数据、 应用标识和用户标识存储 至数据存储服务器, 关闭所述应用, 释放虚拟机资源, 并更新虚拟机状态; 第二异常处理单元, 用于当与所述用户标识及应用标识对应的异常处 理方式为保存虚拟机状态方式时, 根据所述虚拟机当前的状态生成虚拟机 快照数据, 并将所述生成的虚拟机快照数据、 应用标识、 虚拟机信息、 虚 拟机标识和用户标识存储至数据存储服务器, 释放所述虚拟机资源, 并更 新所述虚拟机的状态。
16、 根据权利要求 12-15任一项所述的装置, 其特征在于,
所述接收模块, 还用于接收第二客户端发送的第二连接请求; 所述第 二连接请求携带所述用户标识和应用标识;
所述装置还包括:
异常恢复确定模块, 用于根据所述第二连接请求, 确定所述第二连接 请求指示的应用需要进行异常恢复;
发送模块, 用于向第二客户端发送异常恢复询问消息;
虚拟机选择模块, 用于当接收到所述第二客户端的异常恢复请求, 根 据所述第二连接请求携带的用户标识和应用标识选择目的虚拟机;
恢复模块, 用于所述虚拟管理服务器在所述目的虚拟机上对异常中断 的应用进行恢复。
17、 根据权利要求 16所述的装置, 其特征在于, 异常恢复确定模块具 体用于确定数据存储服务器中保存有与所述应用标识和用户标识对应的待 恢复数据。
18、 根据权利要求 16或 17所述的装置, 其特征在于, 虚拟机选择模 块包括:
获取单元, 用于从数据存储服务器上获取与所述应用标识及用户标识 对应的待恢复数据;
选择单元, 用于当所述待恢复数据为虚拟机数据时, 根据所述虚拟机 数据选择目的虚拟机;
所述选择单元, 还用于当所述待恢复数据为应用数据时, 根据所述应 用标识选择目的虚拟机。
19、 根据权利要求 18所述的装置, 其特征在于, 当所述待恢复数据为 虚拟机数据时, 所述待恢复数据包括: 虚拟机快照数据、 虚拟机信息、 虚 拟机标识,
所述选择单元, 具体用于判断所述虚拟机标识对应的虚拟机是否空闲, 所述虚拟机标识对应的虚拟机空闲, 将所述虚拟机标识对应的虚拟机作为 目的虚拟机; 所述选择单元, 还用于所述虚拟机标识对应的虚拟机不空闲, 选择与 所述虚拟机信息匹配的空闲虚拟机作为目的虚拟机。
20、 根据权利要求 18所述的装置, 其特征在于, 所述选择单元还用于 当所述待恢复数据为应用数据时, 根据所述应用标识从空闲虚拟机中选择 第一虚拟机作为目的虚拟机, 所述第一虚拟机为支持所述应用标识指示的 应用运行的虚拟机。
21、 根据权利要求 16-20任一所述的装置, 其特征在于, 所述恢复模 块包括:
第一恢复单元, 用于当所述待恢复数据为虚拟机数据时, 根据所述虚 进行恢复;
第二恢复单元, 用于当所述待恢复数据为应用数据时, 启动虚拟机, 将所述应用数据复制到所述目的虚拟机上, 并在所述目的虚拟机上根据所 述应用数据运行所述异常中断的应用。
22、根据权利要求 16-21任一项所述的装置, 其特征在于, 所述发送模 块还用于将所述虚拟机标识发送给客户端, 使得所述客户端根据所述虚拟 机标识与虚拟机建立通信连接并与所述虚拟机进行数据交互。
23、 一种异常恢复方法, 其特征在于, 包括:
客户端向虚拟管理服务器发送连接请求, 所述连接请求至少携带用户 标识和应用标识;
所述客户端接收虚拟管理服务器发送的与应用标识对应的异常处理方 式列表;
所述客户端向所述虚拟管理服务器发送所述客户端选择的异常处理方 式, 以便于所述虚拟管理服务器将所述客户端选择的异常处理方式确定并 保存为与所述应用标识和用户标识对应的异常处理方式。
24、 根据权利要求 23所述的方法, 其特征在于, 所述连接请求携带用 户标识、 应用标识和指定的异常处理方式;
所述客户端接收虚拟管理服务器发送的与应用标识对应的异常处理方 式列表具体包括:
当所述虚拟管理服务器确定所述异常处理方式列表中不包含所述指定 的异常处理方式时, 客户端接收所述虚拟管理服务器发送的所述异常处理 方式列表。
25、 根据权利要求 23所述的方法, 其特征在于, 所述方法还包括: 所述客户端接收到所述虚拟管理服务器发送的异常恢复询问消息, 向 所述虚拟管理服务器发送异常恢复请求或异常恢复拒绝消息, 使得所述虚 拟管理服务器能够根据所述异常恢复请求或异常恢复拒绝消息进行相应的 操作。
26、 一种客户端, 其特征在于, 包括:
发送模块, 用于向虚拟管理服务器发送连接请求, 所述连接请求至少 携带用户标识和应用标识;
接收模块, 用于接收虚拟管理服务器发送的与应用标识对应的异常处 理方式列表;
所述发送模块, 还用于向所述虚拟管理服务器发送所述客户端选择的 异常处理方式, 以便于所述虚拟管理服务器将所述客户端选择的异常处理 方式确定为与所述应用标识和用户标识对应的异常处理方式。
27、 根据权利要求 26所述的客户端, 其特征在于,
所述连接请求携带用户标识、 应用标识和指定的异常处理方式; 所述接收模块具体用于当所述虚拟管理服务器确定所述异常处理方式 列表中不包含所述指定的异常处理方式时, 接收所述虚拟管理服务器发送 的所述异常处理方式列表。
28、 根据权利要求 26所述的客户端, 其特征在于,
所述发送模块还用于当所述接收模块接收到所述虚拟管理服务器发送 的异常恢复询问消息, 向所述虚拟管理服务器发送异常恢复请求或异常恢 复拒绝消息, 使得所述虚拟管理服务器能够根据所述异常恢复请求或异常 恢复拒绝消息进行相应的操作。
PCT/CN2012/078524 2011-11-14 2012-07-12 异常处理方法、装置和客户端 WO2013071766A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP12849883.9A EP2712119B1 (en) 2011-11-14 2012-07-12 Abnormality handling method, device and client
US14/143,946 US9740515B2 (en) 2011-11-14 2013-12-30 Exception handling method, apparatus, and client

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201110359792.8 2011-11-14
CN201110359792 2011-11-14
CN201110412168.XA CN103107905B (zh) 2011-11-14 2011-12-12 异常处理方法、装置和客户端
CN201110412168.X 2011-12-12

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/143,946 Continuation US9740515B2 (en) 2011-11-14 2013-12-30 Exception handling method, apparatus, and client

Publications (1)

Publication Number Publication Date
WO2013071766A1 true WO2013071766A1 (zh) 2013-05-23

Family

ID=48315487

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/078524 WO2013071766A1 (zh) 2011-11-14 2012-07-12 异常处理方法、装置和客户端

Country Status (4)

Country Link
US (1) US9740515B2 (zh)
EP (1) EP2712119B1 (zh)
CN (1) CN103107905B (zh)
WO (1) WO2013071766A1 (zh)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9852000B2 (en) * 2013-08-27 2017-12-26 Empire Technology Development Llc Consolidating operations associated with a plurality of host devices
CN104581326B (zh) * 2014-12-09 2017-10-27 深圳市腾讯计算机系统有限公司 操控设备与电视之间的交互方法和装置
CN106293781B (zh) * 2015-05-15 2019-10-18 阿里巴巴集团控股有限公司 在线升级机器虚拟器的方法与设备
CN105389198A (zh) * 2015-10-16 2016-03-09 浪潮(北京)电子信息产业有限公司 一种虚拟机控制台自动重连方法及装置
US10075304B2 (en) 2015-10-30 2018-09-11 Microsoft Technology Licensing, Llc Multiple gateway operation on single operating system
CN105677394B (zh) * 2015-12-30 2020-01-21 北京奇艺世纪科技有限公司 一种终端设备的应用程序升级方法和装置
US10176008B2 (en) * 2016-05-19 2019-01-08 Airwatch, Llc Loading and running virtual working environments in a mobile device management system
CN106254537B (zh) * 2016-09-22 2020-02-07 北京小米移动软件有限公司 接口调用方法和装置
CN106557402B (zh) * 2016-10-31 2019-09-06 努比亚技术有限公司 移动终端及异常信息处理方法
CN108170507B (zh) * 2017-12-04 2022-02-22 上海市信息网络有限公司 虚拟应用管理方法/系统、计算机可读存储介质及服务端
CN108563518A (zh) * 2018-04-08 2018-09-21 广州视源电子科技股份有限公司 主从机通信方法、装置、终端设备及存储介质
CN109324926A (zh) * 2018-08-30 2019-02-12 黄疆 一种基于rollback的垃圾数据处理系统及方法
CN110134460B (zh) * 2019-05-17 2022-04-22 联想(北京)有限公司 系统控制方法、控制器、处理器及计算机可读介质
CN111104199A (zh) * 2019-11-19 2020-05-05 杭州海康威视系统技术有限公司 虚拟机高可用的方法及装置
CN111381969B (zh) * 2020-03-16 2021-10-26 北京康吉森技术有限公司 一种分布式软件的管理方法及其系统
CN111314503B (zh) * 2020-03-31 2022-03-29 新华三信息安全技术有限公司 IPoE用户表的恢复方法及装置
CN111752712B (zh) * 2020-06-28 2023-08-18 中国银行股份有限公司 虚拟机资源利用率提高方法及装置
CN113778695B (zh) * 2021-11-12 2022-04-29 深圳华锐分布式技术股份有限公司 跨应用生命周期的内存快照管理方法、装置、设备及介质
CN114168270A (zh) * 2021-12-15 2022-03-11 江苏多肯新材料有限公司 一种云开发平台控制方法及系统
CN114420264A (zh) * 2022-03-31 2022-04-29 青岛美迪康数字工程有限公司 基于云端的医疗影像归档和通信系统及医疗影像获取方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794243A (zh) * 2010-03-18 2010-08-04 浪潮电子信息产业股份有限公司 一种利用操作系统结构化异常处理加固java应用程序的方法
CN102073556A (zh) * 2010-12-08 2011-05-25 北京航空航天大学 虚拟机的热备份和恢复方法、设备及系统
CN102204210A (zh) * 2011-05-18 2011-09-28 华为技术有限公司 启动应用的方法、服务器和系统

Family Cites Families (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7882247B2 (en) 1999-06-11 2011-02-01 Netmotion Wireless, Inc. Method and apparatus for providing secure connectivity in mobile and other intermittent computing environments
US6857085B1 (en) * 2000-05-15 2005-02-15 Microsoft Corporation Method and system for handling an unexpected exception generated by an application
US7003778B2 (en) * 2001-10-24 2006-02-21 Sun Microsystems, Inc. Exception handling in java computing environments
US7194744B2 (en) * 2002-12-17 2007-03-20 International Business Machines Corporation System and method for dynamic exception handling using an external exception handler
US20050091226A1 (en) 2003-10-23 2005-04-28 Yun Lin Persistent caching directory level support
US20050132363A1 (en) * 2003-12-16 2005-06-16 Vijay Tewari Method, apparatus and system for optimizing context switching between virtual machines
US8732182B2 (en) * 2004-12-02 2014-05-20 Desktopsites Inc. System and method for launching a resource in a network
US20060122955A1 (en) * 2004-12-02 2006-06-08 Alex Bethlehem System and method for launching a resource in a network
US20070174429A1 (en) * 2006-01-24 2007-07-26 Citrix Systems, Inc. Methods and servers for establishing a connection between a client system and a virtual machine hosting a requested computing environment
JP5010164B2 (ja) * 2006-03-31 2012-08-29 株式会社日立製作所 サーバ装置及び仮想計算機の制御プログラム
US8321377B2 (en) * 2006-04-17 2012-11-27 Microsoft Corporation Creating host-level application-consistent backups of virtual machines
US20080301770A1 (en) * 2007-05-31 2008-12-04 Kinder Nathan G Identity based virtual machine selector
JP4678396B2 (ja) * 2007-09-25 2011-04-27 日本電気株式会社 仮想マシンモニタをモニタするコンピュータとその方法、および仮想マシンモニタモニタプログラム
US8458419B2 (en) * 2008-02-27 2013-06-04 International Business Machines Corporation Method for application backup in the VMware consolidated backup framework
US20100070678A1 (en) * 2008-09-12 2010-03-18 Vmware, Inc. Saving and Restoring State Information for Virtualized Computer Systems
US9009329B2 (en) * 2008-11-25 2015-04-14 Microsoft Technology Licensing, Llc Platform for enabling terminal services virtualization
US9195487B2 (en) * 2009-05-19 2015-11-24 Vmware, Inc. Interposition method suitable for hardware-assisted virtual machine
US8219990B2 (en) * 2009-05-28 2012-07-10 Novell, Inc. Techniques for managing virtual machine (VM) states
CN101938368A (zh) * 2009-06-30 2011-01-05 国际商业机器公司 刀片服务器系统中的虚拟机管理器和虚拟机处理方法
US8949408B2 (en) * 2009-12-18 2015-02-03 Microsoft Corporation Session monitoring of virtual desktops in a virtual machine farm
US20110219373A1 (en) * 2010-03-02 2011-09-08 Electronics And Telecommunications Research Institute Virtual machine management apparatus and virtualization method for virtualization-supporting terminal platform
US20120084369A1 (en) * 2010-09-30 2012-04-05 Microsoft Corporation Unified Reconnection To Multiple Remote Servers
US9063822B2 (en) * 2011-09-02 2015-06-23 Microsoft Technology Licensing, Llc Efficient application-aware disaster recovery
US8589481B2 (en) * 2011-09-14 2013-11-19 Microsoft Corporation Multi tenant access to applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794243A (zh) * 2010-03-18 2010-08-04 浪潮电子信息产业股份有限公司 一种利用操作系统结构化异常处理加固java应用程序的方法
CN102073556A (zh) * 2010-12-08 2011-05-25 北京航空航天大学 虚拟机的热备份和恢复方法、设备及系统
CN102204210A (zh) * 2011-05-18 2011-09-28 华为技术有限公司 启动应用的方法、服务器和系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2712119A4 *

Also Published As

Publication number Publication date
EP2712119B1 (en) 2017-04-12
CN103107905A (zh) 2013-05-15
EP2712119A4 (en) 2014-12-10
US20140115587A1 (en) 2014-04-24
EP2712119A1 (en) 2014-03-26
CN103107905B (zh) 2017-08-04
US9740515B2 (en) 2017-08-22

Similar Documents

Publication Publication Date Title
WO2013071766A1 (zh) 异常处理方法、装置和客户端
US8055761B2 (en) Method and apparatus for providing transparent network connectivity
US10623243B2 (en) Management of computing sessions
JP6182265B2 (ja) コンピューティングセッションの管理
AU2014302471B2 (en) Management of computing sessions
WO2013178082A1 (zh) 图片上传方法、系统、客户端及网络服务器、计算机存储介质
KR101840222B1 (ko) 컴퓨팅 세션의 관리
US20140019496A1 (en) Data transfer method
US11755364B2 (en) Transferral of process state and/or components in computing environments
WO2021042612A1 (zh) 无线投屏方法、装置、设备及存储介质
WO2009084791A1 (en) Method of and apparatus for downloading data
WO2018094686A1 (zh) 一种smb业务故障处理方法和存储设备
CN114553693A (zh) 网关升级方法及装置
JP2008167359A (ja) Ip電話システムにおける所分割方法,ファイル更新方法及びip電話システム
US9608914B2 (en) Information processing apparatus and information processing method
US10686646B1 (en) Management of computing sessions
CN114930313A (zh) 用于管理区块链节点的系统和方法
JP2011070279A (ja) アプリケーション・サーバおよびその動作制御方法
JP6659943B2 (ja) 情報処理装置、情報処理システム、その制御方法及びプログラム
JP2004302791A (ja) バックアップ方法/プログラム/記録媒体/情報処理装置/システム
WO2013037232A1 (zh) 断开虚拟桌面的处理方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12849883

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2012849883

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2012849883

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE