CN109522246A - A kind of method and apparatus remotely accessing more USB devices - Google Patents

A kind of method and apparatus remotely accessing more USB devices Download PDF

Info

Publication number
CN109522246A
CN109522246A CN201811402690.8A CN201811402690A CN109522246A CN 109522246 A CN109522246 A CN 109522246A CN 201811402690 A CN201811402690 A CN 201811402690A CN 109522246 A CN109522246 A CN 109522246A
Authority
CN
China
Prior art keywords
usb
user
data
cabinet equipment
usb devices
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201811402690.8A
Other languages
Chinese (zh)
Inventor
张敏
李楚浩
赵计波
候栋勇
孙文
张燕芳
李亚东
沈璞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Cloud Account Network Technology Co Ltd
Original Assignee
Nanjing Cloud Account Network Technology Co Ltd
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 Nanjing Cloud Account Network Technology Co Ltd filed Critical Nanjing Cloud Account Network Technology Co Ltd
Priority to CN201811402690.8A priority Critical patent/CN109522246A/en
Publication of CN109522246A publication Critical patent/CN109522246A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Abstract

The present invention provides a kind of method and apparatus for remotely accessing more USB devices, and by obtaining the open instructions sent from user, the open instructions is the instruction of the port of the USB device on the request opening remote hardware cabinet equipment;According to the open instructions, the data of whole USB devices on the remote hardware cabinet equipment are obtained;The remote data of whole USB devices on the remote hardware cabinet equipment is mapped into the client, so that the client selects the data of one or more USB devices to access in the data of whole USB devices on the remote hardware cabinet equipment;It obtains out code and executes the out code, the USB port is closed.Realization cross-region USB data transmission is reached, and the technical effect of multi-client Yu any connection communication of more rack rooms can be served.

Description

