Dual-agent network isolation transmission method and device based on USBoIP and storage medium

By introducing a proxy machine between the user terminal and the host, and utilizing network proxy technology and dual proxy technology, the direct network connection between the user terminal and the host in USBoIP is cut off, thus solving the data transmission security problem between USB devices and the host in high-confidentiality situations and achieving the effect of secure and confidential data transmission.

CN120602226AActive Publication Date: 2025-09-05BANGYAN TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511086874.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-09-05
Estimated Expiration
2045-08-05

AI Technical Summary

Technical Problem

In high-security scenarios, the network connection between the remote USB device and the host based on USBoIP is limited and cannot meet security requirements.

Method used

A dual-agent network isolation transmission method is adopted. By introducing a proxy machine between the user terminal and the host, using network proxy technology and dual proxy technology, the direct network connection between the user terminal and the host is cut off, and data is forwarded through the USB bus to achieve secure and confidential data transmission.

Benefits of technology

It realizes secure and confidential data transmission in high-security scenarios and is suitable for environments that require physical network isolation. It uses dual proxy technology to cut off the direct network connection between the user terminal and the host in USBoIP, ensuring the security and confidentiality of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602226A_ABST
    Figure CN120602226A_ABST
Patent Text Reader

Abstract

The invention relates to a double-agent network isolation transmission method and device based on USBoIP and a storage medium, and the method comprises the following steps: a user terminal, an agent machine and a host machine continuously detect the access condition of remote USB equipment, if the access of the remote USB equipment is detected, a connection link is established, and after the connection link is established, the remote USB equipment is connected to the agent machine; the user terminal, the agent machine and the host communicate based on the communication data packet; the host establishes a signal connection with a remote USB device accessed to the user terminal through the proxy machine; data interaction is carried out between the host and the remote USB equipment; and after the data interaction is finished, the host is in signal connection with the remote USB equipment accessed to the user terminal through the proxy machine. Direct network connection between the remote USB equipment and the host in the USBoIP is cut off by using a dual-agent technology, and data of appointed ports of agents on the two sides are forwarded on the basis of the USB bus, so that data transmission is safe and confidential.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network transmission, and in particular to a USBoIP-based dual-proxy network isolation transmission method, device and storage medium. Background Art

[0002] Currently, the remote USB device and the host based on USBoIP technology are directly connected via Ethernet. In general applications, the remote USB device is plugged into the USB port of the user terminal; the user terminal and the host are connected via the network. The specific network connection process is as follows:

[0003] 1) The user terminal acts as the USBoIP server and listens for TCP connections on a specified port (usually port 3240);

[0004] 2) The user connects the remote USB device to the USB port of the user terminal to obtain the BUSID of the device;

[0005] 3) The user calls the usbip attach command on the host (with the newly obtained BUSID as a parameter). At this time, the VHCI (USB virtual controller) will create a new socket connected to the USBoIP service port of the user terminal.

[0006] After the connection is established, USB data packets between the host and the newly inserted remote USB device flow on this newly obtained socket.

[0007] However, in high-security situations, there cannot be a network connection between the user terminal connected to the remote USB device and the host, and the application of USBoIP is then limited. Summary of the Invention

[0008] The present invention provides a dual-proxy network isolation transmission method, device and storage medium based on USBoIP, aiming to solve at least one of the technical problems existing in the prior art.

[0009] The technical solution of the present invention is a dual-proxy network isolation transmission method based on USBoIP, which is applied to a dual-proxy network isolation transmission device based on USBoIP. The dual-proxy network isolation transmission device based on USBoIP includes a remote USB device, a user terminal, a proxy machine, and a host machine connected in sequence. The proxy machine is provided with a proxy machine network agent program, and the host machine is provided with a host network agent program. The dual-proxy network isolation transmission method based on USBoIP includes the following steps:

[0010] S100: The user terminal, the agent, and the host continuously detect access to a remote USB device. If access to a remote USB device is detected, a connection link is established. After the connection link is established, the user terminal, the agent, and the host communicate based on communication data packets.

[0011] S200, the host establishes a signal connection with a remote USB device connected to the user terminal through the proxy machine;

