WO2015154489A1 - Usb设备的驱动方法、主机及usb设备 - Google Patents

Usb设备的驱动方法、主机及usb设备 Download PDF

Info

Publication number
WO2015154489A1
WO2015154489A1 PCT/CN2014/092800 CN2014092800W WO2015154489A1 WO 2015154489 A1 WO2015154489 A1 WO 2015154489A1 CN 2014092800 W CN2014092800 W CN 2014092800W WO 2015154489 A1 WO2015154489 A1 WO 2015154489A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
usb device
host
configuration information
new
Prior art date
Application number
PCT/CN2014/092800
Other languages
English (en)
French (fr)
Inventor
刘勇
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015154489A1 publication Critical patent/WO2015154489A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/34User authentication involving the use of external additional devices, e.g. dongles or smart cards
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a USB device driving method, a host, and a USB device.
  • USB Universal Serial Bus
  • the following uses the data card as an example to illustrate the way the host drives the USB device.
  • the host is driven in a similar manner to the data card:
  • the host sends a request for obtaining a device descriptor.
  • the USB device reports the related function port, and the host loads the corresponding driver according to the function port reported by the device.
  • the USB device is generally reported as a mass storage (MASS STORAGE) device, so that the user can install the user interface (User Interface, UI for short) and driver (DRIVER) existing in the MASS STORAGE device on the host. And other software.
  • the UI or DRIVER will actively send commands to the USB device for mode switching, switching the USB device from the MASS STORAGE to a networkable mode, such as NDIS.
  • the host sends a request for obtaining a device descriptor, and the USB device determines the host operating system according to the request, for example, Windows or Linux, and then the USB device reports different function ports according to the judgment result.
  • the function ports are used for networking operations.
  • the driver of these function ports belongs to the operating system and exists in the operating system. The host loads the corresponding driver according to the function port reported by the device.
  • the main purpose of the embodiments of the present invention is to solve the technical problem that any user can operate all the functional ports of the USB device through the host.
  • the driving method of the USB device includes the following steps:
  • the host After the host establishes a connection with the USB device, the host obtains the function configuration information set by the USB device according to the user authority;
  • the host generates a function port corresponding to the function configuration information according to the acquired function configuration information.
  • the step of the host acquiring the function configuration information set by the USB device according to the user authority comprises:
  • the host sends an acquisition command to the USB device
  • the host When detecting the user input verification information, the host sends the verification information input by the user to the USB device, and the USB device determines the user authority according to the verification information, and sets corresponding function configuration information according to the user authority;
  • the host receives the function configuration information sent by the USB device.
  • the driving method of the USB device includes:
  • the host regenerates the function port corresponding to the new function configuration information according to the new function configuration information.
  • an embodiment of the present invention further provides a driving method of a USB device, where the driving method of the USB device includes the following steps:
  • the USB device After the host establishes a connection with the USB device, the USB device acquires the user right, and sets the function configuration information according to the obtained user right;
  • the USB device sends the function configuration information to the host, and the host generates a function port corresponding to the function configuration information according to the function configuration information.
  • the step of the USB device acquiring user rights and setting the function configuration information according to the acquired user rights includes:
  • the USB device receives an acquisition instruction sent by the host
  • the USB device responds to the obtaining instruction and sends the user information to the host;
  • the USB device receives the verification information that is sent by the host when detecting the user input verification information
  • the USB device determines user rights according to the verification information and sets corresponding function configuration information according to the user rights.
  • the driving method of the USB device includes:
  • the USB device When the host detects the user switching the user right to the new user right, and detects that the user inputs the new authentication information, the USB device receives the new verification information sent by the host;
  • the USB device determines new user rights according to the new verification information and sets corresponding new function configuration information according to the new user rights;
  • an embodiment of the present invention further provides a host, where the host includes:
  • the first obtaining module is configured to obtain, after the host establishes a connection with the USB device, the function configuration information that is set by the USB device according to the user authority;
  • the first generation module is configured to generate a function port corresponding to the function configuration information according to the acquired function configuration information.
  • the first obtaining module comprises:
  • a first sending unit configured to send an acquisition instruction to the USB device
  • a first receiving unit configured to receive user information sent by the USB device in response to the acquiring instruction
  • the detecting unit is configured to: when detecting the user input verification information, send the verification information input by the user to the USB device, and the USB device determines the user authority according to the verification information and sets a corresponding function according to the user authority.
  • Configuration information when detecting the user input verification information, send the verification information input by the user to the USB device, and the USB device determines the user authority according to the verification information and sets a corresponding function according to the user authority.
  • the second receiving unit is configured to receive the function configuration information sent by the USB device.
  • the host comprises:
  • the first sending module is configured to send the new verification information input by the user to the USB when detecting that the user switches the user right to the new user right and detects that the user inputs the new verification information.
  • a device for the USB device to determine a new user right according to the new verification information and set corresponding new function configuration information according to the new user right;
  • a first receiving module configured to receive the new function configuration information sent by the USB device
  • the second generation module is configured to regenerate the function port corresponding to the new function configuration information according to the new function configuration information.
  • an embodiment of the present invention further provides a USB device, where the USB device includes:
  • the first setting module is configured to obtain user rights after the host establishes a connection with the USB device, and set function configuration information according to the acquired user rights;
  • the second sending module is configured to send the function configuration information to the host, and the host generates a function port corresponding to the function configuration information according to the function configuration information.
  • the first setting module comprises:
  • a third receiving unit configured to receive an acquisition instruction sent by the host
  • a second sending unit configured to respond to the obtaining instruction and send user information to the host
  • the fourth receiving unit is configured to receive the verification information that is sent by the host when detecting the user input verification information
  • a setting unit configured to determine a user right according to the verification information and set corresponding function configuration information according to the user right.
  • the USB device comprises:
  • the second receiving module is configured to: when the host detects that the user switches the user right to the new user right, and detects that the user inputs the new verification information, receives the new verification information sent by the host;
  • a second setting module configured to determine a new user right according to the new verification information, and set corresponding new function configuration information according to the new user right;
  • the third sending module is configured to send the new function configuration information to the host, and the host regenerates the function port corresponding to the new function configuration information according to the new function configuration information.
  • the host After the host establishes a connection with the USB device, the host acquires the function configuration information set by the USB device according to the user authority; the host generates a function port corresponding to the function configuration information according to the obtained function configuration information.
  • the USB device of the present invention sets corresponding function configuration information according to user rights, and the host generates a function port according to the function configuration information set by the USB device. Therefore, the present invention can improve the security of the USB device, and the configuration of the function port is more flexible; Some user rights only correspond to the generation of some functional ports, which can improve the performance of USB devices and reduce power consumption.
  • FIG. 1 is a schematic flow chart of a first embodiment of a driving method of a USB device according to the present invention
  • FIG. 2 is a schematic flow chart of a second embodiment of a driving method of a USB device according to the present invention.
  • FIG. 3 is a schematic flowchart of a third embodiment of a driving method of a USB device according to the present invention.
  • FIG. 4 is a schematic flowchart diagram of a fourth embodiment of a driving method of a USB device according to the present invention.
  • FIG. 5 is a schematic flowchart diagram of a fifth embodiment of a driving method of a USB device according to the present invention.
  • FIG. 6 is a schematic flowchart of a sixth embodiment of a driving method of a USB device according to the present invention.
  • FIG. 7 is a schematic diagram of functional modules of a first embodiment of a host according to the present invention.
  • FIG. 8 is a schematic diagram of functional modules of a second embodiment of a host according to the present invention.
  • FIG. 9 is a schematic diagram of functional modules of a third embodiment of a host according to the present invention.
  • FIG. 10 is a schematic diagram of functional modules of a fourth embodiment of a USB device according to the present invention.
  • FIG. 11 is a schematic diagram of functional modules of a fifth embodiment of a USB device according to the present invention.
  • FIG. 12 is a schematic diagram of functional modules of a sixth embodiment of a USB device according to the present invention.
  • the host can be applied to a terminal such as a computer or a television
  • the USB device refers to
  • the device connected to the host in the USB mode includes a mobile phone, a tablet computer, a camera, a USB flash drive, etc., which is not limited by the present invention.
  • Embodiments of the present invention provide a driving method of a USB device.
  • FIG. 1 is a schematic flowchart of a first embodiment of a driving method of a USB device according to the present invention.
  • the driving method of the USB device includes:
  • Step S10 After the host establishes a connection with the USB device, the host acquires function configuration information set by the USB device according to the user authority;
  • the host can obtain the user right of the user, and the USB device can obtain the user's authority.
  • the method for obtaining the user right can be password verification, face recognition, gesture verification, voice verification, fingerprint verification, etc. Way to proceed.
  • the user rights can be set in advance, and can be set to an administrator, a guest, or a plurality of user permission levels, which is not limited by the present invention.
  • the function configuration information is set by the USB device according to the user authority, and the function configuration information includes the configuration of the function port that the user authority can use.
  • the function port corresponding to the function configuration information generated by the host is the function port corresponding to the user right.
  • the method for the host to generate the function port corresponding to the function configuration information according to the function configuration information is similar to the prior art, and is not described herein.
  • the USB device sets the corresponding function configuration information according to the user authority, and the host generates the function port according to the function configuration information set by the USB device. Therefore, in this embodiment, the function ports that the user can use are different for different user rights. The functions that the user can use are also different. Therefore, the security of the USB device can be improved, and the configuration of the function port is more flexible; in addition, according to some user rights, only a part of the function port is generated, and the USB device does not need to be in the host at the same time. Turn on all of its function ports, thus improving the performance of USB devices and reducing power consumption.
  • FIG. 2 is a schematic flowchart diagram of a second embodiment of a driving method of a USB device according to the present invention.
  • the present embodiment is based on the first embodiment, and the step S10 includes:
  • Step S11 the host sends an acquisition instruction to the USB device
  • the host After the host establishes a connection with the USB device, or after the host re-establishes the connection with the USB device, the host sends an acquisition command to the USB device.
  • Step S12 The host receives user information sent by the USB device in response to the acquiring instruction.
  • the USB device After receiving the acquisition instruction, the USB device sends the user information to the host in response to the acquisition instruction, so that the host obtains all users of the USB device.
  • Step S13 When detecting the user inputting the verification information, the host sends the verification information input by the user to the USB device, and the USB device determines the user authority according to the verification information, and sets corresponding function configuration information according to the user authority. ;
  • the host can display the user account or other user information of the USB device through screen display, voice broadcast, etc., for the user to select a user account to log in.
  • the user can input the verification information by means of buttons, gestures, voice, text input, fingerprint collection, and the like.
  • the host When detecting the user input verification information, the host sends the verification information input by the user to the USB device, and the USB device verifies the identity of the user according to the verification information, and when the verification information input by the user is verified by the USB device, USB The device determines the user rights of the user, and sets corresponding function configuration information according to the user rights.
  • the USB device can verify the letter The information matches the verification information of the user authority.
  • the user right that matches the verification information input by the user is determined as the user authority of the user; in the absence of the user authority.
  • the verification information matches the verification information input by the user it is determined that the user authority of the user is the minimum user authority.
  • the method for setting the corresponding function configuration information of the user permission of the USB device may be: a preset mapping table, where the mapping table includes a mapping relationship between the user right and each function, and the function corresponding to the user right may be found according to the user right, and the USB device will The configuration information of these functions found as function configuration information; or, it may be any other applicable method.
  • Step S14 The host receives the function configuration information sent by the USB device.
  • the user rights may also be determined by the host. For example, when the host detects the user inputting the verification information, the user determines the user authority according to the verification information; the host sends the acquisition command carrying the user authority to the USB device, and the USB device responds to the acquisition instruction, and sets the corresponding function configuration information according to the user authority. And sending the function configuration information to the host, and the host receives the function configuration information.
  • FIG. 3 is a schematic flowchart diagram of a third embodiment of a driving method of a USB device according to the present invention.
  • the driving method of the USB device includes:
  • Step S30 when the host detects the operation of the user switching the user right to the new user right, and detects that the user inputs the new verification information, sends the new verification information input by the user to the USB device for
  • the USB device determines new user rights according to the new verification information and sets corresponding new function configuration information according to the new user rights;
  • the host can preset the virtual button to obtain other switching identifiers for the user to switch the user rights to the new user rights.
  • the operation of the user to switch the user rights to the new user rights is not limited thereto, and may be any applicable manner.
  • the user performs the operation of switching the user right to the new user right, and inputs new verification information
  • the host sends the new verification information input by the user to the USB device
  • the USB device re-determines the new user authority according to the new verification information and according to the new User permissions set the corresponding new feature configuration information.
  • USB device re-determines the new user rights according to the new authentication information
  • the manner in which the USB device sets the corresponding new function configuration information according to the new user rights may be the same as the method in the second embodiment. However, in this embodiment, the USB sets the corresponding new function configuration according to the new user rights. The method may also be: comparing the function corresponding to the current user right with the function corresponding to the new user right, adding or deleting some functions, thereby obtaining new function configuration information corresponding to the new user right.
  • Step S40 The host receives the new function configuration information sent by the USB device.
  • Step S50 The host regenerates the function port corresponding to the new function configuration information according to the new function configuration information.
  • the manner in which the host regenerates the function port corresponding to the new function configuration information according to the new function configuration information may be the same as the method in the second embodiment. In this embodiment, the host regenerates and new according to the new function configuration information.
  • the method of the function port corresponding to the function configuration information may also be: comparing the function port corresponding to the new function configuration information with the currently enabled function port, adding or deleting some function ports according to the new function configuration information, obtaining and new The function port corresponding to the function configuration information.
  • the new user rights are determined by the host, and the method is the same as that of the second embodiment, and details are not described herein.
  • the USB device when the user performs user right switching, the USB device may reset new function configuration information, and the host may also generate a corresponding function port according to the new function configuration information.
  • the USB PHY Universal Serial Bus physical layer
  • the USB PHY is not required to be restarted, so that the effect of the switching process is smoother and more efficient.
  • the host if the user disconnects the host from the USB device and reconnects the USB device to the host, the host repeatedly performs steps S10 and S20.
  • the driving method of the USB device further includes:
  • the host When the host detects, modify, adds, or deletes the current user rights and/or user information, the host sends new user rights and/or new user information after the user completes the modification, addition, or deletion operation.
  • the USB device is used by the USB device to update user rights and/or user information.
  • new user rights and/or user information may be synchronized between the host and the USB device.
  • the USB device is a mobile phone, and three types of user rights are preset in the mobile phone, namely “Administrator”, “Guest1”, and “Guest2”, and the functions corresponding to the rights of the Administrator are read/write, phone book, information backup, Guest1
  • the function corresponding to the permission is the phone book and the information backup.
  • the function corresponding to the permission of Guest2 is the information backup.
  • the host sends an acquisition command to the mobile phone, and the mobile phone responds to the acquisition instruction and sends the user information to the mobile phone.
  • the user information includes three user accounts: “Administrator”, “Guest1” and “Guest2”, and the host displays the user account.
  • the host sends the password to the mobile phone, and the mobile phone verifies that the password is correct. If it is correct, it searches for the corresponding function of the Administrator, and obtains the reading, writing, phone book and information backup.
  • the three functions the mobile phone sends the configuration information of the three functions to the host.
  • the configuration information corresponding to the read/write function is the storage space information of the mobile phone, and the mobile phone generates the corresponding functions according to the configuration information of the three functions.
  • the function port for example, the mobile phone generates a virtual MASS STORAGE device according to the storage space information of the mobile phone and generates a corresponding function port, and the user reads and writes the mobile phone through the virtual MASS STORAGE device.
  • the permission range corresponding to Guest1 and Guest2 does not include reading and writing. Therefore, the host does not provide a virtual MASS STORAGE device and corresponding port.
  • the USB device is a multi-function USB device with a mobile digital TV decoding chip.
  • the host device is set in the TV.
  • the USB device is pre-configured with two kinds of user rights, namely “Administrator” and “TV Viewer”. "Viewer"", the functions corresponding to the Administrator's permissions include all the functions supported by the USB device.
  • the functions corresponding to the TV Viewer's rights are only related to the functions of the mobile digital TV.
  • the USB device is connected to the TV, the user is the Administrator.
  • the identity is logged in, that is, the USB device determines that the user's user right is the administrator.
  • the details of how to determine the user's privilege can be obtained from the above embodiments and examples, and are not described herein.
  • the user only wants to watch the digital TV, that is, only the rights of the TV Viewer are required, the user authority is switched, the Administrator is switched to the TV Viewer, and the verification information of the TV Viewer is input, and the host sends the verification information to the USB device, USB.
  • the device determines, according to the verification information, that the current user's authority is a TV Viewer, and sets only the function configuration information related to the mobile digital television function, and sends the function configuration information related to the mobile digital television function to the USB device, and the USB device according to the USB device
  • This function configuration information regenerates the functional interface related to the mobile digital TV function and deletes other functional interfaces.
  • the embodiment of the invention further provides a driving method of the USB device.
  • FIG. 4 is a schematic flowchart diagram of a fourth embodiment of a driving method of a USB device according to the present invention.
  • the driving method of the USB device includes:
  • Step S100 after the host establishes a connection with the USB device, the USB device acquires the user authority, and sets the function configuration information according to the user authority;
  • the host can obtain the user right of the user, and the USB device can obtain the user's authority.
  • the method for obtaining the user right can be password verification, face recognition, gesture verification, voice verification, fingerprint verification, etc. Way to proceed.
  • the user rights can be set in advance, and can be set to an administrator, a guest, or a plurality of user permission levels, which is not limited by the present invention.
  • the function configuration information is set by the USB device according to the user authority, and the function configuration information includes the configuration of the function port that the user authority can use.
  • Step S200 The USB device sends the function configuration information to the host, and the host generates a function port corresponding to the function configuration information according to the function configuration information.
  • the function port corresponding to the function configuration information generated by the host is the function port corresponding to the user right.
  • the method for the host to generate the function port corresponding to the function configuration information according to the function configuration information is similar to the prior art, and is not described herein.
  • the USB device sets the corresponding function configuration information according to the user authority, and the host generates the function port according to the function configuration information set by the USB device. Therefore, in this embodiment, the function ports that the user can use are different for different user rights. The functions that the user can use are also different. Therefore, the security of the USB device can be improved, and the configuration of the function port is more flexible; in addition, according to some user rights, only a part of the function port is generated, and the USB device does not need to be in the host at the same time. Turn on all of its function ports, thus improving the performance of USB devices and reducing power consumption.
  • FIG. 5 is a schematic flowchart diagram of a fifth embodiment of a driving method of a USB device according to the present invention.
  • the present embodiment is based on the fourth embodiment, and the step S100 includes:
  • Step S110 the USB device receives an acquisition instruction sent by the host
  • the host After the host establishes a connection with the USB device, or after the host re-establishes the connection with the USB device, the host sends an acquisition command to the USB device.
  • Step S120 the USB device responds to the obtaining instruction and sends user information to the host;
  • the USB device After receiving the acquisition instruction, the USB device sends the user information to the host in response to the acquisition instruction, so that the host obtains all users of the USB device.
  • Step S130 The USB device receives the verification information that is sent by the host when detecting the user input verification information.
  • the host can display the user account or other user information of the USB device through screen display, voice broadcast, etc., for the user to select a user account to log in.
  • the user can input the verification information by means of buttons, gestures, voice, text input, fingerprint collection, and the like.
  • the host When the host detects the user input verification information, the host sends the verification information input by the user to the USB device.
  • Step S140 The USB device determines the user authority according to the verification information, and sets corresponding function configuration information according to the user authority.
  • the USB device verifies the identity of the user according to the verification information.
  • the USB device determines the user authority of the user, and sets corresponding function configuration information according to the user authority, in the user.
  • the following steps are not performed, or the feedback host fails to verify and the host is requested to re-authenticate.
  • the USB device can match the verification information with the verification information of the user authority, and when the verification information having the user authority matches the verification information input by the user, determining that the user right that matches the verification information input by the user is The user authority of the user; when the verification information of the user right does not match the verification information input by the user, the user authority of the user is determined to be the minimum user authority.
  • the method for setting the corresponding function configuration information of the user permission of the USB device may be: a preset mapping table, where the mapping table includes a mapping relationship between the user right and each function, and the function corresponding to the user right may be found according to the user right, and the USB device will The configuration information of these functions found as function configuration information; or, it may be any other applicable method.
  • the user rights may also be determined by the host. For example, when the host detects the user inputting the verification information, the user determines the user authority according to the verification information; the host sends the acquisition command carrying the user authority to the USB device, and the USB device responds to the acquisition instruction, and sets the corresponding function configuration information according to the user authority. And sending the function configuration information to the host, and the host receives the function configuration information.
  • FIG. 6 is a schematic flowchart diagram of a sixth embodiment of a driving method of a USB device according to the present invention.
  • the driving method of the USB device includes:
  • Step S300 when the host detects the user switching the user right to the new user right, and detects that the user inputs the new verification information, the USB device receives the new verification information sent by the host;
  • the host can preset the virtual button to obtain other switching identifiers for the user to switch the user rights to the new user rights.
  • the operation of the user to switch the user rights to the new user rights is not limited thereto, and may be any applicable manner.
  • the user performs an operation of switching user rights to new user rights, and inputs new authentication information, and the host transmits new authentication information input by the user to the USB device.
  • Step S400 the USB device determines new user rights according to the new verification information, and sets corresponding new function configuration information according to the new user rights;
  • the manner in which the USB device sets the corresponding new function configuration information according to the new user rights may be the same as the method in the fifth embodiment.
  • the USB sets the corresponding new function configuration according to the new user rights.
  • the method may also be: comparing the function corresponding to the current user right with the function corresponding to the new user right, adding or deleting some functions, thereby obtaining new function configuration information corresponding to the new user right.
  • Step S500 The USB device sends the new function configuration information to the host, and the host regenerates the function port corresponding to the new function configuration information according to the new function configuration information.
  • the manner in which the host regenerates the function port corresponding to the new function configuration information according to the new function configuration information may be the same as the method in the fifth embodiment.
  • the host regenerates the new function according to the new function configuration information.
  • the method of the function port corresponding to the function configuration information may also be: comparing the function port corresponding to the new function configuration information with the currently enabled function port, adding or deleting some function ports according to the new function configuration information, obtaining and new The function port corresponding to the function configuration information.
  • the new user rights are determined by the host, and the method is the same as that of the second embodiment, and details are not described herein.
  • the USB device when the user performs user right switching, the USB device may reset new function configuration information, and the host may also generate a corresponding function port according to the new function configuration information.
  • the USB PHY when the user performs user right switching, the USB PHY does not need to be restarted, so that the effect of the switching process is smoother and more efficient.
  • the driving method of the USB device further includes:
  • the USB device receives new user rights and/or new information obtained by the host after detecting, modifying, adding, or deleting the current user rights and/or user information.
  • User Info
  • the USB device updates the user rights and/or user information based on the new user rights and/or new user information.
  • the invention further provides a host.
  • FIG. 7 is a schematic diagram of functional modules of a first embodiment of a host according to the present invention.
  • the host includes:
  • the first obtaining module 10 is configured to obtain, after the host establishes a connection with the USB device, the function configuration information that is set by the USB device according to the user authority;
  • the first generation module 20 is configured to generate a function port corresponding to the function configuration information according to the acquired function configuration information.
  • the first obtaining module 10 can obtain the user right of the user, and the USB device can obtain the user's right.
  • the method for obtaining the user right can be password verification, face recognition, gesture verification, and voice verification. , fingerprint verification, etc.
  • the user rights can be set in advance, and can be set to an administrator, a guest, or a plurality of user permission levels, which is not limited by the present invention.
  • the function configuration information is set by the USB device according to the user authority, and the function configuration information includes the configuration of the function port that the user authority can use.
  • the method for the first generation module 20 to generate the function port corresponding to the function configuration information according to the function configuration information is similar to the prior art, and is not described herein.
  • the USB device sets corresponding function configuration information according to the user authority, and the first generation module 20 generates a function port according to the function configuration information set by the USB device. Therefore, in this embodiment, for different users. Permissions, the function ports that the user can use are different, that is, the functions that the user can use are different. Therefore, the security of the USB device can be improved, and the configuration of the function port is more flexible; in addition, only corresponding to some user rights are generated. For some function ports, the USB device does not need to open all its function ports on the host at the same time, thus improving the performance of the USB device and reducing power consumption.
  • FIG. 8 is a schematic diagram of functional modules of a second embodiment of a host according to the present invention.
  • the first acquiring module 10 includes:
  • the first sending unit 11 is configured to send an acquisition instruction to the USB device
  • the first receiving unit 12 is configured to receive user information that is sent by the USB device in response to the acquiring instruction;
  • the detecting unit 13 is configured to: when detecting the user input verification information, send the verification information input by the user to the USB device, where the USB device determines the user authority according to the verification information and sets a corresponding according to the user authority Function configuration information;
  • the second receiving unit 14 is configured to receive the function configuration information sent by the USB device.
  • the first sending unit 11 After the host establishes a connection with the USB device, or after the host re-establishes the connection with the USB device, the first sending unit 11 sends an acquisition command to the USB device.
  • the USB device After receiving the acquisition instruction, the USB device transmits the user information to the first receiving unit 12 in response to the acquisition instruction, so that the first receiving unit 12 obtains all users of the USB device.
  • the detecting unit 13 can display the user account or other user information of the USB device by using a screen display, a voice broadcast, or the like for the user to select a user account to log in.
  • the user can input the verification information by means of buttons, gestures, voice, text input, fingerprint collection, and the like.
  • the USB device can match the verification information with the verification information of the user authority, and when the verification information with the user authority matches the verification information input by the user, determine that the user right that matches the verification information input by the user is The user authority of the user; when the verification information of the user right does not match the verification information input by the user, the user authority of the user is determined to be the minimum user authority.
  • the method for setting the corresponding function configuration information of the user permission of the USB device may be: a preset mapping table, where the mapping table includes a mapping relationship between the user right and each function, and the function corresponding to the user right may be found according to the user right, and the USB device will The configuration information of these functions found as function configuration information; or, it may be any other applicable method.
  • the user authority may also be determined by the detecting unit 13. For example, when the detecting unit 13 detects that the user inputs the verification information, the user authority is determined according to the verification information; the detecting unit 13 sends an acquisition instruction carrying the user authority to the USB device, and the USB device responds to the obtaining instruction according to the user authority setting. Corresponding function configuration information, and sending the function configuration information to the second receiving unit 14, the second receiving unit 14 receiving the function configuration information.
  • FIG. 9 is a schematic diagram of functional modules of a third embodiment of a host according to the present invention.
  • the host includes:
  • the first receiving module 40 is configured to receive the new function configuration information sent by the USB device;
  • the second generation module 50 is configured to regenerate a function port corresponding to the new function configuration information according to the new function configuration information.
  • the first sending module 30 may preset the virtual button to obtain another switching identifier for the user to switch the user right to the new user right.
  • the operation of the user switching the user right to the new user right is not limited thereto, and may be any applicable. the way.
  • the user performs an operation of switching the user right to the new user right, and inputs new verification information.
  • the first sending module 30 sends the new verification information input by the user to the USB device, and the USB device re-determines the new user according to the new verification information. Permissions and set the corresponding new feature configuration information according to the new user rights.
  • USB device re-determines the new user rights according to the new authentication information
  • the manner in which the USB device sets the corresponding new function configuration information according to the new user rights may be the same as the method in the second embodiment. However, in this embodiment, the USB sets the corresponding new function configuration according to the new user rights. The method may also be: comparing the function corresponding to the current user right with the function corresponding to the new user right, adding or deleting some functions, thereby obtaining new function configuration information corresponding to the new user right.
  • the method of the second generation module 50 regenerating the function port corresponding to the new function configuration information according to the new function configuration information may be the same as the method of the second embodiment. In this embodiment, the second generation module 50 is based on the new method.
  • the function configuration information may be: re-generating the function port corresponding to the new function configuration information, or comparing the function port corresponding to the new function configuration information with the currently enabled function port, and adding or deleting according to the new function configuration information. Part of the function port, get the function port corresponding to the new function configuration information.
  • the USB device when the user performs the switching of the user rights, the USB device may reset the new function configuration information, and the second generation module 50 may also generate the corresponding function port according to the new function configuration information.
  • the USB PHY when the user performs user right switching, the USB PHY does not need to be restarted, so that the effect of the switching process is smoother and more efficient.
  • the host if the user disconnects the host from the USB device and reconnects the USB device to the host, the host repeatedly performs steps S10 and S20.
  • the host further includes:
  • the first update module (not shown) is configured to: after detecting, modifying, adding, or deleting the current user rights and/or user information, the user is modified, added, or deleted.
  • the new user rights and/or new user information are sent to the USB device for USB device to update the user rights and/or user information.
  • new user rights and/or user information may be synchronized between the host and the USB device.
  • the invention further provides a USB device.
  • FIG. 10 is a schematic diagram of functional modules of a fourth embodiment of a USB device according to the present invention.
  • the USB device includes:
  • the first setting module 100 is configured to acquire user rights after the host establishes a connection with the USB device, and set function configuration information according to the acquired user rights;
  • the second sending module 200 is configured to send the function configuration information to the host, and the host generates a function port corresponding to the function configuration information according to the function configuration information.
  • the user authority of the user can be obtained by the host, and the user's permission can be obtained by the first setting module 100.
  • the method for obtaining the user right can be password verification, face recognition, gesture verification, voice verification, Fingerprint verification and other methods.
  • the user rights can be set in advance, and can be set to an administrator, a guest, or a plurality of user permission levels, which is not limited by the present invention.
  • the function configuration information is that the first setting module 100 is set according to the user authority, and the function configuration information includes the configuration of the function port that the user authority can use.
  • the function port corresponding to the function configuration information generated by the host is the function port corresponding to the user right.
  • the method for the host to generate the function port corresponding to the function configuration information according to the function configuration information is similar to the prior art, and is not described herein.
  • the first setting module 100 sets the corresponding function configuration information according to the user authority, and the host generates the function port according to the function configuration information set by the first setting module 100. Therefore, in this embodiment, for different user rights, the user may The function ports used are different, that is, the functions that the user can use are different. Therefore, the security of the USB device can be improved, and the configuration of the function port is more flexible; in addition, according to some user rights, only some function ports are generated, USB The device does not need to open all its functional ports on the host at the same time, thus improving the performance of the USB device and reducing power consumption.
  • FIG. 11 is a schematic diagram of functional modules of a fifth embodiment of a USB device according to the present invention.
  • the first setting module 100 includes:
  • the third receiving unit 110 is configured to receive an acquisition instruction sent by the host
  • the second sending unit 120 is configured to respond to the obtaining instruction and send user information to the host;
  • the fourth receiving unit 130 is configured to receive the verification information that is sent by the host when detecting the user input verification information;
  • the setting unit 140 is configured to determine a user right according to the verification information and set corresponding function configuration information according to the user right.
  • the host After the host establishes a connection with the USB device, or after the host re-establishes the connection with the USB device, the host sends an acquisition command to the USB device.
  • the second sending unit 120 After receiving the acquisition instruction, the second sending unit 120 sends the user information to the host in response to the obtaining instruction, so that the host obtains all users of the USB device.
  • the host can display the user account or other user information of the USB device through screen display, voice broadcast, etc., for the user to select a user account to log in.
  • the user can input the verification information by means of buttons, gestures, voice, text input, fingerprint collection, and the like.
  • the host When detecting the user input verification information, the host sends the verification information input by the user to the fourth receiving unit 130.
  • the setting unit 140 verifies the identity of the user according to the verification information.
  • the setting unit 140 determines the user authority of the user, and sets corresponding function configuration information according to the user authority.
  • the verification information input by the user does not pass the verification by the setting unit 140, the following steps are not performed, or the feedback host verification fails and the host is requested to perform the verification again.
  • the setting unit 140 may match the verification information with the verification information of the user authority, and when the verification information that has the user authority matches the verification information input by the user, determine that the user right that matches the verification information input by the user is The user authority of the user; when the verification information of the user right does not match the verification information input by the user, the user authority of the user is determined to be the minimum user authority.
  • the method for setting the function configuration information corresponding to the user authority by the setting unit 140 may be: a preset mapping table, where the mapping table includes a mapping relationship between the user rights and each function, and the function corresponding to the user rights may be found according to the user rights, and the setting unit is 140 will find the configuration information of these functions as function configuration information; or, it may be any other applicable method.
  • the user rights may also be determined by the host. For example, when the host detects that the user inputs the verification information, the user determines the user authority according to the verification information; the host sends an acquisition instruction carrying the user authority to the first setting module 100, and the first setting module 100 responds to the obtaining instruction according to the user authority setting. Corresponding function configuration information, and sending the function configuration information to the host, the host receives the function configuration information.
  • FIG. 12 is a schematic diagram of functional modules of a sixth embodiment of a USB device according to the present invention.
  • the USB device includes:
  • the second receiving module 300 is configured to: when the host detects the user switching the user right to the new user right, and detects that the user inputs the new verification information, receives the new verification information sent by the host;
  • the second setting module 400 is configured to determine a new user right according to the new verification information, and set corresponding new function configuration information according to the new user right;
  • the third sending module 500 is configured to send the new function configuration information to the host, and the host regenerates the function port corresponding to the new function configuration information according to the new function configuration information.
  • the host can preset the virtual button to obtain other switching identifiers for the user to switch the user rights to the new user rights.
  • the operation of the user to switch the user rights to the new user rights is not limited thereto, and may be any applicable manner.
  • the manner in which the second setting module 400 re-determines the new user rights according to the new verification information is the same as the method in the fifth embodiment, and details are not described herein.
  • the manner in which the second setting module 400 sets the corresponding new function configuration information according to the new user rights may also be the same as the method in the fifth embodiment.
  • the USB sets a corresponding new one according to the new user rights.
  • the function configuration manner may also be: comparing the function corresponding to the current user right with the function corresponding to the new user right, adding or deleting some functions, thereby obtaining new function configuration information corresponding to the new user right.
  • the manner in which the host regenerates the function port corresponding to the new function configuration information according to the new function configuration information may be the same as the method in the fifth embodiment.
  • the host regenerates the new function according to the new function configuration information.
  • the method of the function port corresponding to the function configuration information may also be: comparing the function port corresponding to the new function configuration information with the currently enabled function port, adding or deleting some function ports according to the new function configuration information, obtaining and new The function port corresponding to the function configuration information.
  • the new user rights are determined by the host, and the method is the same as that of the second embodiment, and details are not described herein.
  • the second setting module 400 may reset the new function configuration information, and the host may also generate a corresponding function port according to the new function configuration information.
  • the USB PHY does not need to be restarted, so that the effect of the switching process is smoother and more efficient.
  • the USB device if the user disconnects the host from the USB device and reconnects the USB device to the host, the USB device repeatedly performs steps S100 and S200.
  • the USB device further includes:
  • the second update module (not shown) is configured to receive, modify, add, or delete the user sent by the receiving host when detecting the user modifying, adding, or deleting the current user right and/or user information. New user rights and/or new user information obtained afterwards;
  • the second update module updates the user rights and/or user information based on the new user rights and/or new user information.
  • new user rights and/or user information may be synchronized between the host and the USB device.
  • the host After the host establishes a connection with the USB device, the host acquires the function configuration information set by the USB device according to the user authority; the host generates a function port corresponding to the function configuration information according to the obtained function configuration information.
  • the USB device of the present invention sets corresponding function configuration information according to user rights, and the host generates a function port according to the function configuration information set by the USB device. Therefore, the present invention can improve the security of the USB device, and the configuration of the function port is more flexible; Some user rights only correspond to the generation of some functional ports, which can improve the performance of USB devices and reduce power consumption.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