A kind of method and apparatus remotely accessing more USB devices
Technical field
The present invention relates to USB technical field more particularly to a kind of method and apparatus for remotely accessing more USB devices.
Background technique
USB technology is applied to various fields at present, such as e-commerce, bank's tax, Internet securities, USB technology also by Originally data copy simply needs to turn to comprehensive individual service.Along with the appearance of various services, how quickly simultaneously And safely and reliably identify user identity, and reduce the cost and long-range control USB device acquisition data of certification as much as possible A heat subject as current information technology field research.Such as bank's tax does authentication using USB token.
But present invention applicant during technical solution, has found the above-mentioned prior art extremely in realizing the embodiment of the present application It has the following technical problems less:
The remote access of existing USB device in control the relevant technologies there are equipment connect it is cumbersome, by territory restriction, manage The less technical problem of number of devices.
Summary of the invention
The embodiment of the invention provides a kind of method and apparatus for remotely accessing more USB devices, solve existing USB and set Standby remote access in control the relevant technologies there are equipment connect it is cumbersome, by territory restriction, the technology of management equipment negligible amounts Problem.
In view of the above problems, propose the embodiment of the present application in order to provide a kind of method for remotely accessing more USB devices and Device.
In a first aspect, can be applied to a system the present invention provides a kind of method for remotely accessing more USB devices, it is described System includes one or more hardware cabinet equipment and a client, which comprises acquisition is beaten from what user sent Instruction is opened, the open instructions is the instruction that USB port is opened in request;Open instructions is according to the open instructions, described in acquisition The data of whole USB devices on remote hardware cabinet equipment;By whole USB devices on the remote hardware cabinet equipment Remote data maps to the client, so that whole USB devices of the client on the remote hardware cabinet equipment Data in select the data of one or more USB devices to access;It obtains out code and executes the out code, it is right The USB port is closed.
Preferably, the acquisition is after the open instructions that user sends, comprising: according to the open instructions, obtains The connection status of whole USB devices on the remote hardware cabinet equipment;According to complete on the remote hardware cabinet equipment The connection status of portion's USB device, judges whether the connection status changes;If the connection status changes, right The changed USB device corresponds to cabinet and carries out data update.
Preferably, the open instructions obtains the whole on the remote hardware cabinet equipment according to the open instructions Before the data of USB device, comprising: obtain the heartbeat data packets of hardware cabinet equipment, the heartbeat data packets include described remote The essential information of journey hardware cabinet equipment;According to the heartbeat data packets, judge whether the remote hardware cabinet equipment is online; If the remote hardware cabinet equipment is online, according to the open instructions, the USB port is opened.
Preferably, described according to the heartbeat data packets, judge whether the remote hardware cabinet equipment is online, also wraps It includes: if the remote hardware cabinet equipment is not online, according to the open instructions, judging whether user is that first send is opened Instruction;If the user is first transmission open instructions, the openable USB port in user account rear is opened.
Preferably, if the user is first transmission open instructions, the openable institute in user account rear is opened State USB port, comprising: obtain user account information;Obtain user's specification account information;According to the user account information, institute User's specification account information is stated, the legitimacy of the user is verified;If the verification passes, the corresponding token of the user is obtained Information, and persistent storage is carried out to the token information;The corresponding token information of the user is obtained, and to described Token information carries out after persistent storage, comprising: obtains the id information of the user;According to the id information of the user and The token information determines whether that the user opens the USB port;If the id information of the user and described Token information is correct, then the user is allowed to open the USB port.
Preferably, if the id information of the user and the token information are correct, the user is allowed to open After the USB port, comprising: verify whether the USB port is opened;If the USB port has already turned on, the USB Port carries out mapping data transmission.
Second aspect, the present invention provides a kind of devices for remotely accessing more USB devices, can be applied to a system, described System includes one or more hardware cabinet equipment and a client, described device include:
First obtains unit, the first obtains unit are used to obtain the open instructions sent from user, the opening The instruction of USB port is opened in instruction for request;
Second obtaining unit, second obtaining unit are used to open instruction according to the open instructions, obtain described remote The data of whole USB devices on journey hardware cabinet equipment;
First map unit, first map unit is for setting whole USB on the remote hardware cabinet equipment Standby remote data maps to the client, so that whole USBs of the client on the remote hardware cabinet equipment The data of one or more USB devices are selected to access in the data of equipment;
First execution unit, first execution unit is for obtaining out code and executing the out code, to institute USB port is stated to be closed.
Preferably, described device further include:
Third obtaining unit, the third obtaining unit are used to obtain the remote hardware machine according to the open instructions The connection status of whole USB devices on cabinet equipment;
First judging unit, first judging unit are used for according to whole USB on the remote hardware cabinet equipment The connection status of equipment, judges whether the connection status changes;
First updating unit, if first updating unit changes for the connection status, to the generation The USB device of variation corresponds to cabinet and carries out data update.
Preferably, described device further include:
4th obtaining unit, the 4th obtaining unit are used to obtain the heartbeat data packets of hardware cabinet equipment, the heart Jump the essential information that data packet includes the remote hardware cabinet equipment;
Second judgment unit, the second judgment unit are used to judge the remote hardware according to the heartbeat data packets Whether cabinet equipment is online;
Second execution unit, if second execution unit is online for the remote hardware cabinet equipment, according to institute Open instructions is stated, the USB port is opened.
Preferably, described device further include:
Third judging unit, if the third judging unit is not online for the remote hardware cabinet equipment, according to The open instructions judges whether user is first transmission open instructions;
Third execution unit is opened if the third execution unit is first transmission open instructions for the user The logical openable USB port in user account rear.
Preferably, described device further include:
5th obtaining unit, the 5th obtaining unit is for obtaining user account information;
6th obtaining unit, the 6th obtaining unit is for obtaining user's specification account information;
First authentication unit, first authentication unit are used for according to the user account information, the user's specification account Number information, verifies the legitimacy of the user;
4th execution unit, the 4th execution unit is for if the verification passes, obtaining the corresponding token of the user Information, and persistent storage is carried out to the token information;
7th obtaining unit, the 7th obtaining unit are used to obtain the id information of the user;
4th judging unit, the 4th judging unit are used for id information and the token information according to the user, Determine whether that the user opens the USB port;
5th execution unit, if id information and the token information of the 5th execution unit for the user Correctly, then the user is allowed to open the USB port.
Preferably, described device further include:
Second authentication unit, second authentication unit is for verifying whether the USB port is opened;
First transmission unit, if first transmission unit has already turned on for the USB port, the USB port Carry out mapping data transmission.
The third aspect, the present invention provides a kind of device for remotely accessing more USB devices, including memory, processor and The computer program that can be run on a memory and on a processor is stored, the processor is realized following when executing described program Step: obtaining the open instructions sent from user, and the open instructions is the instruction that USB port is opened in request;Open instructions According to the open instructions, the data of whole USB devices on the remote hardware cabinet equipment are obtained;By the remote hardware The remote data of whole USB devices on cabinet equipment maps to the client, so that the client is described long-range hard The data of one or more USB devices are selected to access in the data of whole USB devices on part cabinet equipment;It is closed The out code is instructed and executed, the USB port is closed.
Fourth aspect, the present invention provides a kind of computer readable storage mediums, are stored thereon with computer program, the journey The open instructions for obtaining and sending from user is performed the steps of when sequence is executed by processor, the open instructions is that request is beaten Open the instruction of USB port;Open instructions obtains whole USB on the remote hardware cabinet equipment according to the open instructions The data of equipment;The remote data of whole USB devices on the remote hardware cabinet equipment is mapped into the client, with The client is set to select one or more USB to set in the data of whole USB devices on the remote hardware cabinet equipment Standby data access;It obtains out code and executes the out code, the USB port is closed.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects Fruit:
A kind of method and apparatus remotely accessing more USB devices provided in an embodiment of the present invention, can be applied to a system, institute Stating system includes one or more hardware cabinet equipment and a client, uses USB client soft from user by obtaining The open instructions that part is sent, the open instructions are the instruction that USB port is opened in request, remotely access more USB using the present invention The middleware software open instructions of device, method, will be complete on the long-range remote hardware cabinet equipment according to the open instructions The data of portion's USB device are mapped, and user directly selects and checks in client software.User can be described remote The data of one or more USB devices are selected to access in the data of whole USB devices on journey hardware cabinet equipment, thus It realizes and remotely accesses to multiple USB devices on cabinet, it, will by the middleware software not by regional limitation Communication connection is established between the client software of user and the cabinet hardware product of long-range accessible USB device, realizes cross-region USB data transmission, client and the middleware communication to the geographical location unaware of the cabinet hardware device, when with it is long-range USB device data access transport finishes, then issues out code by the client software of the user, and the out code is The instruction for closing the USB port will realize that the disconnection of remote USB port is extracted, only need to be with to realize client software The middleware software is linked up, without with the cabinet direct communication, and any of one or more USB devices may be selected Connection communication can also serve any connection communication of multi-client Yu more rack rooms, technical effect flexibly and fast, and then solve Determined the remote access of existing USB device in control the relevant technologies there are equipment connect it is cumbersome, by territory restriction, management equipment The technical issues of negligible amounts.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for the method for remotely accessing more USB devices in the embodiment of the present invention;
Fig. 2 is the functional schematic of cabinet in the embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram for the device for remotely accessing more USB devices in the embodiment of the present invention;
Fig. 4 is the structural schematic diagram of another device for remotely accessing more USB devices in the embodiment of the present invention.
Description of symbols: first obtains unit 11, the second obtaining unit 12, the first map unit 13, first executes list Member 14, client 201, middleware software 202, cabinet 203, bus 300, receiver 301, processor 302, transmitter 303 are deposited Reservoir 304, bus interface 306.
Specific embodiment
The embodiment of the invention provides a kind of method and apparatus for remotely accessing more USB devices, for solving existing USB Equipment remote access with control the relevant technologies on there are equipment connect it is cumbersome, by territory restriction, the skill of management equipment negligible amounts Art problem.
Technical solution general thought provided by the invention is as follows:
By obtaining the open instructions sent from user, the open instructions is the instruction that USB port is opened in request;It beats Instruction is opened according to the open instructions, obtains the data of whole USB devices on the remote hardware cabinet equipment;It will be described remote The remote data of whole USB devices on journey hardware cabinet equipment maps to the client, so that the client is described The data of one or more USB devices are selected to access in the data of whole USB devices on remote hardware cabinet equipment;It obtains It obtains out code and executes the out code, the USB port is closed.Realization cross-region usb data biography is reached Defeated, client and the middleware communication directly lead to the geographical location unaware of the cabinet hardware device without with cabinet Letter, and the technical effect of any connection communication of multi-client and more rack rooms can be served.
It should be understood that token described in the embodiment of the present invention, is computerese, it is token in computer identity certification The meaning of (interim) is the meaning marked in morphological analysis.
It should be understood that USB Hub described in the embodiment of the present invention, it is more to refer to that a USB interface can be extended to by one kind Device a, and that these interfaces can be made while being used.USB HUB according to affiliated usb protocol can be divided into USB2.0HUB, USB3.0HUB and USB3.1HUB.
It should be understood that token described in the embodiment of the present invention is computerese, it is token in computer identity certification The meaning of (interim) is the meaning marked in morphological analysis.
It should be understood that MCU described in the embodiment of the present invention is micro-control unit (Microcontroller Unit;MCU), again Claim one chip microcomputer (Single Chip Microcomputer) or single-chip microcontroller, is central processing unit (Central Process Unit;CPU frequency) and specification do appropriate reduction, and by memory (memory), counter (Timer), USB, A/ The perimeter interfaces such as D conversion, UART, PLC, DMA or even LCD driving circuit all integrate the meter for forming chip-scale on a single chip Calculation machine does various combination control for different applications.Such as mobile phone, PC periphery, remote controler, until automotive electronics, industrial Stepper motor, the control of robotic arm etc., the figure of all visible MCU.
It should be understood that ID described in the embodiment of the present invention is that identity number, account, unique encodings, exclusive number, industry are set Meter, national abbreviation, law vocabulary, universal account, decoder, software company etc., all kinds of proprietary vocabulary abbreviations.Identity card, identity Identification, is a kind of proof of identification.
It should be understood that grpc described in the embodiment of the present invention is computerese.
It should be understood that ARM described in the embodiment of the present invention is the low function that arm processor is the design of Acorn Co., Ltd, Britain Consume the first item risc microcontroller of cost.Full name is Advanced RISC Machine.
Technical solution of the present invention is described in detail below by attached drawing and specific embodiment, it should be understood that the application Specific features in embodiment and embodiment are the detailed description to technical scheme, rather than to present techniques The restriction of scheme, in the absence of conflict, the technical characteristic in the embodiment of the present application and embodiment can be combined with each other.
The terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates that there may be three kinds of passes System, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.In addition, herein Middle character "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or".
Embodiment one
Fig. 1 is a kind of flow diagram for the method for remotely accessing more USB devices in the embodiment of the present invention.As shown in Figure 1, The embodiment of the invention provides a kind of methods for remotely accessing more USB devices, can be applied to a system, and the system includes one Or more hardware cabinet equipments and a client, which comprises
Step 110: obtaining the open instructions sent from user, the open instructions is the finger that USB port is opened in request It enables.
Further, the open instructions obtains complete on the remote hardware cabinet equipment according to the open instructions Before the data of portion's USB device, comprising: obtain the heartbeat data packets of hardware cabinet equipment, the heartbeat data packets include described The essential information of remote hardware cabinet equipment;According to the heartbeat data packets, judge the remote hardware cabinet equipment whether Line;If the remote hardware cabinet equipment is online, according to the open instructions, the USB port is opened.
Specifically, user submits the request for the USB port that accesses, visitor using USB client by client software Family end software with a kind of method for remotely accessing more USB devices provided in an embodiment of the present invention as middleware software by carrying out Communication connection, is sent to middleware software for request instruction, is read out to realize to remotely having by middleware software The cabinet hardware of USB access device connects, the transmission for the request instruction that accesses.The middleware software be one operate in it is general Server program on logical computer can access one or more any described remote hardware cabinet equipment, pass through heartbeat data The presence of remote hardware cabinet equipment described in real-time management, and the remote hardware cabinet equipment is controlled by instruction.Together When, the middleware software stores the cabinet hardware equipment information accessed in the database, the middleware software It is also the cabinet and the client software allocation of communications token;The cabinet periodically sends heartbeat packet to the middleware, The heartbeat packet includes the essential information of the cabinet, such as network parameter, cabinet port, port status.
Step 120: open instructions obtains whole USB on the remote hardware cabinet equipment according to the open instructions The data of equipment.
Specifically, after the cabinet that can access USB device receives the request instruction that the client is sent, when described USB client meets access authority, determines whether the USB port connection on the cabinet is normal, more by the remote access The method of USB device sends the data of whole USB devices on the cabinet, this hair as middleware software to the client The bridge communicated between the middleware software cabinet and client software of bright embodiment, is stored with the information of all cabinets, is Cabinet and client software allocation of communications token.The client software need to only be linked up with the middleware software, without With the cabinet direct communication, and a set of middleware software can serve any connection communication of multi-client Yu more rack rooms, When the remote access of the embodiment of the present invention more USB device methods starting, the middleware software to remote hardware cabinet equipment into Row reading data.
Step 130: the remote data of whole USB devices on the remote hardware cabinet equipment is mapped into the client End, so that the client selects one or more in the data of whole USB devices on the remote hardware cabinet equipment The data of USB device access.
Specifically, establishing connection by USB client software also middleware software, can locally directly obtain remotely Whole USB device datas on cabinet, for example, printer, USB flash disk etc. USB device.The remote hardware cabinet is equipped with more Block USB HUB, every piece of USB HUB include multiple USB ports for connecting USB device progress data communication, thus long-range hard There are multiple USB devices on part cabinet equipment.Whole USB on the remote hardware cabinet are set by the middleware software Standby data map to client, and user can be directly viewable the data information of remote USB in client software, to realize Client software establishes data channel by the USB device in middleware software and insertion cabinet, is attached, makes with more equipment User can access the technical effect for establishing the remote usb device of mapping as accessing local USB device, solve existing skill It USB device remote access and is controlled by territory restriction in art, the technical issues of management equipment negligible amounts.
Specifically, the USB port on remote hardware cabinet can access one or any number of USB devices, Yong Huke To select the data of one or more USB device to be mapped to client by obtaining the whole USB device datas remotely mapped In software.Remote hardware cabinet described in the embodiment of the present invention include run Linux and system software based on ARM framework Mainboard and operation MCU and embedded software USB HUB plate, the mainboard CPU use four core Cortex-A7CPU dominant frequency 1.2Ghz cost performance is higher;CPU part also adds house dog design, and encountering crash can be restarted automatically, without manual intervention;Institute The memory for stating mainboard is eMMC, has Bad Block Management mechanism;The cabinet tail portion uses USB Type B interface base, more firm Gu;The USB HUB interface board uses No. 24 AWG winding displacements, powers to interface, for port powered stable, mainboard and interface board Power supply is equipped with storage capacitor;Mainboard and interface use reset signal, can pass through the MCU of each layer interface plate of cpu reset and own USB port, the ARM mainboard built-in type program by MCU can restart each port and to USB device carry out simulation insert It pulls out.In addition each channel USB of the USB HUB plate increases inexpensive resettable fuse, will not shadow even if interface is short-circuit Other port operations are rung, in addition, hardware cabinet equipment is supported to be greater than 100 USB interfaces in the embodiment of the present invention, are split as muti-piece USB HUB plate, every block of USB HUB plate provide 10~20 USB ports, reduce maintenance cost, be conveniently replaceable maintenance.The mainboard Application software can restart each port of the USB HUB plate by MCU chip and embedded software control and simulation plugs USB device.User in use, in the mainboard in USB HUB plate described in Linux application program management each USB port electricity Source and drive software, the mainboard establish the connection of USB by the middleware software and the client software, will own USB port information is sent to the client software by the middleware software, and by instruction control the USB device and Access data, at the same user can be connected using client software by middleware software selection it is any described in one or more Cabinet equipment carries out data access and load, and client software is established by middleware software and the USB device being inserted into cabinet Data channel allows users to the remote usb device that mapping is established in the access as accessing local USB device, meanwhile, it supports to appoint The one or more client softwares of meaning access the middleware software.To solve existing USB device remote access With in control the relevant technologies there are equipment connect it is cumbersome, by territory restriction, the technical issues of management equipment negligible amounts.
Step 140: obtaining out code and execute the out code, the USB port is closed.
Specifically, completing when client and the remote USB end equipment of selection connect, terminate data access and load, visitor Family end software sends the order for closing the USB port to the middleware software, to remotely control at the USB port The closing of USB device, thus the USB device connection closed of the client software and remote cabinet.USB is utilized to realize Access and control of the method for the more USB devices of remote access of client software through the embodiment of the present invention to remote usb device, Has no territory restriction, user is able to access that remote usb device as accessing local USB device, and the remote USB for establishing mapping is set It is standby.To solve the remote access of existing USB device in control the relevant technologies there are equipment connect it is cumbersome, by territory restriction The technical issues of.
Further, the acquisition is after the open instructions that user sends, comprising: according to the open instructions, obtains Obtain the connection status of whole USB devices on the remote hardware cabinet equipment;According on the remote hardware cabinet equipment The connection status of whole USB devices, judges whether the connection status changes;If the connection status changes, Cabinet is corresponded to the changed USB device and carries out data update.
Specifically, whole USB devices should also determine the USB device on the client software fed remote cabinet The connection status of port, judges whether connection status changes, and the middleware software stores the USB port of all cabinets Status information, if the USB port state of the cabinet changes, the cabinet can notify the middleware software in time It is updated.The middleware software is able to record the current state of all USB ports described in the cabinet, for example, USB Whether the presence or absence of equipment, the plug of USB device, USB device are occupied etc..The middleware software is by the state of USB device It is sent to client software, user obtains the current state of each remote usb device by client software, according to current state Carry out selection connection.
Further, described according to the heartbeat data packets, judge whether the remote hardware cabinet equipment is online, also wraps It includes: if the remote hardware cabinet equipment is not online, according to the open instructions, judging whether user is that first send is opened Instruction;If the user is first transmission open instructions, the openable USB port in user account rear is opened.
Further, if the user is first transmission open instructions, it is openable to open user account rear The USB port, comprising: obtain user account information;Obtain user's specification account information;According to the user account information, The user's specification account information, verifies the legitimacy of the user;If the verification passes, it is corresponding to obtain the user Token information, and persistent storage is carried out to the token information.
Specifically, the safety in order to guarantee communication, corresponding USB port have corresponding priority assignation, work as user Do not find that USB device is online in terminal, for the user being initially opened, need to carry out to put after account is opened can open it is described USB port matches according to the information saved in the user account and corresponding information and the middleware software of user's input, Then user validation is verified.Its state is pushed to the middleware software, the centre by heartbeat packet by the cabinet Part software authenticates the account according to the account information and corresponding strategy of storage, and certification, which passes through, generates corresponding token, and persistently Change stores, and does not have to open-minded again, the access right of USB port typing user account information when user reuses then In.
Further, described to obtain the corresponding token information of the user if the verification passes, and the token is believed Breath carries out after persistent storage, comprising: obtains the id information of the user;According to the id information of the user and described Token information determines whether that the user opens the USB port;If the id information of the user and the token Information is correct, then the user is allowed to open the USB port.
Further, if the id information of the user and the token information are correct, the user is allowed to beat After opening the USB port, comprising: verify whether the USB port is opened;If the USB port has already turned on, described USB port carries out mapping data transmission.
Specifically, the middleware software is equipped with encryption and decryption interface, encryption and decryption operation can be carried out to it, make the master Communication between plate and the middleware software becomes safer.Its state is pushed to described by the cabinet by heartbeat packet Middleware software, the middleware software authenticate the account according to the account information and corresponding strategy of storage, and certification passes through generation Corresponding token, and persistent storage is got off.It is all to communicate the Open Framework grpc that provides based on Google to complete.For institute The verifying for stating client software identity is carried out by the middleware software, and the middleware software is stored with client user's name And password, its access right is judged by the username and password of user, verifies the legitimacy of client, the cabinet is based on Token and ID determines whether that the client software opens the USB device information of designated port.When the identity of user obtains Verifying then allows user to open corresponding USB port, it is determined that the USB port has already turned on, then user can be by described USB port carries out data mapping transmission.The client software and the cabinet can not only connect the centre in local area network Part software realizes that the USB device of the cabinet is inserted into access and control.The middleware software can also be deployed in interconnection On net Cloud Server, the remote access by internet and the USB device of the control cabinet are realized, USB port is mapped Data transmission.
Embodiment two
In order to preferably introduce a kind of method and technology feature and use for remotely accessing more USB devices of the embodiment of the present invention On the way, applicable cases of the invention are described in detail below in conjunction with specific embodiment.
Introduction of the embodiment of the present invention is applied to the use declared dutiable goods of batch, using it is of the invention can be realized it is intelligent, automatic The solution of declaring dutiable goods changed realizes that tax table is automatically generated according to tax policy laws and regulations requirement, and one key of batch is declared, and covers full tax Kind, it realizes unattended.Enterprise can be greatly lowered to declare dutiable goods cost, raising efficiency.
With reference to Fig. 2 cabinet functional schematic, long-range control CA is mapped to the windows and is declared dutiable goods where client 201 Virtual generator terminal all clients in local area network and/or internet are realized by the USB port being inserted into CA on the cabinet 203 End can map CA, and the long-range CA that energy access map as access local CA comes.
The window client 201 issues instruction unpack enterprise CA to the middleware software 202, the middleware Software 202 authenticates the account according to the account information and corresponding strategy of storage, and certification is held by generating corresponding token Longization stores, and all communications are communicated based on Google grpc, and it is legal that the middleware software 202 carries out verifying its to identity Property, it determines whether to open port CA, receives and open attach instruction, obtained first from the middleware software 202 described Then IP, token of cabinet 203 connect the cabinet 203, obtain the read-write of the cabinet 203 as a result, to described Windows client 201 available specified USB port CA information, including company identification number, title, tax office information etc..
The foregoing is merely example of the invention, can not be used to limit the present invention, it is all in spirit of the invention and Within principle, any modification, equivalent substitution, improvement and etc. done be should be included in the scope of protection of the invention.
Embodiment three
Based on the same inventive concept of method for remotely accessing more USB devices a kind of in previous embodiment, the present invention is also A kind of device remotely accessing more USB devices is provided, can be applied to a system, the system includes one or more hardware cabinet Equipment and a client, as shown in figure 3, described device includes:
First obtains unit 11, the first obtains unit 11 is used to obtain the open instructions sent from user, described Open instructions is the instruction that USB port is opened in request;
Second obtaining unit 12, second obtaining unit 12 are used to open instruction according to the open instructions, obtain institute State the data of whole USB devices on remote hardware cabinet equipment;
First map unit 13, first map unit 13 are used for the whole on the remote hardware cabinet equipment The remote data of USB device maps to the client, so that the client is complete on the remote hardware cabinet equipment The data of one or more USB devices are selected to access in the data of portion's USB device;
First execution unit 14, first execution unit 14 are used to obtain out code and execute the out code, The USB port is closed.
Further, described device further include:
Third obtaining unit, the third obtaining unit are used to obtain the remote hardware machine according to the open instructions The connection status of whole USB devices on cabinet equipment;
First judging unit, first judging unit are used for according to whole USB on the remote hardware cabinet equipment The connection status of equipment, judges whether the connection status changes;
First updating unit, if first updating unit changes for the connection status, to the generation The USB device of variation corresponds to cabinet and carries out data update.
Further, described device further include:
4th obtaining unit, the 4th obtaining unit are used to obtain the heartbeat data packets of hardware cabinet equipment, the heart Jump the essential information that data packet includes the remote hardware cabinet equipment;
Second judgment unit, the second judgment unit are used to judge the remote hardware according to the heartbeat data packets Whether cabinet equipment is online;
Second execution unit, if second execution unit is online for the remote hardware cabinet equipment, according to institute Open instructions is stated, the USB port is opened.
Further, described device further include:
Third judging unit, if the third judging unit is not online for the remote hardware cabinet equipment, according to The open instructions judges whether user is first transmission open instructions;
Third execution unit is opened if the third execution unit is first transmission open instructions for the user The logical openable USB port in user account rear.
Further, described device further include:
5th obtaining unit, the 5th obtaining unit is for obtaining user account information;
6th obtaining unit, the 6th obtaining unit is for obtaining user's specification account information;
First authentication unit, first authentication unit are used for according to the user account information, the user's specification account Number information, verifies the legitimacy of the user;
4th execution unit, the 4th execution unit is for if the verification passes, obtaining the corresponding token of the user Information, and persistent storage is carried out to the token information;
7th obtaining unit, the 7th obtaining unit are used to obtain the id information of the user;
4th judging unit, the 4th judging unit are used for id information and the token information according to the user, Determine whether that the user opens the USB port;
5th execution unit, if id information and the token information of the 5th execution unit for the user Correctly, then the user is allowed to open the USB port.
Further, described device further include:
Second authentication unit, second authentication unit is for verifying whether the USB port is opened;
First transmission unit, if first transmission unit has already turned on for the USB port, the USB port Carry out mapping data transmission.
One of 1 embodiment one of earlier figures remotely accesses the various change mode and specific reality of the method for more USB devices Example is equally applicable to a kind of device for remotely accessing more USB devices of the present embodiment, by aforementioned to a kind of more USB of remote access The detailed description of the method for equipment, those skilled in the art are clear that a kind of more USB of remote access in the present embodiment The implementation method of the device of equipment, so this will not be detailed here in order to illustrate the succinct of book.
Example IV
Based on the same inventive concept of method for remotely accessing more USB devices a kind of in previous embodiment, the present invention is also A kind of device remotely accessing more USB devices is provided, computer program is stored thereon with, realization when which is executed by processor A kind of the step of either the authentication method of network legal power described previously method.
Wherein, in Fig. 4, bus architecture (is represented) with bus 300, and bus 300 may include any number of interconnection Bus and bridge, bus 300 will include the one or more processors represented by processor 302 and what memory 304 represented deposits The various circuits of reservoir link together.Bus 300 can also will peripheral equipment, voltage-stablizer and management circuit etc. it Various other circuits of class link together, and these are all it is known in the art, therefore, no longer carry out further to it herein Description.Bus interface 306 provides interface between bus 300 and receiver 301 and transmitter 303.Receiver 301 and transmitter 303 can be the same element, i.e. transceiver, provide the unit for communicating over a transmission medium with various other devices.
Processor 302 is responsible for management bus 300 and common processing, and memory 304 can be used for storage processor 302 when executing operation used data.
Embodiment five
Based on the same inventive concept of method for remotely accessing more USB devices a kind of in previous embodiment, the present invention is also A kind of computer readable storage medium is provided, computer program is stored thereon with, is realized when which is executed by processor following Step:
The open instructions sent from user is obtained, the open instructions is the instruction that USB port is opened in request;Opening refers to It enables according to the open instructions, obtains the data of whole USB devices on the remote hardware cabinet equipment;It will be described long-range hard The remote data of whole USB devices on part cabinet equipment maps to the client, so that the client is described long-range The data of one or more USB devices are selected to access in the data of whole USB devices on hardware cabinet equipment;It is closed It closes instruction and executes the out code, the USB port is closed.
In the specific implementation process, when which is executed by processor, method either can also be realized in embodiment one Step.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects Fruit:
A kind of method and apparatus remotely accessing more USB devices provided in an embodiment of the present invention, can be applied to a system, institute Stating system includes one or more hardware cabinet equipment and a client, uses USB client soft from user by obtaining The open instructions that part is sent, the open instructions are the instruction that USB port is opened in request, remotely access more USB using the present invention The middleware software open instructions of device, method, will be complete on the long-range remote hardware cabinet equipment according to the open instructions The data of portion's USB device are mapped, and user directly selects and checks in client software.User can be described remote The data of one or more USB devices are selected to access in the data of whole USB devices on journey hardware cabinet equipment, thus It realizes and remotely accesses to multiple USB devices on cabinet, it, will by the middleware software not by regional limitation Communication connection is established between the client software of user and the cabinet hardware product of long-range accessible USB device, realizes cross-region USB data transmission, client and the middleware communication to the geographical location unaware of the cabinet hardware device, when with it is long-range USB device data access transport finishes, then issues out code by the client software of the user, and the out code is The instruction for closing the USB port will realize that the disconnection of remote USB port is extracted, only need to be with to realize client software The middleware software is linked up, without with the cabinet direct communication, and any of one or more USB devices may be selected Connection communication can also serve any connection communication of multi-client Yu more rack rooms, technical effect flexibly and fast, and then solve Determined the remote access of existing USB device in control the relevant technologies there are equipment connect it is cumbersome, by territory restriction, management equipment The technical issues of negligible amounts.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (9)

