WO2012152010A1 - Method and device for sharing functions of network device - Google Patents

Method and device for sharing functions of network device Download PDF

Info

Publication number
WO2012152010A1
WO2012152010A1 PCT/CN2011/084461 CN2011084461W WO2012152010A1 WO 2012152010 A1 WO2012152010 A1 WO 2012152010A1 CN 2011084461 W CN2011084461 W CN 2011084461W WO 2012152010 A1 WO2012152010 A1 WO 2012152010A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual device
service
module
unit
driving
Prior art date
Application number
PCT/CN2011/084461
Other languages
French (fr)
Chinese (zh)
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 WO2012152010A1 publication Critical patent/WO2012152010A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities

Definitions

  • the present invention relates to the field of network sharing, and in particular to a method and apparatus for sharing function of a network device. Background technique
  • Hotspot devices Take the current hotspot products as an example.
  • Almost all hotspot devices support the Global Positioning System (GPS) function.
  • the main working method of hotspot devices is to access the Internet (Internet) via wireless fidelity (wifi).
  • Internet Internet
  • wifi wireless fidelity
  • User devices that access wifi can use certain features in the hotspot device.
  • the user equipment wants to use the GPS function to obtain GPS location information, it must use a cable to connect to the hotspot device, install the driver, obtain the GPS location information in the hotspot device, and realize GPS positioning. At this time, only one person can enjoy the GPS alone.
  • Function other user equipment cannot use GPS function because GPS location information cannot be obtained. Summary of the invention
  • the main purpose of the present invention is to provide a method and system for sharing function of a network device, to realize function sharing of the network device, and to improve device utilization.
  • the technical solution of the present invention is as follows:
  • the invention provides a method for sharing function of a network device, comprising: the virtual device sending an activation request to the network device, the network device determining that the virtual device is legal, allowing the virtual device to be activated, the virtual device activating the self-driver, and enumerating on the virtual device host Transfer function data according to network protocols and network devices.
  • the network device sends a broadcast message at a certain time.
  • the virtual device starts a background service driven by its function, receives a broadcast message of the network device, determines that the network device supports the virtual device, and sends an activation request to the network device; or, the virtual device starts its own function driver.
  • the background service sends an activation request to the network device.
  • the network device sends the authentication method and the authentication parameter to the virtual device, and the virtual device obtains the authentication result according to the authentication method and the authentication parameter, compares with the preset authentication result, determines that the two match, and sends the authentication result to the virtual device.
  • the network device the network device compares the received authentication result with the preset authentication result to determine that the two match, and the virtual device is legal.
  • the enumerating on the virtual device host includes: the virtual device resets through the network device, and establishes a control channel with the virtual device host; the virtual device host reads the virtual device descriptor of the virtual device, according to the virtual device description.
  • the virtual device mounts the interface driver and negotiates with the virtual device to configure the virtual device to work normally.
  • the transmitting the function data according to the network protocol and the network device includes: the network device encapsulates the data into a data format supported by the network protocol, encrypts the temporary key generated by itself, and sends the data to the virtual device through the network protocol; The received data is decrypted according to the key sent by the received network device to implement its own function.
  • the method further includes: the virtual device is illegal, and the network device rejects the virtual The device currently activates the request, and delays the activation request of the virtual device for the next time. If the virtual device is determined to be illegal for N consecutive times, all requests of the virtual device are rejected.
  • the invention also provides a system for sharing function of a network device, comprising: a service module, a driving module and a host enumeration module;
  • a driving module configured to send an activation request to the service module, activate the self-driver, enumerate through the host enumeration module, and transmit the function data according to the network protocol and the service module;
  • a service module configured to determine that the driving module is legal, allows the driving module to be activated, and transmits function data according to the network protocol and the driving module;
  • the host enumeration module is used to enumerate the driver modules.
  • the service module further includes a service activation unit
  • the drive module further includes a drive activation unit
  • the service activation unit is configured to send a broadcast message at a certain time, receive an activation request of the drive activation unit, or receive an activation request of the drive activation unit;
  • the driving activation unit is configured to start its own background service, receive a broadcast message of the service activation unit, determine that the service module supports the virtual device in which the service module is located, and send an activation request to the service activation unit; or, start its own background service, to the service.
  • the activation unit sends an activation request.
  • the service module further includes a service authentication unit and a service data processing unit
  • the driving module further includes a driving authentication unit
  • the service authentication unit is configured to send an authentication method and an authentication parameter to the driving authentication unit, receive an authentication result replied by the driving authentication unit, and compare with the authentication result preset by itself to determine that the two match,
  • the driver module is legal; the service data processing unit and the service activation unit are notified; otherwise, the driver module is illegal, and the service activation unit is notified;
  • the driving authentication unit is configured to perform authentication according to the received authentication method and the authentication parameter, obtain an authentication result, compare with the preset authentication result, and determine that the two match, and the authentication result is obtained.
  • the driving module further includes a driving enumeration unit;
  • the driving enumeration unit is configured to send a ready message to the host enumeration module, reset by the host enumeration module, establish a control channel with the host enumeration module, and perform configuration negotiation; correspondingly, the host enumeration a module, configured to drive the enumeration unit to perform reset according to the received ready message of the driven enumeration unit, establish a control channel with the driving enumeration unit, and allocate an address for the driving module; and describe the virtual device according to the read driving enumeration unit For the driver module to mount the driver, negotiate the configuration with the driver enumeration unit.
  • the driving module further includes a driving data processing unit
  • the service data processing unit is configured to determine that the driving module is legal, and the function data is encapsulated into a data format supported by the network protocol, and is encrypted by the temporary key generated by itself, and then sent to the driving data processing unit according to the network protocol;
  • the information contains a temporary key;
  • the driving data processing unit is configured to decrypt the function data sent by the service data processing unit according to the temporary key sent by the received service data processing unit to implement its own function.
  • the service activation unit is further configured to: determine that the driving module is illegal, refuse to drive the activation request of the activation unit, and delay processing the next activation request of the driving activation unit, if the N times are determined continuously If the driver module is illegal, all requests of the driver module are rejected.
  • the virtual device and the network device are connected through a wireless network, and after the network device performs the legal authentication on the virtual device, the virtual device is allowed to be activated, and the virtual device is enumerated to simulate the physical device through the interface.
  • the virtual device host communicates with the virtual device host, the network device sends the function data to the virtual device, and the virtual device host implements the function of the network device through the virtual device, and the virtual device host and the network device implement the network device function in the wireless network. Share, improve device utilization.
  • the function data is encrypted by the temporary key, thereby improving the security of data transmission.
  • FIG. 1 is a schematic flowchart of a method for implementing function sharing of a network device according to the present invention
  • FIG. 2 is a schematic diagram of a process of enumerating virtual devices on a virtual device host according to the present invention
  • FIG. 3 is a schematic diagram of a virtual composition of network device function sharing according to the present invention. detailed description
  • the virtual device sends an activation request to the network device, the network device determines that the virtual device is legal, allows the virtual device to activate, the virtual device activates its own driver, and enumerates on the virtual device host, and transmits according to the network protocol and the network device. Functional data.
  • the network device includes a plurality of functions, which may also be referred to as an application.
  • the virtual device located in the user equipment, is a functional module on the user equipment, and includes a function driver matched with a network device vendor type, and the network.
  • the function of the device - correspondingly, the user equipment may also be referred to as a virtual device host, which is a device that uses a network device function, and is connected to the network device through a wireless network; for the network device, the virtual device accesses the virtual device by simulating the physical device
  • the mode of the device host enables the virtual device host to wirelessly connect to the network device and use the functions on the network device.
  • the invention provides a method for sharing function of a network device, as shown in FIG. 1:
  • Step 101 The virtual device sends an activation request to the network device.
  • the broadcast message is sent at regular intervals.
  • the broadcast message includes its own identification number (ID) and its own function.
  • the virtual device starts its own background service and receives the broadcast message of the network device.
  • the function in the message is compared with the function supported by itself, if it is consistent with the function supported by itself, it is determined that the network device supports the virtual device, and sends an activation request to the network device, where the activation request includes a function supported by itself; or
  • the virtual device starts its own background service and sends an activation request to the network device. It should be noted that, in the solution of the present invention, between the virtual device and the network device, the virtual device is used. The host communicates with the wireless connection of the network device.
  • Step 102 The network device determines whether the virtual device is legal. If it is legal, go to step 103; otherwise, go to step 104.
  • the network device receives the activation request sent by the virtual device, establishes a temporary ID for the virtual device, and associates the ID with a function supported in the activation request.
  • the ID can be established according to methods in the prior art, such as a random number algorithm.
  • the network device sends the authentication method and the authentication parameter to the virtual device, and the virtual device performs authentication according to the authentication method and the authentication parameter, and obtains the authentication result, and compares with the locally preset authentication result. If the two match, the network The device is legal, and the authentication result is sent to the network device. If the two do not match, the network device is illegal, and the authentication result is sent to the network device, and the information interaction with the network device is terminated, and the process ends.
  • the authentication method may be any one of the prior art, for example, an asymmetric authentication algorithm, a symmetric authentication algorithm, etc., and the preset is preset in a driver of the virtual device.
  • the network device receives the authentication result and compares it with the locally preset authentication result. If the two match, the virtual device is legal, and step 103 is performed. If the two do not match, step 104 is performed, where the preset is preset. In the service program of the network device.
  • Step 103 Allow the virtual device to be activated, the virtual device activates its own driver, and enumerates in the virtual device host, and implements its own function according to the network protocol and the network device to transmit the function data, for example, the U disk function.
  • the network device sends the permission activation information to the virtual device, the permission activation information includes a temporary key, and the virtual device receives the permission activation information to start the self-drive.
  • the virtual device is enumerated in the virtual device host to simulate physical device access.
  • the virtual device can be regarded as a physical device connected to the virtual device host through the interface of the virtual device host.
  • the network device sends the data of the function to the virtual device according to the virtual device ID and the corresponding supported function, and the virtual device host can read the data received by the virtual device.
  • the sending The data is encapsulated into a data format supported by the network protocol for the network device, encrypted by the temporary key generated by itself, and then sent to the virtual device through the network protocol.
  • the virtual device decrypts the received data according to the temporary key to implement its own functions.
  • the temporary key may be generated by any one of the methods in the prior art, such as a random number algorithm, and the network device regenerates a new temporary key and sends it to the virtual device at a certain time.
  • the virtual device is based on the new one.
  • the temporary key receives data. Among them, the time interval at regular intervals can be set as needed.
  • the enumeration process of the virtual device in the network device is as shown in FIG. 1 , and the specific steps are as follows:
  • Step 1031 The virtual device is reset by using the virtual device host.
  • the virtual device sends a ready message to the virtual device host, the virtual device host receives the ready message sent by the virtual device, sends a reset request to the virtual device, and the virtual device receives the reset request, and performs resetting, where the reset is: virtual device emulating physical device The restart process.
  • Step 1032 Establish a control channel between the virtual device host and the virtual device.
  • the host and the virtual device simulate the signaling protocol between the physical device and the host to establish a control channel.
  • the virtual device sends an address request to the virtual device host, and the virtual device host generates an address and sends the address to the virtual device.
  • a method in the prior art such as a random number algorithm or the like, is employed.
  • the communication between the virtual device and the virtual device host carries the address so that the virtual device host recognizes the virtual device.
  • Step 1033 The virtual device host reads the virtual device descriptor of the virtual device, mounts the interface driver for the virtual device according to the virtual device descriptor, and negotiates the configuration with the virtual device, and the virtual device works normally.
  • the virtual device host sends a virtual device descriptor request to the virtual device, and the virtual device returns the locally pre-stored virtual device descriptor to the virtual device host;
  • the virtual device descriptor is used to describe the type of the virtual device and functions that can be implemented, for example, U disk function for Universal Serial Bus (USB) devices;
  • the virtual device host selects and saves the interface driver saved by itself according to the virtual device descriptor. For example, if a USB device is assumed, the USB interface driver is selected and loaded.
  • Configuration negotiation between the virtual device and the virtual device host determines the virtual device configuration, and the virtual device works normally.
  • the configuration negotiation is to simulate the configuration negotiation between the physical device and the virtual device host in the prior art, and the virtual device sends the configuration to the virtual device host.
  • the virtual device host receives the configuration and sends a determination configuration message to the virtual device.
  • Information is transmitted between the device and the virtual device host according to the determined configuration, and the configuration is related to the device type of the virtual device.
  • the virtual device is configured as a USB high-speed device, and the virtual device sends its own data transmission speed to the virtual device host. After receiving the data transmission speed, the virtual device host sends the data transmission speed to the virtual device.
  • the data transmission speed message is determined, the virtual device and the virtual device host perform signal transmission at the speed.
  • Step 104 The network device rejects the activation request of the virtual device.
  • the network device determines that the virtual device is illegal, rejects the current activation request of the virtual device, and delays the activation request of the virtual device for the next time. If the virtual device is determined to be illegal for N consecutive times, the virtual device is rejected. All requests from the device until the network device is restarted. The time of the delay may be set as needed, and the size of the N may be set as needed.
  • the virtual device After the virtual device is authenticated by the network device, the virtual device activates its own driver and connects to the virtual device host through a virtual wired connection through enumeration, thereby realizing the mapping between the virtual device host and the network device.
  • the function data of the network device can be obtained to implement its own function, so that multiple virtual devices located on the same virtual device host or different virtual device hosts can simultaneously access the network device. Obtain functional data and implement virtual device functions to share network device functions.
  • the present invention further provides a network device function sharing system, as shown in FIG. 3, the system includes: a service module 302, a driver module 301, and a host enumeration module 303;
  • the service module 302 is located in the network device
  • the driver module 301 is a driver of the virtual device
  • the host enumeration module 303 is located in the virtual device host.
  • the driving module 301 is configured to initiate an activation request to the service module 302, activate the self-driver, perform enumeration by the host enumeration module 303, and transmit the function data according to the network protocol and the service module 302.
  • the service module 302 is configured to receive an activation request of the driving module 301, determine that the driving module 301 is legal, allow the driving module 301 to activate, and transmit the function data to the driving module 301 according to the network protocol; otherwise, reject the activation request of the driving module 301;
  • the host enumeration module 303 is configured to enumerate the driver module 301.
  • the driving module 301 further includes: a driving activation unit 3011, and the service module 302 further includes: a service activation unit 3021;
  • the service activation unit 3021 is further configured to: send a broadcast message at a certain time, receive an activation request of the drive activation unit 3011; or, receive an activation request of the drive activation unit 3011; establish a temporary ID for the virtual device where the drive activation unit 3011 is located, and And the function supported by the driver module 301 should be;
  • the driving activation unit 3011 is further configured to start its own background service, receive a broadcast message of the service activation unit 3021, determine that the service activation unit 3021 supports the virtual device in which it is located, and send an activation request to the service activation unit 3021; or, start its own background.
  • the service sends an activation request to the service activation unit 3021, which includes the functions supported by itself.
  • the service module 302 further includes: a service authentication unit 3022, a service data processing unit 3023; the driver module 301 further includes a drive authentication unit 3012;
  • the service authentication unit 3022 sends an authentication method and an authentication parameter to the driving authentication unit 3012, and compares the authentication result sent by the received driving authentication unit 3012 with the preset authentication result. If the two match, Then, it is determined that the driving module 301 is legal, and the service data processing unit 3023 and the service activation unit 3021 are notified; otherwise, it is determined that the driving module 301 is illegal, and the service activation unit 3011 is notified; Correspondingly, the driving authentication unit 3012 is specifically configured to: perform authentication according to the received authentication method and the authentication parameter, obtain an authentication result, and compare with the preset authentication result to determine that the two are the same, then the service module 302 is legal. The authentication result is sent to the service authentication unit 3022; otherwise, the service module 302 is illegal, and the authentication result is sent to the service authentication unit 3022.
  • the driving module 301 further includes: a driving enumeration unit 3014;
  • the service activation unit 3021 is specifically configured to: determine that the driving module 301 is illegal, reject the current activation request of the driving activation unit 3011, and delay the activation request of the driving activation unit 3011 for the next time, and determine the driving module for N consecutive times. If the 301 is illegal, all the requests of the driving module 301 are rejected; determining that the driving module 301 is legal, and transmitting the permission activation information to the driving activation unit 3011;
  • the drive activation unit 3011 is configured to activate its own drive and notify the drive enumeration unit 3014.
  • the driver enumeration unit 3014 is configured to send a ready message to the host enumeration module 303, perform a reset by the host enumeration module 303, establish a control channel with the host enumeration module 303, and perform configuration negotiation.
  • the host enumeration module 303 is configured to: according to the ready message of the received driving enumeration unit 3014, request the driving enumeration unit 3014 to perform resetting, establish a control channel with the driving enumeration unit 3014, and allocate an address for the driving module 301, according to
  • the read virtual device descriptor of the drive enumeration unit 3014 mounts the drive for the drive module 301, and performs configuration negotiation with the drive enumeration unit 3014.
  • the driving module 301 further includes: a driving data processing unit 3013;
  • the service data processing unit 3023 is specifically configured to: encapsulate the data into a data format supported by the network protocol, encrypt the temporary key generated by itself, and send the encapsulated data to the driving data processing unit 3013 according to the network protocol;
  • the temporary key is regenerated at a certain time; the permission activation information includes a temporary key; and the data is a function corresponding to the virtual device ID.
  • the drive data processing unit 3013 is configured to decrypt the function data transmitted by the service data processing unit 3023 according to the temporary key transmitted by the service data processing unit 3023 to implement its own function.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed is a method for sharing the functions of a network device. The method includes the following steps: a virtual device sends an activation request to a network device; the network device decides that the virtual device is legitimate and then allows the virtual device to activate; the virtual device activates the drive thereof, and transmits function data with the network device according to a network protocol. Further disclosed is a system for sharing the functions of a network device. By using the method and system of the present invention, the functions of the network device are shared and the utilization rate of the device and data transmission security are improved.