本发明公开了一种USB设备的驱动方法,该方法包括:在主机与USB设备建立连接后,主机获取USB设备根据获取的用户权限设置的功能配置信息;主机根据获取的功能配置信息,生成与功能配置信息对应的功能端口。本发明还公开了一种主机及USB设备。本发明能提升USB设备的安全性,且功能端口的配置更灵活;此外,还可提升USB设备的性能、降低功耗。

Description

USB设备的驱动方法、主机及USB设备 技术领域
本发明涉及计算机技术领域,尤其涉及USB设备的驱动方法、主机及USB设备。
背景技术
通常当通用串行总线(Universal Serial Bus,简称为USB)设备接入主机后,主机对USB设备进行驱动以使USB设备与主机建立数据传输通道。
下面以数据卡为例说明主机驱动USB设备的方式,对于手机、平板电脑等其他USB设备,主机对其的驱动方式与数据卡相似:
方式一,主机发送获取设备描述符等请求,USB设备收到请求后,上报相关功能端口,主机根据设备上报的功能端口加载相应驱动。在这种情况下,USB设备一般上报为大容量存储(MASS STORAGE)设备,这样用户就可以在主机上安装存在于MASS STORAGE设备中的用户界面(User Interface,简称为UI)和驱动(DRIVER)等软件。当用户安装完毕后,为了能够使用USB设备进行联网或其它操作,UI或者DRIVER会主动发送指令给USB设备,进行模式切换,将USB设备从MASS STORAGE切换到可以联网的模式,例如NDIS。
方式二,主机发送获取设备描述符等请求,USB设备根据这些请求进行主机操作系统的判断,例如是Windows还是Linux,然后USB设备根据判断结果上报不同的功能端口,一般这些功能端口用于联网操作,并且这些功能端口的驱动属于操作系统自带的,已经存在于操作系统中,主机根据设备上报的功能端口加载相应驱动。
上述两种驱动USB设备的方式在将USB设备的功能端口固定后,USB设备的功能也随之固定了,任何人在任何主机上均可以操作所有的功能端口,存在许多安全隐患。
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。
发明内容
本发明实施例的主要目的在于解决任何用户都能通过主机操作USB设备的所有功能端口的技术问题。
为实现上述目的,本发明实施例提供的一种USB设备的驱动方法,所述USB设备的驱动方法包括以下步骤:
在主机与USB设备建立连接后,主机获取USB设备根据用户权限设置的功能配置信息;
主机根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口。
优选地,所述主机获取USB设备根据用户权限设置的功能配置信息的步骤包括:
主机发送获取指令至USB设备;
主机接收USB设备响应所述获取指令而发送的用户信息;
主机在侦测到用户输入验证信息时,将用户输入的所述验证信息发送至USB设备,供USB设备根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息;
主机接收USB设备发送的所述功能配置信息。
优选地,所述主机根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口的步骤之后,所述USB设备的驱动方法包括:
在主机侦测到用户切换所述用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,将用户输入的所述新的验证信息发送至USB设备,供USB设备根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
主机接收USB设备发送的所述新的功能配置信息;
主机根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
此外,为实现上述目的,本发明实施例还提供一种USB设备的驱动方法,所述USB设备的驱动方法包括以下步骤:
在主机与USB设备建立连接后,USB设备获取用户权限,并根据获取的用户权限设置功能配置信息;
USB设备发送所述功能配置信息至主机,供主机根据所述功能配置信息生成与所述功能配置信息对应的功能端口。
优选地,所述USB设备获取用户权限,并根据获取的用户权限设置功能配置信息的步骤包括:
USB设备接收主机发送的获取指令;
USB设备响应所述获取指令并发送用户信息至主机;
USB设备接收主机在侦测到用户输入验证信息时发送的所述验证信息;
USB设备根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息。
优选地,所述USB设备发送所述功能配置信息至主机,供主机根据所述功能配置信息生成与所述功能配置信息对应的功能端口的步骤之后,所述USB设备的驱动方法包括:
在主机侦测到用户切换用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,USB设备接收主机发送的所述新的验证信息;
USB设备根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
USB设备发送所述新的功能配置信息至主机,供主机根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
此外,为实现上述目的,本发明实施例还提供一种主机,所述主机包括:
第一获取模块,设置为在主机与USB设备建立连接后,获取USB设备根据用户权限设置的功能配置信息;
第一生成模块,设置为根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口。
优选地,所述第一获取模块包括:
第一发送单元,设置为发送获取指令至USB设备;
第一接收单元,设置为接收USB设备响应所述获取指令而发送的用户信息;
侦测单元,设置为在侦测到用户输入验证信息时,将用户输入的所述验证信息发送至USB设备,供USB设备根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息;
第二接收单元,设置为接收USB设备发送的所述功能配置信息。
优选地,所述主机包括:
第一发送模块,设置为在侦测到用户切换所述用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,将用户输入的所述新的验证信息发送至USB设备,供USB设备根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
第一接收模块,设置为接收USB设备发送的所述新的功能配置信息;
第二生成模块,设置为根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
此外,为实现上述目的,本发明实施例还提供一种USB设备,所述USB设备包括:
第一设置模块,设置为在主机与USB设备建立连接后,获取用户权限,并根据获取的用户权限设置功能配置信息;
第二发送模块,设置为发送所述功能配置信息至主机,供主机根据所述功能配置信息生成与所述功能配置信息对应的功能端口。
优选地,所述第一设置模块包括:
第三接收单元,设置为接收主机发送的获取指令;
第二发送单元,设置为响应所述获取指令并发送用户信息至主机;
第四接收单元,设置为接收主机在侦测到用户输入验证信息时发送的所述验证信息;
设置单元,设置为根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息。
优选地,USB设备包括:
第二接收模块,设置为在主机侦测到用户切换用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,接收主机发送的所述新的验证信息;
第二设置模块,设置为根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
第三发送模块,设置为发送所述新的功能配置信息至主机,供主机根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
本发明实施例在主机与USB设备建立连接后,主机获取USB设备根据用户权限设置的功能配置信息;主机根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口。本发明USB设备根据用户权限设置相应的功能配置信息,主机根据USB设备设置的功能配置信息生成功能端口,因此,本发明能提升USB设备的安全性,且功能端口的配置更灵活;此外,根据一些用户权限仅对应生成部分功能端口,从而可提升USB设备的性能、降低功耗。
附图说明
图1为本发明USB设备的驱动方法第一实施例的流程示意图;
图2为本发明USB设备的驱动方法第二实施例的流程示意图;
图3为本发明USB设备的驱动方法第三实施例的流程示意图;
图4为本发明USB设备的驱动方法第四实施例的流程示意图;
图5为本发明USB设备的驱动方法第五实施例的流程示意图;
图6为本发明USB设备的驱动方法第六实施例的流程示意图;
图7为本发明主机第一实施例的功能模块示意图;
图8为本发明主机第二实施例的功能模块示意图;
图9为本发明主机第三实施例的功能模块示意图;
图10为本发明USB设备第四实施例的功能模块示意图;
图11为本发明USB设备第五实施例的功能模块示意图;
图12为本发明USB设备第六实施例的功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本领域技术人员可以理解的,本发明实施例USB设备的驱动方法、主机及USB设备的下述实施例中,所述主机可应用于计算机、电视机等终端中,所述USB设备是指以USB方式与主机连接的设备,包括:手机、平板电脑、照相机、U盘等,本发明并不对此进行限定。
本发明实施例提供一种USB设备的驱动方法。
参照图1,图1为本发明USB设备的驱动方法第一实施例的流程示意图。
本发明USB设备的驱动方法第一实施例中,该USB设备的驱动方法包括:
步骤S10,在主机与USB设备建立连接后,主机获取USB设备根据用户权限设置的功能配置信息;
主机在与USB设备建立连接后,可由主机获取用户的用户权限,也可由USB设备获取用户的权限,获取用户权限的方法可以是通过密码验证、人脸识别、手势验证、声音验证、指纹验证等方式进行。其中,用户权限可预先设置,根据用户的需求,可设置为Administrator(管理员)、Guest(访客),也可设置为多个用户权限等级,本发明对此不作限定。
功能配置信息是USB设备根据用户权限设置的,功能配置信息包括用户权限可使用的功能端口的配置。
步骤S20,主机根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口。
由于功能配置信息是由USB设备根据用户权限设置的,因此,主机根据该功能配置信息对应生成的功能端口即为用户权限对应的功能端口。
主机根据功能配置信息生成与该功能配置信息对应的功能端口的方法与现有技术相似,在此不作赘述。
本实施例USB设备根据用户权限设置相应的功能配置信息,主机根据USB设备设置的功能配置信息生成功能端口,因此,本实施例中,对于不同的用户权限,该用户可使用的功能端口是不同的,即用户可使用的功能也是不同的,因此,能提升USB设备的安全性,且功能端口的配置更灵活;此外,根据一些用户权限仅对应生成部分功能端口,USB设备不需要同时在主机上开启其所有的功能端口,因此,可提升USB设备的性能、降低功耗。
参照图2,图2为本发明USB设备的驱动方法第二实施例的流程示意图。
本发明USB设备的驱动方法第二实施例中,本实施例在第一实施例的基础上,所述步骤S10包括:
步骤S11,主机发送获取指令至USB设备;
在主机与USB设备建立连接后,或者,在主机与USB设备重新建立连接后,主机发送获取指令至USB设备。
步骤S12,主机接收USB设备响应所述获取指令而发送的用户信息;
USB设备接收到获取指令后,响应该获取指令,将用户信息发送至主机,以使主机获得USB设备的所有用户。
步骤S13,主机在侦测到用户输入验证信息时,将用户输入的所述验证信息发送至USB设备,供USB设备根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息;
主机可通过屏幕显示、语音播报等方式展示该USB设备的用户账号或其他用户信息以供用户选择一用户账号进行登录。用户可通过按键、手势、语音、文字输入、采集指纹等方式输入验证信息。
主机在侦测到用户输入验证信息时,将用户输入的验证信息发送至USB设备,USB设备根据该验证信息,对用户的身份进行验证,在用户输入的验证信息通过USB设备的验证时,USB设备确定该用户的用户权限,并根据该用户权限设置相应的功能配置信息,在用户输入的验证信息未通过USB设备的验证时,不执行下述步骤,或者,反馈主机验证失败并请求主机重新进行验证。在一些实施例中,USB设备可将验证信 息与用户权限的验证信息进行匹配,在存在用户权限的验证信息与用户输入的验证信息匹配时,确定与用户输入的验证信息匹配的用户权限为该用户的用户权限;在不存在用户权限的验证信息与用户输入的验证信息匹配时,确定该用户的用户权限为最低用户权限。
USB设备设置用户权限相应的功能配置信息的方法可以是:预置映射表,该映射表中包含用户权限与各功能的映射关系,根据用户权限可查找到该用户权限对应的功能,USB设备将查找到的这些功能的配置信息作为功能配置信息;或者,可以是其他任何适用的方法。
步骤S14,主机接收USB设备发送的所述功能配置信息。
在一些实施例中,也可以是通过主机确定用户权限。例如,主机侦测到用户输入验证信息时,根据该验证信息确定用户权限;主机发送携带用户权限的获取指令至USB设备,USB设备响应该获取指令,根据该用户权限设置相应的功能配置信息,并发送该功能配置信息至主机,主机接收该功能配置信息。
参照图3,图3为本发明USB设备的驱动方法第三实施例的流程示意图。
本发明USB设备的驱动方法第三实施例中,本实施例在第一实施例、第二实施例的基础上,所述步骤S20之后,所述USB设备的驱动方法包括:
步骤S30,在主机侦测到用户切换所述用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,将用户输入的所述新的验证信息发送至USB设备,供USB设备根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
主机可预先设置虚拟按钮获取其他切换标识供用户进行切换用户权限至新的用户权限,当然,用户切换用户权限至新的用户权限的操作并不限于此,还可以是任何适用的方式。
用户进行切换用户权限至新的用户权限的操作,并输入新的验证信息,主机将用户输入的新的验证信息发送至USB设备,USB设备根据新的验证信息重新确定新的用户权限并根据新的用户权限设置相应的新的功能配置信息。
其中,USB设备根据新的验证信息重新确定新的用户权限的方式与上述第二实施例的方法相同,在此不作赘述。
同样,USB设备根据新的用户权限设置相应的新的功能配置信息的方式也与上述第二实施例的方法可以相同,但本实施例中,USB根据新的用户权限设置相应的新的功能配置的方式也可以是:将当前用户权限对应的功能与新的用户权限对应的功能进行比较,添加或者删除部分功能,从而得到新的用户权限对应的新的功能配置信息。
步骤S40,主机接收USB设备发送的所述新的功能配置信息;
步骤S50,主机根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
主机根据新的功能配置信息,重新生成与新的功能配置信息对应的功能端口的方式与上述第二实施例的方法可以相同,本实施例中,主机根据新的功能配置信息,重新生成与新的功能配置信息对应的功能端口的方法也可以是:根据新的功能配置信息对应的功能端口与当前启用的功能端口进行比较,根据新的功能配置信息添加或删除部分功能端口,得到与新的功能配置信息对应的功能端口。
本实施例中,也可以是通过主机确定新的用户权限,其方法与上述第二实施例的方法相同,在此不作赘述。
本实施例在用户进行用户权限的切换时,USB设备可重新设置新的功能配置信息,而主机也可根据新的功能配置信息生成对应的功能端口。本实施例在用户进行用户权限的切换时,不需要重启USB PHY(Universal Serial Bus physical layer,通用串行总线物理接口),使得切换过程的效果更平滑、更高效。
本发明一优选实施例中,若用户切断主机与USB设备的连接,并重新将USB设备与主机进行连接后,主机重复执行步骤S10和步骤S20。
本发明一优选实施例中,所述USB设备的驱动方法还包括:
主机在侦测到用户对当前的用户权限和/或用户信息进行修改、添加或删除操作时,将用户进行完修改、添加或删除操作后得到的新的用户权限和/或新的用户信息发送至USB设备供USB设备进行用户权限和/或用户信息的更新。
本实施例在用户权限和/或用户信息被修改、删除或添加时,可使新的用户权限和/或用户信息在主机与USB设备中同步。
下面举两个本发明USB设备的驱动方法的应用实例帮助理解,但并不用于限定本发明。
例一、USB设备为手机,该手机中预先设置有三种用户权限,分别为“Administrator”、“Guest1”、“Guest2”,Administrator的权限对应的功能为读写、电话本、信息备份,Guest1的权限对应的功能为电话本、信息备份,Guest2的权限对应的功能为信息备份。该手机与主机连接后,主机发送获取指令至手机,手机响应该获取指令,并发送用户信息至手机,该用户信息包括“Administrator”、“Guest1”、“Guest2”三个用户账号,主机展示该三个用户账号,用户若选择“Administrator”并输入相应密码一,主机发送该密码一至手机,手机验证该密码是否正确,若正确,则查找Administrator对应的功能,得到读写、电话本、信息备份三种功能,手机将这三种功能的配置信息发送至主机,例如,读写功能对应的配置信息为手机的存储空间信息,手机根据这三种功能的配置信息,生成这三种功能对应的功能端口,例如,手机根据手机的存储空间信息,生成虚拟的MASS STORAGE设备并生成相应的功能端口,用户通过虚拟的MASS STORAGE设备对手机进行读写操作。而对应于Guest1、Guest2的权限范围并不包括读写,因此,主机不会提供虚拟的MASS STORAGE设备及对应的端口。
例二、USB设备是自带移动数字电视解码芯片的多功能USB设备,主机设置于电视机中,该USB设备中预先设置有两种用户权限,分别为“Administrator”、“TV Viewer(电视机观看者)”,Administrator的权限对应的功能包括所有USB设备支持的功能,TV Viewer的权限对应的功能仅为与移动数字电视功能相关的功能,当USB设备与电视机连接时,用户以Administrator的身份登录,即USB设备确定用户的用户权限为Administrator,此处具体如何确定用户的权限可由上述实施例及例一中可获知,此处不作赘述。若用户只想观看数字电视,即只需要TV Viewer的权限,则进行用户权限的切换操作,将Administrator切换为TV Viewer,并输入TV Viewer的验证信息,主机将该验证信息发送至USB设备,USB设备根据该验证信息确定当前用户的权限为TV Viewer,并设置仅包括与移动数字电视功能相关的功能配置信息,并将该与移动数字电视功能相关的功能配置信息发送至USB设备,USB设备根据该功能配置信息,重新生成与移动数字电视功能相关的功能接口,而删除其他功能接口。
本发明实施例进一步提供一种USB设备的驱动方法。
参照图4,图4为本发明USB设备的驱动方法第四实施例的流程示意图。
本发明USB设备的驱动方法第四实施例中,该USB设备的驱动方法包括:
步骤S100,在主机与USB设备建立连接后,USB设备获取用户权限,并根据用户权限设置功能配置信息;
主机在与USB设备建立连接后,可由主机获取用户的用户权限,也可由USB设备获取用户的权限,获取用户权限的方法可以是通过密码验证、人脸识别、手势验证、声音验证、指纹验证等方式进行。其中,用户权限可预先设置,根据用户的需求,可设置为Administrator(管理员)、Guest(访客),也可设置为多个用户权限等级,本发明对此不作限定。
功能配置信息是USB设备根据用户权限设置的,功能配置信息包括用户权限可使用的功能端口的配置。
步骤S200,USB设备发送所述功能配置信息至主机,供主机根据所述功能配置信息生成与所述功能配置信息对应的功能端口。
由于功能配置信息是由USB设备根据用户权限设置的,因此,主机根据该功能配置信息对应生成的功能端口即为用户权限对应的功能端口。
主机根据功能配置信息生成与该功能配置信息对应的功能端口的方法与现有技术相似,在此不作赘述。
本实施例USB设备根据用户权限设置相应的功能配置信息,主机根据USB设备设置的功能配置信息生成功能端口,因此,本实施例中,对于不同的用户权限,该用户可使用的功能端口是不同的,即用户可使用的功能也是不同的,因此,能提升USB设备的安全性,且功能端口的配置更灵活;此外,根据一些用户权限仅对应生成部分功能端口,USB设备不需要同时在主机上开启其所有的功能端口,因此,可提升USB设备的性能、降低功耗。
参照图5,图5为本发明USB设备的驱动方法第五实施例的流程示意图。
本发明USB设备的驱动方法第五实施例中,本实施例在第四实施例的基础上,所述步骤S100包括:
步骤S110,USB设备接收主机发送的获取指令;
在主机与USB设备建立连接后,或者,在主机与USB设备重新建立连接后,主机发送获取指令至USB设备。
步骤S120,USB设备响应所述获取指令并发送用户信息至主机;
USB设备接收到获取指令后,响应该获取指令,将用户信息发送至主机,以使主机获得USB设备的所有用户。
步骤S130,USB设备接收主机在侦测到用户输入验证信息时发送的所述验证信息;
主机可通过屏幕显示、语音播报等方式展示该USB设备的用户账号或其他用户信息以供用户选择一用户账号进行登录。用户可通过按键、手势、语音、文字输入、采集指纹等方式输入验证信息。
主机在侦测到用户输入验证信息时,将用户输入的验证信息发送至USB设备。
步骤S140,USB设备根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息。
USB设备根据该验证信息,对用户的身份进行验证,在用户输入的验证信息通过USB设备的验证时,USB设备确定该用户的用户权限,并根据该用户权限设置相应的功能配置信息,在用户输入的验证信息未通过USB设备的验证时,不执行下述步骤,或者,反馈主机验证失败并请求主机重新进行验证。在一些实施例中,USB设备可将验证信息与用户权限的验证信息进行匹配,在存在用户权限的验证信息与用户输入的验证信息匹配时,确定与用户输入的验证信息匹配的用户权限为该用户的用户权限;在不存在用户权限的验证信息与用户输入的验证信息匹配时,确定该用户的用户权限为最低用户权限。
USB设备设置用户权限相应的功能配置信息的方法可以是:预置映射表,该映射表中包含用户权限与各功能的映射关系,根据用户权限可查找到该用户权限对应的功能,USB设备将查找到的这些功能的配置信息作为功能配置信息;或者,可以是其他任何适用的方法。
在一些实施例中,也可以是通过主机确定用户权限。例如,主机侦测到用户输入验证信息时,根据该验证信息确定用户权限;主机发送携带用户权限的获取指令至USB设备,USB设备响应该获取指令,根据该用户权限设置相应的功能配置信息,并发送该功能配置信息至主机,主机接收该功能配置信息。
参照图6,图6为本发明USB设备的驱动方法第六实施例的流程示意图。
本发明USB设备的驱动方法第六实施例中,本实施例在第四实施例、第五实施例的基础上,所述步骤S200之后,所述USB设备的驱动方法包括:
步骤S300,在主机侦测到用户切换用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,USB设备接收主机发送的所述新的验证信息;
主机可预先设置虚拟按钮获取其他切换标识供用户进行切换用户权限至新的用户权限,当然,用户切换用户权限至新的用户权限的操作并不限于此,还可以是任何适用的方式。
用户进行切换用户权限至新的用户权限的操作,并输入新的验证信息,主机将用户输入的新的验证信息发送至USB设备。
步骤S400,USB设备根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
其中,USB设备根据新的验证信息重新确定新的用户权限的方式与上述第五实施例的方法相同,在此不作赘述。
同样,USB设备根据新的用户权限设置相应的新的功能配置信息的方式也与上述第五实施例的方法可以相同,但本实施例中,USB根据新的用户权限设置相应的新的功能配置的方式也可以是:将当前用户权限对应的功能与新的用户权限对应的功能进行比较,添加或者删除部分功能,从而得到新的用户权限对应的新的功能配置信息。
步骤S500,USB设备发送所述新的功能配置信息至主机,供主机根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
主机根据新的功能配置信息,重新生成与新的功能配置信息对应的功能端口的方式与上述第五实施例的方法可以相同,本实施例中,主机根据新的功能配置信息,重新生成与新的功能配置信息对应的功能端口的方法也可以是:根据新的功能配置信息对应的功能端口与当前启用的功能端口进行比较,根据新的功能配置信息添加或删除部分功能端口,得到与新的功能配置信息对应的功能端口。
本实施例中,也可以是通过主机确定新的用户权限,其方法与上述第二实施例的方法相同,在此不作赘述。
本实施例在用户进行用户权限的切换时,USB设备可重新设置新的功能配置信息,而主机也可根据新的功能配置信息生成对应的功能端口。本实施例在用户进行用户权限的切换时,不需要重启USB PHY,使得切换过程的效果更平滑、更高效。
本发明一优选实施例中,若用户切断主机与USB设备的连接,并重新将USB设备与主机进行连接后,USB设备重复执行步骤S100和步骤S200。
本发明一优选实施例中,所述USB设备的驱动方法还包括:
USB设备接收主机在侦测到用户对当前的用户权限和/或用户信息进行修改、添加或删除操作时发送的用户进行完修改、添加或删除操作后得到的新的用户权限和/或新的用户信息;
USB设备根据该新的用户权限和/或新的用户信息进行用户权限和/或用户信息的更新。
本实施例在用户权限和/或用户信息被修改、删除或添加时,可使新的用户权限和/或用户信息在主机与USB设备中同步。
本发明进一步提供一种主机。
参照图7,图7为本发明主机第一实施例的功能模块示意图。
本发明主机第一实施例中,该主机包括:
第一获取模块10,设置为在主机与USB设备建立连接后,获取USB设备根据用户权限设置的功能配置信息;
第一生成模块20,设置为根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口。
主机在与USB设备建立连接后,可由第一获取模块10获取用户的用户权限,也可由USB设备获取用户的权限,获取用户权限的方法可以是通过密码验证、人脸识别、手势验证、声音验证、指纹验证等方式进行。其中,用户权限可预先设置,根据用户的需求,可设置为Administrator(管理员)、Guest(访客),也可设置为多个用户权限等级,本发明对此不作限定。
功能配置信息是USB设备根据用户权限设置的,功能配置信息包括用户权限可使用的功能端口的配置。
由于功能配置信息是由USB设备根据用户权限设置的,因此,第一生成模块20根据该功能配置信息对应生成的功能端口即为用户权限对应的功能端口。
第一生成模块20根据功能配置信息生成与该功能配置信息对应的功能端口的方法与现有技术相似,在此不作赘述。
本实施例USB设备根据用户权限设置相应的功能配置信息,第一生成模块20根据USB设备设置的功能配置信息生成功能端口,因此,本实施例中,对于不同的用户 权限,该用户可使用的功能端口是不同的,即用户可使用的功能也是不同的,因此,能提升USB设备的安全性,且功能端口的配置更灵活;此外,根据一些用户权限仅对应生成部分功能端口,USB设备不需要同时在主机上开启其所有的功能端口,因此,可提升USB设备的性能、降低功耗。
参照图8,图8为本发明主机第二实施例的功能模块示意图。
本发明主机第二实施例中,本实施例在第一实施例的基础上,所述第一获取模块10包括:
第一发送单元11,设置为发送获取指令至USB设备;
第一接收单元12,设置为接收USB设备响应所述获取指令而发送的用户信息;
侦测单元13,设置为在侦测到用户输入验证信息时,将用户输入的所述验证信息发送至USB设备,供USB设备根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息;
第二接收单元14,设置为接收USB设备发送的所述功能配置信息。
在主机与USB设备建立连接后,或者,在主机与USB设备重新建立连接后,第一发送单元11发送获取指令至USB设备。
USB设备接收到获取指令后,响应该获取指令,将用户信息发送至第一接收单元12,以使第一接收单元12获得USB设备的所有用户。
侦测单元13可通过屏幕显示、语音播报等方式展示该USB设备的用户账号或其他用户信息以供用户选择一用户账号进行登录。用户可通过按键、手势、语音、文字输入、采集指纹等方式输入验证信息。
侦测单元13在侦测到用户输入验证信息时,将用户输入的验证信息发送至USB设备,USB设备根据该验证信息,对用户的身份进行验证,在用户输入的验证信息通过USB设备的验证时,USB设备确定该用户的用户权限,并根据该用户权限设置相应的功能配置信息,在用户输入的验证信息未通过USB设备的验证时,不执行下述步骤,或者,反馈侦测单元13验证失败并请求侦测单元13重新进行验证。在一些实施例中,USB设备可将验证信息与用户权限的验证信息进行匹配,在存在用户权限的验证信息与用户输入的验证信息匹配时,确定与用户输入的验证信息匹配的用户权限为 该用户的用户权限;在不存在用户权限的验证信息与用户输入的验证信息匹配时,确定该用户的用户权限为最低用户权限。
USB设备设置用户权限相应的功能配置信息的方法可以是:预置映射表,该映射表中包含用户权限与各功能的映射关系,根据用户权限可查找到该用户权限对应的功能,USB设备将查找到的这些功能的配置信息作为功能配置信息;或者,可以是其他任何适用的方法。
在一些实施例中,也可以是通过侦测单元13确定用户权限。例如,侦测单元13侦测到用户输入验证信息时,根据该验证信息确定用户权限;侦测单元13发送携带用户权限的获取指令至USB设备,USB设备响应该获取指令,根据该用户权限设置相应的功能配置信息,并发送该功能配置信息至第二接收单元14,第二接收单元14接收该功能配置信息。
参照图9,图9为本发明主机第三实施例的功能模块示意图。
本发明主机第三实施例中,本实施例在第一实施例、第二实施例的基础上,所述主机包括:
第一发送模块30,设置为在主机侦测到用户切换所述用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,将用户输入的所述新的验证信息发送至USB设备,供USB设备根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
第一接收模块40,设置为接收USB设备发送的所述新的功能配置信息;
第二生成模块50,设置为根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
第一发送模块30可预先设置虚拟按钮获取其他切换标识供用户进行切换用户权限至新的用户权限,当然,用户切换用户权限至新的用户权限的操作并不限于此,还可以是任何适用的方式。
用户进行切换用户权限至新的用户权限的操作,并输入新的验证信息,第一发送模块30将用户输入的新的验证信息发送至USB设备,USB设备根据新的验证信息重新确定新的用户权限并根据新的用户权限设置相应的新的功能配置信息。
其中,USB设备根据新的验证信息重新确定新的用户权限的方式与上述第二实施例的方法相同,在此不作赘述。
同样,USB设备根据新的用户权限设置相应的新的功能配置信息的方式也与上述第二实施例的方法可以相同,但本实施例中,USB根据新的用户权限设置相应的新的功能配置的方式也可以是:将当前用户权限对应的功能与新的用户权限对应的功能进行比较,添加或者删除部分功能,从而得到新的用户权限对应的新的功能配置信息。
第二生成模块50根据新的功能配置信息,重新生成与新的功能配置信息对应的功能端口的方式与上述第二实施例的方法可以相同,本实施例中,第二生成模块50根据新的功能配置信息,重新生成与新的功能配置信息对应的功能端口的方法也可以是:根据新的功能配置信息对应的功能端口与当前启用的功能端口进行比较,根据新的功能配置信息添加或删除部分功能端口,得到与新的功能配置信息对应的功能端口。
本实施例中,也可以是通过第一发送模块30确定新的用户权限,其方法与上述第二实施例的方法相同,在此不作赘述。
本实施例在用户进行用户权限的切换时,USB设备可重新设置新的功能配置信息,而第二生成模块50也可根据新的功能配置信息生成对应的功能端口。本实施例在用户进行用户权限的切换时,不需要重启USB PHY,使得切换过程的效果更平滑、更高效。
本发明一优选实施例中,若用户切断主机与USB设备的连接,并重新将USB设备与主机进行连接后,主机重复执行步骤S10和步骤S20。
本发明一优选实施例中,所述主机还包括:
第一更新模块(图中未示出),设置为在侦测到用户对当前的用户权限和/或用户信息进行修改、添加或删除操作时,将用户进行完修改、添加或删除操作后得到的新的用户权限和/或新的用户信息发送至USB设备供USB设备进行用户权限和/或用户信息的更新。
本实施例在用户权限和/或用户信息被修改、删除或添加时,可使新的用户权限和/或用户信息在主机与USB设备中同步。
本发明进一步提供一种USB设备。
参照图10,图10为本发明USB设备第四实施例的功能模块示意图。
本发明USB设备第四实施例中,该USB设备包括:
第一设置模块100,设置为在主机与USB设备建立连接后,获取用户权限,并根据获取的用户权限设置功能配置信息;
第二发送模块200,设置为发送所述功能配置信息至主机,供主机根据所述功能配置信息生成与所述功能配置信息对应的功能端口。
主机在与USB设备建立连接后,可由主机获取用户的用户权限,也可由第一设置模块100获取用户的权限,获取用户权限的方法可以是通过密码验证、人脸识别、手势验证、声音验证、指纹验证等方式进行。其中,用户权限可预先设置,根据用户的需求,可设置为Administrator(管理员)、Guest(访客),也可设置为多个用户权限等级,本发明对此不作限定。
功能配置信息是第一设置模块100根据用户权限设置的,功能配置信息包括用户权限可使用的功能端口的配置。
由于功能配置信息是由第一设置模块100根据用户权限设置的,因此,主机根据该功能配置信息对应生成的功能端口即为用户权限对应的功能端口。
主机根据功能配置信息生成与该功能配置信息对应的功能端口的方法与现有技术相似,在此不作赘述。
本实施例第一设置模块100根据用户权限设置相应的功能配置信息,主机根据第一设置模块100设置的功能配置信息生成功能端口,因此,本实施例中,对于不同的用户权限,该用户可使用的功能端口是不同的,即用户可使用的功能也是不同的,因此,能提升USB设备的安全性,且功能端口的配置更灵活;此外,根据一些用户权限仅对应生成部分功能端口,USB设备不需要同时在主机上开启其所有的功能端口,因此,可提升USB设备的性能、降低功耗。
参照图11,图11为本发明USB设备第五实施例的功能模块示意图。
本发明USB设备第五实施例中,本实施例在第四实施例的基础上,所述第一设置模块100包括:
第三接收单元110,设置为接收主机发送的获取指令;
第二发送单元120,设置为响应所述获取指令并发送用户信息至主机;
第四接收单元130,设置为接收主机在侦测到用户输入验证信息时发送的所述验证信息;
设置单元140,设置为根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息。
在主机与USB设备建立连接后,或者,在主机与USB设备重新建立连接后,主机发送获取指令至USB设备。
第二发送单元120接收到获取指令后,响应该获取指令,将用户信息发送至主机,以使主机获得USB设备的所有用户。
主机可通过屏幕显示、语音播报等方式展示该USB设备的用户账号或其他用户信息以供用户选择一用户账号进行登录。用户可通过按键、手势、语音、文字输入、采集指纹等方式输入验证信息。
主机在侦测到用户输入验证信息时,将用户输入的验证信息发送至第四接收单元130。
设置单元140根据该验证信息,对用户的身份进行验证,在用户输入的验证信息通过设置单元140的验证时,设置单元140确定该用户的用户权限,并根据该用户权限设置相应的功能配置信息,在用户输入的验证信息未通过设置单元140的验证时,不执行下述步骤,或者,反馈主机验证失败并请求主机重新进行验证。在一些实施例中,设置单元140可将验证信息与用户权限的验证信息进行匹配,在存在用户权限的验证信息与用户输入的验证信息匹配时,确定与用户输入的验证信息匹配的用户权限为该用户的用户权限;在不存在用户权限的验证信息与用户输入的验证信息匹配时,确定该用户的用户权限为最低用户权限。
设置单元140设置用户权限相应的功能配置信息的方法可以是:预置映射表,该映射表中包含用户权限与各功能的映射关系,根据用户权限可查找到该用户权限对应的功能,设置单元140将查找到的这些功能的配置信息作为功能配置信息;或者,可以是其他任何适用的方法。
在一些实施例中,也可以是通过主机确定用户权限。例如,主机侦测到用户输入验证信息时,根据该验证信息确定用户权限;主机发送携带用户权限的获取指令至第一设置模块100,第一设置模块100响应该获取指令,根据该用户权限设置相应的功能配置信息,并发送该功能配置信息至主机,主机接收该功能配置信息。
参照图12,图12为本发明USB设备第六实施例的功能模块示意图。
本发明USB设备第六实施例中,本实施例在第四实施例、第五实施例的基础上,USB设备包括:
第二接收模块300,设置为在主机侦测到用户切换用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,接收主机发送的所述新的验证信息;
第二设置模块400,设置为根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
第三发送模块500,设置为发送所述新的功能配置信息至主机,供主机根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
主机可预先设置虚拟按钮获取其他切换标识供用户进行切换用户权限至新的用户权限,当然,用户切换用户权限至新的用户权限的操作并不限于此,还可以是任何适用的方式。
用户进行切换用户权限至新的用户权限的操作,并输入新的验证信息,主机将用户输入的新的验证信息发送至第二接收模块300。
其中,第二设置模块400根据新的验证信息重新确定新的用户权限的方式与上述第五实施例的方法相同,在此不作赘述。
同样,第二设置模块400根据新的用户权限设置相应的新的功能配置信息的方式也与上述第五实施例的方法可以相同,但本实施例中,USB根据新的用户权限设置相应的新的功能配置的方式也可以是:将当前用户权限对应的功能与新的用户权限对应的功能进行比较,添加或者删除部分功能,从而得到新的用户权限对应的新的功能配置信息。
主机根据新的功能配置信息,重新生成与新的功能配置信息对应的功能端口的方式与上述第五实施例的方法可以相同,本实施例中,主机根据新的功能配置信息,重新生成与新的功能配置信息对应的功能端口的方法也可以是:根据新的功能配置信息对应的功能端口与当前启用的功能端口进行比较,根据新的功能配置信息添加或删除部分功能端口,得到与新的功能配置信息对应的功能端口。
本实施例中,也可以是通过主机确定新的用户权限,其方法与上述第二实施例的方法相同,在此不作赘述。
本实施例在用户进行用户权限的切换时,第二设置模块400可重新设置新的功能配置信息,而主机也可根据新的功能配置信息生成对应的功能端口。本实施例在用户进行用户权限的切换时,不需要重启USB PHY,使得切换过程的效果更平滑、更高效。
本发明一优选实施例中,若用户切断主机与USB设备的连接,并重新将USB设备与主机进行连接后,USB设备重复执行步骤S100和步骤S200。
本发明一优选实施例中,所述USB设备还包括:
第二更新模块(图中未示出),设置为接收主机在侦测到用户对当前的用户权限和/或用户信息进行修改、添加或删除操作时发送的用户进行完修改、添加或删除操作后得到的新的用户权限和/或新的用户信息;
第二更新模块根据该新的用户权限和/或新的用户信息进行用户权限和/或用户信息的更新。
本实施例在用户权限和/或用户信息被修改、删除或添加时,可使新的用户权限和/或用户信息在主机与USB设备中同步。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
工业实用性
本发明实施例在主机与USB设备建立连接后,主机获取USB设备根据用户权限设置的功能配置信息;主机根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口。本发明USB设备根据用户权限设置相应的功能配置信息,主机根据USB设备设置的功能配置信息生成功能端口,因此,本发明能提升USB设备的安全性,且功能端口的配置更灵活;此外,根据一些用户权限仅对应生成部分功能端口,从而可提升USB设备的性能、降低功耗。