1. a kind of method for remotely accessing more USB devices, can be applied to a system, the system includes that one or more is long-range hard Part cabinet equipment and a client, which is characterized in that the described method includes:
The open instructions sent from user is obtained, the open instructions is that request is opened on the remote hardware cabinet equipment The instruction of the port of USB device;
According to the open instructions, the data of whole USB devices on the remote hardware cabinet equipment are obtained;
The remote data of whole USB devices on the remote hardware cabinet equipment is mapped into the client, so that described Client selects the number of one or more USB devices in the data of whole USB devices on the remote hardware cabinet equipment According to accessing;
It obtains out code and executes the out code, the USB port is closed.
2. the method as described in claim 1, which is characterized in that the acquisition is after the open instructions that user sends, packet It includes:
According to the open instructions, the connection status of whole USB devices on the remote hardware cabinet equipment is obtained;
According to the connection status of whole USB devices on the remote hardware cabinet equipment, judge whether the connection status is sent out Changing;
If the connection status changes, data update is carried out to the corresponding cabinet of changed USB device.
3. the method as described in claim 1, which is characterized in that it is described according to the open instructions, obtain the remote hardware Before the data of whole USB devices on cabinet equipment, comprising:
The heartbeat data packets of the remote hardware cabinet equipment are obtained, the heartbeat data packets include that the remote hardware cabinet is set Standby essential information;
According to the heartbeat data packets, judge whether the remote hardware cabinet equipment is online;
If the remote hardware cabinet equipment is online, according to the open instructions, the USB port is opened.
4. method as claimed in claim 3, which is characterized in that it is described according to the heartbeat data packets, judge described long-range hard Whether part cabinet equipment is online, further includes:
If the remote hardware cabinet equipment is not online, according to the open instructions, judge whether user is that first send is beaten Open instruction;
If the user is first transmission open instructions, the USB port is opened after opening user account.
5. method as claimed in claim 4, which is characterized in that if the user is first transmission open instructions, The USB port is opened after opening user account, comprising:
Obtain user account information;
Obtain user's specification account information;
According to the user account information, the user's specification account information, the legitimacy of the user is verified;
If the verification passes, the corresponding token information of the user is obtained, and persistent storage is carried out to the token information;
Obtain the id information of the user;
According to the id information of the user and the token information, determine whether that the user opens the USB port;
If the id information of the user and the token information are correct, the user is allowed to open the USB port.
6. method as claimed in claim 5, which is characterized in that if the id information of the user and token letter Breath is correct, then after allowing the user to open the USB port, comprising:
Verify whether the USB port is opened;
If the USB port has already turned on, mapping data transmission is carried out by the USB port.
7. a kind of device for remotely accessing more USB devices, can be applied to a system, the system includes one or more hardware machine Cabinet equipment and a client, which is characterized in that described device includes:
First obtains unit, the first obtains unit are used to obtain the open instructions sent from user, the open instructions The instruction of USB port is opened for request;
Second obtaining unit, second obtaining unit are used to obtain the remote hardware cabinet according to the open instructions and set The data of standby upper whole USB devices;
First map unit, first map unit are used for whole USB devices on the remote hardware cabinet equipment Remote data maps to the client, so that whole USB devices of the client on the remote hardware cabinet equipment Data in select the data of one or more USB devices to access;
First execution unit, first execution unit is for obtaining out code and executing the out code, to the USB Port is closed.
8. a kind of device for remotely accessing more USB devices, including memory, processor and storage on a memory and can handled The computer program run on device, which is characterized in that the processor performs the steps of when executing described program
The open instructions sent from user is obtained, the open instructions is the instruction that USB port is opened in request;
According to the open instructions, the data of whole USB devices on the remote hardware cabinet equipment are obtained;
The remote data of whole USB devices on the remote hardware cabinet equipment is mapped into the client, so that described Client selects the number of one or more USB devices in the data of whole USB devices on the remote hardware cabinet equipment According to accessing;
It obtains out code and executes the out code, the USB port is closed.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor It is performed the steps of when row
The open instructions sent from user is obtained, the open instructions is the instruction that USB port is opened in request;
According to the open instructions, the data of whole USB devices on the remote hardware cabinet equipment are obtained;
The remote data of whole USB devices on the remote hardware cabinet equipment is mapped into the client, so that described Client selects the number of one or more USB devices in the data of whole USB devices on the remote hardware cabinet equipment According to accessing;
It obtains out code and executes the out code, the USB port is closed.
CN201811402690.8A 2018-11-23 2018-11-23 A kind of method and apparatus remotely accessing more USB devices Pending CN109522246A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811402690.8A CN109522246A (en) 2018-11-23 2018-11-23 A kind of method and apparatus remotely accessing more USB devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811402690.8A CN109522246A (en) 2018-11-23 2018-11-23 A kind of method and apparatus remotely accessing more USB devices