[0012] S300, the host interacts with the remote USB device for data exchange, wherein the host interacts with the remote USB device for data exchange including the host's virtual host controller interface VHCI sending data to the USBIP server of the user terminal and the user terminal's USBIP server sending data to the host's virtual host controller interface VHCI;

[0013] S400: After the data interaction is completed, the host deletes the signal connection with the remote USB device connected to the user terminal through the proxy machine.

[0014] Furthermore, step S100 includes the following steps:

[0015] S110, the user terminal, the agent network agent program of the agent machine, and the host network agent program on the host side continuously monitor a TCP connection signal established by a remote USB device connecting to the user terminal;

[0016] S120: If it is detected that a remote USB device is connected to the USB interface of the user terminal, a bus identifier BUSID of the remote USB device is assigned;

[0017] S130, the host network agent program waits for a connection from the virtual host controller interface VHCI via the USB over IP (USBoIP) protocol service port. The host invokes a usbip attach command including a bus identifier BUSID parameter. The host virtual host controller interface VHCI establishes a second socket (socket B) based on the transmission control protocol TCP to connect to the local host network agent program on the host.

[0018] S140, establishing a virtual channel between the host network agent of the host and the agent network agent of the agent;

[0019] S150 , the proxy network agent program of the proxy machine creates a first socket (socket A) based on the transmission control protocol TCP to connect to the USBoIP service port of the user terminal.

[0020] Further, in step S110,

[0021] The proxy network agent program is connected to the user terminal as a client, and the host network agent program monitors the TCP connection through the USBoIP service port.

[0022] Furthermore, step S200 includes the following steps:

[0023] S210 , the virtual host controller interface VHCI of the host initiates a second socket (socket B) connection request to the local monitoring USB over IP (USBoIP) protocol service port;

[0024] S220: The host network agent program of the host accepts the connection request and applies for a corresponding channel number, and sends a connection establishment data packet to the agent network agent program of the agent;

[0025] S230, the proxy network agent program of the proxy machine receives the connection establishment data packet and extracts the target port number, and initiates a connection request to the USBoIP server of the user terminal through the first socket (socket A);

[0026] S240, the USBoIP server of the user terminal accepts the connection request and returns information to the proxy network agent program of the proxy machine;

[0027] S250, the proxy network agent program saves the channel number and responds to the host network agent program that the connection is successfully established;

[0028] S260: The proxy network agent program of the host saves the channel number and feeds back connection acceptance information to the virtual host controller interface VHCI of the host.

[0029] Furthermore, in step S300, the virtual host controller interface VHCI of the host sends data to the USBIP server of the user terminal, including the following steps:

[0030] S310 , the virtual host controller interface VHCI of the host sends data to the second socket (socket B);

[0031] S320, the host network agent program of the host obtains the channel number cN according to the index of the second socket (socket B) value and performs packet processing on the data;

[0032] S330: The host network agent of the host sends a transmission data packet to the agent network agent of the agent;

[0033] S340 , the proxy network agent program of the proxy machine obtains the second socket (socket B) value according to the channel number cN index, disassembles the transmission data packet, and sends the data to the USBoIP server of the user terminal through the first socket (socket A).

[0034] Furthermore, in step S300, the USBIP server of the user terminal sends data to the virtual host controller interface VHCI of the host, including the following steps:

[0035] S350, the USBoIP server of the user terminal sends data to the proxy network agent program of the proxy machine through the first socket (socket A);

[0036] S360, the proxy network agent program of the proxy machine obtains the channel number cN according to the index of the first socket (socket A) value and performs packet processing on the data;

[0037] S370, the agent network agent program of the agent sends a transmission data packet to the host network agent program of the host;

[0038] S380 , the host network agent of the host obtains the value of the second socket (socket B) according to the channel number cN index, disassembles the transmission data packet, and sends the data to the virtual host controller interface VHCI of the host through the second socket (socket B).

[0039] Furthermore, step S400 includes the following steps:

[0040] S410, the virtual host controller interface VHCI of the host disconnects the second socket (socket B);

[0041] S420: The host network agent program of the host obtains the channel number cN according to the second socket (socket B) value index, and sends a connection deletion data packet to the agent network agent program of the agent;

[0042] S430 , the proxy network agent program of the proxy machine receives the connection deletion data packet and obtains the first socket (socket A) value according to the channel number cN index;