Claims (12)

  1. 一种通用串行总线USB设备的驱动方法,包括以下步骤:
    在主机与USB设备建立连接后,主机获取USB设备根据用户权限设置的功能配置信息;
    主机根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口。
  2. 如权利要求1所述的USB设备的驱动方法,其中,所述主机获取USB设备根据用户权限设置的功能配置信息的步骤包括:
    主机发送获取指令至USB设备;
    主机接收USB设备响应所述获取指令而发送的用户信息;
    主机在侦测到用户输入验证信息时,将用户输入的所述验证信息发送至USB设备,供USB设备根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息;
    主机接收USB设备发送的所述功能配置信息。
  3. 如权利要求1或2所述的USB设备的驱动方法,其中,所述主机根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口的步骤之后,所述USB设备的驱动方法包括:
    在主机侦测到用户切换所述用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,将用户输入的所述新的验证信息发送至USB设备,供USB设备根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
    主机接收USB设备发送的所述新的功能配置信息;
    主机根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
  4. 一种通用串行总线USB设备的驱动方法,包括以下步骤:
    在主机与USB设备建立连接后,USB设备获取用户权限,并根据获取的用户权限设置功能配置信息;
    USB设备发送所述功能配置信息至主机,供主机根据所述功能配置信息生成与所述功能配置信息对应的功能端口。
  5. 如权利要求4所述的USB设备的驱动方法,其中,所述USB设备获取用户权限,并根据获取的用户权限设置功能配置信息的步骤包括:
    USB设备接收主机发送的获取指令;
    USB设备响应所述获取指令并发送用户信息至主机;
    USB设备接收主机在侦测到用户输入验证信息时发送的所述验证信息;
    USB设备根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息。
  6. 如权利要求4或5所述的USB设备的驱动方法,其中,所述USB设备发送所述功能配置信息至主机,供主机根据所述功能配置信息生成与所述功能配置信息对应的功能端口的步骤之后,所述USB设备的驱动方法包括:
    在主机侦测到用户切换用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,USB设备接收主机发送的所述新的验证信息;
    USB设备根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
    USB设备发送所述新的功能配置信息至主机,供主机根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
  7. 一种主机,包括:
    第一获取模块,设置为在主机与通用串行总线USB设备建立连接后,获取USB设备根据用户权限设置的功能配置信息;
    第一生成模块,设置为根据获取的功能配置信息,生成与所述功能配置信息对应的功能端口。
  8. 如权利要求7所述的主机,其中,所述第一获取模块包括:
    第一发送单元,设置为发送获取指令至USB设备;
    第一接收单元,设置为接收USB设备响应所述获取指令而发送的用户信息;
    侦测单元,设置为在侦测到用户输入验证信息时,将用户输入的所述验证信息发送至USB设备,供USB设备根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息;
    第二接收单元,设置为接收USB设备发送的所述功能配置信息。
  9. 如权利要求7或8所述的主机,其中,所述主机包括:
    第一发送模块,设置为在侦测到用户切换所述用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,将用户输入的所述新的验证信息发送至USB设备,供USB设备根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
    第一接收模块,设置为接收USB设备发送的所述新的功能配置信息;
    第二生成模块,设置为根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
  10. 一种通用串行总线USB设备,包括:
    第一设置模块,设置为在主机与USB设备建立连接后,获取用户权限,并根据获取的用户权限设置功能配置信息;
    第二发送模块,设置为发送所述功能配置信息至主机,供主机根据所述功能配置信息生成与所述功能配置信息对应的功能端口。
  11. 如权利要求10所述的USB设备,其中,所述第一设置模块包括:
    第三接收单元,设置为接收主机发送的获取指令;
    第二发送单元,设置为响应所述获取指令并发送用户信息至主机;
    第四接收单元,设置为接收主机在侦测到用户输入验证信息时发送的所述验证信息;
    设置单元,设置为根据所述验证信息确定用户权限并根据所述用户权限设置相应的功能配置信息。
  12. 如权利要求10或11所述的USB设备,其中,所述USB设备包括:
    第二接收模块,设置为在主机侦测到用户切换用户权限至新的用户权限的操作,且侦测到用户输入新的验证信息时,接收主机发送的所述新的验证信息;
    第二设置模块,设置为根据所述新的验证信息确定新的用户权限并根据所述新的用户权限设置相应的新的功能配置信息;
    第三发送模块,设置为发送所述新的功能配置信息至主机,供主机根据所述新的功能配置信息,重新生成与所述新的功能配置信息对应的功能端口。
