WO2015117539A1 - 一种调用安装于电子设备上的应用的方法及装置 - Google Patents

一种调用安装于电子设备上的应用的方法及装置 Download PDF

Info

Publication number
WO2015117539A1
WO2015117539A1 PCT/CN2015/071453 CN2015071453W WO2015117539A1 WO 2015117539 A1 WO2015117539 A1 WO 2015117539A1 CN 2015071453 W CN2015071453 W CN 2015071453W WO 2015117539 A1 WO2015117539 A1 WO 2015117539A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
electronic device
virtual machine
desktop
notification message
Prior art date
Application number
PCT/CN2015/071453
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 中兴通讯股份有限公司
Publication of WO2015117539A1 publication Critical patent/WO2015117539A1/zh

Links

Images

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/445Program loading or initiating
    • 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/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators

Definitions

  • the present invention relates to the field of Internet cloud computing and virtualization, and more particularly to a method and apparatus for invoking an application installed on an electronic device.
  • VDI Virtual Desktop Infrastructure
  • client/server client/server
  • All the data is stored in a centralized large-scale storage device in the data center, which can also be understood as one.
  • the typical architecture of a virtual desktop system is generally a large virtual machine cluster in the background remote end. Each user needs a virtual machine to serve it; all terminal devices are finally connected to a gateway relay device through the Internet. And then distribute the virtual machine to the user.
  • Virtual desktop infrastructure and technology bring two advantages: administrators can deploy, host, and manage all desktop virtual machines in the Internet data center to reduce operation and maintenance costs; end users can access through the network. Virtual desktops get a similar experience to a full physical PC (personal computer) desktop, reducing the physical hardware cost of the client.
  • PC personal computer
  • the key technology currently used by VDI is the desktop transmission protocol, also known as the network display protocol, and its protocol implementation.
  • Host Rendering all graphics and image processing work of the virtual machine desktop is completed on the remote server, and only pixel information is sent to the user terminal, and the terminal does not need to perform a large amount of The operation eliminates the client design that requires high CPU and memory resources, keeps the client structure simple, but requires a lot of network bandwidth.
  • Second is the client rendering (Client Rendering): the client has a certain computing power, undertake part of the desktop image graphics work, data can be compressed and transmitted, saving network bandwidth.
  • the architecture of virtualization technology is shown in Figure 1.
  • the hypervisor virtualization engine or virtual machine manager, virtual machine monitor
  • you can create and run multiple virtual machines each virtual machine is similar to a physical PC, completely independent Run and isolated from each other to install the different needs of users Guest OS, such as Windows XP, Windows 7, various distributions or commercial versions based on the Linux kernel.
  • Hypervisor virtualization engine such as Xen, KVM (Kernel-based Virtual Machine), also known as VMM (Virtual Machine Monitor, Virtual Machine Monitor or Manager) ), an intermediate layer of software running between the underlying physical server and the operating system that allows multiple operating systems and applications on them to share hardware.
  • Hypervisor is a "meta" operating system in a virtual computing environment that can access all physical device resources including CPU processor, memory, disk, and network card on the server host. Hypervisors not only schedule and coordinate access to these hardware resources, but also isolate and protect each virtual machine.
  • Hypervisor is the core of all virtualization technologies. It manages the life cycle of virtual machines through Hypervisor. For example, one of its basic capabilities is to support non-disruptive online migration of virtual machines to migrate virtual machines from one host to another. End users do not have any awareness of the process of using virtual machines.
  • the main types of X86 virtualization hypervisors on the market today include: 1. The virtual machine runs directly on the system hardware. The hypervisor creates an instance of hardware full emulation, which is called bare model. 2. The virtual machine runs on the traditional operating system, and the same hardware simulation example is created, which is called hosted or hosted. 3. The virtual machine runs on a traditional operating system, creating a separate virtualized instance, such as a container, pointing to the underlying managed operating system, known as "operating system virtualization.” The most common one is still the bare-machine hypervisor. The virtualization kernel is installed directly on the hardware computing resources. The virtual machine and its guest operating system (Guest OS) are installed and run on top of the hypervisor. The feature is that the hardware and software architecture and management are more efficient and flexible, and the performance of the hardware can be better utilized, thereby improving the utilization of computing resources, storage resources, and network resources on the physical server, and reducing operating costs.
  • the virtual desktop technology is the desktop of the virtual machine operating system created and managed by the hypervisor, and is extended to the user's terminal local system for display, and the audio and video of the virtual machine is also redirected to the terminal output, and the end user's mouse is used.
  • Human keyboard input operations such as keyboards, audio and video input operations such as recording and video recording, redirected to the virtual machine, and then presented and presented through the desktop of the virtual machine.
  • the VDI virtual desktop transfer protocol or network display protocol is generally used to implement desktop remote and peripheral redirection.
  • the architecture and component deployment of the virtual desktop is shown in Figure 2.
  • the virtual desktop client program installed on the user terminal (such as a thin terminal, PC or laptop) can access the enterprise hypervisor virtualization server host and the virtual machine on it. .
  • the Hypervisor server host creates and manages virtual machines for device emulation of virtual machines. In a virtual machine, components such as virtual desktop agents, target stubs, and other drivers are deployed to enable message interaction and communication between the virtual desktop and the
  • the end user can provide the operation and use and maintenance of the virtual machine OS (Operating System), the desktop system and the installed methods and methods on the application to achieve the same user as the physical PC desktop.
  • the virtual machine OS Operating System
  • the desktop system and the installed methods and methods on the application to achieve the same user as the physical PC desktop.
  • some applications that are planned to be installed in a virtual machine require high resource consumption and real-time performance at runtime, which may significantly increase network pressure.
  • a sensation will occur, which directly affects the performance of the virtual machine and the application experience, resulting in the experience of the virtual desktop user.
  • it is not suitable to install such an application in a virtual machine, and it is installed in the local system of the user terminal to better meet the performance requirements.
  • the desktop usability can be greatly improved.
  • Embodiments of the present invention provide a method and apparatus for invoking an application installed on an electronic device to improve the ease of calling an application from a virtual machine desktop.
  • the method for invoking an application installed on an electronic device is applied to a virtual machine, and includes the following steps:
  • the first application is an application installed on an electronic device.
  • Processing the application association message creating a first object for launching the first application on a virtual machine desktop.
  • the object for starting the first application includes a desktop shortcut object of the first program; processing the application association message, and creating a first one for starting the first application on the virtual machine desktop
  • the steps of the object specifically include:
  • the attribute information of the desktop shortcut object is saved, and the creation of the first object is completed.
  • the step of sending a startup notification message corresponding to the application startup information to the electronic device specifically includes: invoking a Windows application programming interface API function by using a target stub program of the virtual machine to notify the desktop agent of the virtual machine to the electronic
  • the device sends a startup notification message corresponding to the application startup information.
  • the Windows application programming interface API function is a PostMessage function.
  • an embodiment of the present invention further provides a method for invoking an application installed on an electronic device, which is applied to the electronic device, and includes the following steps:
  • the first application corresponds to an application trigger instruction issued by the user on the virtual machine side, and is determined according to an application trigger instruction.
  • the method before receiving the first application startup notification message sent from the virtual machine side, the method further includes:
  • a first application association message corresponding to the attribute information is sent to the virtual machine side.
  • the method further includes:
  • the electronic device program window includes a desktop client program window corresponding to the remote virtual machine on the electronic device.
  • the step of running the first application according to the startup notification message specifically includes:
  • the first application is executed according to the startup notification message by using a ShellExecute shell execution or CreateProcess creation process method by a desktop client window program set on the electronic device.
  • the method further includes:
  • an embodiment of the present invention further provides an apparatus for invoking an application installed on an electronic device, which is applied to a virtual machine, and includes the following structure:
  • Instruction detection module set to detect a user application trigger instruction
  • An application determining module configured to determine that the application triggering instruction corresponds to a first application on an electronic device
  • a startup notification message sending module configured to send a startup notification message of the first application to the electronic device, so that the electronic device can run the first application according to the startup notification message;
  • the first application is an application installed on an electronic device.
  • the device further includes
  • An associated message receiving module configured to receive a first application association message transmitted from the electronic device
  • An object creation module configured to process the application association message, and create a first object for launching the first application on a virtual machine desktop.
  • the object for starting the first application includes a desktop shortcut object of the first program;
  • the object creation module specifically includes:
  • a startup information saving unit configured to save the first application startup information in the first application association message
  • Operation object declaration unit set to reference the COM component IWshRuntimeLibrary, declare the operation object WshShell corresponding to the first application;
  • Desktop Shortcut Object Creation Unit Set the IWshShortcut object to create a shortcut to the desktop shortcut of the first application by calling CreateShortcut.
  • the attribute saving unit is configured to save attribute information of the desktop shortcut object, and complete creation of the first object.
  • the startup notification message sending module is further configured to notify the desktop agent of the virtual machine by calling a Windows application programming interface API function of the target stub program of the virtual machine, and send, to the electronic device, the corresponding information corresponding to the application startup information. Start a notification message.
  • the Windows application programming interface API function is a PostMessage function.
  • an embodiment of the present invention further provides an apparatus for invoking an application installed on an electronic device, which is applied to an electronic device, including:
  • a startup notification message receiving module configured to receive a startup notification message of the first application sent from the virtual machine side;
  • An application execution execution module configured to run the first application according to the startup notification message
  • the first application corresponds to an application trigger instruction issued by the user on the virtual machine side, and is determined according to an application trigger instruction.
  • the device further includes:
  • Drag and drop motion detection module set to detect the user's drag and drop action
  • a drag and drop position determining module configured to determine that the end position of the drag and drop action is in a window area corresponding to the virtual machine
  • Attribute information obtaining module configured to obtain attribute information of the first application that is dragged and dropped;
  • the association message sending module is configured to send the first application association message corresponding to the attribute information to the virtual machine side.
  • the device further includes:
  • a first drag and drop action enabling module configured to call a Windows application programming interface function DragAcceptFiles, such that the electronic device program window allows the drag and drop action to be accepted;
  • the second drag and drop action enabling module is configured to set an Accept Files property of the electronic device program window through the Windows integrated development environment, so that the electronic device program window allows the drag and drop action to be accepted;
  • the electronic device program window includes a desktop client program window corresponding to the remote virtual machine on the electronic device.
  • the application running execution module is further configured to run the first application according to the startup notification message by using a ShellExecute shell execution or a CreateProcess creation process method by using a desktop client window program disposed on the electronic device. .
  • the device further includes:
  • the window minimization module is configured to hide or minimize the desktop window of the electronic device itself when the application execution execution module runs the first application according to the startup notification message.
  • the method and device for invoking an application installed on an electronic device provided by the embodiment of the present invention can run a corresponding first application program on the electronic device by issuing an instruction to the desktop of the virtual machine. Reduce the load on the virtual machine, make full use of the local hardware and software resources of the electronic device; increase the flexibility of application deployment and enhance the user experience.
  • FIG. 1 is a schematic flowchart of a method for applying an application installed on an electronic device to a virtual machine according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of steps involved in detecting a user application triggering instruction in an embodiment of the present invention
  • FIG. 3 is a schematic diagram of steps of creating an object for starting a first application on a virtual machine desktop according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of a method for calling an application installed on an electronic device on an electronic device according to another embodiment of the present invention
  • FIG. 5 is a schematic diagram of steps performed before receiving a first application start notification message sent from a virtual machine in an embodiment of the present invention
  • FIG. 6 is a schematic diagram of a drag and drop operation in an embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of a process of determining that an end position of the drag and drop operation is within a window area corresponding to a virtual machine according to an embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of an apparatus for invoking an application installed on an electronic device when applied to a virtual machine according to an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of an apparatus for invoking an application installed on an electronic device when applied to an electronic device according to an embodiment of the present invention.
  • An embodiment of the present invention provides a method for invoking an application installed on an electronic device, which is applied to a virtual machine.
  • the process is as shown in FIG. 1 and includes the following steps:
  • Step 101 Detect a user application trigger instruction
  • Step 102 Determine that the application triggers the first application corresponding to the instruction on the electronic device
  • Step 103 Send a startup notification message of the first application to the electronic device, so that the electronic device can run the first application according to the startup notification message.
  • the method for invoking an application installed on an electronic device can receive an application trigger instruction sent by a user on a virtual machine side, and trigger an instruction according to the application trigger instruction.
  • the first application installed on the physical electronic device is operated by the electronic device in the first application, thereby allowing the user to directly launch the application installed on the electronic device directly on the virtual machine side, thereby improving the ease of use of the virtual machine. .
  • the application triggers the instruction in step 101, which is an instruction applied by the user through the desktop of the virtual machine, and the instruction can be implemented by clicking an object set on the desktop of the virtual machine, such as clicking a graphic object or an icon object.
  • the application triggers an instruction, and can also cause a text instruction input by a user through a keyboard or the like.
  • the virtual machine is provided with a desktop agent and a target stub program; the virtual machine may be provided with a target stub program and a desktop agent for sending a startup notification message of the first application to the electronic device.
  • the target stub program runs as a Windows background service.
  • the startup notification message of the first application in step 103 may be directed to the target stub program associated with the object.
  • the desktop agent sends and then sends it to the electronic device by the desktop agent.
  • the target stub program calls the PostMessage function to notify the desktop agent to carry a startup notification message including the first application path and the file name information, to inform the electronic device that the electronic device needs to be started to be installed on the electronic device.
  • the first local application is a registered trademark of Microsoft Corporation.
  • the startup notification message of the first application may be sent to a desktop client program deployed on the electronic device through a transmission channel of the virtual desktop protocol, where the desktop client program is After receiving the startup notification message, the electronic device performs startup and operation of the first application.
  • Step 201 Receive a first application association message transmitted from an electronic device.
  • Step 202 Process the application association message, and create a first object for starting the first application on a virtual machine desktop.
  • step 202 the step of detecting an application triggering instruction in step 101 can be implemented by clicking on the first object created on the virtual machine desktop for starting the first application.
  • the object for starting the first application includes a desktop shortcut object of the first program; processing the application association message, and creating, at the virtual machine desktop, the first
  • the object of the application specifically includes the steps shown in Figure 3:
  • Step 301 Save first application startup information in the first application association message.
  • Step 302 Refer to the COM component IWshRuntimeLibrary, and declare the operation object WshShell corresponding to the first application;
  • Step 303 Call the CreateShortcut method to create an IWshShortcut object of the desktop shortcut of the first application;
  • Step 304 Save attribute information of the desktop shortcut object, and complete creation of the first object.
  • the first application startup information should include at least a path of the first application. Further, the first application startup information further includes a name of the first application.
  • the attribute information of the desktop shortcut object includes a target stub path (TargetPath), a text parameter (Arguments), a floating description (Description), a global hot key (Hotkey), and an icon position associated with the shortcut object ( Properties such as IconLocation), call the Save method to save and complete the creation of the shortcut.
  • TigetPath target stub path
  • Arguments text parameter
  • Description floating description
  • Hotkey global hot key
  • IconLocation an icon position associated with the shortcut object
  • the step of sending a startup notification message corresponding to the application startup information to the electronic device specifically includes: calling a Windows API (Application Programming Interface) through a target stub program of the virtual machine.
  • the function notifies the desktop agent of the virtual machine to send a startup notification message corresponding to the application startup information to the electronic device.
  • the Windows API function includes a PostMessage function.
  • the startup notification message includes information such as a path and a file name of the first application on the electronic device.
  • an embodiment of the present invention provides a method for invoking an application installed on an electronic device, including the following steps performed on the electronic device, as shown in FIG. 4:
  • Step 401 Receive a startup notification message of the first application sent from the virtual machine side.
  • Step 402 Run the first application according to the startup notification message.
  • the first application corresponds to an application trigger instruction issued by the user on the virtual machine side, and is determined according to an application trigger instruction.
  • the first application is started and run on the electronic device, so that the virtual machine can be quickly started when the first application is invoked, and the program running jamming caused by the virtual machine configuration or bandwidth is avoided.
  • the virtual machine is provided with a desktop agent and a target stub; the target stub runs in the form of a Windows background service.
  • the target stub program After receiving the application triggering command issued by the user on the virtual machine side, the target stub program calls PostMessage to notify the desktop agent, and the desktop agent wants the electronic device to issue a startup notification message of the first application.
  • the startup notification message includes a path and a file name of the first application on the electronic device.
  • the application triggering instruction issued by the user on the virtual machine side may be an instruction input by the user, or may be a trigger instruction issued by the user when clicking an object of the virtual machine desktop.
  • the user can run the corresponding first application by clicking the object, which is convenient for the user to operate.
  • the user can add the object corresponding to the first application to the virtual machine desktop by dragging the startup shortcut or the startup icon of the first application on the electronic device, so that the user can click the object to run the first object. application.
  • the method before receiving the first application startup notification message sent from the virtual machine side, the method further includes:
  • Step 501 Detecting a user's drag and drop action
  • Step 502 Determine that the end position of the drag and drop action is in a window area corresponding to the virtual machine
  • Step 503 Acquire attribute information of the first application that is dragged and dropped
  • Step 504 Send a first application association message corresponding to the attribute information to the virtual machine.
  • step 501 after detecting the drag and drop operation of the user, the Windows message WM_DROPFILES is mapped, and the subsequent processing of the drag and drop action is performed in the message processing function OnDropFiles.
  • the attribute information of the first application to be dragged and dropped can be sent to the virtual machine according to the drag and drop action of the user, so that the virtual machine creates a startup on the desktop of the user.
  • the first object of the first application can be sent to the virtual machine according to the drag and drop action of the user, so that the virtual machine creates a startup on the desktop of the user.
  • the drag and drop action refers to a method of dragging by a mouse, moving, copying, and pasting between windows of different programs, between different windows of the same program, and between different controls of the same program in the same program. technology.
  • Drag and drop is done with the help of the operating system.
  • the dragged object first registers the data format it uses with the operating system and provides the data in the specified data format.
  • the program window of the drag and drop is received, the relevant data is extracted according to the specified data format, and corresponding objects are generated according to the extracted data or other subsequent processing is performed.
  • the drag and drop action is an action of applying a press on an object and dragging and dropping the object, as shown in FIG.
  • Step 5021 Call the GetClientRect function of the Win32 API to obtain the virtual desktop area coordinates presented on the electronic device.
  • Step 5022 Call the ClientToScreen function to convert the coordinate system to the screen coordinate system of the electronic device;
  • Step 5023 Calling the DragQueryPoint function of the Win32 API to obtain the location at the end of the drag and drop operation;
  • Step 5024 Determine, according to the virtual desktop area coordinate, the screen coordinate system, and the position at the end of the drag and drop operation, whether the position at the end of the drag and drop operation falls within the virtual desktop area; if yes, proceed to the next step;
  • Step 5025 Determine that the end position of the drag and drop action is within the window area corresponding to the virtual machine.
  • the first application association message in step 504 includes attribute information of the first application, and the attribute information includes at least a path and a file name of the first application in the electronic device.
  • the DragFinish function is called to release the system memory and return.
  • step 504 the first application association message is sent to the desktop agent in the virtual machine, and the desktop agent is notified to create a relative object in the virtual machine desktop, which is a shortcut object in this embodiment.
  • the DragFinish function is called to release the memory allocated by the system and the processing ends.
  • the method before the step of dragging and dropping the user is detected, the method further includes:
  • DragAcceptFiles Calling the Windows application programming interface function DragAcceptFiles, so that the electronic device program window allows to accept the drag and drop action
  • the electronic device program window includes a desktop client program window corresponding to the remote virtual machine on the electronic device.
  • the Windows message WM_DROPFILES is mapped, and the mouse drag and drop event is processed in the message processing function OnDropFiles.
  • the step of running the first application according to the startup notification message specifically includes:
  • the first application is executed according to the startup notification message by a desktop client window program set on the electronic device, using a ShellExecute or CreateProcess method.
  • the method when the first application is executed according to the startup notification message, the method further includes:
  • the electronic device is provided with a desktop client window program
  • the desktop client window program is configured to send a first application association message to the virtual machine, and run the according to the startup notification message.
  • the first application hides or minimizes the desktop window of the electronic device itself.
  • the desktop client window program uses a ShellExecute or CreateProcess method to finally launch an application local to the running terminal according to the received path and file name of the terminal local application.
  • the desktop client window program calls ShowWindow to hide (SW_HIDE) or minimize (SW_MINIMIZE) its own desktop window, to avoid occluding or overwriting the window or interface popped up when the terminal local application runs.
  • SW_HIDE ShowWindow to hide
  • SW_MINIMIZE minimize
  • an embodiment of the present invention provides an apparatus for invoking an application installed on an electronic device, which is applied to a virtual machine, and has a structure as shown in FIG. 8, and includes the following structure:
  • Instruction detection module set to detect a user application trigger instruction
  • An application determining module configured to determine that the application triggering instruction corresponds to a first application on an electronic device
  • a startup notification message sending module configured to send a startup notification message of the first application to the electronic device, so that the electronic device can run the first application according to the startup notification message;
  • the first application is an application installed on an electronic device.
  • the device for invoking an application installed on an electronic device can be deployed and run on an electronic device that is a host of a virtual machine, and does not need to be installed and deployed in the virtual machine, thereby reducing the burden on the desktop virtual machine.
  • the apparatus further includes:
  • An associated message receiving module configured to receive a first application association message transmitted from the electronic device
  • An object creation module configured to process the application association message, and create a first object for launching the first application on a virtual machine desktop.
  • the object for starting the first application includes a desktop shortcut object of the first program; the object creation module specifically includes:
  • a startup information saving unit configured to save the first application startup information in the first application association message
  • Operation object declaration unit set to reference the COM component IWshRuntimeLibrary, declare the operation object WshShell corresponding to the first application;
  • Desktop Shortcut Object Creation Unit Sets the IWshShortcut object to create a desktop shortcut for the first application by calling the CreateShortcut method;
  • the attribute saving unit is configured to save attribute information of the desktop shortcut object, and complete creation of the first object.
  • the startup notification message sending module is further configured to: notify a desktop agent of the virtual machine by calling a Windows API function by a target stub program of the virtual machine, and send, to the electronic device, a corresponding to the application startup information. Start notification message.
  • the Windows API function includes a PostMessage function.
  • the embodiment of the present invention further provides an apparatus for invoking an application installed on an electronic device, which is applied to an electronic device, and the structure thereof is as shown in FIG.
  • a startup notification message receiving module configured to receive a startup notification message of the first application sent from the virtual machine side;
  • An application execution execution module configured to run the first application according to the startup notification message
  • the first application corresponds to an application trigger instruction issued by the user on the virtual machine side, and is determined according to an application trigger instruction.
  • the apparatus further includes:
  • Drag and drop motion detection module set to detect the user's drag and drop action
  • a drag and drop position determining module configured to determine that the end position of the drag and drop action is in a window area corresponding to the virtual machine
  • Attribute information obtaining module configured to obtain attribute information of the first application that is dragged and dropped;
  • the association message sending module is configured to send the first application association message corresponding to the attribute information to the virtual machine side.
  • the apparatus further includes:
  • a first drag and drop action enabling module configured to call a Windows application programming interface function DragAcceptFiles, such that the electronic device program window allows the drag and drop action to be accepted;
  • the second drag and drop action enabling module is configured to set an Accept Files property of the electronic device program window through the Windows integrated development environment, so that the electronic device program window allows the drag and drop action to be accepted;
  • the electronic device program window includes a desktop client program window corresponding to the remote virtual machine on the electronic device.
  • the application execution execution module is further configured to run the first application according to the startup notification message by using a ShellExecute or CreateProcess method by a desktop client window program disposed on the electronic device. program.
  • the apparatus further includes:
  • the window minimization module is configured to hide or minimize the desktop window of the electronic device itself when the application execution execution module runs the first application according to the startup notification message.
  • the method and device for invoking an application installed on an electronic device provided by the embodiment of the present invention can run a corresponding first application program on the electronic device by issuing an instruction to the desktop of the virtual machine. Reduce the load on the virtual machine, make full use of the local hardware and software resources of the electronic device; increase the flexibility of application deployment and enhance the user experience.
  • the method and apparatus for invoking an application installed on an electronic device have the following beneficial effects: the corresponding first application can be run on the electronic device by issuing an instruction to the desktop of the virtual machine.
  • the program reduces the load on the virtual machine, fully utilizes the local hardware and software resources of the electronic device, increases the flexibility of application deployment, and improves the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