Description

一种网络设备功能共享的方法及装置 技术领域  Method and device for sharing network device function
本发明涉及网络共享领域, 特别是指一种网络设备功能共享的方法及 装置。 背景技术  The present invention relates to the field of network sharing, and in particular to a method and apparatus for sharing function of a network device. Background technique
随着科学技术的发展, 网络在人们的生活中已经不可缺少。 随着网络 接入技术的更新换代, 越来越多的网络设备呈现在我们面前, 很多网络设 备有各式各样的功能, 并且可以同时供多用户使用, 也就是说, 用户通过 自身设备与所述网络设备相连, 可以使用所述网络设备的功能。 但是, 其 中有很多功能需要用户设备通过线缆连接网络设备, 用户设备才能使用。 因为同时只能有一个用户设备通过线缆连接到所述网络设备, 这就导致这 些功能变成了该用户设备的专有功能, 无法与其他用户设备共享。  With the development of science and technology, the Internet is indispensable in people's lives. With the upgrading of network access technologies, more and more network devices are presented to us. Many network devices have various functions and can be used by multiple users at the same time. That is, users use their own devices. The network devices are connected, and the functions of the network devices can be used. However, many of these functions require the user equipment to connect to the network equipment through a cable, and the user equipment can be used. Since only one user device can be connected to the network device through a cable at the same time, these functions become proprietary functions of the user device and cannot be shared with other user devices.
以目前较为流行的无线热点 ( hotspot )产品为例, 几乎全部 hotspot设 备都支持全球定位***(GPS )功能, hotspot设备的主要工作方式是通过 无线保真 (wifi )接入因特网 (Internet ), 同样接入 wifi的用户设备可以使 用 hotspot设备中的某些功能。 但是, 如果用户设备要使用 GPS功能, 获取 GPS定位信息,就必须使用线缆连接到 hotspot设备,安装驱动,获取 hotspot 设备中的 GPS定位信息, 实现 GPS定位, 此时只能单人独享 GPS功能, 其他的用户设备因无法获取 GPS定位信息, 所以无法使用 GPS功能。 发明内容  Take the current hotspot products as an example. Almost all hotspot devices support the Global Positioning System (GPS) function. The main working method of hotspot devices is to access the Internet (Internet) via wireless fidelity (wifi). User devices that access wifi can use certain features in the hotspot device. However, if the user equipment wants to use the GPS function to obtain GPS location information, it must use a cable to connect to the hotspot device, install the driver, obtain the GPS location information in the hotspot device, and realize GPS positioning. At this time, only one person can enjoy the GPS alone. Function, other user equipment cannot use GPS function because GPS location information cannot be obtained. Summary of the invention
有鉴于此, 本发明的主要目的在于提供一种网络设备功能共享的方法 及***, 实现网络设备功能共享, 提高设备利用率。 为解决上述技术问题, 本发明的技术方案如下所述: In view of this, the main purpose of the present invention is to provide a method and system for sharing function of a network device, to realize function sharing of the network device, and to improve device utilization. In order to solve the above technical problem, the technical solution of the present invention is as follows:
本发明提供了一种网络设备功能共享的方法, 包括: 虚拟设备向网络 设备发送激活请求, 网络设备确定虚拟设备合法, 允许虚拟设备激活, 虚 拟设备激活自身驱动, 并在虚拟设备主机上枚举, 根据网络协议与网络设 备传输功能数据。  The invention provides a method for sharing function of a network device, comprising: the virtual device sending an activation request to the network device, the network device determining that the virtual device is legal, allowing the virtual device to be activated, the virtual device activating the self-driver, and enumerating on the virtual device host Transfer function data according to network protocols and network devices.
上述方案中, 所述虚拟设备向网络设备发送激活请求之前, 需要进行 下面的操作步驟:  In the foregoing solution, before the virtual device sends an activation request to the network device, the following operations are performed:
网络设备每隔一定时间发送广播消息, 虚拟设备启动自身功能驱动的 后台服务, 接收网络设备的广播消息, 确定网络设备支持本虚拟设备, 向 网络设备发送激活请求; 或者, 虚拟设备启动自身功能驱动的后台服务, 向网络设备发送激活请求。 网络设备向虚拟设备发送鉴权方法及鉴权参数, 虚拟设备根据鉴权方法及 鉴权参数获取鉴权结果, 同自身预置的鉴权结果比较, 确定两者相符, 将 鉴权结果发送给网络设备, 网络设备将接收的鉴权结果同自身预置的鉴权 结果比较, 确定两者相符, 则虚拟设备合法。  The network device sends a broadcast message at a certain time. The virtual device starts a background service driven by its function, receives a broadcast message of the network device, determines that the network device supports the virtual device, and sends an activation request to the network device; or, the virtual device starts its own function driver. The background service sends an activation request to the network device. The network device sends the authentication method and the authentication parameter to the virtual device, and the virtual device obtains the authentication result according to the authentication method and the authentication parameter, compares with the preset authentication result, determines that the two match, and sends the authentication result to the virtual device. The network device, the network device compares the received authentication result with the preset authentication result to determine that the two match, and the virtual device is legal.
上述方案中, 所述在虚拟设备主机上枚举包括: 虚拟设备通过网络设 备进行复位, 与虚拟设备主机之间建立控制通道; 虚拟设备主机读取虚拟 设备的虚拟设备描述符, 根据虚拟设备描述符为虚拟设备挂载接口驱动, 与虚拟设备协商配置, 虚拟设备正常工作。  In the above solution, the enumerating on the virtual device host includes: the virtual device resets through the network device, and establishes a control channel with the virtual device host; the virtual device host reads the virtual device descriptor of the virtual device, according to the virtual device description. The virtual device mounts the interface driver and negotiates with the virtual device to configure the virtual device to work normally.
上述方案中, 所述根据网络协议与网络设备传输功能数据包括: 网络 设备将数据封装成网络协议支持的数据格式, 通过自身生成的临时密钥加 密后, 通过网络协议发送给虚拟设备; 虚拟设备根据接收的网络设备发送 的密钥对接收的数据进行解密, 实现自身功能。  In the above solution, the transmitting the function data according to the network protocol and the network device includes: the network device encapsulates the data into a data format supported by the network protocol, encrypts the temporary key generated by itself, and sends the data to the virtual device through the network protocol; The received data is decrypted according to the key sent by the received network device to implement its own function.
上述方案中, 该方法进一步包括: 虚拟设备非法, 网络设备拒绝虚拟 设备当前的激活请求, 并对所述虚拟设备下一次的激活请求延时处理, 若 连续 N次均确定所述虚拟设备非法, 则拒绝所述虚拟设备的所有请求。 In the foregoing solution, the method further includes: the virtual device is illegal, and the network device rejects the virtual The device currently activates the request, and delays the activation request of the virtual device for the next time. If the virtual device is determined to be illegal for N consecutive times, all requests of the virtual device are rejected.
本发明还提供了一种网络设备功能共享的***, 包括: 服务模块、 驱 动模块以及主机枚举模块;  The invention also provides a system for sharing function of a network device, comprising: a service module, a driving module and a host enumeration module;
驱动模块, 用于向服务模块发送激活请求, 激活自身驱动, 通过主机 枚举模块进行枚举, 根据网络协议与服务模块传输功能数据;  a driving module, configured to send an activation request to the service module, activate the self-driver, enumerate through the host enumeration module, and transmit the function data according to the network protocol and the service module;
服务模块, 用于确定驱动模块合法, 允许驱动模块激活, 根据网络协 议与驱动模块传输功能数据;  a service module, configured to determine that the driving module is legal, allows the driving module to be activated, and transmits function data according to the network protocol and the driving module;
主机枚举模块, 用于对驱动模块进行枚举。  The host enumeration module is used to enumerate the driver modules.
上述方案中, 所述服务模块进一步包括服务激活单元、 驱动模块进一 步包括驱动激活单元;  In the above solution, the service module further includes a service activation unit, and the drive module further includes a drive activation unit;
所述服务激活单元, 用于每隔一定时间发送广播消息, 接收驱动激活 单元的激活请求; 或, 接收驱动激活单元的激活请求;  The service activation unit is configured to send a broadcast message at a certain time, receive an activation request of the drive activation unit, or receive an activation request of the drive activation unit;
所述驱动激活单元, 用于启动自身的后台服务, 接收服务激活单元的 广播消息, 确定服务模块支持自身所在的虚拟设备, 向服务激活单元发送 激活请求; 或, 启动自身的后台服务, 向服务激活单元发送激活请求。  The driving activation unit is configured to start its own background service, receive a broadcast message of the service activation unit, determine that the service module supports the virtual device in which the service module is located, and send an activation request to the service activation unit; or, start its own background service, to the service. The activation unit sends an activation request.
上述方案中, 所述服务模块进一步包括服务鉴权单元以及服务数据处 理单元, 驱动模块进一步包括驱动鉴权单元;  In the above solution, the service module further includes a service authentication unit and a service data processing unit, and the driving module further includes a driving authentication unit;
所述服务鉴权单元, 用于向驱动鉴权单元发送鉴权方法及鉴权参数, 接收驱动鉴权单元回复的鉴权结果, 同自身预置的鉴权结果比较, 确定两 者相符, 则驱动模块合法; 通知服务数据处理单元及服务激活单元; 否则, 驱动模块非法, 通知服务激活单元;  The service authentication unit is configured to send an authentication method and an authentication parameter to the driving authentication unit, receive an authentication result replied by the driving authentication unit, and compare with the authentication result preset by itself to determine that the two match, The driver module is legal; the service data processing unit and the service activation unit are notified; otherwise, the driver module is illegal, and the service activation unit is notified;
相应的, 所述驱动鉴权单元, 用于根据接收的鉴权方法及鉴权参数进 行鉴权, 获取鉴权结果, 同自身预置的鉴权结果比较, 确定两者相符, 将 鉴权结果发送给服务鉴权单元。 上述方案中, 所述驱动模块进一步包括驱动枚举单元; Correspondingly, the driving authentication unit is configured to perform authentication according to the received authentication method and the authentication parameter, obtain an authentication result, compare with the preset authentication result, and determine that the two match, and the authentication result is obtained. Send to the service authentication unit. In the above solution, the driving module further includes a driving enumeration unit;
所述驱动枚举单元, 用于向主机枚举模块发送就绪消息, 通过主机枚 举模块进行复位, 与主机枚举模块之间建立控制通道, 并进行配置协商; 相应的, 所述主机枚举模块, 用于根据接收的驱动枚举单元的就绪消 息, 要求驱动枚举单元进行复位, 与驱动枚举单元建立控制通道, 为驱动 模块分配地址; 根据读取的驱动枚举单元的虚拟设备描述符, 为驱动模块 挂载驱动, 与驱动枚举单元进行配置协商。  The driving enumeration unit is configured to send a ready message to the host enumeration module, reset by the host enumeration module, establish a control channel with the host enumeration module, and perform configuration negotiation; correspondingly, the host enumeration a module, configured to drive the enumeration unit to perform reset according to the received ready message of the driven enumeration unit, establish a control channel with the driving enumeration unit, and allocate an address for the driving module; and describe the virtual device according to the read driving enumeration unit For the driver module to mount the driver, negotiate the configuration with the driver enumeration unit.
上述方案中, 所述驱动模块进一步包括驱动数据处理单元;  In the above solution, the driving module further includes a driving data processing unit;
所述服务数据处理单元, 用于确定驱动模块合法, 将功能数据封装成 网络协议支持的数据格式, 通过自身生成的临时密钥加密后, 根据网络协 议发送给驱动数据处理单元; 所述允许激活信息中包含临时密钥;  The service data processing unit is configured to determine that the driving module is legal, and the function data is encapsulated into a data format supported by the network protocol, and is encrypted by the temporary key generated by itself, and then sent to the driving data processing unit according to the network protocol; The information contains a temporary key;
所述驱动数据处理单元, 用于根据接收的服务数据处理单元发送的临 时密钥, 对服务数据处理单元发送的功能数据进行解密, 实现自身功能。  The driving data processing unit is configured to decrypt the function data sent by the service data processing unit according to the temporary key sent by the received service data processing unit to implement its own function.
上述方案中, 所述服务激活单元进一步用于, 确定驱动模块非法, 拒 绝驱动激活单元当前的激活请求, 并对所述驱动激活单元的下一次激活请 求延时处理, 若连续 N次均确定所述驱动模块非法, 则拒绝所述驱动模块 的所有请求。  In the above solution, the service activation unit is further configured to: determine that the driving module is illegal, refuse to drive the activation request of the activation unit, and delay processing the next activation request of the driving activation unit, if the N times are determined continuously If the driver module is illegal, all requests of the driver module are rejected.
由此可见, 采用本发明所述的方法及***, 虚拟设备与网络设备通过 无线网络相连, 网络设备对虚拟设备进行合法认证后, 允许虚拟设备激活, 虚拟设备通过枚举, 模拟物理设备通过接口接入虚拟设备主机的方式, 与 虚拟设备主机通信, 网络设备将功能数据发送给虚拟设备, 虚拟设备主机 通过虚拟设备实现网络设备的功能, 虚拟设备主机与网络设备实现无线网 络中网络设备功能的共享, 提高设备利用率。  It can be seen that, by using the method and system of the present invention, the virtual device and the network device are connected through a wireless network, and after the network device performs the legal authentication on the virtual device, the virtual device is allowed to be activated, and the virtual device is enumerated to simulate the physical device through the interface. The virtual device host communicates with the virtual device host, the network device sends the function data to the virtual device, and the virtual device host implements the function of the network device through the virtual device, and the virtual device host and the network device implement the network device function in the wireless network. Share, improve device utilization.
进一步的, 本发明方案中对功能数据通过临时密钥加密, 提高了数据 传输安全性。 附图说明 Further, in the solution of the present invention, the function data is encrypted by the temporary key, thereby improving the security of data transmission. DRAWINGS
图 1为本发明实现网络设备功能共享的方法流程示意图;  1 is a schematic flowchart of a method for implementing function sharing of a network device according to the present invention;
图 2为本发明虚拟设备在虚拟设备主机上枚举的流程示意图; 图 3为本发明实现网络设备功能共享的虚脱组成示意图。 具体实施方式  2 is a schematic diagram of a process of enumerating virtual devices on a virtual device host according to the present invention; FIG. 3 is a schematic diagram of a virtual composition of network device function sharing according to the present invention. detailed description
本发明的基本思想是: 虚拟设备向网络设备发送激活请求, 网络设备 确定虚拟设备合法, 允许虚拟设备激活, 虚拟设备激活自身驱动, 并在虚 拟设备主机上枚举, 根据网络协议与网络设备传输功能数据。  The basic idea of the present invention is: The virtual device sends an activation request to the network device, the network device determines that the virtual device is legal, allows the virtual device to activate, the virtual device activates its own driver, and enumerates on the virtual device host, and transmits according to the network protocol and the network device. Functional data.
其中, 所述网络设备包含若干功能, 也可以称之为应用, 所述虚拟设 备, 位于用户设备, 是用户设备上的功能模块, 自身包含与网络设备厂商 类型匹配的功能驱动, 与所述网络设备的功能——对应, 所述用户设备也 可以称之为虚拟设备主机, 是要使用网络设备功能的设备, 通过无线网络 与网络设备相连; 对于网络设备, 虚拟设备通过模拟物理设备接入虚拟设 备主机的方式, 实现虚拟设备主机与网络设备无线连接, 使用网络设备上 的功能。  The network device includes a plurality of functions, which may also be referred to as an application. The virtual device, located in the user equipment, is a functional module on the user equipment, and includes a function driver matched with a network device vendor type, and the network. The function of the device - correspondingly, the user equipment may also be referred to as a virtual device host, which is a device that uses a network device function, and is connected to the network device through a wireless network; for the network device, the virtual device accesses the virtual device by simulating the physical device The mode of the device host enables the virtual device host to wirelessly connect to the network device and use the functions on the network device.
下面通过具体实施例与附图来对本发明进行详细说明。  The invention will now be described in detail by way of specific embodiments and drawings.
本发明提供了一种网络设备功能共享的方法, 如图 1所示:  The invention provides a method for sharing function of a network device, as shown in FIG. 1:
步驟 101、 虚拟设备向网络设备发送激活请求;  Step 101: The virtual device sends an activation request to the network device.
网络设备正常启动后, 每隔一定时间发送广播消息, 所述广播消息中 包括自身身份识别号码(ID )、 自身的功能; 虚拟设备启动自身驱动的后台 服务, 接收网络设备的广播消息, 将广播消息中的功能与自身支持的功能 相比, 若有与自身支持的功能相符的, 则确定网络设备支持本虚拟设备, 向网络设备发送激活请求, 所述激活请求中包含自身支持的功能; 或者, 虚拟设备启动自身驱动的后台服务, 向网络设备发送激活请求。 这里 要说明的是, 本发明方案中, 虚拟设备与网络设备之间, 是通过虚拟设备 主机与网络设备的无线连接进行通信。 After the network device is started normally, the broadcast message is sent at regular intervals. The broadcast message includes its own identification number (ID) and its own function. The virtual device starts its own background service and receives the broadcast message of the network device. The function in the message is compared with the function supported by itself, if it is consistent with the function supported by itself, it is determined that the network device supports the virtual device, and sends an activation request to the network device, where the activation request includes a function supported by itself; or The virtual device starts its own background service and sends an activation request to the network device. It should be noted that, in the solution of the present invention, between the virtual device and the network device, the virtual device is used. The host communicates with the wireless connection of the network device.
步驟 102、 网络设备判断虚拟设备是否合法,如果合法,执行步驟 103; 否则, 执行步驟 104。  Step 102: The network device determines whether the virtual device is legal. If it is legal, go to step 103; otherwise, go to step 104.
网络设备接收虚拟设备发送的激活请求, 给虚拟设备建立临时 ID, 将 ID与所述激活请求中支持的功能对应。所述 ID可以根据现有技术中的方法 建立, 例如随机数算法。  The network device receives the activation request sent by the virtual device, establishes a temporary ID for the virtual device, and associates the ID with a function supported in the activation request. The ID can be established according to methods in the prior art, such as a random number algorithm.
网络设备向虚拟设备发送鉴权方法及鉴权参数, 虚拟设备根据鉴权方 法及鉴权参数进行鉴权, 获取鉴权结果, 同本地预置的鉴权结果比较, 若 两者相符, 则网络设备合法, 向网络设备发送鉴权结果; 若两者不符, 则 网络设备非法, 将鉴权结果发送给网络设备, 同时终止与网络设备之间的 信息交互, 流程结束。 所述鉴权方法可以采用现有技术中任意一种, 例如 非对称鉴权算法、 对称鉴权算法等, 所述预置为预置在虚拟设备的驱动程 序中。  The network device sends the authentication method and the authentication parameter to the virtual device, and the virtual device performs authentication according to the authentication method and the authentication parameter, and obtains the authentication result, and compares with the locally preset authentication result. If the two match, the network The device is legal, and the authentication result is sent to the network device. If the two do not match, the network device is illegal, and the authentication result is sent to the network device, and the information interaction with the network device is terminated, and the process ends. The authentication method may be any one of the prior art, for example, an asymmetric authentication algorithm, a symmetric authentication algorithm, etc., and the preset is preset in a driver of the virtual device.
网络设备接收鉴权结果, 同本地预置的鉴权结果比较, 若两者相符, 则虚拟设备合法, 执行步驟 103; 若两者不符, 执行步驟 104, 其中, 所述 预置为预置在网络设备的服务程序中。  The network device receives the authentication result and compares it with the locally preset authentication result. If the two match, the virtual device is legal, and step 103 is performed. If the two do not match, step 104 is performed, where the preset is preset. In the service program of the network device.
步驟 103、 允许虚拟设备激活, 虚拟设备激活自身驱动, 并在虚拟设备 主机中枚举, 根据网络协议与网络设备传输功能数据, 实现自身功能, 例 如 U盘功能。  Step 103: Allow the virtual device to be activated, the virtual device activates its own driver, and enumerates in the virtual device host, and implements its own function according to the network protocol and the network device to transmit the function data, for example, the U disk function.
网络设备向虚拟设备发送允许激活信息, 所述允许激活信息中包含临 时密钥, 虚拟设备接收允许激活信息, 启动自身驱动。 虚拟设备在虚拟设 备主机中枚举, 模拟物理设备接入, 对于虚拟设备主机来说, 虚拟设备可 看做是物理设备通过虚拟设备主机的接口与虚拟设备主机连接。  The network device sends the permission activation information to the virtual device, the permission activation information includes a temporary key, and the virtual device receives the permission activation information to start the self-drive. The virtual device is enumerated in the virtual device host to simulate physical device access. For the virtual device host, the virtual device can be regarded as a physical device connected to the virtual device host through the interface of the virtual device host.
然后, 网络设备根据虚拟设备 ID及对应的支持的功能, 向虚拟设备发 送所述功能的数据, 虚拟设备主机可读取虚拟设备接收的数据。 所述发送 为网络设备将数据封装成网络协议支持的数据格式, 通过自身生成的临时 密钥加密后, 通过网络协议发送给虚拟设备。 虚拟设备根据临时密钥, 对 接收的数据进行解密, 实现自身功能。 所述临时密钥可以通过现有技术中 的任意一种方法生成, 例如随机数算法等, 并且每隔一定时间, 网络设备 重新生成新的临时密钥, 发送给虚拟设备, 虚拟设备根据新的临时密钥接 收数据。 其中, 每隔一定时间的时间间隔可根据需要设定。 Then, the network device sends the data of the function to the virtual device according to the virtual device ID and the corresponding supported function, and the virtual device host can read the data received by the virtual device. The sending The data is encapsulated into a data format supported by the network protocol for the network device, encrypted by the temporary key generated by itself, and then sent to the virtual device through the network protocol. The virtual device decrypts the received data according to the temporary key to implement its own functions. The temporary key may be generated by any one of the methods in the prior art, such as a random number algorithm, and the network device regenerates a new temporary key and sends it to the virtual device at a certain time. The virtual device is based on the new one. The temporary key receives data. Among them, the time interval at regular intervals can be set as needed.
其中, 所述虚拟设备在网络设备中枚举过程如图 1所示, 具体步驟如 下:  The enumeration process of the virtual device in the network device is as shown in FIG. 1 , and the specific steps are as follows:
步驟 1031、 虚拟设备通过虚拟设备主机进行复位;  Step 1031: The virtual device is reset by using the virtual device host.
具体为, 虚拟设备向虚拟设备主机发送就绪消息, 虚拟设备主机接收 虚拟设备发送的就绪消息, 向虚拟设备发送复位请求, 虚拟设备接收复位 请求, 进行复位, 所述复位为: 虚拟设备模拟物理设备的重启过程。  Specifically, the virtual device sends a ready message to the virtual device host, the virtual device host receives the ready message sent by the virtual device, sends a reset request to the virtual device, and the virtual device receives the reset request, and performs resetting, where the reset is: virtual device emulating physical device The restart process.
步驟 1032、 虚拟设备主机与虚拟设备之间建立控制通道;  Step 1032: Establish a control channel between the virtual device host and the virtual device.
主机与虚拟设备之间, 模拟物理设备与主机之间的信令协议, 建立控 制通道; 虚拟设备向虚拟设备主机发送地址请求, 虚拟设备主机生成地址, 发送给虚拟设备, 所述地址的生成可以采用现有技术中的方法, 例如随机 数算法等。 虚拟设备与虚拟设备主机之间的通信携带地址, 以便虚拟设备 主机识别虚拟设备。  The host and the virtual device simulate the signaling protocol between the physical device and the host to establish a control channel. The virtual device sends an address request to the virtual device host, and the virtual device host generates an address and sends the address to the virtual device. A method in the prior art, such as a random number algorithm or the like, is employed. The communication between the virtual device and the virtual device host carries the address so that the virtual device host recognizes the virtual device.
步驟 1033、 虚拟设备主机读取虚拟设备的虚拟设备描述符, 根据虚拟 设备描述符为虚拟设备挂载接口驱动, 与虚拟设备协商配置, 虚拟设备正 常工作。  Step 1033: The virtual device host reads the virtual device descriptor of the virtual device, mounts the interface driver for the virtual device according to the virtual device descriptor, and negotiates the configuration with the virtual device, and the virtual device works normally.
虚拟设备主机向虚拟设备发送获取虚拟设备描述符请求, 虚拟设备将 本地预存的虚拟设备描述符回复给虚拟设备主机; 所述虚拟设备描述符用 于描述虚拟设备的类型以及可以实现的功能, 例如为通用串行总线(USB ) 设备, 实现 U盘功能; 虚拟设备主机根据虚拟设备描述符选择自身保存的接口驱动并加载, 例如, 假设 USB设备, 则选择 USB接口驱动并加载。 The virtual device host sends a virtual device descriptor request to the virtual device, and the virtual device returns the locally pre-stored virtual device descriptor to the virtual device host; the virtual device descriptor is used to describe the type of the virtual device and functions that can be implemented, for example, U disk function for Universal Serial Bus (USB) devices; The virtual device host selects and saves the interface driver saved by itself according to the virtual device descriptor. For example, if a USB device is assumed, the USB interface driver is selected and loaded.
虚拟设备与虚拟设备主机之间进行配置协商, 确定虚拟设备配置, 虚 拟设备可正常工作。 所述配置协商为模拟现有技术中物理设备与虚拟设备 主机之间的配置协商, 虚拟设备向虚拟设备主机发送自身配置, 虚拟设备 主机接收所述配置, 向虚拟设备发送确定配置消息, 则虚拟设备与虚拟设 备主机之间按照所述确定的配置进行信息传输, 所述配置与虚拟设备的设 备类型有关。 例如, 虚拟设备与虚拟设备主机之间模拟配置协商, 假设虚 拟设备为 USB高速设备, 虚拟设备向虚拟设备主机发送自身的数据传输速 度, 虚拟设备主机接收所述数据传输速度后, 向虚拟设备发送确定数据传 输速度消息, 则虚拟设备与虚拟设备主机之间按照该速度进行信号传输。  Configuration negotiation between the virtual device and the virtual device host determines the virtual device configuration, and the virtual device works normally. The configuration negotiation is to simulate the configuration negotiation between the physical device and the virtual device host in the prior art, and the virtual device sends the configuration to the virtual device host. The virtual device host receives the configuration and sends a determination configuration message to the virtual device. Information is transmitted between the device and the virtual device host according to the determined configuration, and the configuration is related to the device type of the virtual device. For example, the virtual device is configured as a USB high-speed device, and the virtual device sends its own data transmission speed to the virtual device host. After receiving the data transmission speed, the virtual device host sends the data transmission speed to the virtual device. When the data transmission speed message is determined, the virtual device and the virtual device host perform signal transmission at the speed.
步驟 104、 网络设备拒绝虚拟设备的激活请求。  Step 104: The network device rejects the activation request of the virtual device.
具体为: 网络设备确定虚拟设备非法, 拒绝虚拟设备当前的激活请求, 并对所述虚拟设备下一次的激活请求延时处理, 若连续 N次均确定所述虚 拟设备非法, 则拒绝所述虚拟设备的所有请求, 直至网络设备重新启动。 所述延时的时间可根据需要设定, 所述 N的大小可根据需要设定。  Specifically, the network device determines that the virtual device is illegal, rejects the current activation request of the virtual device, and delays the activation request of the virtual device for the next time. If the virtual device is determined to be illegal for N consecutive times, the virtual device is rejected. All requests from the device until the network device is restarted. The time of the delay may be set as needed, and the size of the N may be set as needed.
通过以上方法, 虚拟设备经过网络设备的合法认证后, 激活自身驱动, 通过枚举, 以虚拟有线连接的方式与虚拟设备主机相连, 实现了虚拟设备 主机与网络设备之间网络接口的映射, 从而使虚拟设备主机通过无线网络 与网络设备连接时, 可以获取网络设备的功能数据, 实现自身功能, 这样, 位于同一个虚拟设备主机或不同的虚拟设备主机上的多个虚拟设备可同时 从网络设备获取功能数据, 实现虚拟设备功能, 从而实现网络设备功能的 共享。  After the virtual device is authenticated by the network device, the virtual device activates its own driver and connects to the virtual device host through a virtual wired connection through enumeration, thereby realizing the mapping between the virtual device host and the network device. When the virtual device host is connected to the network device through the wireless network, the function data of the network device can be obtained to implement its own function, so that multiple virtual devices located on the same virtual device host or different virtual device hosts can simultaneously access the network device. Obtain functional data and implement virtual device functions to share network device functions.
基于以上方法, 本发明还提供了一种网络设备功能共享的***, 如图 3 所示, 该***包括: 服务模块 302、 驱动模块 301以及主机枚举模块 303; 其中, 服务模块 302位于网络设备, 驱动模块 301是虚拟设备的驱动程序, 位于虚拟设备主机, 主机枚举模块 303位于虚拟设备主机。 Based on the above method, the present invention further provides a network device function sharing system, as shown in FIG. 3, the system includes: a service module 302, a driver module 301, and a host enumeration module 303; The service module 302 is located in the network device, the driver module 301 is a driver of the virtual device, is located in the virtual device host, and the host enumeration module 303 is located in the virtual device host.
驱动模块 301 , 用于向服务模块 302发起激活请求, 激活自身驱动, 通 过主机枚举模块 303进行枚举, 根据网络协议与服务模块 302传输功能数 据;  The driving module 301 is configured to initiate an activation request to the service module 302, activate the self-driver, perform enumeration by the host enumeration module 303, and transmit the function data according to the network protocol and the service module 302.
服务模块 302, 用于接收驱动模块 301的激活请求, 确定驱动模块 301 合法, 允许驱动模块 301激活, 根据网络协议同驱动模块 301传输功能数 据; 否则, 拒绝驱动模块 301的激活请求;  The service module 302 is configured to receive an activation request of the driving module 301, determine that the driving module 301 is legal, allow the driving module 301 to activate, and transmit the function data to the driving module 301 according to the network protocol; otherwise, reject the activation request of the driving module 301;
主机枚举模块 303 , 用于对驱动模块 301进行枚举。  The host enumeration module 303 is configured to enumerate the driver module 301.
所述驱动模块 301进一步包括: 驱动激活单元 3011、 服务模块 302进 一步包括: 服务激活单元 3021 ;  The driving module 301 further includes: a driving activation unit 3011, and the service module 302 further includes: a service activation unit 3021;
服务激活单元 3021进一步用于, 每隔一定时间发送广播消息, 接收驱 动激活单元 3011 的激活请求; 或, 接收驱动激活单元 3011 的激活请求; 给驱动激活单元 3011所在的虚拟设备建立临时 ID,并与驱动模块 301支持 的功能^应;  The service activation unit 3021 is further configured to: send a broadcast message at a certain time, receive an activation request of the drive activation unit 3011; or, receive an activation request of the drive activation unit 3011; establish a temporary ID for the virtual device where the drive activation unit 3011 is located, and And the function supported by the driver module 301 should be;
驱动激活单元 3011进一步用于, 启动自身的后台服务, 接收服务激活 单元 3021的广播消息, 确定服务激活单元 3021支持自身所在的虚拟设备, 向服务激活单元 3021发送激活请求; 或, 启动自身的后台服务, 向服务激 活单元 3021发送激活请求, 所述激活请求中包括自身支持的功能。  The driving activation unit 3011 is further configured to start its own background service, receive a broadcast message of the service activation unit 3021, determine that the service activation unit 3021 supports the virtual device in which it is located, and send an activation request to the service activation unit 3021; or, start its own background. The service sends an activation request to the service activation unit 3021, which includes the functions supported by itself.
所述服务模块 302进一步包括: 服务鉴权单元 3022、 服务数据处理单 元 3023; 驱动模块 301进一步包括驱动鉴权单元 3012;  The service module 302 further includes: a service authentication unit 3022, a service data processing unit 3023; the driver module 301 further includes a drive authentication unit 3012;
所述服务鉴权单元 3022,向驱动鉴权单元 3012发送鉴权方法及鉴权参 数, 将接收的驱动鉴权单元 3012发送的鉴权结果同预置的鉴权结果比较, 若两者相符, 则确定驱动模块 301合法, 通知服务数据处理单元 3023及服 务激活单元 3021 ; 否则, 确定驱动模块 301非法,通知服务激活单元 3011 ; 相应的, 驱动鉴权单元 3012具体用于, 根据接收的鉴权方法及鉴权参 数进行鉴权, 获取鉴权结果, 同预置的鉴权结果比较, 确定两者相同, 则 服务模块 302合法, 将鉴权结果发送给服务鉴权单元 3022; 否则, 服务模 块 302非法, 将鉴权结果发送给服务鉴权单元 3022。 The service authentication unit 3022 sends an authentication method and an authentication parameter to the driving authentication unit 3012, and compares the authentication result sent by the received driving authentication unit 3012 with the preset authentication result. If the two match, Then, it is determined that the driving module 301 is legal, and the service data processing unit 3023 and the service activation unit 3021 are notified; otherwise, it is determined that the driving module 301 is illegal, and the service activation unit 3011 is notified; Correspondingly, the driving authentication unit 3012 is specifically configured to: perform authentication according to the received authentication method and the authentication parameter, obtain an authentication result, and compare with the preset authentication result to determine that the two are the same, then the service module 302 is legal. The authentication result is sent to the service authentication unit 3022; otherwise, the service module 302 is illegal, and the authentication result is sent to the service authentication unit 3022.
所述驱动模块 301进一步包括: 驱动枚举单元 3014;  The driving module 301 further includes: a driving enumeration unit 3014;
服务激活单元 3021具体用于, 确定驱动模块 301非法, 拒绝驱动激活 单元 3011 当前的激活请求, 并对所述驱动激活单元 3011 下一次的激活请 求延时处理, 连续 N次均确定所述驱动模块 301非法, 则拒绝所述驱动模 块 301的所有请求; 确定驱动模块 301合法, 向驱动激活单元 3011发送允 许激活信息;  The service activation unit 3021 is specifically configured to: determine that the driving module 301 is illegal, reject the current activation request of the driving activation unit 3011, and delay the activation request of the driving activation unit 3011 for the next time, and determine the driving module for N consecutive times. If the 301 is illegal, all the requests of the driving module 301 are rejected; determining that the driving module 301 is legal, and transmitting the permission activation information to the driving activation unit 3011;
所述驱动激活单元 3011 , 用于激活自身驱动, 并通知驱动枚举单元 3014。  The drive activation unit 3011 is configured to activate its own drive and notify the drive enumeration unit 3014.
所述驱动枚举单元 3014, 用于向主机枚举模块 303发送就绪消息, 通 过主机枚举模块 303进行复位, 与主机枚举模块 303之间建立控制通道, 并进行配置协商;  The driver enumeration unit 3014 is configured to send a ready message to the host enumeration module 303, perform a reset by the host enumeration module 303, establish a control channel with the host enumeration module 303, and perform configuration negotiation.
相应的, 主机枚举模块 303 , 用于根据接收的驱动枚举单元 3014的就 绪消息, 要求驱动枚举单元 3014进行复位, 与驱动枚举单元 3014建立控 制通道, 为驱动模块 301分配地址, 根据读取的驱动枚举单元 3014的虚拟 设备描述符, 为驱动模块 301挂载驱动, 与驱动枚举单元 3014进行配置协 商。  Correspondingly, the host enumeration module 303 is configured to: according to the ready message of the received driving enumeration unit 3014, request the driving enumeration unit 3014 to perform resetting, establish a control channel with the driving enumeration unit 3014, and allocate an address for the driving module 301, according to The read virtual device descriptor of the drive enumeration unit 3014 mounts the drive for the drive module 301, and performs configuration negotiation with the drive enumeration unit 3014.
所述驱动模块 301进一步包括: 驱动数据处理单元 3013;  The driving module 301 further includes: a driving data processing unit 3013;
服务数据处理单元 3023具体用于, 向将数据封装成网络协议支持的数 据格式, 通过自身生成的临时密钥加密, 根据网络协议将封装后的数据发 送给驱动数据处理单元 3013; 其中, 所述临时密钥每隔一定时间重新生成; 所述允许激活信息中包含临时密钥; 所述数据为虚拟设备 ID对应的功能的 数据; The service data processing unit 3023 is specifically configured to: encapsulate the data into a data format supported by the network protocol, encrypt the temporary key generated by itself, and send the encapsulated data to the driving data processing unit 3013 according to the network protocol; The temporary key is regenerated at a certain time; the permission activation information includes a temporary key; and the data is a function corresponding to the virtual device ID. Data
驱动数据处理单元 3013 ,用于根据服务数据处理单元 3023发送的临时 密钥,对服务数据处理单元 3023发送的功能数据进行解密,实现自身功能。  The drive data processing unit 3013 is configured to decrypt the function data transmitted by the service data processing unit 3023 according to the temporary key transmitted by the service data processing unit 3023 to implement its own function.
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。  The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.

