WO2018072101A1 - 设备调用方法、装置、系统、电子设备和计算机程序产品 - Google Patents

设备调用方法、装置、系统、电子设备和计算机程序产品 Download PDF

Info

Publication number
WO2018072101A1
WO2018072101A1 PCT/CN2016/102456 CN2016102456W WO2018072101A1 WO 2018072101 A1 WO2018072101 A1 WO 2018072101A1 CN 2016102456 W CN2016102456 W CN 2016102456W WO 2018072101 A1 WO2018072101 A1 WO 2018072101A1
Authority
WO
WIPO (PCT)
Prior art keywords
operation instruction
external terminal
external
terminal
communication connection
Prior art date
Application number
PCT/CN2016/102456
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 PCT/CN2016/102456 priority Critical patent/WO2018072101A1/zh
Priority to CN201680002921.9A priority patent/CN107003952A/zh
Publication of WO2018072101A1 publication Critical patent/WO2018072101A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a device calling method, apparatus, system, electronic device, and computer program product.
  • the application program running in the operating system in the prior art can call the local device to perform the corresponding operation and obtain the corresponding operation result.
  • the specific scheme of calling the local camera to perform the photographing operation is: the application program calls the camera driver interface in the operating system; The kernel layer of the operating system starts the driver code corresponding to the camera, the driver starts the camera and completes the camera operation, and feeds the photo back to the application.
  • an application can usually only invoke a device based on a local device driver, which is not flexible enough.
  • the embodiment of the invention provides a device calling method, device, system, electronic device and computer program product, which can realize the call to the external terminal device and is more flexible.
  • an embodiment of the present invention provides a device invocation method, where the method includes:
  • the operation instruction execution result is fed back to the application.
  • an embodiment of the present invention provides a device invocation method, where the method includes:
  • the execution result of the operation instruction is fed back to the external calling terminal.
  • an embodiment of the present invention provides a device invoking device, where the device includes:
  • An interface module configured to receive an invocation request of an application requesting a device driver interface
  • a communication module configured to send an operation instruction corresponding to the call request to the external terminal based on a communication connection with an external terminal
  • the communication module is further configured to receive an operation instruction execution result fed back by the external terminal;
  • the interface module is further configured to feed back the operation instruction execution result to the application.
  • an embodiment of the present invention provides a device invoking device, where the device includes:
  • a driving module configured to invoke a driver of a device corresponding to the operation instruction to execute the operation instruction
  • the calling communication module is further configured to feed back an execution result of the operation instruction to the external calling terminal.
  • an embodiment of the present invention provides a device invoking system, comprising: the device invoking device provided by the third aspect, and the device invoking device provided in the fourth aspect.
  • an embodiment of the present invention provides an electronic device, including: a memory, one or more processors; and one or more modules, the one or more modules being Stored in the memory and configured to be executed by the one or more processors, the one or more modules comprising instructions for performing the various steps of the method provided by the first aspect above.
  • an embodiment of the present invention provides an electronic device, including: a memory, one or more processors; and one or more modules, the one or more modules being Stored in the memory and configured to be executed by the one or more processors, the one or more modules including instructions for performing the various steps of the methods provided by the second aspect above.
  • embodiments of the present invention provide a computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising An aspect provides instructions for each step of the method.
  • embodiments of the present invention provide a computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising Two aspects of the instructions provided in the various steps of the method.
  • the operation instruction for the device in the call request is sent to the external terminal, and the execution result of the operation instruction fed back by the external terminal is received, and the local driver is not needed.
  • the call to the device of the external terminal is more flexible.
  • the upper application of the present invention is not aware during the device call process, and is applicable to various application programs; the result of the device executing the operation instruction is feedback from the bottom layer and is not easily intercepted.
  • FIG. 1 is a system architecture diagram of a device invocation method according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic flowchart of a device invoking method in Embodiment 1 of the present invention
  • FIG. 3 is a schematic diagram of a virtualization architecture applicable to a device invocation method in Embodiment 3 of the present invention
  • FIG. 4 is a schematic structural diagram of a device invoking device in Embodiment 5 of the present invention.
  • FIG. 5 is a schematic structural diagram of a device invoking device in Embodiment 6 of the present invention.
  • the application can usually only call the device based on the local device driver, which is not flexible enough.
  • the present invention provides a device calling method, after receiving an invocation request of an application calling device driver interface, sending an operation instruction for a device in an invocation request to an external terminal, and receiving an operation of feedback from an external terminal.
  • the result of the instruction execution can realize the call to the device of the external terminal without the local driver, and is more flexible.
  • the upper layer application of the present invention is not perceived in the device calling process, and is applicable to various application programs; the result of the device executing the operation instruction is The bottom layer feedback is not easy to be intercepted.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • FIG. 1 is a system architecture diagram of a device invocation method according to Embodiment 1 of the present invention, including a first terminal and a second terminal, where the first terminal and the second terminal are physical devices that are operated based on different processors.
  • the first terminal and the second terminal respectively have devices for calling themselves, such as a satellite positioning device, a processor or a camera, etc., and the two devices respectively run respective operating systems and run in the operating system of the first terminal.
  • FIG. 2 is a schematic flowchart of a device invoking method according to Embodiment 1 of the present invention. As shown in FIG. 2, the device calling method includes:
  • Step 101 The virtual driver front end running by the kernel layer of the first terminal operating system receives an application request for invoking a device driver interface.
  • a driver that invokes the device is initiated.
  • the request of the interface is sent, and the request is sent to the kernel layer of the operating system where the application is located.
  • the process of sending the call request by the application is the same as the prior art, and the virtual drive front end running in the kernel layer can obtain the call request of the user.
  • Step 102 The virtual drive front end sends an operation instruction corresponding to the call request to the second terminal based on a communication connection with the second terminal.
  • the first terminal establishes a communication connection based on various transmission protocols, such as TCP/IP (Transmission Control Protocol/Internet Protocol), by establishing a communication connection based on various transmission protocols by using a wired terminal or a wireless terminal.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • the established wireless connection, and the connection may be direct, or may be forwarded through a cloud server or other relay server; it may be based on the public network, or may be based on a private network with a higher security level.
  • the virtual drive front end needs to invoke the communication module to establish a communication connection with the virtual drive back end running on the second terminal.
  • the virtual driver front end After monitoring the application request to invoke the device driver interface, the virtual driver front end determines the device pointed to by the application's call request, and then determines the second terminal that has the device and can accept the call. At the same time, the virtual drive front end can also determine an operation instruction to be executed on the pointed device according to the call request of the device driver interface, and the operation instruction includes an operation name, an operation object, and an operation parameter.
  • the virtual drive front end is correspondingly packaged and sent to the second terminal based on the communication connection between the first terminal and the second terminal.
  • the communication connection with the second terminal is an authenticated communication connection to the second terminal.
  • the first terminal When the first terminal establishes a communication connection with the second terminal or sends data, the first terminal needs to perform authentication on the second terminal, and the authentication manner includes, but is not limited to, authenticating the terminal or device information of the second terminal, and the second terminal The security of the communication link between the two is authenticated.
  • an operation instruction corresponding to the call request is sent to the second terminal based on a communication connection with the second terminal.
  • the first terminal will include some local devices that can be called, but for security, privacy or device performance, some applications of the first terminal are configured as devices that preferentially call external terminals. Or configured to not allow local devices to be called.
  • the virtual drive front end determines that the application that initiated the call request is the configured application, the operation instruction corresponding to the call request is sent to the second terminal.
  • the device operation instruction is sent to the second terminal based on a communication connection with the second terminal.
  • the first terminal may include a virtualized system architecture, that is, multiple virtual machines are running, and each virtual machine runs its own application. For security, privacy, or device performance considerations, some virtual machines of the first terminal are configured as Applications running on the application preferentially call the devices of the external terminal, or configuring the virtual machines to run on them does not allow the local device to be called.
  • the virtual drive front end determines that the application that initiated the call request runs on the configured virtual machines, the operation instruction corresponding to the call request is sent to the second terminal.
  • Step 103 The virtual driver backend running by the second terminal operating system receives a device operation instruction from the first terminal based on a communication connection with the first terminal.
  • the second terminal operating system kernel layer runs a virtual driver back end, and can receive the encapsulated operation instruction of the device sent by the first terminal virtual driver front end based on the communication connection between the first terminal and the second terminal in step 102.
  • the second terminal is in communication connection with the first terminal, and the second terminal performs an authenticated communication connection with the first terminal. That is, the second terminal needs to authenticate the first terminal when establishing the communication connection or before transmitting the data, and the authentication manner includes, but is not limited to, authenticating the terminal or device information of the second terminal, and the communication link between the second terminals. Security for authentication, etc.
  • Step 104 The virtual driver backend invokes a driver of the device corresponding to the operation instruction to execute the operation instruction;
  • the virtual drive backend of the second terminal decapsulates the device operation instruction, determine the device pointed by the device operation instruction, call the local corresponding device driver to execute the operation instruction, and acquire the execution of the operation instruction by the local device. result.
  • the device driver and the device are located on the second terminal side, so that the software and hardware architecture of the first terminal can be simplified.
  • Step 105 The virtual driver backend feeds back the execution result of the operation instruction to the first terminal.
  • the virtual drive back end of the second terminal encapsulates the execution result of the operation instruction and transmits it to the virtual drive front end of the first terminal based on the communication connection between the first terminal and the second terminal.
  • Step 106 The virtual drive front end receives an operation instruction execution result fed back by the second terminal.
  • the virtual drive front end of the first terminal receives the operation instruction execution result fed back by the second terminal and decapsulates the same.
  • Step 107 The virtual drive front end feeds back the operation instruction execution result to the application.
  • the virtual drive front end of the first terminal feeds back the decapsulated operation instruction execution result to the application, and the application completes the call to the device of the second terminal.
  • the method before step 102, further includes: acquiring device information of the second terminal, determining, according to the device information, whether the second terminal is capable of executing the operation instruction; step 102 is specifically, when determining When the second terminal is capable of executing the operation instruction, the operation instruction corresponding to the call request is sent to the second terminal based on a communication connection with the second terminal.
  • the manner in which the first terminal acquires the device information of the second terminal includes, but is not limited to, the following manners: 1) the server collects the device information of each device supported by the external terminal and sends it to the first terminal, or the first terminal requests the server Device information of the related device; 2) after the first terminal establishes communication with the second terminal, the first terminal reads or receives the device information sent by the second terminal; 3) the first terminal broadcasts the device information of the device that needs to be called, and receives The confirmation information that the second terminal feeds back to support the device call, and the like.
  • the device information may include the type, model, performance parameters, current task status, and the like of the device.
  • the encapsulated operation instruction is sent to the second terminal based on the connection established with the second terminal.
  • the operation instruction when the operation instruction is detachable into a plurality of parallel sub-operation instructions, determining a plurality of external terminals corresponding to the device, based on a communication connection with the plurality of external terminals, Transmitting a plurality of sub-operation instructions to the plurality of external terminals; and receiving the plurality of external And executing, by the terminal, a plurality of sub-operation instruction execution results, and acquiring an operation instruction execution result according to the plurality of sub-operation instruction execution results.
  • the virtual driver front end running by the kernel layer of the first terminal operating system may split the plurality of sub-operation instructions and send the plurality of sub-operation instructions to the plurality of external terminals respectively.
  • the operation is performed in a distributed and parallel manner by devices of a plurality of external terminals, thereby improving operational efficiency.
  • the virtual drive front end merges the execution result of each sub-operation instruction to obtain the application result of the execution result feedback request of the original operation instruction.
  • a large number of image frames can be divided into multiple sub-operation objects, each of which The operation object includes a part of the image frame, and the instruction for invoking the GPU to perform the calculation operation for the sub-operation object is separately sent to the device with the GPU, and after the device feedbacks the execution result, the processing results of the multiple sub-image frames are combined to obtain the original operation.
  • the processing result of the object is a large number of image frames, each of which The operation object includes a part of the image frame, and the instruction for invoking the GPU to perform the calculation operation for the sub-operation object is separately sent to the device with the GPU, and after the device feedbacks the execution result, the processing results of the multiple sub-image frames are combined to obtain the original operation.
  • the processing result of the object is a large number of image frames, each of which The operation object includes a part of the image frame, and the instruction for invoking the GPU to perform the calculation operation for the sub-operation object is separately sent to the device with the GPU, and after the device feedbacks the execution result, the processing
  • the operation instruction is separately sent to the plurality of external terminals based on a communication connection with the plurality of external terminals in step 102; and the plurality of external terminals that are received first are fed back The result is determined as the result of the operation instruction execution.
  • the virtual driver front end running in the kernel layer of the first terminal operating system can simultaneously send the same operation instruction to multiple external terminals, that is, the devices respectively calling multiple external terminals simultaneously execute the operation instruction, and respectively feedback the operation of the device on multiple external terminals.
  • the application result feedback application received first is taken, which makes the application call to the device as smooth as possible.
  • the first terminal can implement the call to the external terminal device without the local driver, and is more flexible.
  • the upper layer application is not perceived by the device during the device calling process, and is applicable to various application programs;
  • the result of the instruction is feedback from the bottom layer and is not easily intercepted.
  • the first terminal and the second terminal can authenticate each other to ensure that the device calling process is more secure; and the process of identifying the device information before the first terminal invokes the device of the second terminal is disclosed, which can enable the call.
  • the process is more efficient and improves the availability; the first terminal can configure some applications on it or an application running on a virtual machine to call the device of the external terminal, and the management of the device is more flexible; the first terminal can drive the device driver
  • the operation instruction corresponding to the call request of the interface is split into multiple sub-operation instructions, which are processed by multiple external terminals in parallel to improve the efficiency of device call, or the same operation instruction is sent to multiple external terminals for simultaneous processing, and the fastest feedback is adopted. Execution results maximize the speed of device calls.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the local operating system establishes a network connection with the remote operating system through a network communication module (TCP/IP), and implements a virtual device driver front end in the local operating system.
  • TCP/IP network communication module
  • An application in the local operating system can initiate synchronization, invocation, or management of device information for the remote operating system.
  • the application of the local operating system calls the system API (Application Programming Interface) to obtain information of the device that needs to be synchronized; when the system API calls the driver code corresponding to the device, the virtual driver front end is triggered.
  • the network communication module is called to establish communication with the virtual driver backend in the remote operating system; after the communication is established, the virtual driver front end sends the system API call information to the virtual driver back end to the virtual driver backend of the remote operating system; after the virtual driver
  • the real device driver is called to obtain the device information, and the device information is returned to the virtual driver backend; the virtual driver backend passes the return device information to the virtual driver front end through the network; the virtual driver front end returns the device information to the call s application.
  • the application in the local operating system obtains the required device information, completes the synchronization of the device information, and the device information is the device information of the remote operating system.
  • the local terminal may acquire the location information of the remote terminal in real time, so that the location information of the remote terminal is used as the location information of the local terminal, and the location information of the local terminal is invisible or simulated.
  • the local terminal can control the camera on the remote terminal, such as making adjustments to exposure, shooting angles, etc., to obtain the most suitable remote image information.
  • the local operating system application is local or remote to the called device. There is no awareness, the code and operations involved in the application are exactly the same, making the local operating system look like a device with a remote operating system. Based on the present embodiment, it is possible to infinitely expand the devices in the remote operating system for use by the local operating system as needed without increasing the burden on the local operating system.
  • the embodiment can implement remote call of the mobile internet-based device, and control peripheral devices on the remote terminal in real time, such as opening and closing a remote device, remotely configuring device parameters, or remote control.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • FIG. 3 is a schematic diagram of a virtualization architecture applicable to a device invocation method according to Embodiment 3 of the present invention.
  • the virtualization architecture runs a virtual machine monitor (VMM or Hypervisor) at a virtualization layer to manage a real physical device platform. And provide a corresponding virtual device platform for each client (Guest).
  • VMM virtual machine monitor
  • the virtualization architecture has two clients, and the client runs various operating systems and carries applications.
  • the application in the client 1 operating system has real physical device control and management rights, and the real device driver in the operating system can directly call the local device.
  • the virtual device driver front end responds to the call and initiates a network connection through the network communication module, and connects to the virtual device driver back end of the remote terminal, the network of the network communication module
  • the communication may be a network communication channel that is isolated by virtualization; after receiving the operation instruction corresponding to the call request, the remote terminal invokes a real device driver, performs a call of the real physical device, and feeds back to the virtual device driver front end of the client 2 .
  • different clients of the local terminal can respectively invoke devices of the local or remote operating system, but the level of the application is completely unperceived.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • the virtual device driver front end in the local terminal operating system can simultaneously establish a connection with the virtual device driver back end of the plurality of remote terminals, and realize information synchronization, calling, and management of the plurality of remote terminal devices on the one hand, and On the one hand, distributed task processing is possible.
  • a distributed operation of the GPU of the mobile device is implemented, which specifically includes: assigning parallel tasks to different remote terminals respectively;
  • the backup driver calls the GPU on it to perform the operation, and returns the operation result to the local terminal to implement the calculation result summary and subsequent processing.
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • FIG. 4 is a schematic structural diagram of a device invoking device 500 according to Embodiment 5 of the present invention. As shown in the figure, the device 500 includes:
  • the interface module 501 is configured to receive an application request that invokes a device driver interface by an application
  • the communication module 502 is configured to send, according to a communication connection with the external terminal, an operation instruction corresponding to the call request to the external terminal;
  • the communication module 502 is further configured to receive an operation instruction execution result fed back by the external terminal;
  • the interface module 501 is further configured to feed back the operation instruction execution result to the application.
  • the communication connection with the external terminal is an authenticated communication connection to the external terminal.
  • the communication module 502 is specifically configured to: when the operation instruction is detachable into a plurality of parallel sub-operation instructions, determine a plurality of external terminals corresponding to the device, based on the plurality of a communication connection of the external terminal, respectively, sending the plurality of sub-operation instructions to the plurality of external terminals;
  • the communication module 502 is further configured to receive a plurality of sub-operation instruction execution results fed back by the plurality of external terminals, and execute a result acquisition operation instruction execution result according to the plurality of sub-operation instructions.
  • the communication module 502 is specifically configured to separately send the operation instruction to the plurality of external terminals based on a communication connection with a plurality of external terminals;
  • the communication module 502 is further configured to determine, as a result of the operation instruction execution, the result of the first received external terminal feedback.
  • the communication module 502 is specifically configured to: when determining that the application is a preset application, based on a communication connection with an external terminal, the operation instruction corresponding to the call request The order is sent to the external terminal.
  • the communication module 502 is specifically configured to: when determining that the application is an application running on a preset virtual machine, send the device operation instruction to the office based on a communication connection with an external terminal. Said external terminal.
  • the device further comprises:
  • the device information judging module 503 is configured to acquire the device information of the external terminal before the communication module 502 sends the operation command corresponding to the call request to the external terminal based on the communication connection with the external terminal, according to the Determining, by the device information, whether the external terminal is capable of executing the operation instruction;
  • the communication module 502 is specifically configured to, when determining that the external terminal is capable of executing the operation instruction, send an operation instruction corresponding to the call request to the external terminal based on a communication connection with the external terminal.
  • the device is a satellite positioning device, a processor or a camera.
  • FIG. 5 is a schematic structural diagram of a device invoking device 600 according to Embodiment 6 of the present invention. As shown in the figure, the device 600 includes:
  • Calling a communication module 601, configured to receive a device operation instruction from an external calling terminal based on a communication connection with an external calling terminal;
  • a driving module 602 configured to invoke a driver of a device corresponding to the operation instruction to execute the operation instruction
  • the calling communication module 601 is further configured to feed back an execution result of the operation instruction to the external calling terminal.
  • the communication connection with the external calling terminal is an authenticated communication connection to the external calling terminal.
  • the device in the embodiment of the present invention further provides a device calling electronic device. Since the principle is similar to the device calling method, the implementation of the method may refer to the implementation of the method, and the repeated description is not repeated.
  • the electronic device includes: a display, a memory, one or more processors; and one or more modules, the one or more modules being stored in the memory and configured to be configured by the one or more The processor executes, the one or more modules including instructions for performing the various steps of any of the above methods.
  • the embodiment of the present invention further provides a device calling computer program product. Since the principle is similar to the device calling method, the implementation of the method may refer to the implementation of the method, and the repeated description is not repeated.
  • the computer program product comprises a computer readable storage medium and a computer program mechanism embodied therein, the computer program mechanism comprising instructions for performing the various steps of any of the foregoing methods.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a full device embodiment, an entirely software embodiment, or an embodiment in combination with software and device. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephonic Communication Services (AREA)