本发明提供一种调用安装于电子设备上的应用的方法及装置。所述方法及装置应用于虚拟机和电子设备。所述方法应用于虚拟机时,包括步骤:检测用户应用程序触发指令;确定应用程序触发指令在电子设备上所对应的第一应用程序;向电子设备发送第一应用程序的启动通知消息,使得电子设备能够根据启动通知消息运行第一应用程序;第一应用程序为安装于电子设备上的应用程序。所述方法应用于电子设备时,包括步骤:接收从虚拟机端发送的第一应用程序的启动通知消息;根据启动通知消息运行第一应用程序;所述第一应用程序与用户在虚拟机端发出的应用程序触发指令对应,并根据应用程序触发指令确定。所述装置与所述方法对应,能够提高从虚拟机桌面调用应用的便易性。

Description

一种调用安装于电子设备上的应用的方法及装置 技术领域
本发明涉及互联网云计算和虚拟化领域,尤其涉及一种调用安装于电子设备上的应用的方法及装置。
背景技术
随着互联网云计算和虚拟化技术的发展,在虚拟桌面技术领域也取得了长足的进步,产生了桌面虚拟化,即VDI(Virtual Desktop Infrastructure,虚拟桌面基础架构)的概念,其实质是一种将个人计算机环境从物理设施上分离出来、基于服务器的Client/Server(客户端/服务端)计算模式,而所有的数据都存放在数据中心内的集中式大型存储设备中,也可以理解为一种支持企业级实现桌面系统远程动态访问与数据中心统一托管的技术。其目标是实现可通过任何终端设备、在任何地点、任何时间,访问互联网上属于用户个人的桌面系统。而虚拟桌面系统的典型构架,在后台远端一般是一个庞大的虚拟机集群,每个用户都需要一个虚拟机为其服务;所有的终端设备通过互联网最终都连接到一个网关的中继设备上,然后对用户进行虚拟机的分发工作。
虚拟桌面基础架构及技术,带来了两方面的优点:管理员可以将所有的桌面虚拟机在互联网数据中心进行部署、托管,并进行统一的管理,降低运维成本;终端用户能够通过网络访问虚拟桌面,获得与完整的物理PC(个人电脑)桌面相似的使用体验,降低用户端的物理硬件成本。
目前VDI所使用的关键技术,是桌面传输协议,也称为网络显示协议,及其协议实现。一般来说基于两条技术路线:首先是服务器渲染(Host Rendering):虚拟机桌面的所有图形图像处理工作,都在远端服务器上完成,向用户终端发送的仅是像素信息,终端无需进行大量的运算,剔除了对CPU和内存资源要求较高的客户端设计,保持了客户端结构简洁,但是对网络带宽要求较大。其次是客户端渲染(Client Rendering):客户端具备一定的运算能力,承担部分桌面图像图形计算工作,数据可以压缩传输,节约网络带宽。
虚拟化技术的架构,见图1。在X86架构服务器主机上,基于Hypervisor虚拟化引擎(或称为虚拟机管理器、虚拟机监视器),可以创建并运行多台虚拟机,每台虚拟机都类似一台物理PC机,完全独立运行并相互隔离,可以安装用户所需的各种不同 的客户操作系统(Guest OS),如Windows XP、Windows 7、基于Linux内核的各种发布版或商业版本等。
在X86架构物理服务器硬件的计算环境中,Hypervisor虚拟化引擎如Xen、KVM(Kernel-based Virtual Machine,基于Kernel的虚拟机)等,也称为VMM(Virtual Machine Monitor,虚拟机监视器或管理器),是一种运行在基础物理服务器和操作系统之间的中间软件层,可允许多个操作系统及其上的应用程序共享硬件。Hypervisor是一种在虚拟计算环境中的“元”操作系统,可以访问服务器主机上包括CPU处理器、内存、磁盘、网卡在内的所有物理设备资源。Hypervisors不但调度协调这些硬件资源的访问,也同时在各个虚拟机之间施加隔离和防护。当服务器启动并运行Hypervisor时,可以给每一台虚拟机分配适量的CPU、内存,网络和磁盘资源,同时加载虚拟机的客户操作系统(Guest OS)。Hypervisor是所有虚拟化技术的核心,通过Hypervisor实现对虚拟机的生命周期进行管理,比如其基本能力之一就是支持非中断的在线迁移虚拟机,使虚拟机从一个主机迁移到另一个主机上,而终端用户在使用虚拟机的过程中不会有任何感知。
目前市场上主要的X86虚拟化Hypervisor的架构类型,包括:1.虚拟机直接运行在系统硬件上,Hypervisor创建出硬件全仿真的实例,被称为裸机型。2.虚拟机运行在传统操作系统上,同样创建的是硬件全仿真实例,被称为托管型或宿主型。3.虚拟机运行在传统操作系统上,创建一个独立的虚拟化实例,比如容器,指向底层托管操作系统,被称为“操作系统虚拟化”。而其中最常见的仍然是裸机型的Hypervisor,虚拟化内核直接安装在硬件计算资源上,虚拟机及其客户操作系统(Guest OS)安装并运行在Hypervisor之上。其特点是软硬件架构和管理更高效、更灵活,硬件的效能能够更好地发挥出来,从而提高物理服务器上计算资源、存储资源和网络资源的利用率,降低运营成本。
虚拟桌面技术,是将Hypervisor创建和管理的虚拟机操作系统的桌面,拉远到用户的终端本地系统上进行显示,同时将虚拟机的音视频也重定向到终端输出,而将终端用户的鼠标、键盘等人体学输入操作或录音、摄像等音视频输入操作,重定向到虚拟机中去,再通过虚拟机的桌面反馈并呈现出来。一般采用VDI虚拟桌面传输协议或称为网络显示协议,来实现桌面拉远和外设重定向。虚拟桌面的架构和组件部署见图2,通过安装在用户终端(如瘦终端、PC机或笔记本电脑)上的虚拟桌面客户端程序,可以访问企业的Hypervisor虚拟化服务器主机及其上的虚拟机。Hypervisor服务器主机创建并管理虚拟机,实现虚拟机的设备仿真。在虚拟机中,部署虚拟桌面代理程序、目标存根程序和其他驱动等组件,从而实现虚拟桌面与客户端程序的消息交互和通信。
通过虚拟桌面技术,可以为终端用户提供操作、使用和维护虚拟机OS(Operating System,操作系统)、桌面系统及其上已安装应用程序的途径和方法,达到与物理PC机桌面完全相同的用户体验和使用效果。
不管现有技术中的哪一种虚拟化引擎或虚拟桌面协议,都存在一个问题,即虚拟机中的客户操作系统(Guest OS)和用户本地的终端操作系统,各自独立,用户所需的各种应用程序,要么部署在虚拟桌面的客户操作系统中并启动运行(这是虚拟桌面大多数用户的使用场景和方式),要么部署在终端本地系统中并启动运行。所以目前的各种方案和产品,都不能从虚拟桌面中直接启动一个原本安装在终端本地的应用,也不能的从终端本地直接启动一个原本安装在虚拟桌面客户操作系统中的应用。在某些有特定需求的应用场景下,就会给虚拟桌面的使用带来不便,从而限制了虚拟桌面的应用场景。比如计划安装到虚拟机中的某些应用程序,运行时对资源的消耗和实时性要求较高,可能会显著增加网络压力。在虚拟机配置较差或网络带宽不足的情况下,一旦虚拟桌面的延时超过50ms,就会产生卡顿感,直接影响虚拟机的性能表现以及应用程序的使用体验,导致虚拟桌面用户的体验变差。所以把这类应用部署安装在虚拟机中并不合适,而安装在用户终端本地系统中,更能满足性能要求。此时只要能够解决从虚拟桌面中直接快速启动终端应用的问题,而不需要在虚拟桌面和终端本地桌面之间反复切换,就能极大提升桌面易用性。
发明内容
本发明实施例提供了一种调用安装于电子设备上的应用的方法和装置,提高从虚拟机桌面调用应用的便易性。
基于上述目的本发明实施例提供的调用安装于电子设备上的应用的方法,应用于虚拟机,包括下述步骤:
检测用户应用程序触发指令;
确定所述应用程序触发指令在电子设备上所对应的第一应用程序;
向电子设备发送所述第一应用程序的启动通知消息,使得所述电子设备能够根据所述启动通知消息运行所述第一应用程序;
所述第一应用程序为安装于电子设备上的应用程序。
可选的,检测用户应用程序触发指令之前,还包括如下步骤:
接收从电子设备传送的第一应用程序关联消息;
处理所述应用程序关联消息,在虚拟机桌面创建用于启动所述第一应用程序的第一对象。
可选的,所述用于启动第一应用程序的对象包括第一程序的桌面快捷方式对象;处理所述应用程序关联消息,在虚拟机桌面创建用于启动所述第一应用程序的第一对象的步骤具体包括:
保存所述第一应用程序关联消息中的第一应用程序启动信息;
引用COM组件IWshRuntimeLibrary,声明对应于第一应用程序的操作对象WshShell;
调用CreateShortcut创建快捷方式方法创建第一应用程序的桌面快捷方式的IWshShortcut对象;
保存所述桌面快捷方式对象的属性信息,完成所述第一对象的创建。
可选的,向电子设备发送与所述应用程序启动信息对应的启动通知消息的步骤具体包括:通过虚拟机的目标存根程序调用Windows应用程序编程接口API函数通知虚拟机的桌面代理程序,向电子设备发送与所述应用程序启动信息对应的启动通知消息。
可选的,所述Windows应用程序编程接口API函数为PostMessage函数。
进一步,本发明实施例还提供了一种调用安装于电子设备上的应用的方法,应用于电子设备,包括的如下步骤:
接收从虚拟机端发送的第一应用程序的启动通知消息;
根据所述启动通知消息运行所述第一应用程序;
所述第一应用程序与用户在虚拟机端发出的应用程序触发指令对应,并根据应用程序触发指令确定。
可选的,接收从虚拟机端发送的第一应用程序启动通知消息之前,还包括:
检测到用户的拖放动作;
判断所述拖放动作的结束位置在虚拟机所对应的窗口区域内;
获取被拖放的第一应用程序的属性信息;
将对应于所述属性信息的第一应用程序关联消息发送到虚拟机端。
可选的,检测到用户的拖放动作步骤之前,还包括:
调用Windows应用程序编程接口函数DragAcceptFiles,使得所述电子设备程序窗口允许接受拖放文件的操作;
或,通过Windows集成开发环境设置电子设备程序窗口的Accept Files属性,使得所述电子设备程序窗口允许接受拖放文件的操作;
所述电子设备程序窗口包括电子设备上的远端虚拟机所对应的桌面客户端程序窗口。
可选的,根据所述启动通知消息运行所述第一应用程序的步骤具体包括:
通过设置于电子设备上的桌面客户端窗口程序,使用ShellExecute外壳执行或CreateProcess创建进程方法,根据所述启动通知消息运行所述第一应用程序。
可选的,根据所述启动通知消息运行所述第一应用程序时,还包括:
将电子设备自身的桌面窗口隐藏或最小化。
进一步,本发明实施例还提供了一种调用安装于电子设备上的应用的装置,应用于虚拟机,包括下述结构:
指令检测模块:设置为检测用户应用程序触发指令;
应用程序确定模块:设置为确定所述应用程序触发指令在电子设备上所对应的第一应用程序;
启动通知消息发送模块:设置为向电子设备发送所述第一应用程序的启动通知消息,使得所述电子设备能够根据所述启动通知消息运行所述第一应用程序;
所述第一应用程序为安装于电子设备上的应用程序。
可选的,所述装置还包括
关联消息接收模块:设置为接收从电子设备传送的第一应用程序关联消息;
对象创建模块:设置为处理所述应用程序关联消息,在虚拟机桌面创建用于启动所述第一应用程序的第一对象。
可选的,所述用于启动第一应用程序的对象包括第一程序的桌面快捷方式对象;所述对象创建模块具体包括:
启动信息保存单元:设置为保存所述第一应用程序关联消息中的第一应用程序启动信息;
操作对象声明单元:设置为引用COM组件IWshRuntimeLibrary,声明对应于第一应用程序的操作对象WshShell;
桌面快捷方式对象创建单元:设置为调用CreateShortcut创建快捷方式方法创建第一应用程序的桌面快捷方式的IWshShortcut对象;
属性保存单元:设置为保存所述桌面快捷方式对象的属性信息,完成所述第一对象的创建。
可选的,所述启动通知消息发送模块还设置为通过虚拟机的目标存根程序调用Windows应用程序编程接口API函数通知虚拟机的桌面代理程序,向电子设备发送与所述应用程序启动信息对应的启动通知消息。
可选的,所述Windows应用程序编程接口API函数为PostMessage函数。
进一步,本发明实施例还提供了一种调用安装于电子设备上的应用的装置,应用于电子设备,包括:
启动通知消息接收模块:设置为接收从虚拟机端发送的第一应用程序的启动通知消息;
应用程序运行执行模块:设置为根据所述启动通知消息运行所述第一应用程序;
所述第一应用程序与用户在虚拟机端发出的应用程序触发指令对应,并根据应用程序触发指令确定。
可选的,所述装置还包括:
拖放动作检测模块:设置为检测到用户的拖放动作;
拖放位置判断模块:设置为判断所述拖放动作的结束位置在虚拟机所对应的窗口区域内;
属性信息获取模块:设置为获取被拖放的第一应用程序的属性信息;
关联消息发送模块:设置为将对应于所述属性信息的第一应用程序关联消息发送到虚拟机端。
可选的,所述装置还包括:
第一拖放动作使能模块:设置为调用Windows应用程序编程接口函数DragAcceptFiles,使得所述电子设备程序窗口允许接受所述拖放动作;
或,第二拖放动作使能模块:设置为通过Windows集成开发环境设置电子设备程序窗口的Accept Files属性,使得所述电子设备程序窗口允许接受所述拖放动作;
所述电子设备程序窗口包括电子设备上的远端虚拟机所对应的桌面客户端程序窗口。
可选的,所述应用程序运行执行模块进一步设置为通过设置于电子设备上的桌面客户端窗口程序,使用ShellExecute外壳执行或CreateProcess创建进程方法,根据所述启动通知消息运行所述第一应用程序。
可选的,所述装置还包括:
窗口最小化模块:设置为所述应用程序运行执行模块根据所述启动通知消息运行所述第一应用程序时,将电子设备自身的桌面窗口隐藏或最小化。
从上面所述可以看出,本发明实施例提供的调用安装于电子设备上的应用的方法及装置,可以通过向虚拟机的桌面下发指令,在电子设备上运行相应的第一应用程序,减轻虚拟机的负荷,充分利用电子设备本地的软硬件资源;增加应用部署的灵活性,提升用户体验。
附图说明
图1为本发明实施例中,应用于虚拟机的调用安装于电子设备上的应用的方法流程示意图;
图2为本发明一种实施例中,检测用户应用程序触发指令之前所包含的步骤示意图;
图3为本发明一种实施例中,在虚拟机桌面创建用于启动第一应用程序的对象的步骤示意图;
图4为本发明另一实施例中,在电子设备端调用安装于电子设备上的应用的方法流程示意图;
图5为本发明一种实施例中,接收从虚拟机端发送的第一应用程序启动通知消息之前所执行的步骤示意图;
图6为本发明一种实施例中的拖放动作示意图;
图7为本发明一种实施例中,判断所述拖放动作的结束位置在虚拟机所对应的窗口区域内的步骤的具体流程示意图;
图8为本发明一种实施例中,应用于虚拟机时,调用安装于电子设备上的应用的装置结构示意图;
图9为本发明一种实施例中,应用于电子设备时,调用安装于电子设备上的应用的装置结构示意图。
具体实施方式
为了给出有效的实现方案,本发明实施例提供了以下实施例,以下结合说明书附图对本发明的实施例进行说明。
本发明实施例提供了一种调用安装于电子设备上的应用的方法,应用于虚拟机,其流程如图1所示,包括下述步骤:
步骤101:检测用户应用程序触发指令;
步骤102:确定所述应用程序触发指令在电子设备上所对应的第一应用程序;
步骤103:向电子设备发送所述第一应用程序的启动通知消息,使得所述电子设备能够根据所述启动通知消息运行所述第一应用程序。
从上面所述可以看出,本发明所提供的调用安装于电子设备上的应用的方法,能够接收用户在虚拟机端下发的应用程序触发指令,并依据该应用程序触发指令触发安 装于物理电子设备上的第一应用程序,在该第一应用程序由电子设备进行运行,从而允许用户在虚拟机端直接迅速启动安装于电子设备上的应用,提高虚拟机使用的便易性。
在具体实施例中,步骤101中所述应用程序触发指令,为用户通过虚拟机桌面所施加的指令,该指令可以通过点击设置于虚拟机桌面的一个对象实现,如点击图形对象或图标对象。所述应用程序触发指令,也可以使用户通过键盘等机构输入的文字指令。
在具体实施例中,所述虚拟机上设置有桌面代理程序和目标存根程序;所述虚拟机中可设置有用于向电子设备发送第一应用程序的启动通知消息的目标存根程序和桌面代理程序,所述目标存根程序以Windows后台服务的方式运行。当步骤101中所述的应用程序触发指令通过点击设置于虚拟机桌面的一个对象实现时,步骤103中所述第一应用程序的启动通知消息,可以通过与所述对象关联的目标存根程序向桌面代理程序发送,再由桌面代理程序向所述电子设备发送。
更具体的,在一种实施例中,由所述目标存根程序调用PostMessage函数通知桌面代理程序,携带包括有第一应用路径和文件名信息的启动通知消息,告知电子设备需要启动安装于电子设备本地的第一应用。
在具体实施例中,在执行步骤103时,可通过虚拟桌面协议的传输通道,向部署在电子设备本地的桌面客户端程序发送所述第一应用程序的启动通知消息,所述桌面客户端程序收到所述启动通知消息之后,所述电子设备执行第一应用程序的启动和运行。
在本发明的一种实施例中,检测用户应用程序触发指令之前,还包括在虚拟机本地执行的如下步骤,如图2所示:
步骤201:接收从电子设备传送的第一应用程序关联消息;
步骤202:处理所述应用程序关联消息,在虚拟机桌面创建用于启动所述第一应用程序的第一对象。
参照图1和图2,步骤202之后,所述步骤101中检测应用程序触发指令的步骤,可通过点击所述在虚拟机桌面创建的用于启动第一应用程序的第一对象实现。
在本发明的一些实施例中,所述用于启动第一应用程序的对象包括第一程序的桌面快捷方式对象;处理所述应用程序关联消息,在虚拟机桌面创建用于启动所述第一应用程序的对象具体包括如图3所示的步骤:
步骤301:保存所述第一应用程序关联消息中的第一应用程序启动信息;
步骤302:引用COM组件IWshRuntimeLibrary,声明对应于第一应用程序的操作对象WshShell;
步骤303:调用CreateShortcut(创建快捷方式)方法创建第一应用程序的桌面快捷方式的IWshShortcut对象;
步骤304:保存所述桌面快捷方式对象的属性信息,完成所述第一对象的创建。
更具体的,所述第一应用程序启动信息应至少包括第一应用程序的路径。进一步,所述第一应用程序启动信息还包括第一应用程序的名称。
更具体的,所述桌面快捷方式对象的属性信息包括该快捷方式对象关联的目标存根程序路径(TargetPath)、文本参数(Arguments)、浮动描述(Description)、全局热键(Hotkey)、图标位置(IconLocation)等属性,调用Save方法,保存并完成快捷方式的创建。
在本发明的一些实施例中,向电子设备发送与所述应用程序启动信息对应的启动通知消息的步骤具体包括:通过虚拟机的目标存根程序调用Windows API(Application Programming Interface,应用程序编程接口)函数通知虚拟机的桌面代理程序,向电子设备发送与所述应用程序启动信息对应的启动通知消息。
具体的,所述Windows API函数包括PostMessage函数。
具体的,所述启动通知消息包括第一应用在电子设备上的路径和文件名等信息。
进一步,本发明实施例提供了一种调用安装于电子设备上的应用的方法,包括在电子设备上执行的如下步骤,如图4所示:
步骤401:接收从虚拟机端发送的第一应用程序的启动通知消息;
步骤402:根据所述启动通知消息运行所述第一应用程序;
所述第一应用程序与用户在虚拟机端发出的应用程序触发指令对应,并根据应用程序触发指令确定。
所述第一应用程序在电子设备上启动并运行,使得虚拟机端调用所述第一应用时可迅速启动,避免因虚拟机配置或带宽造成的程序运行卡顿感。
在本发明的一些实施例中,所述虚拟机设置有桌面代理程序和目标存根程序;所述目标存根程序以Windows后台服务的方式运行。当收到用户在虚拟机端发出的应用程序触发指令后,所述目标存根程序调用PostMessage通知桌面代理程序,所述桌面代理程序想电子设备发出第一应用程序的启动通知消息。
具体的,所述启动通知消息包括第一应用程序在电子设备上的路径和文件名称。
所述用户在虚拟机端发出的应用程序触发指令,可以是用户输入的指令,也可以是用户在点击虚拟机桌面的对象时发出的触发指令。当允许用户在虚拟机桌面添加一个对象,使得用户通过点击该对象就可以运行相应的第一应用程序,这样可以方便用户的操作。在更佳的情况下,用户可以通过在电子设备拖动第一应用的启动快捷方式或启动图标等,向虚拟机桌面添加第一应用所对应的对象,使得用户点击该对象就可以运行第一应用。
在本发明的一些实施例中,参照图5,接收从虚拟机端发送的第一应用程序启动通知消息之前,还包括:
步骤501:检测到用户的拖放动作;
步骤502:判断所述拖放动作的结束位置在虚拟机所对应的窗口区域内;
步骤503:获取被拖放的第一应用程序的属性信息;
步骤504:将对应于所述属性信息的第一应用程序关联消息发送到虚拟机端。
步骤501中,检测到用户的拖放操作后,映射Windows消息WM_DROPFILES,在消息处理函数OnDropFiles中执行对所述拖放动作的后续处理。
上述OnDropFiles函数调用时,为传递文件名分配电子设备的系统内存。
可以看出,在本发明实施例中,可以根据用户的拖放动作,将被拖放的第一应用程序的属性信息发送到虚拟机端,使得虚拟机在自己的桌面上创建一个用于启动第一应用程序的第一对象。
所述拖放动作,是指用鼠标拖动的方法,在不同程序的窗口之间、同一程序的不同窗口之间、同一程序同一窗口的不同控件之间,进行移动、复制和粘贴等操作的技术。拖放操作是在操作系统的帮助下完成的。被拖动的对象首先向操作系统注册它使用的数据格式,并按指定的数据格式提供数据。拖放操作结束时,接收拖放的程序窗口,按指定的数据格式提取有关数据,并根据提取的数据生成相应的对象或执行其他后续处理。
作为一个实施例,所述拖放动作为在一个对象上施加按压并拖放该对象的动作,如图6所示。
作为一个实施例,参照图7,在步骤502还包括如下步骤,
步骤5021:调用Win 32API的GetClientRect函数获取在电子设备上呈现的虚拟桌面区域坐标;
步骤5022:调用ClientToScreen函数将坐标系转换到电子设备的屏幕坐标系;
步骤5023:调用Win 32API的DragQueryPoint函数获取所述拖放动作结束时的位置;
步骤5024:根据所述虚拟桌面区域坐标、屏幕坐标系、拖放动作结束时的位置,判断所述拖放动作结束时的位置是否落入虚拟桌面区域之内;若是,则进入下一步骤;
步骤5025:判断所述拖放动作的结束位置在虚拟机所对应的窗口区域内。
作为一个实施例,步骤504中所述将第一应用程序关联消息包含有所述第一应用程序的属性信息,该属性信息至少包括第一应用程序在电子设备的路径和文件名。
在一种具体实施例中,若上述步骤5024中判断所述拖放动作结束时的位置没有落入虚拟桌面区域之内,则在OnDropFiles消息处理函数中,调用DragFinish函数释放系统内存并返回。
步骤504中,所述第一应用程序关联消息发送到虚拟机中的桌面代理程序,告知桌面代理程序在虚拟机桌面长创建一个相对的对象,该对象在本实施例中为快捷方式对象。所述第一应用程序关联消息发送后,调用DragFinish函数释放系统分配的内存并结束处理。
在本发明的一些实施例中,检测到用户的拖放动作步骤之前,还包括:
调用Windows应用程序编程接口函数DragAcceptFiles,使得所述电子设备程序窗口允许接受拖放动作;
或,通过Windows集成开发环境设置电子设备程序窗口的Accept Files属性,使得所述电子设备程序窗口允许接受拖放动作;
所述电子设备程序窗口包括电子设备上的远端虚拟机所对应的桌面客户端程序窗口。
使得所述电子设备程序窗口允许接受拖放文件的操作之后,映射Windows消息WM_DROPFILES,在消息处理函数OnDropFiles中处理鼠标拖放事件。
在本发明的一些实施例中,根据所述启动通知消息运行所述第一应用程序的步骤具体包括:
通过设置于电子设备上的桌面客户端窗口程序,使用ShellExecute(外壳执行)或CreateProcess(创建进程)方法,根据所述启动通知消息运行所述第一应用程序。
在本发明的一些实施例中,根据所述启动通知消息运行所述第一应用程序时,还包括:
将电子设备自身的桌面窗口隐藏或最小化。
在本发明的一些实施例中,所述电子设备上设置有桌面客户端窗口程序,该桌面客户端窗口程序用于向虚拟机发送第一应用程序关联消息、根据所述启动通知消息运行所述第一应用程序、将电子设备自身的桌面窗口隐藏或最小化。
在一些实施例中,上述桌面客户端窗口程序使用ShellExecute或CreateProcess的方法,根据收到的终端本地应用程序的路径和文件名,最终启动运行终端本地的一个应用程序。
在一些实施例中,上述桌面客户端窗口程序调用ShowWindow,将自身的桌面窗口隐藏(SW_HIDE)或最小化(SW_MINIMIZE),避免遮挡或覆盖到终端本地应用程序运行时弹出的窗口或界面。
进一步,本发明实施例提供了一种调用安装于电子设备上的应用的装置,应用于虚拟机,结构如图8所示,包括下述结构:
指令检测模块:设置为检测用户应用程序触发指令;
应用程序确定模块:设置为确定所述应用程序触发指令在电子设备上所对应的第一应用程序;
启动通知消息发送模块:设置为向电子设备发送所述第一应用程序的启动通知消息,使得所述电子设备能够根据所述启动通知消息运行所述第一应用程序;
所述第一应用程序为安装于电子设备上的应用程序。
本发明所提供的调用安装于电子设备上的应用的装置,可以在作为虚拟机主机的电子设备上部署并运行,而不需要安装部署到虚拟机中,一方面减轻桌面虚拟机的负担,充分利用终端本地的硬件资源;另一方面可以增加工程部署的灵活性,满足某些特定软件在电子设备终端运行的实时性和性能要求。在使用时无需用户在虚拟机桌面和电子设备本地之间切换,易用性得到提高。
仍然参照图8,所述装置还包括:
关联消息接收模块:设置为接收从电子设备传送的第一应用程序关联消息;
对象创建模块:设置为处理所述应用程序关联消息,在虚拟机桌面创建用于启动所述第一应用程序的第一对象。
仍然参照图8,在一些实施例中,所述用于启动第一应用程序的对象包括第一程序的桌面快捷方式对象;所述对象创建模块具体包括:
启动信息保存单元:设置为保存所述第一应用程序关联消息中的第一应用程序启动信息;
操作对象声明单元:设置为引用COM组件IWshRuntimeLibrary,声明对应于第一应用程序的操作对象WshShell;
桌面快捷方式对象创建单元:设置为调用CreateShortcut方法创建第一应用程序的桌面快捷方式的IWshShortcut对象;
属性保存单元:设置为保存所述桌面快捷方式对象的属性信息,完成所述第一对象的创建。
在本发明的一些实施例中,所述启动通知消息发送模块还设置为通过虚拟机的目标存根程序调用Windows API函数通知虚拟机的桌面代理程序,向电子设备发送与所述应用程序启动信息对应的启动通知消息。
具体的,所述Windows API函数包括PostMessage函数。
进一步,本发明实施例还提供了一种调用安装于电子设备上的应用的装置,应用于电子设备,其结构参照图9,包括:
启动通知消息接收模块:设置为接收从虚拟机端发送的第一应用程序的启动通知消息;
应用程序运行执行模块:设置为根据所述启动通知消息运行所述第一应用程序;
所述第一应用程序与用户在虚拟机端发出的应用程序触发指令对应,并根据应用程序触发指令确定。
仍然参照图9,在本发明的一些实施例中,所述装置还包括:
拖放动作检测模块:设置为检测到用户的拖放动作;
拖放位置判断模块:设置为判断所述拖放动作的结束位置在虚拟机所对应的窗口区域内;
属性信息获取模块:设置为获取被拖放的第一应用程序的属性信息;
关联消息发送模块:设置为将对应于所述属性信息的第一应用程序关联消息发送到虚拟机端。
在本发明的一些实施例中,所述装置还包括:
第一拖放动作使能模块:设置为调用Windows应用程序编程接口函数DragAcceptFiles,使得所述电子设备程序窗口允许接受所述拖放动作;
或,第二拖放动作使能模块:设置为通过Windows集成开发环境设置电子设备程序窗口的Accept Files属性,使得所述电子设备程序窗口允许接受所述拖放动作;
所述电子设备程序窗口包括电子设备上的远端虚拟机所对应的桌面客户端程序窗口。
在本发明的一些实施例中,所述应用程序运行执行模块还设置为通过设置于电子设备上的桌面客户端窗口程序,使用ShellExecute或CreateProcess方法,根据所述启动通知消息运行所述第一应用程序。
仍然参照图10,所述装置还包括:
窗口最小化模块:设置为所述应用程序运行执行模块根据所述启动通知消息运行所述第一应用程序时,将电子设备自身的桌面窗口隐藏或最小化。
从上面所述可以看出,本发明实施例提供的调用安装于电子设备上的应用的方法及装置,可以通过向虚拟机的桌面下发指令,在电子设备上运行相应的第一应用程序,减轻虚拟机的负荷,充分利用电子设备本地的软硬件资源;增加应用部署的灵活性,提升用户体验。
应当理解,本说明书所描述的多个实施例仅用于说明和解释本发明,并不用于限定本发明。并且在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。
工业实用性
如上所述,本发明实施例提供的一种调用安装于电子设备上的应用的方法及装置具有以下有益效果:可以通过向虚拟机的桌面下发指令,在电子设备上运行相应的第一应用程序,减轻虚拟机的负荷,充分利用电子设备本地的软硬件资源;增加应用部署的灵活性,提升用户体验。