Claims

权利要求书 Claim
1、 一种网络设备功能共享的方法, 其特征在于, 该方法包括: 虚拟设备向网络设备发送激活请求, 网络设备确定虚拟设备合法, 允 许虚拟设备激活, 虚拟设备激活自身驱动, 并在虚拟设备主机上枚举, 根 据网络协议与网络设备传输功能数据。  A method for sharing function of a network device, the method comprising: the virtual device sending an activation request to the network device, the network device determining that the virtual device is legal, allowing the virtual device to activate, the virtual device activating the self-driven, and the virtual device Enumerated on the host, transmitting function data according to network protocols and network devices.
2、 根据权利要求 1所述的方法, 其特征在于, 所述虚拟设备向网络设 备发送激活请求之前, 该方法进一步包括:  The method according to claim 1, wherein before the virtual device sends an activation request to the network device, the method further includes:
网络设备每隔一定时间发送广播消息, 虚拟设备启动自身功能驱动的 后台服务, 接收网络设备的广播消息, 确定网络设备支持本虚拟设备, 向 网络设备发送激活请求; 或者,  The network device sends a broadcast message at a certain time. The virtual device starts a background service driven by its function, receives a broadcast message of the network device, determines that the network device supports the virtual device, and sends an activation request to the network device; or
虚拟设备启动自身功能驱动的后台服务, 向网络设备发送激活请求。 The virtual device starts its own function-driven background service and sends an activation request to the network device.
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述网络设备确定 虚拟设备合法包括: The method according to claim 1 or 2, wherein the determining, by the network device, that the virtual device is legal comprises:
网络设备向虚拟设备发送鉴权方法及鉴权参数, 虚拟设备根据鉴权方 法及鉴权参数获取鉴权结果, 同自身预置的鉴权结果比较, 确定两者相符, 将鉴权结果发送给网络设备, 网络设备将接收的鉴权结果同自身预置的鉴 权结果比较, 确定两者相符, 则虚拟设备合法。  The network device sends the authentication method and the authentication parameter to the virtual device, and the virtual device obtains the authentication result according to the authentication method and the authentication parameter, compares with the preset authentication result, determines that the two match, and sends the authentication result to the virtual device. The network device, the network device compares the received authentication result with the preset authentication result to determine that the two match, and the virtual device is legal.
4、 根据权利要求 3所述的方法, 其特征在于, 所述在虚拟设备主机上 枚举包括:  4. The method according to claim 3, wherein the enumerating on the virtual device host comprises:
虚拟设备通过网络设备进行复位, 与虚拟设备主机之间建立控制通道; 虚拟设备主机读取虚拟设备的虚拟设备描述符, 根据虚拟设备描述符为虚 拟设备挂载接口驱动, 与虚拟设备协商配置, 虚拟设备正常工作。  The virtual device is reset by the network device, and a control channel is established with the virtual device host; the virtual device host reads the virtual device descriptor of the virtual device, mounts the interface driver for the virtual device according to the virtual device descriptor, and negotiates the configuration with the virtual device. The virtual device is working properly.
5、 根据权利要求 3所述的方法, 其特征在于, 所述根据网络协议与网 络设备传输功能数据包括:  The method according to claim 3, wherein the transmitting the function data according to the network protocol and the network device comprises:
网络设备将数据封装成网络协议支持的数据格式, 通过自身生成的临 时密钥加密后, 通过网络协议发送给虚拟设备; 虚拟设备根据接收的网络 设备发送的密钥对接收的数据进行解密, 实现自身功能。 The network device encapsulates the data into a data format supported by the network protocol, through its own generated Pro After the key is encrypted, it is sent to the virtual device through the network protocol; the virtual device decrypts the received data according to the key sent by the received network device to implement its own function.
6、 根据权利要求 3所述的方法, 其特征在于, 该方法进一步包括: 虚拟设备非法, 网络设备拒绝虚拟设备当前的激活请求, 并对所述虚 拟设备下一次的激活请求延时处理,若连续 N次均确定所述虚拟设备非法, 则拒绝所述虚拟设备的所有请求。  The method according to claim 3, wherein the method further comprises: the virtual device is illegal, the network device rejects the current activation request of the virtual device, and delays the next activation request of the virtual device, if If it is determined that the virtual device is illegal for N consecutive times, all requests of the virtual device are rejected.
7、 一种网络设备功能共享的***, 其特征在于, 该***包括: 服务模 块、 驱动模块以及主机枚举模块;  7. A system for sharing network device functions, the system comprising: a service module, a driver module, and a host enumeration module;
驱动模块, 用于向服务模块发送激活请求, 激活自身驱动, 通过主机 枚举模块进行枚举, 根据网络协议与服务模块传输功能数据;  a driving module, configured to send an activation request to the service module, activate the self-driver, enumerate through the host enumeration module, and transmit the function data according to the network protocol and the service module;
服务模块, 用于确定驱动模块合法, 允许驱动模块激活, 根据网络协 议与驱动模块传输功能数据;  a service module, configured to determine that the driving module is legal, allows the driving module to be activated, and transmits function data according to the network protocol and the driving module;
主机枚举模块, 用于对驱动模块进行枚举。  The host enumeration module is used to enumerate the driver modules.
8、 根据权利要求 7所述的***, 其特征在于, 所述服务模块进一步包 括服务激活单元、 驱动模块进一步包括驱动激活单元;  8. The system according to claim 7, wherein the service module further comprises a service activation unit, and the drive module further comprises a drive activation unit;
所述服务激活单元, 用于每隔一定时间发送广播消息, 接收驱动激活 单元的激活请求; 或, 接收驱动激活单元的激活请求;  The service activation unit is configured to send a broadcast message at a certain time, receive an activation request of the drive activation unit, or receive an activation request of the drive activation unit;
所述驱动激活单元, 用于启动自身的后台服务, 接收服务激活单元的 广播消息, 确定服务模块支持自身所在的虚拟设备, 向服务激活单元发送 激活请求; 或, 启动自身的后台服务, 向服务激活单元发送激活请求。  The driving activation unit is configured to start its own background service, receive a broadcast message of the service activation unit, determine that the service module supports the virtual device in which the service module is located, and send an activation request to the service activation unit; or, start its own background service, to the service. The activation unit sends an activation request.
9、 根据权要求 7或 8所述的***, 其特征在于, 所述服务模块进一步 包括服务鉴权单元以及服务数据处理单元, 驱动模块进一步包括驱动鉴权 单元;  The system of claim 7 or 8, wherein the service module further comprises a service authentication unit and a service data processing unit, the drive module further comprising a drive authentication unit;
所述服务鉴权单元, 用于向驱动鉴权单元发送鉴权方法及鉴权参数, 接收驱动鉴权单元回复的鉴权结果, 同自身预置的鉴权结果比较, 确定两 者相符, 则驱动模块合法; 通知服务数据处理单元及服务激活单元; 否则, 驱动模块非法, 通知服务激活单元; The service authentication unit is configured to send an authentication method and an authentication parameter to the driving authentication unit, and receive an authentication result replied by the driving authentication unit, and compare with the authentication result preset by itself to determine two If the match is met, the driver module is legal; the service data processing unit and the service activation unit are notified; otherwise, the driver module is illegal, and the service activation unit is notified;
相应的, 所述驱动鉴权单元, 用于根据接收的鉴权方法及鉴权参数进 行鉴权, 获取鉴权结果, 同自身预置的鉴权结果比较, 确定两者相符, 将 鉴权结果发送给服务鉴权单元。  Correspondingly, the driving authentication unit is configured to perform authentication according to the received authentication method and the authentication parameter, obtain an authentication result, compare with the preset authentication result, and determine that the two match, and the authentication result is obtained. Send to the service authentication unit.
10、 根据权利要求 9所述的***, 其特征在于, 所述驱动模块进一步 包括驱动枚举单元;  10. The system according to claim 9, wherein the driving module further comprises a driving enumeration unit;
所述驱动枚举单元, 用于向主机枚举模块发送就绪消息, 通过主机枚 举模块进行复位, 与主机枚举模块之间建立控制通道, 并进行配置协商; 相应的, 所述主机枚举模块, 用于根据接收的驱动枚举单元的就绪消 息, 要求驱动枚举单元进行复位, 与驱动枚举单元建立控制通道, 为驱动 模块分配地址; 根据读取的驱动枚举单元的虚拟设备描述符, 为驱动模块 挂载驱动, 与驱动枚举单元进行配置协商。  The driving enumeration unit is configured to send a ready message to the host enumeration module, reset by the host enumeration module, establish a control channel with the host enumeration module, and perform configuration negotiation; correspondingly, the host enumeration a module, configured to drive the enumeration unit to perform reset according to the received ready message of the driven enumeration unit, establish a control channel with the driving enumeration unit, and allocate an address for the driving module; and describe the virtual device according to the read driving enumeration unit For the driver module to mount the driver, negotiate the configuration with the driver enumeration unit.
11、 根据权利要求 9所述的***, 其特征在于, 所述驱动模块进一步 包括驱动数据处理单元;  The system according to claim 9, wherein the driving module further comprises a driving data processing unit;
所述服务数据处理单元, 用于确定驱动模块合法, 将功能数据封装成 网络协议支持的数据格式, 通过自身生成的临时密钥加密后, 根据网络协 议发送给驱动数据处理单元; 所述允许激活信息中包含临时密钥;  The service data processing unit is configured to determine that the driving module is legal, and the function data is encapsulated into a data format supported by the network protocol, and is encrypted by the temporary key generated by itself, and then sent to the driving data processing unit according to the network protocol; The information contains a temporary key;
所述驱动数据处理单元, 用于根据接收的服务数据处理单元发送的临 时密钥, 对服务数据处理单元发送的功能数据进行解密, 实现自身功能。  The driving data processing unit is configured to decrypt the function data sent by the service data processing unit according to the temporary key sent by the received service data processing unit to implement its own function.
12、 根据权利要求 11所述的***, 其特征在于,  12. The system of claim 11 wherein:
所述服务激活单元进一步用于, 确定驱动模块非法, 拒绝驱动激活单 元当前的激活请求, 并对所述驱动激活单元的下一次激活请求延时处理, 若连续 N次均确定所述驱动模块非法, 则拒绝所述驱动模块的所有请求。  The service activation unit is further configured to: determine that the driving module is illegal, refuse to drive the current activation request of the activation unit, and delay processing the next activation request of the driving activation unit, if it is determined that the driving module is illegal for N consecutive times , then reject all requests from the driver module.
PCT/CN2011/084461 2011-07-06 2011-12-22 Method and device for sharing functions of network device WO2012152010A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110187963.3 2011-07-06
CN2011101879633A CN102255902A (en) 2011-07-06 2011-07-06 Network equipment function sharing method and device