[0043] S440, the proxy network agent program of the proxy machine disconnects the first socket (socket A) of the USBoIP server of the user terminal;

[0044] S450, the agent network agent program of the agent deletes the channel number cN and the first socket (socket A) value pair;

[0045] S460: The agent network agent program of the agent machine replies to the host network agent program of the host machine with a message indicating that the connection has been successfully deleted.

[0046] Further, in step S100,

[0047] The packet structure of the communication data packet includes a packet header identification field, a message serial number field, a packet type field, a load length field and a load field connected in sequence, wherein:

[0048] The packet type field includes heartbeat type, heartbeat reply type, connection establishment type, connection establishment reply type, connection deletion type, connection deletion reply type and transmission data type.

[0049] Furthermore, the present invention also proposes a dual-proxy network isolation transmission device based on USBoIP, which is used to execute the dual-proxy network isolation transmission method based on USBoIP. The dual-proxy network isolation transmission device based on USBoIP includes:

[0050] Remote USB devices;

[0051] A user terminal, the remote USB device being electrically connected to the user terminal;

[0052] An agent machine, wherein the user terminal is connected to the agent machine via Ethernet, and an agent machine network agent program is provided on the agent machine, and the agent machine network agent program is electrically connected to the user terminal via Ethernet;

[0053] The host, the agent is connected to the host via a USB bus, the host is provided with a host network agent program, and the host network agent program is electrically connected to the agent via the USB bus.

[0054] Furthermore, the present invention also proposes a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the USBoIP-based dual-proxy network isolation transmission method is implemented.

[0055] The beneficial effects of the present invention are:

[0056] The USBoIP-based dual-proxy network isolation transmission method, device, and storage medium are specifically a remote device access security solution based on the USB over IP (USBoIP) protocol, and are particularly suitable for high-security scenarios requiring physical network isolation. The present invention uses network proxy technology to enable USBoIP to be used in isolated networks. The dual-proxy technology isolates the direct network connection between the user terminal and the host in USBoIP, and forwards data from the designated ports of the agents on both sides based on the USB bus, thereby achieving the technical effect of secure and confidential data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 The flowchart of the dual-proxy network isolation transmission method based on USBoIP is shown in FIG.

[0058] Figure 2 The figure is a schematic diagram of the structure of a network connection between a user terminal and a host in the prior art.

[0059] Figure 3 This is a structural diagram of a dual-proxy network isolation transmission device based on USBoIP.

[0060] Figure 4 A flowchart of establishing a connection in a dual-proxy network isolation transmission method based on USBoIP.

[0061] Figure 5 The present invention is a flow chart of the process of sending data from the virtual host controller interface VHCI of the host to the USBIP server of the user terminal in the dual-proxy network isolation transmission method based on USBoIP.

[0062] Figure 6 The present invention is a flow chart of the process of sending data from the USBIP server of the user terminal to the virtual host controller interface VHCI of the host in the dual-proxy network isolation transmission method based on USBoIP.

[0063] Figure 7 The figure is a flowchart of deleting a connection in a dual-proxy network isolation transmission method based on USBoIP. DETAILED DESCRIPTION

[0064] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments and features in the embodiments of this application can be combined with each other unless there is a conflict.

[0065] It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to the other feature or indirectly fixed or connected to the other feature. Furthermore, terms such as "upper," "lower," "left," "right," "top," and "bottom" used in this disclosure are intended solely to describe the relative positions of the components of the disclosure as shown in the accompanying drawings.

[0066] In addition, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art. The terms used in this specification are only used to describe specific embodiments and are not intended to limit the present invention. The term "and / or" as used herein includes any combination of one or more of the related listed items.

[0067] It should be understood that although the terms first, second, third, etc. may be used to describe various elements in the present disclosure, these elements should not be limited to these terms. These terms are only used to distinguish elements of the same type from each other. For example, a first element may also be referred to as a second element, and similarly, a second element may also be referred to as a first element without departing from the scope of the present disclosure.

[0068] Reference Figures 1 to 7 In some embodiments, the technical solution of the present invention is a dual-proxy network isolation transmission method based on USBoIP, which is applied to a dual-proxy network isolation transmission device based on USBoIP. The dual-proxy network isolation transmission device based on USBoIP includes a remote USB device, a user terminal, a proxy machine and a host machine connected in sequence. The proxy machine is provided with a proxy machine network agent program, and the host machine is provided with a host network agent program. Figure 1 The dual-proxy network isolation transmission method based on USBoIP includes the following steps:

[0069] S100: The user terminal, the agent, and the host continuously detect access to a remote USB device. If access to a remote USB device is detected, a connection link is established. After the connection link is established, the user terminal, the agent, and the host communicate based on communication data packets.

[0070] S200, the host establishes a signal connection with a remote USB device connected to the user terminal through the proxy machine;

[0071] S300, the host interacts with the remote USB device for data exchange, wherein the host interacts with the remote USB device for data exchange including the host's virtual host controller interface VHCI sending data to the USBIP server of the user terminal and the user terminal's USBIP server sending data to the host's virtual host controller interface VHCI;

[0072] S400: After the data interaction is completed, the host deletes the signal connection with the remote USB device connected to the user terminal through the proxy machine.

[0073] The beneficial effects of the present invention are:

[0074] The USBoIP-based dual-proxy network isolation transmission method, device, and storage medium are specifically a remote device access security solution based on the USB over IP (USBoIP) protocol, and are particularly suitable for high-security scenarios requiring physical network isolation. The present invention uses network proxy technology to enable USBoIP to be used in isolated networks. The dual-proxy technology isolates the direct network connection between the user terminal and the host in USBoIP, and forwards data from the designated ports of the agents on both sides based on the USB bus, thereby achieving the technical effect of secure and confidential data transmission.

[0075] The dual-proxy network isolation transmission method, device and storage medium based on USBoIP use dual-proxy technology to isolate the direct network connection between the user terminal and the host in USBoIP; and forward the data of the designated ports of the agents on both sides based on the USB bus.

[0076] In contrast, the reference Figure 2 In general application scenarios of the prior art, a remote USB device is inserted into a USB interface of a user terminal, and the user terminal and the host are directly connected via a network.

[0077] Reference Figure 2 , the process of network connection between the user terminal and the host in the prior art is:

[0078] 1) The user terminal acts as the USBoIP server and listens for TCP connections on a specified port (usually port 3240);

[0079] 2) The user connects the remote USB device to the USB port of the user terminal to obtain the device's bus identifier BUSID;

[0080] 3) The user calls the usbip attach command on the host (with the newly obtained bus identifier BUSID as a parameter). At this time, the host's virtual host controller interface VHCI will create a new socket connected to the user terminal USBoIP service port.

[0081] USB data packets between the host and the newly inserted remote USB device flow on this newly acquired socket.

[0082] Reference Figure 3In the dual-proxy network isolation transmission method, device and storage medium based on USBoIP described in the present invention, a proxy machine is added between the user terminal and the host, and the direct network connection between the user terminal and the host in USBoIP is isolated through dual-proxy technology.

[0083] In a specific embodiment, the user terminal and the agent are connected via Ethernet, and the agent and the host are connected via a USB bus. The network connection process is as follows:

[0084] 1) The user terminal acts as the USBoIP server and listens for TCP connections on a specified port (usually 3240);

[0085] 2) Similarly, the network agent program on the host side also listens for TCP connections on the USBoIP service port (usually 3240);

[0086] 3) After the user connects the remote USB device to the USB port of the user terminal, the BUSID of the USB device is obtained;

[0087] 4) The user calls the usbip attach command on the host (with BUSID as the parameter), and VHCI will create a new TCP socket (called socket B) to connect to the USBoIP service port (3240) monitored by the local network agent program on the host;

[0088] 5) The host network agent will create a new virtual channel with the agent network agent;

[0089] 6) The proxy machine's network agent program then creates a new TCP socket (called socket A) and connects it to the USBoIP service port on the user terminal.

[0090] After the above process is completed, the user terminal and the agent network agent program communicate using socket A; the agent network agent program and the host network agent program communicate using a virtual channel; and the host network agent program and the VHCI communicate using socket B.

[0091] The proxy network agent program forwards the received data of socket A and the virtual channel; the host network agent forwards the received data of the virtual channel and socket B. In this way, after inserting a new remote USB device, there is a socket communication link between the user terminal and the host's VHCI.

[0092] Furthermore, step S100 includes the following steps:

[0093] S110, the user terminal, the agent network agent program of the agent machine, and the host network agent program on the host side continuously monitor a TCP connection signal established by a remote USB device connecting to the user terminal;

[0094] S120: If it is detected that a remote USB device is connected to the USB interface of the user terminal, a bus identifier BUSID of the remote USB device is assigned;

[0095] S130, the host network agent program waits for a connection from the virtual host controller interface VHCI via the USB over IP (USBoIP) protocol service port. The host invokes a usbip attach command including a bus identifier BUSID parameter. The host virtual host controller interface VHCI establishes a second socket (socket B) based on the transmission control protocol TCP to connect to the local host network agent program on the host.

[0096] S140, establishing a virtual channel between the host network agent of the host and the agent network agent of the agent;

[0097] S150 , the proxy network agent program of the proxy machine creates a first socket (socket A) based on the transmission control protocol TCP to connect to the USBoIP service port of the user terminal.

[0098] In step S130 , the host calls the usbip attach command including the bus identifier BUSID parameter, and the host's virtual host controller interface VHCI creates a second socket (socket B) based on the transmission control protocol TCP and connects to the USB over IP (USBoIP) protocol service port monitored by the host.

[0099] Specifically, in step S100, referring to Table 1, the structure of the data communication packet is:

[0100] Table 1:

[0101] Packet header identifier (H_CODE) Message serial number (Session_ID) Packet type (dataType) Data payload length (dataLen) Payload 2byte 2byte 1 byte 4 bytes nbyte

[0102] Among them, H_CODE is the packet header identifier (such as 0xAA55), Session_ID is the message serial number, dataType is the packet type, dataLen is the length of the data load, and payload is the data load.

[0103] dataType can be assigned the following values:

[0104] enum {

[0105] BY_USBIP_PK_TYPE_HEATBEAT 0x01, / * Heartbeat* /

[0106] BY_USBIP_PK_TYPE_HEATBEAT_ACK 0x02, / * Heartbeat reply* /

[0107] BY_USBIP_PK_TYPE_CONNECT 0x03, / * Establish connection* /

[0108] BY_USBIP_PK_TYPE_CONNECT_ACK 0x04, / * Establish connection reply* /

[0109] BY_USBIP_PK_TYPE_DISCONNECT 0x05, / * delete the connection * /

[0110] BY_USBIP_PK_TYPE_DISCONNECT_ACK 0x06, / * delete connection reply* /

[0111] BY_USBIP_PK_TYPE_DATA 0x07 / * Transmission data* /

[0112] }

[0113] Further, in step S110,

[0114] The proxy network agent program is connected to the user terminal as a client, and the host network agent program monitors the TCP connection through the USBoIP service port.

[0115] Specifically, the proxy network agent program is connected to the user terminal as a client and monitors the user terminal.

[0116] Further, refer to Figure 4 , step S200 includes the following steps:

[0117] S210 , the virtual host controller interface VHCI of the host initiates a second socket (socket B) connection request to the local monitoring USB over IP (USBoIP) protocol service port;

[0118] S220: The host network agent program of the host accepts the connection request and applies for a corresponding channel number, and sends a connection establishment data packet to the agent network agent program of the agent;

[0119] S230, the proxy network agent program of the proxy machine receives the connection establishment data packet and extracts the target port number, and initiates a connection request to the USBoIP server of the user terminal through the first socket (socket A);

[0120] S240, the USBoIP server of the user terminal accepts the connection request and returns it to the proxy network agent program of the proxy machine;

[0121] S250, the proxy network agent program saves the channel number and responds to the host network agent program that the connection is successfully established;

[0122] S260: The proxy network agent program of the host saves the channel number and feeds back connection acceptance information to the virtual host controller interface VHCI of the host.

[0123] Specifically, in step S220, the connection establishment data packet is a type of communication data packet. After the host network agent receives the socket connection at the USBoIP service port (3240), it sends a connection establishment data packet to the agent-side network agent. The agent-side network agent extracts relevant information from the data packet and establishes a socket connection with the USBoIP service port (3240) of the user terminal. Referring to Table 2, the structure of the connection establishment data packet is:

[0124] Table 2:

[0125] Packet header identifier (H_CODE) Message serial number (Session_ID) Packet type (dataType) Data payload length (dataLen) The port number of the target network object (Port num) Transport layer protocol type (TCP or UDP) Transmission channel number (Chn num) 2byte 2byte 1 byte (0x03) 4 bytes 2byte 1 byte 2byte

[0126] Among them, port num is the port number of the target network object to be connected, TCP or UDP is whether the transport layer protocol is TCP (value is 1) or UDP (value is 2), and chn num is the transmission channel number.

[0127] After responding to the command, the proxy network agent will reply an ACK to the host network agent. Referring to Table 3, the format of the reply ACK is:

[0128] Table 3:

[0129] Packet header identifier (H_CODE) Message serial number (Session_ID) Packet type (dataType) Data payload length (dataLen) Payload 2byte 2byte 1 byte (0x04) 4 bytes 1 byte

[0130] Further, in step S300, refer to Figure 5 The virtual host controller interface VHCI of the host sends data to the USBIP server of the user terminal, including the following steps:

[0131] S310 , the virtual host controller interface VHCI of the host sends data to the second socket (socket B);

[0132] S320, the host network agent program of the host obtains the channel number cN according to the index of the second socket (socket B) value and performs packet processing on the data;

[0133] S330: The host network agent of the host sends a transmission data packet to the agent network agent of the agent;

[0134] S340 , the proxy network agent program of the proxy machine obtains the second socket (socket B) value according to the channel number cN index, disassembles the transmission data packet, and sends the data to the USBoIP server of the user terminal through the first socket (socket A).

[0135] Further, in step S300, refer to Figure 6 The USBIP server of the user terminal sends data to the virtual host controller interface VHCI of the host, including the following steps:

[0136] S350, the USBoIP server of the user terminal sends data to the proxy network agent program of the proxy machine through the first socket (socket A);

[0137] S360, the proxy network agent program of the proxy machine obtains the channel number cN according to the index of the first socket (socket A) value and performs packet processing on the data;

[0138] S370, the agent network agent program of the agent sends a transmission data packet to the host network agent program of the host;

[0139] S380 , the host network agent of the host obtains the value of the second socket (socket B) according to the channel number cN index, disassembles the transmission data packet, and sends the data to the virtual host controller interface VHCI of the host through the second socket (socket B).

[0140] Specifically, referring to Table 4, the transmission data packet format is:

[0141] Table 4:

[0142] Packet header identifier (H_CODE) Message serial number (Session_ID) Packet type (dataType) Data payload length (dataLen) Channel number (Chn num) Payload 2byte 2byte 1 byte (0x07) 4 bytes 2byte nbyte

[0143] When the network agent program of either the host or agent receives any data on the connection socket, it needs to index the corresponding channel number according to the socket value and encapsulate the data into a data packet and send it to the USB bus.

[0144] After receiving such a data packet on the USB bus, the network agent program of either the host or the agent needs to extract the channel number (chn num) from the data packet; then index the corresponding socket value by the channel number; and finally send the data payload out on the socket.

[0145] Further, refer to Figure 7 , step S400 includes the following steps:

[0146] S410, the virtual host controller interface VHCI of the host disconnects the second socket (socket B);

[0147] S420: The host network agent program of the host obtains the channel number cN according to the second socket (socket B) value index, and sends a connection deletion data packet to the agent network agent program of the agent;

[0148] S430 , the proxy network agent program of the proxy machine receives the connection deletion data packet and obtains the first socket (socket A) value according to the channel number cN index;

[0149] S440, the proxy network agent program of the proxy machine disconnects the first socket (socket A) of the USBoIP server of the user terminal;

[0150] S450, the agent network agent program of the agent deletes the channel number cN and the first socket (socket A) value pair;

[0151] S460: The agent network agent program of the agent machine replies to the host network agent program of the host machine with a message indicating that the connection has been successfully deleted.

[0152] Specifically, referring to Table 5, the format of the delete connection data packet is:

[0153] Table 5:

[0154] Packet header identifier (H_CODE) Message serial number (Session_ID) Packet type (dataType) Data payload length (dataLen) Channel number to be deleted (Chn num) 2byte 2byte 1 byte (0x05) 4 bytes 2byte

[0155] Among them, Chn num is the channel number to be deleted.