Claims (20)

  1. 一种调用安装于电子设备上的应用的方法,应用于虚拟机,包括下述步骤:
    检测用户应用程序触发指令;
    确定所述应用程序触发指令在电子设备上所对应的第一应用程序;
    向电子设备发送所述第一应用程序的启动通知消息,使得所述电子设备能够根据所述启动通知消息运行所述第一应用程序;
    所述第一应用程序为安装于电子设备上的应用程序。
  2. 根据权利要求1所述的方法,其中,检测用户应用程序触发指令之前,还包括如下步骤:
    接收从电子设备传送的第一应用程序关联消息;
    处理所述应用程序关联消息,在虚拟机桌面创建用于启动所述第一应用程序的第一对象。
  3. 根据权利要求2所述的方法,其中,所述用于启动第一应用程序的对象包括第一程序的桌面快捷方式对象;处理所述应用程序关联消息,在虚拟机桌面创建用于启动所述第一应用程序的第一对象的步骤具体包括:
    保存所述第一应用程序关联消息中的第一应用程序启动信息;
    引用COM组件IWshRuntimeLibrary,声明对应于第一应用程序的操作对象WshShell;
    调用CreateShortcut创建快捷方式方法创建第一应用程序的桌面快捷方式的IWshShortcut对象;
    保存所述桌面快捷方式对象的属性信息,完成所述第一对象的创建。
  4. 根据权利要求3所述的方法,其中,向电子设备发送与所述应用程序启动信息对应的启动通知消息的步骤具体包括:通过虚拟机的目标存根程序调用Windows应用程序编程接口API函数通知虚拟机的桌面代理程序,向电子设备发送与所述应用程序启动信息对应的启动通知消息。
  5. 根据权利要求4所述的方法,其中,所述Windows应用程序编程接口API函数为PostMessage函数。
  6. 一种调用安装于电子设备上的应用的方法,应用于电子设备,包括的如下步骤:
    接收从虚拟机端发送的第一应用程序的启动通知消息;
    根据所述启动通知消息运行所述第一应用程序;
    所述第一应用程序与用户在虚拟机端发出的应用程序触发指令对应,并根据应用程序触发指令确定。
  7. 根据权利要求6所述的方法,其中,接收从虚拟机端发送的第一应用程序启动通知消息之前,还包括:
    检测到用户的拖放动作;
    判断所述拖放动作的结束位置在虚拟机所对应的窗口区域内;
    获取被拖放的第一应用程序的属性信息;
    将对应于所述属性信息的第一应用程序关联消息发送到虚拟机端。
  8. 根据权利要求7所述的方法,其中,检测到用户的拖放动作步骤之前,还包括:
    调用Windows应用程序编程接口函数DragAcceptFiles,使得所述电子设备程序窗口允许接受拖放文件的操作;
    或,通过Windows集成开发环境设置电子设备程序窗口的Accept Files属性,使得所述电子设备程序窗口允许接受拖放文件的操作;
    所述电子设备程序窗口包括电子设备上的远端虚拟机所对应的桌面客户端程序窗口。
  9. 根据权利要求6所述的方法,其中,根据所述启动通知消息运行所述第一应用程序的步骤具体包括:
    通过设置于电子设备上的桌面客户端窗口程序,使用ShellExecute外壳执行或CreateProcess创建进程方法,根据所述启动通知消息运行所述第一应用程序。
  10. 根据权利要求6所述的方法,其中,根据所述启动通知消息运行所述第一应用程序时,还包括:
    将电子设备自身的桌面窗口隐藏或最小化。
  11. 一种调用安装于电子设备上的应用的装置,应用于虚拟机,包括下述结构:
    指令检测模块:设置为检测用户应用程序触发指令;
    应用程序确定模块:设置为确定所述应用程序触发指令在电子设备上所对应的第一应用程序;
    启动通知消息发送模块:设置为向电子设备发送所述第一应用程序的启动通知消息,使得所述电子设备能够根据所述启动通知消息运行所述第一应用程序;
    所述第一应用程序为安装于电子设备上的应用程序。
  12. 根据权利要求11所述的装置,其中,还包括
    关联消息接收模块:设置为接收从电子设备传送的第一应用程序关联消息;
    对象创建模块:设置为处理所述应用程序关联消息,在虚拟机桌面创建用于启动所述第一应用程序的第一对象。
  13. 根据权利要求12所述的装置,其中,所述用于启动第一应用程序的对象包括第一程序的桌面快捷方式对象;所述对象创建模块具体包括:
    启动信息保存单元:设置为保存所述第一应用程序关联消息中的第一应用程序启动信息;
    操作对象声明单元:设置为引用COM组件IWshRuntimeLibrary,声明对应于第一应用程序的操作对象WshShell;
    桌面快捷方式对象创建单元:设置为调用CreateShortcut创建快捷方式方法创建第一应用程序的桌面快捷方式的IWshShortcut对象;
    属性保存单元:设置为保存所述桌面快捷方式对象的属性信息,完成所述第一对象的创建。
  14. 根据权利要求13所述的装置,其中,所述启动通知消息发送模块还设置为通过虚拟机的目标存根程序调用Windows应用程序编程接口API函数通知虚拟机的桌面代理程序,向电子设备发送与所述应用程序启动信息对应的启动通知消息。
  15. 根据权利要求14所述的装置,其中,所述Windows应用程序编程接口API函数为PostMessage函数。
  16. 一种调用安装于电子设备上的应用的装置,应用于电子设备,包括:
    启动通知消息接收模块:设置为接收从虚拟机端发送的第一应用程序的启动通知消息;
    应用程序运行执行模块:设置为根据所述启动通知消息运行所述第一应用程序;
    所述第一应用程序与用户在虚拟机端发出的应用程序触发指令对应,并根据应用程序触发指令确定。
  17. 根据权利要求16所述的装置,其中,还包括:
    拖放动作检测模块:设置为检测到用户的拖放动作;
    拖放位置判断模块:设置为判断所述拖放动作的结束位置在虚拟机所对应的窗口区域内;
    属性信息获取模块:设置为获取被拖放的第一应用程序的属性信息;
    关联消息发送模块:设置为将对应于所述属性信息的第一应用程序关联消息发送到虚拟机端。
  18. 根据权利要求17所述的装置,其中,还包括:
    第一拖放动作使能模块:设置为调用Windows应用程序编程接口函数DragAcceptFiles,使得所述电子设备程序窗口允许接受所述拖放动作;
    或,第二拖放动作使能模块:设置为通过Windows集成开发环境设置电子设备程序窗口的Accept Files属性,使得所述电子设备程序窗口允许接受所述拖放动作;
    所述电子设备程序窗口包括电子设备上的远端虚拟机所对应的桌面客户端程序窗口。
  19. 根据权利要求16所述的装置,其中,所述应用程序运行执行模块还设置为通过设置于电子设备上的桌面客户端窗口程序,使用ShellExecute外壳执行或CreateProcess创建进程方法,根据所述启动通知消息运行所述第一应用程序。
  20. 根据权利要求16所述的装置,其中,还包括:
    窗口最小化模块:设置为所述应用程序运行执行模块根据所述启动通知消息运行所述第一应用程序时,将电子设备自身的桌面窗口隐藏或最小化。