Abstract

一种设备调用方法、装置、系统、电子设备和计算机程序产品,所述方法包括:接收应用程序请求调用设备驱动程序接口的调用请求;基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端;以及,接收所述外部终端反馈的操作指令执行结果;将所述操作指令执行结果反馈所述应用程序。从而无需本地驱动程序即可实现对外部终端的设备的调用,更加灵活,同时在设备调用过程中上层应用程序无感知,适用于各种应用程序;设备执行操作指令的结果由底层反馈,不易被拦截。

Description

设备调用方法、装置、系统、电子设备和计算机程序产品 技术领域
本发明涉及通信技术领域,特别涉及设备调用方法、装置、系统、电子设备和计算机程序产品。
背景技术
现有技术中操作系统运行的应用程序能够调用本地设备执行相应操作并获得相应操作结果,以摄像头为例,调用本地摄像头执行拍照操作的具体方案为:应用程序调用操作系统中摄像头驱动程序接口;操作系统kernel层启动摄像头对应的驱动程序代码,驱动程序启动摄像头并完成拍照操作,并将照片反馈应用程序。
现有技术中应用程序通常仅能基于本地的设备驱动调用设备,不够灵活。
发明内容
本发明实施例提出了设备调用方法、装置、系统、电子设备和计算机程序产品,能够实现对外部终端的设备的调用,更加灵活。
在一个方面,本发明实施例提供了一种设备调用方法,其特征在于,所述方法包括:
接收应用程序请求调用设备驱动程序接口的调用请求;
基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端;以及,
接收所述外部终端反馈的操作指令执行结果;
将所述操作指令执行结果反馈所述应用程序。
在另一个方面,本发明实施例提供了一种设备调用方法,其特征在于,所述方法包括:
基于与外部调用终端的通信连接,接收来自外部调用终端的设备操作指令;
调用所述操作指令对应的设备的驱动程序执行所述操作指令;
将所述操作指令的执行结果反馈至所述外部调用终端。
在另一个方面,本发明实施例提供了一种设备调用装置,其特征在于,所述装置包括:
接口模块,用于接收应用程序请求调用设备驱动程序接口的调用请求;
通信模块,用于基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端;以及,
所述通信模块,还用于接收所述外部终端反馈的操作指令执行结果;
所述接口模块,还用于将所述操作指令执行结果反馈所述应用程序。
在另一个方面,本发明实施例提供了一种设备调用装置,其特征在于,所述装置包括:
调用通信模块,用于基于与外部调用终端的通信连接,接收来自外部调用终端的设备操作指令;
驱动模块,用于调用所述操作指令对应的设备的驱动程序执行所述操作指令;
所述调用通信模块,还用于将所述操作指令的执行结果反馈至所述外部调用终端。
在另一个方面,本发明实施例提供了一种设备调用系统,其特征在于,所述系统包括:上述第三方面提供的设备调用装置和上述第四方面提供的设备调用装置。
在另一个方面,本发明实施例提供了一种电子设备,其特征在于,所述电子设备包括:存储器,一个或多个处理器;以及一个或多个模块,所述一个或多个模块被存储在所述存储器中,并被配置成由所述一个或多个处理器执行,所述一个或多个模块包括用于执行上述第一个方面提供的方法中各个步骤的指令。
在另一个方面,本发明实施例提供了一种电子设备,其特征在于,所述电子设备包括:存储器,一个或多个处理器;以及一个或多个模块,所述一个或多个模块被存储在所述存储器中,并被配置成由所述一个或多个处理器执行,所述一个或多个模块包括用于执行上述第二个方面提供的方法中各个步骤的指令。
在另一个方面,本发明实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括用于执行上述第一个方面提供的方法中各个步骤的指令。
在另一个方面,本发明实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括用于执行上述第二个方面提供的方法中各个步骤的指令。
本发明的有益效果如下:
本发明中,在接收到应用程序调用设备驱动程序接口的调用请求后,将调用请求中对设备的操作指令发送至外部终端,并接收外部终端反馈的操作指令执行结果,无需本地驱动程序即可实现对外部终端的设备的调用,更加灵活,同时本发明在设备调用过程中上层应用程序无感知,适用于各种应用程序;设备执行操作指令的结果由底层反馈,不易被拦截。
附图说明
下面将参照附图描述本发明的具体实施例,其中:
图1示出了本发明实施例一中设备调用方法适用的系统架构图;
图2示出了本发明实施例一中设备调用方法的流程示意图;
图3示出了本发明实施例三中设备调用方法适用的虚拟化架构示意图;
图4示出了本发明实施例五中设备调用装置的结构示意图;
图5示出了本发明实施例六中设备调用装置的结构示意图。
具体实施方式
为了使本发明的技术方案及优点更加清楚明白,以下结合附图对本发明的示例性实施例进行进一步详细的说明,显然,所描述的实施例仅是本发明的一部分实施例,而不是所有实施例的穷举。并且在不冲突的情况下,本说明中的实施例及实施例中的特征可以互相结合。
发明人在发明过程中注意到:应用程序通常仅能基于本地的设备驱动调用设备,不够灵活。
针对上述不足,本发明提供了一种设备调用方法,在接收到应用程序调用设备驱动程序接口的调用请求后,将调用请求中对设备的操作指令发送至外部终端,并接收外部终端反馈的操作指令执行结果,无需本地驱动程序即可实现对外部终端的设备的调用,更加灵活,同时本发明在设备调用过程中上层应用程序无感知,适用于各种应用程序;设备执行操作指令的结果由底层反馈,不易被拦截。
为了便于本发明的实施,下面以实例进行说明。
实施例一:
图1示出了本发明实施例一中设备调用方法适用的系统架构图,包括第一终端和第二终端,所述第一终端和第二终端为基于不同处理器运行的物理设备。第一终端和第二终端上分别有可供自身调用的设备,如卫星定位装置,处理器或者摄像头等,同时两个设备分别运行各自的操作系统,并且在第一终端的操作系统中运行了一个应用程序,通过本发明的方法,该应用程序能够调用第二终端的设备。
图2示出了本发明实施例一中设备调用方法流程示意图,如图2所示,所述设备调用方法包括:
步骤101,第一终端操作系统kernel层运行的虚拟驱动前端接收应用程序请求调用设备驱动程序接口的调用请求;
第一终端中的应用程序需要调用某一设备时,会发起调用该设备的驱动程 序接口的请求,并将该请求发送至应用程序所在的操作系统的kernel层,应用程序发送调用请求的过程与现有技术相同,kernel层中运行的虚拟驱动前端能够获取到用户的调用请求。
步骤102,虚拟驱动前端基于与第二终端的通信连接,将所述调用请求对应的操作指令发送至所述第二终端;
第一终端与其外部终端,即第二终端,建立可通过有线或者无线方式建立基于各种传输协议实现的通信连接,例如基于TCP/IP(Transmission Control Protocol/Internet Protocol,传输控制协议/网际协议)建立的无线连接,并且所述连接可以是直接的,也可以是通过云端服务器或者其他中继服务器转发的;可以是基于公网的,也可以是基于安全级别更高的专网的。具体的,虚拟驱动前端需要调用通信模块与运行于第二终端的虚拟驱动后端建立通信连接。
虚拟驱动前端在监测到应用程序请求调用设备驱动程序接口的调用请求后,确定所述应用程序的调用请求指向的设备,进而确定具有所述设备并能够接受调用的第二终端。同时虚拟驱动前端还能够根据设备驱动程序接口的调用请求确定对所指向的设备将要执行的操作指令,操作指令包括操作名称、操作对象和操作参数等。
虚拟驱动前端基于第一终端与第二终端的通信连接将调用请求对应的操作指令进行相应封装后发送至第二终端。
在一些实施方式中,所述与第二终端的通信连接,为对所述第二终端进行认证后的通信连接。第一终端与第二终端建立通信连接时或者发送数据前,第一终端需要对第二终端进行认证,认证方式包括但不限于对第二终端的终端或者设备信息进行认证,对与第二终端间的通信链路的安全性进行认证等。
在一些实施方式中,当判断所述应用程序为预设应用程序时,基于与第二终端的通信连接,将所述调用请求对应的操作指令发送至所述第二终端。
通常第一终端会包括一些可供调用的本地设备,但是出于安全、隐私或者设备性能的考虑,将第一终端的某些应用程序配置为优先调用外部终端的设备 或者配置为不允许调用本地设备。当虚拟驱动前端判断发起调用请求的应用程序为这些被配置的应用程序时,将调用请求对应的操作指令发送至第二终端。
在一些实施方式中,当判断所述应用程序为运行于预设虚拟机的应用程序时,基于与第二终端的通信连接,将所述设备操作指令发送至所述第二终端。
第一终端中可能包含虚拟化系统架构,即运行了多个虚拟机,各虚拟机运行各自的应用程序,出于安全、隐私或者设备性能的考虑,将第一终端的一些虚拟机配置为其上运行的应用程序优先调用外部终端的设备,或者将这些虚拟机配置为其上运行的应用程序不允许调用本地设备。当虚拟驱动前端判断发起调用请求的应用程序运行于这些被配置的虚拟机时,将调用请求对应的操作指令发送至第二终端。
步骤103,第二终端操作系统运行的虚拟驱动后端基于与第一终端的通信连接,接收来自第一终端的设备操作指令;
第二终端操作系统kernel层运行虚拟驱动后端,其能够基于步骤102中所述的第一终端与第二终端的通信连接接收第一终端虚拟驱动前端发送的封装后的对设备的操作指令。
在一些实施方式中,所述第二终端与第一终端的通信连接,为第二终端对所述第一终端进行认证后的通信连接。即在建立通信连接时或发送数据前,第二终端需要对第一终端进行认证,认证方式包括但不限于对第二终端的终端或者设备信息进行认证,对于第二终端间的通信链路的安全性进行认证等。
步骤104,虚拟驱动后端调用所述操作指令对应的设备的驱动程序执行所述操作指令;
第二终端的虚拟驱动后端解封装所述设备操作指令后,确定所述设备操作指令指向的设备,调用本地对应的设备驱动程序执行该操作指令,并获取本地设备执行所述操作指令的执行结果。设备驱动和设备位于第二终端侧,使第一终端的软硬件架构能够得到简化。
步骤105,虚拟驱动后端将所述操作指令的执行结果反馈至第一终端;
第二终端的虚拟驱动后端将操作指令的执行结果封装,并基于第一终端与第二终端的通信连接将其发送至第一终端的虚拟驱动前端。
步骤106,虚拟驱动前端接收所述第二终端反馈的操作指令执行结果;
第一终端的虚拟驱动前端接收到第二终端反馈的操作指令执行结果并对其解封装。
步骤107,虚拟驱动前端将所述操作指令执行结果反馈所述应用程序。
第一终端的虚拟驱动前端将解封装后的操作指令执行结果反馈至所述应用程序,至此应用程序完成了对第二终端的设备的调用。
在一些实施方式中,步骤102之前还包括:获取所述第二终端的设备信息,根据所述设备信息判断所述第二终端是否能够执行所述操作指令;步骤102具体为,当判断所述第二终端能够执行所述操作指令时,基于与所述第二终端的通信连接,将所述调用请求对应的操作指令发送至所述第二终端。
在实现第一终端上运行的应用程序对第二终端的设备调用之前,第一终端需要先根据获取到的第二终端的设备信息确定其能够执行某类操作指令。其中第一终端获取第二终端的设备信息的方式包括但不限于以下方式:1)服务器统计各终端支持外部调用的设备的设备信息并将其发送至第一终端,或者第一终端向服务器请求相关设备的设备信息;2)第一终端与第二终端建立通信后,第一终端读取或者接收第二终端发送的设备信息;3)第一终端广播其需要调用的设备的设备信息,接收到第二终端反馈的其支持该设备调用的确认信息,等。设备信息可以包括设备的类别,型号,性能参数,当前任务情况等。
在第一终端获取第二终端的设备信息并判断其能够适用于当前的调用请求对应的操作指令时才将封装的操作指令基于与第二终端建立的连接发送至第二终端。
在一些实施方式中,当所述操作指令可拆分为多个并行的子操作指令时,确定所述设备对应的多个外部终端,基于与所述多个外部终端的通信连接,将所述多个子操作指令分别发送至所述多个外部终端;以及,接收所述多个外部 终端反馈的多个子操作指令执行结果,根据所述多个子操作指令执行结果获取操作指令执行结果。
当一个操作指令可拆分为多个并行的子操作指令时,第一终端操作系统kernel层运行的虚拟驱动前端可将其拆分,并将多个子操作指令分别发送给多个外部终端,以通过多个外部终端的设备分布式并行的执行这些操作,提升操作效率。虚拟驱动前端在接收到各外部终端调用设备执行相应的子操作指令反馈的结果后,将各子操作指令的执行结果合并得到原操作指令的执行结果反馈发起请求的应用程序。
例如当某一应用程序以大量相互相对独立的图像帧为操作对象,需要调用GPU(Graphics Processing Unit,图形处理器)进行相应计算操作时,可将大量图像帧划分为多个子操作对象,每个子操作对象包含部分图像帧,并将针对这些子操作对象调用GPU进行计算操作的指令分别发送至多个具有GPU的设备,待这些设备反馈执行结果后,将多个子图像帧的处理结果合并得到原操作对象的处理结果。
在一些实施方式中,在步骤102中基于与多个外部终端的通信连接,将所述操作指令分别发送至所述多个外部终端;以及,将最先接收到的所述多个外部终端反馈的结果确定为操作指令执行结果。
第一终端操作系统kernel层运行的虚拟驱动前端可将同样的操作指令同时发送至多个外部终端,即分别调用多个外部终端的设备同时执行该操作指令,在多个外部终端分别反馈设备的操作指令执行结果时,取最先收到的执行结果反馈应用程序,此种方式能够使应用程序对设备的调用尽可能更流畅。
本实施例中,第一终端无需本地驱动程序即可实现对外部终端的设备的调用,更加灵活,同时本发明在设备调用过程中上层应用程序无感知,适用于各种应用程序;设备执行操作指令的结果由底层反馈,不易被拦截。在一些实施方式中,第一终端和第二终端可以互相进行认证,确保设备调用过程更安全;公开了第一终端调用第二终端的设备前对其设备信息的识别过程,能够使调用 过程更高效,提升可用性;第一终端可配置其上的某些应用程序或者某个虚拟机上运行的应用程序调用外部终端的设备,对设备的管理更灵活;第一终端可将设备驱动程序接口的调用请求对应的操作指令拆分为多个子操作指令,由多个外部终端并行处理,提高设备调用效率,或者将同样的操作指令发送至多个外部终端同时处理,并采用其中反馈最快的执行结果,最大限度提升设备调用的速度。
实施例二:
在本实施例中,本地操作系统通过网络通信模块(TCP/IP)与远程操作系统建立网络连接,并在本地操作系统中实现虚拟设备驱动前端。本地操作系统中某一应用程序可发起对远程操作系统的设备信息的同步、调用或者管理。
以设备信息同步为例,本地操作系统的应用程序调用系统API(Application Programming Interface,应用程序编程接口)获取需要同步的设备的信息;系统API调用设备对应的驱动程序代码时,将触发虚拟驱动前端调用网络通信模块与远程操作系统中的虚拟驱动后端建立通信;通信建立完成后,虚拟驱动前端向虚拟驱动后端发送系统API调用信息到远程操作系统的虚拟驱动程序后端;虚拟驱动程序后端调用真实的设备驱动程序以获得设备信息,并将获得设备信息返回到虚拟驱动程序后端;虚拟驱动程序后端通过网络将返回设备信息传递给虚拟驱动前端;虚拟驱动前端将设备信息返回调用的应用程序。至此,本地操作系统中的应用程序获得了所需的设备信息,完成了设备信息的同步,并且该设备信息为远程操作系统的设备信息。
在一些实施方式中,本地终端可实时获取远程终端的位置信息,从而以远程终端的位置信息作为本地终端的位置信息,实现本地终端的位置信息隐身或者模拟。
在一些实施方式中,本地终端可控制远程终端上的摄像头,例如进行曝光、拍摄角度等的调整,以获得最适合的远程图像信息。
本实施例中,本地操作系统的应用程序中对调用的设备是本地还是远程设 备并无感知,应用程序涉及的代码和操作完全一致,使本地操作系统如同拥有远程操作系统的设备。基于本实施例,能够根据需要无限扩充远程操作系统中的设备供本地操作系统使用而不增加本地操作系统的负担。此外本实施例可以实现基于移动互联网的设备远程调用,实时控制远程终端上的外设,例如打开、关闭远程设备,远程配置设备参数,或者远程控制等。
实施例三:
图3示出了本发明实施例三中设备调用方法适用的虚拟化架构示意图,所述虚拟化架构在虚拟化层运行虚拟机监控器(VMM或称为Hypervisor)以管理真实的物理设备平台,并为每个客户机(Guest)提供对应的虚拟设备平台。本实施例中虚拟化架构中具有两个客户机,客户机分别运行各种的操作系统并承载应用程序,
其中客户机1操作系统中的应用程序具备真实的物理设备控制和管理权限,并且其操作系统中具有真实的设备驱动,可以直接调用本地设备。
当客户机2的操作系统中的应用程序调用系统驱动时,虚拟设备驱动前端响应该调用,并通过网络通信模块发起网络连接,连接至远程终端的虚拟设备驱动后端,该网络通信模块的网络通信可以是通过虚拟化隔离的网络通信通道;远程终端接收到调用请求对应的操作指令后,调用真实的设备驱动(Driver),进行真实物理设备的调用并反馈至客户机2的虚拟设备驱动前端。
本实施例中,本地终端的不同客户机能够分别调用本地或者远程操作系统的设备,但应用程序的层面完全无感知。
实施例四:
在本实施例中,本地终端操作系统中的虚拟设备驱动前端能够同时与多个远程终端的虚拟设备驱动后端建立连接,一方面实现对多个远程终端设备的信息同步、调用和管理,另一方面可进行分布式任务处理。
例如通过调用多个远程终端的GPU运算单元,实现移动设备GPU的分布式运算,具体包括:将并行任务分别分配到不同的远程终端;远程终端通过设 备驱动调用其上的GPU进行运算,并将运算结果返回本地终端实现计算结果汇总及后续处理。
实施例五:
基于同一发明构思,本发明实施例中还提供了一种设备调用装置500,由于这些装置解决问题的原理与设备调用方法相似,因此这些装置的实施可以参见方法的实施,重复之处不再赘述。图4示出了本发明实施例五中设备调用装置500的结构示意图,如图所示,所述装置500包括:
接口模块501,用于接收应用程序请求调用设备驱动程序接口的调用请求;
通信模块502,用于基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端;以及,
所述通信模块502,还用于接收所述外部终端反馈的操作指令执行结果;
所述接口模块501,还用于将所述操作指令执行结果反馈所述应用程序。
在一些实施方式中,所述与外部终端的通信连接,为对所述外部终端进行认证后的通信连接。
在一些实施方式中,所述通信模块502具体用于,当所述操作指令可拆分为多个并行的子操作指令时,确定所述设备对应的多个外部终端,基于与所述多个外部终端的通信连接,将所述多个子操作指令分别发送至所述多个外部终端;
所述通信模块502还具体用于,接收所述多个外部终端反馈的多个子操作指令执行结果,根据所述多个子操作指令执行结果获取操作指令执行结果。
在一些实施方式中,所述通信模块502具体用于,基于与多个外部终端的通信连接,将所述操作指令分别发送至所述多个外部终端;
所述通信模块502还具体用于,将最先接收到的所述多个外部终端反馈的结果确定为操作指令执行结果。
在一些实施方式中,所述通信模块502具体用于,当判断所述应用程序为预设应用程序时,基于与外部终端的通信连接,将所述调用请求对应的操作指 令发送至所述外部终端。
在一些实施方式中,所述通信模块502具体用于,当判断所述应用程序为运行于预设虚拟机的应用程序时,基于与外部终端的通信连接,将所述设备操作指令发送至所述外部终端。
在一些实施方式中,所述装置还包括:
设备信息判断模块503,用于在所述通信模块502基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端之前,获取所述外部终端的设备信息,根据所述设备信息判断所述外部终端是否能够执行所述操作指令;
所述通信模块502具体用于,当判断所述外部终端能够执行所述操作指令时,基于与所述外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端。
在一些实施方式中,所述设备为卫星定位装置,处理器或者摄像头。
实施例六:
基于同一发明构思,本发明实施例中还提供了一种设备调用装置600,由于这些装置解决问题的原理与设备调用方法相似,因此这些装置的实施可以参见方法的实施,重复之处不再赘述。图5示出了本发明实施例六中设备调用装置600的结构示意图,如图所示,所述装置600包括:
调用通信模块601,用于基于与外部调用终端的通信连接,接收来自外部调用终端的设备操作指令;
驱动模块602,用于调用所述操作指令对应的设备的驱动程序执行所述操作指令;
所述调用通信模块601,还用于将所述操作指令的执行结果反馈至所述外部调用终端。
在一些实施方式中,所述与外部调用终端的通信连接,为对所述外部调用终端进行认证后的通信连接。
实施例七:
基于同一发明构思,本发明实施例中还提供了设备调用电子设备,由于其原理与设备调用方法相似,因此其实施可以参见方法的实施,重复之处不再赘述。所述电子设备包括:显示器,存储器,一个或多个处理器;以及一个或多个模块,所述一个或多个模块被存储在所述存储器中,并被配置成由所述一个或多个处理器执行,所述一个或多个模块包括用于执行任一上述方法中各个步骤的指令。
实施例八:
基于同一发明构思,本发明实施例还提供了设备调用计算机程序产品,由于其原理与设备调用方法相似,因此其实施可以参见方法的实施,重复之处不再赘述。所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括用于执行任一前述方法中各个步骤的指令。
为了描述的方便,以上所述装置的各部分以功能分为各种模块分别描述。当然,在实施本发明时可以把各模块或单元的功能在同一个或多个软件或设备中实现。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全设备实施例、完全软件实施例、或结合软件和设备方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机 或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。