[0156] In a specific embodiment, after the connection is deleted, an ACK needs to be returned to the host. Referring to Table 6, the format is as follows:

[0157] Table 6:

[0158] Packet header identifier (H_CODE) Message serial number (Session_ID) Packet type (dataType) Data payload length (dataLen) Payload 2byte 2byte 1 byte (0x06) 4 bytes 2byte

[0159] Further, in step S100,

[0160] The packet structure of the communication data packet includes a packet header identification field, a message serial number field, a packet type field, a load length field and a load field connected in sequence, wherein:

[0161] The packet type field includes heartbeat type, heartbeat reply type, connection establishment type, connection establishment reply type, connection deletion type, connection deletion reply type and transmission data type.

[0162] Furthermore, the present invention also proposes a dual-proxy network isolation transmission device based on USBoIP, which is used to execute the dual-proxy network isolation transmission method based on USBoIP. The dual-proxy network isolation transmission device based on USBoIP includes:

[0163] Remote USB devices;

[0164] A user terminal, the remote USB device being electrically connected to the user terminal;

[0165] An agent machine, wherein the user terminal is connected to the agent machine via Ethernet, and an agent machine network agent program is provided on the agent machine, and the agent machine network agent program is electrically connected to the user terminal via Ethernet;

[0166] The host, the agent is connected to the host via a USB bus, the host is provided with a host network agent program, and the host network agent program is electrically connected to the agent via the USB bus.

[0167] Furthermore, the present invention also provides a computer-readable storage medium storing program instructions, which, when executed by a processor, implement the USBoIP-based dual-proxy network isolation transmission method. The foregoing description is merely a preferred embodiment of the present invention, and the present invention is not limited to the aforementioned embodiments. As long as the technical effects of the present invention are achieved using the same means, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A dual-proxy network isolation transmission method based on USBoIP, applied to a dual-proxy network isolation transmission device based on USBoIP, wherein the dual-proxy network isolation transmission device based on USBoIP comprises a remote USB device, a user terminal, a proxy machine, and a host machine connected in sequence, wherein the proxy machine is provided with a proxy machine network agent program, and the host machine is provided with a host network agent program, characterized in that: The dual-proxy network isolation transmission method based on USBoIP includes the following steps: S100: The user terminal, the agent, and the host continuously detect access to a remote USB device. If access to a remote USB device is detected, a connection link is established. After the connection link is established, the user terminal, the agent, and the host communicate based on communication data packets. S200, the host establishes a signal connection with a remote USB device connected to the user terminal through the proxy machine; S300, the host interacts with the remote USB device for data exchange, wherein the host interacts with the remote USB device for data exchange including the host's virtual host controller interface VHCI sending data to the USBIP server of the user terminal and the user terminal's USBIP server sending data to the host's virtual host controller interface VHCI; S400: After the data interaction is completed, the host deletes the signal connection with the remote USB device connected to the user terminal through the proxy machine.

2. The USBoIP-based dual-proxy network isolation transmission method according to claim 1, characterized in that: Step S100 includes the following steps: S110, the user terminal, the agent network agent program of the agent machine, and the host network agent program on the host side continuously monitor a TCP connection signal established by a remote USB device connecting to the user terminal; S120: If it is detected that a remote USB device is connected to the USB interface of the user terminal, a bus identifier BUSID of the remote USB device is assigned; S130, the host network agent waits for the virtual host controller interface VHCI to connect through the USB over IP protocol service port, the host calls the usbip attach command including the bus identifier BUSID parameter, and the host virtual host controller interface VHCI creates a second socket based on the transmission control protocol TCP to connect to the local host network agent program on the host; S140, establishing a virtual channel between the host network agent of the host and the agent network agent of the agent; S150: The agent network agent program of the agent machine creates a first socket based on the transmission control protocol TCP to connect to the USBoIP service port of the user terminal.

3. The USBoIP-based dual-proxy network isolation transmission method according to claim 2, characterized in that: In step S110, The proxy network agent program is connected to the user terminal as a client, and the host network agent program monitors the TCP connection through the USBoIP service port.