PCT/CN2015/071453 2014-07-22 2015-01-23 一种调用安装于电子设备上的应用的方法及装置 WO2015117539A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410351747.1 2014-07-22
CN201410351747.1A CN105335176B (zh) 2014-07-22 2014-07-22 一种调用安装于电子设备上的应用的方法及装置

Publications (1)

Publication Number Publication Date
WO2015117539A1 true WO2015117539A1 (zh) 2015-08-13

Family

ID=53777337

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/071453 WO2015117539A1 (zh) 2014-07-22 2015-01-23 一种调用安装于电子设备上的应用的方法及装置

Country Status (2)

Country Link
CN (1) CN105335176B (zh)
WO (1) WO2015117539A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144676A (zh) * 2017-06-15 2019-01-04 阿里巴巴集团控股有限公司 一种应用程序的自启动检测方法、装置及服务器
CN111158969A (zh) * 2019-12-31 2020-05-15 奇安信科技集团股份有限公司 数据处理方法、电子设备、存储介质和计算机程序产品
CN113660371A (zh) * 2021-08-16 2021-11-16 深圳市瑞驰信息技术有限公司 一种实现云手机应用快速打开的方法和系统

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536802B (zh) * 2014-12-19 2021-05-04 中兴通讯股份有限公司 一种实现应用调用的方法及虚拟机
CN108255547B (zh) * 2017-09-28 2021-05-28 新华三云计算技术有限公司 一种应用程序控制方法及装置
CN108256349A (zh) * 2017-12-29 2018-07-06 北京奇虎科技有限公司 网页防护的方法及装置
CN113542503B (zh) * 2020-03-31 2022-07-15 华为技术有限公司 一种创建应用快捷方式的方法、电子设备及系统
CN113961086B (zh) * 2021-12-21 2022-04-01 统信软件技术有限公司 一种快捷键实现方法、计算设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022398A (zh) * 2007-03-21 2007-08-22 中国科学院计算技术研究所 在多节点智能网络应用服务系统中实现剪贴板共享的方法
CN102591671A (zh) * 2011-01-14 2012-07-18 鸿富锦精密工业(深圳)有限公司 在虚拟环境中启动应用程序的方法
CN102662741A (zh) * 2012-04-05 2012-09-12 华为技术有限公司 虚拟桌面的实现方法、装置和系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291410B2 (en) * 2006-12-29 2012-10-16 Intel Corporation Controlling virtual machines based on activity state
CN100555298C (zh) * 2007-06-08 2009-10-28 北京飞天诚信科技有限公司 虚拟个人办公环境的方法和设备
KR101506683B1 (ko) * 2008-08-06 2015-03-30 삼성전자 주식회사 다수개의 운영 시스템을 지원하는 장치 및 방법

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022398A (zh) * 2007-03-21 2007-08-22 中国科学院计算技术研究所 在多节点智能网络应用服务系统中实现剪贴板共享的方法
CN102591671A (zh) * 2011-01-14 2012-07-18 鸿富锦精密工业(深圳)有限公司 在虚拟环境中启动应用程序的方法
CN102662741A (zh) * 2012-04-05 2012-09-12 华为技术有限公司 虚拟桌面的实现方法、装置和系统

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144676A (zh) * 2017-06-15 2019-01-04 阿里巴巴集团控股有限公司 一种应用程序的自启动检测方法、装置及服务器
CN111158969A (zh) * 2019-12-31 2020-05-15 奇安信科技集团股份有限公司 数据处理方法、电子设备、存储介质和计算机程序产品
CN111158969B (zh) * 2019-12-31 2024-03-08 奇安信科技集团股份有限公司 数据处理方法、电子设备和存储介质
CN113660371A (zh) * 2021-08-16 2021-11-16 深圳市瑞驰信息技术有限公司 一种实现云手机应用快速打开的方法和系统