Claims (25)

  1. 一种设备调用方法,其特征在于,所述方法包括:
    接收应用程序请求调用设备驱动程序接口的调用请求;
    基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端;
    以及,
    接收所述外部终端反馈的操作指令执行结果;
    将所述操作指令执行结果反馈所述应用程序。
  2. 如权利要求1所述的方法,其特征在于,
    所述与外部终端的通信连接,为对所述外部终端进行认证后的通信连接。
  3. 如权利要求1所述的方法,其特征在于,所述基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端,包括:
    当所述操作指令可拆分为多个并行的子操作指令时,确定所述设备对应的多个外部终端,基于与所述多个外部终端的通信连接,将所述多个子操作指令分别发送至所述多个外部终端;
    所述接收所述外部终端反馈的操作指令执行结果,包括:
    接收所述多个外部终端反馈的多个子操作指令执行结果,根据所述多个子操作指令执行结果获取操作指令执行结果。
  4. 如权利要求1所述的方法,其特征在于,所述基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端,包括:
    基于与多个外部终端的通信连接,将所述操作指令分别发送至所述多个外部终端;
    所述接收所述外部终端反馈的操作指令执行结果,包括:
    将最先接收到的所述多个外部终端反馈的结果确定为操作指令执行结果。
  5. 如权利要求1所述的方法,其特征在于,所述基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端,包括:
    当判断所述应用程序为预设应用程序时,基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端。
  6. 如权利要求1所述的方法,其特征在于,所述基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端,包括:
    当判断所述应用程序为运行于预设虚拟机的应用程序时,基于与外部终端的通信连接,将所述设备操作指令发送至所述外部终端。
  7. 如权利要求1所述的方法,其特征在于,在所述基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端之前,还包括:
    获取所述外部终端的设备信息,根据所述设备信息判断所述外部终端是否能够执行所述操作指令;
    所述基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端,包括:
    当判断所述外部终端能够执行所述操作指令时,基于与所述外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端。
  8. 如权利要求1所述的方法,其特征在于,
    所述设备为卫星定位装置,处理器或者摄像头。
  9. 一种设备调用方法,其特征在于,所述方法包括:
    基于与外部调用终端的通信连接,接收来自外部调用终端的设备操作指令;
    调用所述操作指令对应的设备的驱动程序执行所述操作指令;
    将所述操作指令的执行结果反馈至所述外部调用终端。
  10. 如权利要求9所述的方法,其特征在于,
    所述与外部调用终端的通信连接,为对所述外部调用终端进行认证后的通信连接。
  11. 一种设备调用装置,其特征在于,所述装置包括:
    接口模块,用于接收应用程序请求调用设备驱动程序接口的调用请求;
    通信模块,用于基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端;
    以及,
    所述通信模块,还用于接收所述外部终端反馈的操作指令执行结果;
    所述接口模块,还用于将所述操作指令执行结果反馈所述应用程序。
  12. 如权利要求11所述的装置,其特征在于,
    所述与外部终端的通信连接,为对所述外部终端进行认证后的通信连接。
  13. 如权利要求11所述的装置,其特征在于:
    所述通信模块具体用于,当所述操作指令可拆分为多个并行的子操作指令时,确定所述设备对应的多个外部终端,基于与所述多个外部终端的通信连接,将所述多个子操作指令分别发送至所述多个外部终端;
    所述通信模块还具体用于,接收所述多个外部终端反馈的多个子操作指令执行结果,根据所述多个子操作指令执行结果获取操作指令执行结果。
  14. 如权利要求11所述的装置,其特征在于:
    所述通信模块具体用于,基于与多个外部终端的通信连接,将所述操作指令分别发送至所述多个外部终端;
    所述通信模块还具体用于,将最先接收到的所述多个外部终端反馈的结果确定为操作指令执行结果。
  15. 如权利要求11所述的装置,其特征在于:
    所述通信模块具体用于,当判断所述应用程序为预设应用程序时,基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端。
  16. 如权利要求11所述的装置,其特征在于:
    所述通信模块具体用于,当判断所述应用程序为运行于预设虚拟机的应用程序时,基于与外部终端的通信连接,将所述设备操作指令发送至所述外部终端。
  17. 如权利要求11所述的装置,其特征在于,所述装置还包括:
    设备信息判断模块,用于在所述通信模块基于与外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端之前,获取所述外部终端的设备信息,根据所述设备信息判断所述外部终端是否能够执行所述操作指令;
    所述通信模块具体用于,当判断所述外部终端能够执行所述操作指令时,基于与所述外部终端的通信连接,将所述调用请求对应的操作指令发送至所述外部终端。
  18. 如权利要求11所述的装置,其特征在于,
    所述设备为卫星定位装置,处理器或者摄像头。
  19. 一种设备调用装置,其特征在于,所述装置包括:
    调用通信模块,用于基于与外部调用终端的通信连接,接收来自外部调用终端的设备操作指令;
    驱动模块,用于调用所述操作指令对应的设备的驱动程序执行所述操作指令;
    所述调用通信模块,还用于将所述操作指令的执行结果反馈至所述外部调用终端。
  20. 如权利要求19所述的装置,其特征在于,
    所述与外部调用终端的通信连接,为对所述外部调用终端进行认证后的通信连接。
  21. 一种设备调用系统,其特征在于所述设备调用系统包括:如权利要求11至18中任一权利要求所述的设备调用装置,以及如权利要求19至20中任一权利要求所述的设备调用装置。
  22. 一种电子设备,其特征在于,所述电子设备包括:
    存储器,一个或多个处理器;以及一个或多个模块,所述一个或多个模块被存储在所述存储器中,并被配置成由所述一个或多个处理器执行,所述一个或多个模块包括用于执行权利要求1至8中任一所述方法中各个步骤的指令。
  23. 一种电子设备,其特征在于,所述电子设备包括:
    存储器,一个或多个处理器;以及一个或多个模块,所述一个或多个模块被存储在所述存储器中,并被配置成由所述一个或多个处理器执行,所述一个或多个模块包括用于执行权利要求9至10中任一所述方法中各个步骤的指令。
  24. 一种与电子设备结合使用的计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括用于执行权利要求1至8中任一所述方法中各个步骤的指令。
  25. 一种与电子设备结合使用的计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括用于执行权利要求9至10中任一所述方法中各个步骤的指令。