Publications (1)

Publication Number Publication Date
WO2012152010A1 true WO2012152010A1 (en) 2012-11-15

Family

ID=44982898

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/084461 WO2012152010A1 (en) 2011-07-06 2011-12-22 Method and device for sharing functions of network device

Country Status (2)

Country Link
CN (1) CN102255902A (en)
WO (1) WO2012152010A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255902A (en) * 2011-07-06 2011-11-23 中兴通讯股份有限公司 Network equipment function sharing method and device
CN103391527B (en) * 2012-05-11 2016-12-07 南京中兴软件有限责任公司 Implementation method, equipment and the system that in wireless access hotspot device, function is shared
CN106341777B (en) * 2016-08-11 2019-04-02 深圳创维-Rgb电子有限公司 USB virtual unit creation method, equipment and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545037A (en) * 2003-11-10 2004-11-10 深圳市东湖存储技术有限公司 Virtual CD-Rom library system and virtual CD data flow network transmission method
CN101771707A (en) * 2010-02-08 2010-07-07 中兴通讯股份有限公司 Method for realizing resource share among terminals, resource processing system and terminals
WO2011072142A2 (en) * 2009-12-09 2011-06-16 Citrix Systems, Inc. Methods and systems for displaying, on a first machine, data associated with a drive of a second machine, without mapping the drive
CN102255902A (en) * 2011-07-06 2011-11-23 中兴通讯股份有限公司 Network equipment function sharing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545037A (en) * 2003-11-10 2004-11-10 深圳市东湖存储技术有限公司 Virtual CD-Rom library system and virtual CD data flow network transmission method
WO2011072142A2 (en) * 2009-12-09 2011-06-16 Citrix Systems, Inc. Methods and systems for displaying, on a first machine, data associated with a drive of a second machine, without mapping the drive
CN101771707A (en) * 2010-02-08 2010-07-07 中兴通讯股份有限公司 Method for realizing resource share among terminals, resource processing system and terminals
CN102255902A (en) * 2011-07-06 2011-11-23 中兴通讯股份有限公司 Network equipment function sharing method and device