Publications (1)

Publication Number Publication Date
CN109522246A true CN109522246A (en) 2019-03-26

Family

ID=65778877

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811402690.8A Pending CN109522246A (en) 2018-11-23 2018-11-23 A kind of method and apparatus remotely accessing more USB devices

Country Status (1)

Country Link
CN (1) CN109522246A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110189216A (en) * 2019-05-30 2019-08-30 南京木石信息科技有限公司 A kind of system and method that automatic batch is declared dutiable goods
CN111930653A (en) * 2020-07-13 2020-11-13 四川钛阁科技有限责任公司 Remote distribution use method and device of USB (universal serial bus) equipment
CN113282527A (en) * 2021-05-08 2021-08-20 珠海金智维信息科技有限公司 Method, device and host for realizing USB equipment switching management
CN113806719A (en) * 2021-09-15 2021-12-17 大连华信计算机技术股份有限公司 Remote automatic switching system for RPA + USB cabinet to realize multi-network bank U shield
CN114116315A (en) * 2021-11-27 2022-03-01 深圳市锐宝智联信息有限公司 USB failure recovery method and system applied to industrial information security mainboard
CN117112104A (en) * 2023-08-24 2023-11-24 浙江远算科技有限公司 Local storage mapping method, equipment and medium based on remote desktop gateway

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488941A (en) * 2008-01-18 2009-07-22 中兴通讯股份有限公司 Method and system for implementing USB equipment shared using
US20100146000A1 (en) * 2008-12-04 2010-06-10 International Business Machines Corporation Administering Blade Servers In A Blade Center
CN103312781A (en) * 2013-05-15 2013-09-18 山东超越数控电子有限公司 Implementation method of virtual USB (Universal Serial Bus)
CN105183675A (en) * 2015-09-30 2015-12-23 华为技术有限公司 USB equipment access method, device and system, terminal and server
CN105378659A (en) * 2013-06-14 2016-03-02 托加里奥有限责任公司 Method and system for enabling access of client device to remote desktop

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488941A (en) * 2008-01-18 2009-07-22 中兴通讯股份有限公司 Method and system for implementing USB equipment shared using
US20100146000A1 (en) * 2008-12-04 2010-06-10 International Business Machines Corporation Administering Blade Servers In A Blade Center
CN103312781A (en) * 2013-05-15 2013-09-18 山东超越数控电子有限公司 Implementation method of virtual USB (Universal Serial Bus)
CN105378659A (en) * 2013-06-14 2016-03-02 托加里奥有限责任公司 Method and system for enabling access of client device to remote desktop
CN105183675A (en) * 2015-09-30 2015-12-23 华为技术有限公司 USB equipment access method, device and system, terminal and server

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110189216A (en) * 2019-05-30 2019-08-30 南京木石信息科技有限公司 A kind of system and method that automatic batch is declared dutiable goods
CN111930653A (en) * 2020-07-13 2020-11-13 四川钛阁科技有限责任公司 Remote distribution use method and device of USB (universal serial bus) equipment
CN113282527A (en) * 2021-05-08 2021-08-20 珠海金智维信息科技有限公司 Method, device and host for realizing USB equipment switching management
CN113806719A (en) * 2021-09-15 2021-12-17 大连华信计算机技术股份有限公司 Remote automatic switching system for RPA + USB cabinet to realize multi-network bank U shield
CN114116315A (en) * 2021-11-27 2022-03-01 深圳市锐宝智联信息有限公司 USB failure recovery method and system applied to industrial information security mainboard
CN117112104A (en) * 2023-08-24 2023-11-24 浙江远算科技有限公司 Local storage mapping method, equipment and medium based on remote desktop gateway
CN117112104B (en) * 2023-08-24 2024-03-29 浙江远算科技有限公司 Local storage mapping method, equipment and medium based on remote desktop gateway