Also Published As

Publication number Publication date
CN105335176B (zh) 2019-10-25
CN105335176A (zh) 2016-02-17

Similar Documents

Publication Publication Date Title
WO2016095383A1 (zh) 一种实现应用调用的方法及虚拟机
WO2015117539A1 (zh) 一种调用安装于电子设备上的应用的方法及装置
CN108021425B (zh) 一种集成多个应用图形窗口的虚拟桌面系统及运行方法
US12056513B2 (en) Virtual machine migration using multiple, synchronized streams of state data transferring via file descriptors
US8244956B2 (en) Mechanism for automatic adjustment of virtual machine storage
US9015705B2 (en) Computing device having a migrated virtual machine accessing physical storage space on another computing device
US8484653B2 (en) Mechanism for delayed hardware upgrades in virtualization systems
US8671403B2 (en) Pre-creating virtual machines in a grid environment
US8356120B2 (en) Mechanism for memory state restoration of virtual machine (VM)-controlled peripherals at a destination host machine during migration of the VM
US8627133B2 (en) Virtual machine boot speed-up by clock acceleration
US9286094B2 (en) Human interface device virtualization using paravirtual USB system
CN104598294B (zh) 用于移动设备的高效安全的虚拟化方法及其设备
US9001050B2 (en) Touch screen emulation for a virtual machine
US9588793B2 (en) Creating new virtual machines based on post-boot virtual machine snapshots
US20120131575A1 (en) Device emulation in a virtualized computing environment
WO2023202179A1 (zh) 容器热迁移方法及容器热迁移装置
CN111213127A (zh) 用于直接分配的设备的虚拟化操作
CN107949828B (zh) 用于将应用中的机器代码的执行动态地迁移至虚拟机的方法和装置
KR20120068573A (ko) 심리스 애플리케이션 통합 장치 및 방법
CN108255547B (zh) 一种应用程序控制方法及装置
US11487559B2 (en) Dynamically switching between pointer modes
US9104634B2 (en) Usage of snapshots prepared by a different host
US10241821B2 (en) Interrupt generated random number generator states
US20230026015A1 (en) Migration of virtual computing storage resources using smart network interface controller acceleration
WO2024087958A1 (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: 15746345

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15746345

Country of ref document: EP

Kind code of ref document: A1