PCT/CN2014/092800 2014-09-12 2014-12-02 Usb设备的驱动方法、主机及usb设备 WO2015154489A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410465589.2A CN105468552A (zh) 2014-09-12 2014-09-12 Usb设备的驱动方法、主机及usb设备
CN201410465589.2 2014-09-12

Publications (1)

Publication Number Publication Date
WO2015154489A1 true WO2015154489A1 (zh) 2015-10-15

Family

ID=54287239

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/092800 WO2015154489A1 (zh) 2014-09-12 2014-12-02 Usb设备的驱动方法、主机及usb设备

Country Status (2)

Country Link
CN (1) CN105468552A (zh)
WO (1) WO2015154489A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609540A (zh) * 2021-08-03 2021-11-05 深圳市闪联信息技术有限公司 一种电子设备的usb接口可信管理方法及系统
CN115442083A (zh) * 2022-08-08 2022-12-06 黄建邦 设备接入方法、数据交换方法、装置、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108880897A (zh) * 2018-06-29 2018-11-23 平安科技(深圳)有限公司 服务器的验收方法、装置、计算机设备及存储介质
CN109976877B (zh) * 2019-03-22 2021-05-04 优刻得科技股份有限公司 利用virtio驱动实现请求的方法、装置和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080022399A1 (en) * 2006-07-21 2008-01-24 Ricoh Company, Limited Information processing apparatus, information processing method, and computer program product
CN102214279A (zh) * 2010-04-08 2011-10-12 苏州智童科技有限公司 通过外接存储设备控制主机用户权限的方法和装置
CN102799539A (zh) * 2012-06-08 2012-11-28 长沙文盾信息技术有限公司 一种安全优盘及其数据主动防护方法
CN103942478A (zh) * 2013-01-22 2014-07-23 浙江安科网络技术有限公司 一种身份验证与权限管理方法和设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533452B (zh) * 2009-04-17 2012-05-09 宏碁电脑(上海)有限公司 一种对usb接口进行密码保护的方法
KR101156102B1 (ko) * 2011-05-11 2012-06-20 이승진 보안기능이 구비된 메모리 카드 리더기 및 이를 이용한 데이터 암호화 방법
CN102368230A (zh) * 2011-10-31 2012-03-07 北京天地融科技有限公司 移动存储器的访问控制方法、移动存储器及系统
CN102622311B (zh) * 2011-12-29 2015-03-25 北京神州绿盟信息安全科技股份有限公司 Usb移动存储设备访问控制方法、装置及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080022399A1 (en) * 2006-07-21 2008-01-24 Ricoh Company, Limited Information processing apparatus, information processing method, and computer program product
CN102214279A (zh) * 2010-04-08 2011-10-12 苏州智童科技有限公司 通过外接存储设备控制主机用户权限的方法和装置
CN102799539A (zh) * 2012-06-08 2012-11-28 长沙文盾信息技术有限公司 一种安全优盘及其数据主动防护方法
CN103942478A (zh) * 2013-01-22 2014-07-23 浙江安科网络技术有限公司 一种身份验证与权限管理方法和设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609540A (zh) * 2021-08-03 2021-11-05 深圳市闪联信息技术有限公司 一种电子设备的usb接口可信管理方法及系统
CN113609540B (zh) * 2021-08-03 2024-07-09 深圳市闪联信息技术有限公司 一种电子设备的usb接口可信管理方法及系统
CN115442083A (zh) * 2022-08-08 2022-12-06 黄建邦 设备接入方法、数据交换方法、装置、设备及存储介质
CN115442083B (zh) * 2022-08-08 2023-08-25 黄建邦 设备接入方法、数据交换方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN105468552A (zh) 2016-04-06