PCT/CN2016/102456 2016-10-18 2016-10-18 设备调用方法、装置、系统、电子设备和计算机程序产品 WO2018072101A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/102456 WO2018072101A1 (zh) 2016-10-18 2016-10-18 设备调用方法、装置、系统、电子设备和计算机程序产品
CN201680002921.9A CN107003952A (zh) 2016-10-18 2016-10-18 设备调用方法、装置、系统、电子设备和计算机程序产品

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/102456 WO2018072101A1 (zh) 2016-10-18 2016-10-18 设备调用方法、装置、系统、电子设备和计算机程序产品

Publications (1)

Publication Number Publication Date
WO2018072101A1 true WO2018072101A1 (zh) 2018-04-26

Family

ID=59431271

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/102456 WO2018072101A1 (zh) 2016-10-18 2016-10-18 设备调用方法、装置、系统、电子设备和计算机程序产品

Country Status (2)

Country Link
CN (1) CN107003952A (zh)
WO (1) WO2018072101A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131146A (zh) * 2019-06-24 2020-12-25 维塔科技(北京)有限公司 获取设备信息的方法、装置、存储介质及电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018112719A1 (zh) * 2016-12-20 2018-06-28 深圳前海达闼云端智能科技有限公司 设备调用方法、装置、系统和电子设备
CN110389827B (zh) * 2018-04-20 2023-05-12 伊姆西Ip控股有限责任公司 在分布式系统中进行优化的方法、设备和计算机程序产品
CN114116140B (zh) * 2022-01-27 2022-07-26 荣耀终端有限公司 获取数据的方法和电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012164711A1 (ja) * 2011-06-02 2012-12-06 株式会社 日立製作所 情報処理システム、ソフトウエア検証方法、及びプログラム
CN103036916A (zh) * 2011-09-29 2013-04-10 中国移动通信集团公司 远程硬件资源的调用方法及其装置、系统
CN103077018A (zh) * 2012-12-27 2013-05-01 广州英码信息科技有限公司 一种基于安卓系统的设备接口的控制方法及系统
CN103731309A (zh) * 2013-12-31 2014-04-16 深圳市科漫达智能管理科技有限公司 一种设备管理方法及装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685416B (zh) * 2012-09-20 2019-04-26 联想(北京)有限公司 分布式任务分配与认领方法以及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012164711A1 (ja) * 2011-06-02 2012-12-06 株式会社 日立製作所 情報処理システム、ソフトウエア検証方法、及びプログラム
CN103036916A (zh) * 2011-09-29 2013-04-10 中国移动通信集团公司 远程硬件资源的调用方法及其装置、系统
CN103077018A (zh) * 2012-12-27 2013-05-01 广州英码信息科技有限公司 一种基于安卓系统的设备接口的控制方法及系统
CN103731309A (zh) * 2013-12-31 2014-04-16 深圳市科漫达智能管理科技有限公司 一种设备管理方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131146A (zh) * 2019-06-24 2020-12-25 维塔科技(北京)有限公司 获取设备信息的方法、装置、存储介质及电子设备
CN112131146B (zh) * 2019-06-24 2022-07-12 维塔科技(北京)有限公司 获取设备信息的方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN107003952A (zh) 2017-08-01