Similar Documents

Publication Publication Date Title
CN109522246A (en) A kind of method and apparatus remotely accessing more USB devices
CN105264818B (en) A kind of certificate acquisition method and apparatus
CN104717261B (en) A kind of login method and desktop management equipment
CN105393256B (en) Calculating device and method for the security web guidance based on strategy
CN109743293A (en) The access method and network target range system, computer storage medium in network target range
CN103067404B (en) A kind of method that user accesses embedded web server
CN109672683A (en) Binding method, binding device and the terminal device of internet of things equipment
WO2006053068A2 (en) Method and system of retrieving avatar data unique to a user
CN105022939B (en) Information Authentication method and device
CN103684793B (en) A kind of method based on trust computing enhancing communication security of power distribution network
CN103500400A (en) Multi-application mobile payment system and safety method
CN103975567B (en) Two-factor authentication method and virtual machine facility
CN110198318A (en) A kind of container service user authen method
CN107580000A (en) Digital certificate authentication method and device
CN106603721A (en) Remote control method and system and remote control client
CN101315657A (en) Safe input method in Windows system
CN107682321B (en) A kind of method and device of SDN controller cluster single-sign-on
CN110493175A (en) A kind of information processing method, electronic equipment and storage medium
CN105743855B (en) A kind of safety control system of Internet application equipment and its distribution, application method
CN101593256A (en) Based on a kind of secured inputting method under the Windows operating system
CN106254328A (en) A kind of access control method and device
CN113497806B (en) Remote login method, device and storage medium
CN106161501A (en) The data sharing method of virtual desktop and device
CN110348989A (en) Line of credit method of adjustment, device and electronic equipment based on APP
CN105991575A (en) Cloud desktop login method and system thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190326