Similar Documents

Publication Publication Date Title
CN107534653B (zh) 基于云的跨设备的数字笔配对
US9781123B2 (en) Methods of providing social network service and server performing the same
US10897455B2 (en) System and method for identity authentication
EP3108613B1 (en) Method and apparatus for authenticating client credentials
CN101436233B (zh) 一种硬盘多用户分区切换控制方法、系统及计算机终端
WO2018228199A1 (zh) 一种授权方法以及相关设备
US9930705B2 (en) Mobile terminal control method, apparatus and system
WO2015154489A1 (zh) Usb设备的驱动方法、主机及usb设备
US20150242609A1 (en) Universal Authenticator Across Web and Mobile
US10320571B2 (en) Techniques for authenticating devices using a trusted platform module device
US10409972B2 (en) Fingerprint recognition method and mobile terminal
WO2014075231A1 (zh) 双因素认证方法及虚拟机设备
CN103164260A (zh) 用于移动终端的应用程序管理系统及方法
EP3134863B1 (en) Methods of providing social network service and server performing the same
KR100991191B1 (ko) 컴퓨터 보안 모듈 및 이를 적용한 컴퓨터 장치
US8713653B2 (en) Data processing apparatus, activation control method, and computer-readable storage medium
US20150180848A1 (en) Push-Based Trust Model For Public Cloud Applications
CN109831304B (zh) 一种身份认证设备的多应用方法及系统
CN112165706B (zh) 设备连接管理方法、装置及蓝牙设备
CN108990041B (zh) 一种进行主副卡设置的方法和设备
CN103971057A (zh) 一种移动通信智能终端的可信路径实现方法及系统
TWI581189B (zh) 一種虛擬機控制系統、方法及使用者終端
US11132471B1 (en) Methods and apparatus for secure access
CN103902873A (zh) 移动设备、使用移动设备进行身份认证的方法
JP2013254502A (ja) 情報処理装置、プログラム、認証方法

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

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

Country of ref document: EP

Kind code of ref document: A1