Similar Documents

Publication Publication Date Title
US10915983B2 (en) System for distributed virtualization of GPUs in desktop cloud
US10698717B2 (en) Accelerator virtualization method and apparatus, and centralized resource manager
WO2018072101A1 (zh) 设备调用方法、装置、系统、电子设备和计算机程序产品
WO2016155394A1 (zh) 一种虚拟网络功能间链路建立方法及装置
WO2016037479A1 (zh) 虚拟化网络功能vnf优化方法、装置及系统
US11700262B2 (en) System and method to securely execute datacenter management operations remotely
US20170046013A1 (en) Web-browser based desktop and application remoting solution
US9801146B2 (en) Terminal and synchronization control method among terminals
US20160191483A1 (en) Universal Connector
WO2016070609A1 (zh) 实现vnf实例化的方法、系统及nfvo和vnfm
US20110276625A1 (en) Method and system for host independent keyboard, video, and mouse (kvm) redirection
WO2018112855A1 (zh) 一种虚拟化方法、装置、及电子设备、计算机程序产品
WO2015192582A1 (zh) 虚拟桌面登录验证方法和装置
WO2016101545A1 (zh) 设备管理方法、装置及系统
CN108139936A (zh) 提供对自部署的虚拟应用中的虚拟机的串行端口的访问的方法、装置和系统
WO2013178127A1 (zh) 应用程序关闭方法及系统
US11061540B2 (en) Remote support service with smart whiteboard
CN111212117A (zh) 一种远程交互的方法和装置
WO2018112719A1 (zh) 设备调用方法、装置、系统和电子设备
CN106657076B (zh) 一种网络命名空间的tcp服务实现方法及装置
US20240022670A1 (en) Scanning preview method in scanner redirection
Parák et al. Challenges in achieving iaas cloud interoperability across multiple cloud management frameworks
WO2023081178A1 (en) Method and apparatus for delivering 5g ar/mr cognitive experience to 5g devices
JP2016189127A (ja) 仮想マシン及びリモートデスクトップシステム
CN115516439A (zh) 5g网络中应用提供商的媒体流式传输内容准备的方法

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: 16919088

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.08.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16919088

Country of ref document: EP

Kind code of ref document: A1