4. The USBoIP-based dual-proxy network isolation transmission method according to claim 1, characterized in that: Step S200 includes the following steps: S210, the virtual host controller interface VHCI of the host initiates a second socket connection request to the local monitoring USB over IP protocol service port; S220: The host network agent program of the host accepts the connection request and applies for a corresponding channel number, and sends a connection establishment data packet to the agent network agent program of the agent; S230, the proxy network agent program of the proxy machine receives the connection establishment data packet and extracts the target port number, and initiates a connection request to the USBoIP server of the user terminal through the first socket; S240, the USBoIP server of the user terminal accepts the connection request and returns information to the proxy network agent program of the proxy machine; S250, the proxy network agent program saves the channel number and responds to the host network agent program that the connection is successfully established; S260: The proxy network agent program of the host saves the channel number and feeds back connection acceptance information to the virtual host controller interface VHCI of the host.

5. The USBoIP-based dual-proxy network isolation transmission method according to claim 1, characterized in that: In step S300, the virtual host controller interface VHCI of the host sends data to the USBIP server of the user terminal, including the following steps: S310, the virtual host controller interface VHCI of the host sends data to the second socket; S320, the host network agent program of the host obtains the channel number cN according to the second socket value index and performs packet processing on the data; S330: The host network agent of the host sends a transmission data packet to the agent network agent of the agent; S340: The proxy network agent program of the proxy machine obtains the second socket value according to the channel number cN index, disassembles the transmission data packet, and sends the data to the USBoIP server of the user terminal through the first socket.

6. The USBoIP-based dual-proxy network isolation transmission method according to claim 1, characterized in that: In step S300, the USBIP server of the user terminal sends data to the virtual host controller interface VHCI of the host, including the following steps: S350, the USBoIP server of the user terminal sends data to the agent network agent program of the agent through the first socket; S360: The proxy network agent program of the proxy machine obtains the channel number cN according to the first socket value index and performs packet processing on the data; S370, the agent network agent program of the agent sends a transmission data packet to the host network agent program of the host; S380: The host network agent of the host obtains the second socket value according to the channel number cN index, disassembles the transmission data packet, and sends the data to the virtual host controller interface VHCI of the host through the second socket.

7. The USBoIP-based dual-proxy network isolation transmission method according to claim 1, characterized in that: Step S400 includes the following steps: S410, the virtual host controller interface VHCI of the host disconnects the second socket connection; S420: The host network agent program of the host obtains the channel number cN according to the second socket value index, and sends a connection deletion data packet to the agent network agent program of the agent; S430: The proxy network agent program of the proxy machine receives the connection deletion data packet and obtains the first socket value according to the channel number cN index; S440, the proxy network agent program of the proxy machine disconnects the first socket connection with the USBoIP server of the user terminal; S450, the agent network agent program of the agent deletes the channel number cN and the first socket value pair; S460: The agent network agent program of the agent machine replies to the host network agent program of the host machine with a message indicating that the connection has been successfully deleted.

8. The USBoIP-based dual-proxy network isolation transmission method according to claim 1, characterized in that: In step S100, The packet structure of the communication data packet includes a packet header identification field, a message serial number field, a packet type field, a load length field and a load field connected in sequence, wherein: The packet type field includes heartbeat type, heartbeat reply type, connection establishment type, connection establishment reply type, connection deletion type, connection deletion reply type and transmission data type.

9. A dual-proxy network isolation transmission device based on USBoIP, configured to execute the dual-proxy network isolation transmission method based on USBoIP according to any one of claims 1 to 8, characterized in that: The dual-proxy network isolation transmission device based on USBoIP includes: Remote USB devices; A user terminal, the remote USB device being electrically connected to the user terminal; An agent machine, wherein the user terminal is connected to the agent machine via Ethernet, and an agent machine network agent program is provided on the agent machine, and the agent machine network agent program is electrically connected to the user terminal via Ethernet; The host, the agent is connected to the host via a USB bus, the host is provided with a host network agent program, and the host network agent program is electrically connected to the agent via the USB bus.

10. A computer-readable storage medium, characterized in that Program instructions are stored thereon, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Host device coupled to a USB peripheral and method of operating the same

    CN103299285A

  • Method and system for realizing USB secure transmission in local area network

    CN113315783A

  • Cloud service system, cloud terminal and physical identity binding method

    CN116366650A

  • USB device sharing method and system based on virtualization

    CN116955236A

  • USB equipment access method and device, terminal equipment and storage medium

    CN119127765A