Also Published As

Publication number Publication date
CN102255902A (en) 2011-11-23

Similar Documents

Publication Publication Date Title
EP2941854B1 (en) Authenticating a wireless dockee to a wireless docking service
US10229071B2 (en) Method and apparatus for directly connecting dockee device to peripheral device in a wireless docking network
JP5972295B2 (en) Pairing between wireless devices
US20080192935A1 (en) Receiver, Transmitter and Communication Control Program
CN101651682B (en) Method, system and device of security certificate
US20060068760A1 (en) System and method for pairing dual mode wired/wireless devices
CN106385277B (en) Encryption device, method and system
JP2009512069A (en) System and method for providing secure data transmission
KR101966379B1 (en) Authentication apparatus based on biometric information, control server and application server, and method for data management based on biometric information thereof
WO2015164999A1 (en) Virtual card downloading method, terminal and intermediate device
JP2007202112A (en) System and method for configuring electronic device to access wireless local area network
CN105357666A (en) WIFI (Wireless Fidelity) password sharing method and terminals
JP2016525748A5 (en)
JP2016170630A5 (en)
JP2020530733A (en) Remote control of computing devices
JP3691464B2 (en) Wireless access point
WO2012075904A1 (en) Method, device and system for verifying binding data card and mobile host
JP2006050191A5 (en)
JP5915107B2 (en) COMMUNICATION METHOD, COMMUNICATION DEVICE, STORAGE DEVICE, AND CONTROL PROGRAM
WO2017012204A1 (en) Wireless connection method, terminal, wireless access point and computer storage medium
WO2023279897A1 (en) Secure binding method and system, storage medium, and electronic apparatus
WO2012152010A1 (en) Method and device for sharing functions of network device
JP2014527206A5 (en)
WO2012129848A1 (en) Method and apparatus for simulating universal serial bus device
JP2012023733A (en) Access point and method for connecting wireless communication

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

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

Country of ref document: EP

Kind code of ref document: A1