CN114338707A - Data management method and related device for USB signal transparent transmission multiple devices - Google Patents
Data management method and related device for USB signal transparent transmission multiple devices Download PDFInfo
- Publication number
- CN114338707A CN114338707A CN202111469390.3A CN202111469390A CN114338707A CN 114338707 A CN114338707 A CN 114338707A CN 202111469390 A CN202111469390 A CN 202111469390A CN 114338707 A CN114338707 A CN 114338707A
- Authority
- CN
- China
- Prior art keywords
- local
- transaction packet
- host
- packet
- address parameter
- 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.)
- Granted
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Information Transfer Systems (AREA)
Abstract
The application discloses a data management method and a related device for USB signal transparent transmission multiple devices, wherein the method comprises the following steps: s1, acquiring an IN transaction packet sent by the local host through a USB signal; s2, judging whether the transmission mode of the IN transaction packet is synchronous transmission, if so, executing S3, otherwise, executing S4; s3, sending the IN transaction packet to the remote host, recording a first address parameter when the IN transaction packet is forwarded by the remote host, and sending response data returned by the remote host to the local host when the IN transaction packet sent to the first address parameter is received again; and S4, forwarding the IN transaction packet to the remote host, recording a first address parameter of the IN transaction packet forwarded by the remote host, and responding based on the local register when receiving the IN transaction packet sent by the local host to the first address parameter. The technical problem that transmission errors are easy to occur when the IN transaction packet is transmitted between the existing remote host and the remote equipment is solved.
Description
Technical Field
The present application relates to the field of USB technologies, and in particular, to a data management method and a related apparatus for USB signal transparent transmission multiple devices.
Background
With the progress of the technology, the USB technology is mature, and USB signals are widely used in many fields.
When the existing USB signal is transmitted over a very long distance, as shown in fig. 1, a remote host needs to support multiple remote devices. However, the existing remote host is prone to transmission errors when transmitting IN transaction packets between the remote device and the local host.
Disclosure of Invention
IN view of this, the present application provides a data management method and a related apparatus for USB signal transparent transmission multiple devices, which solve the technical problem that transmission errors are likely to occur when IN transaction packets are transmitted between a remote host and a remote device IN the prior art.
The application provides a data management method for USB signal transparent transmission multiple devices in a first aspect, which comprises the following steps:
step S1, obtaining an IN transaction packet sent by the local host through the USB signal;
step S2, judging whether the transmission mode of the IN transaction packet is synchronous transmission, if yes, executing step S3, and if no, executing step S4;
step S3, sending the IN transaction packet to a remote host, recording a first address parameter when the IN transaction packet is forwarded by the remote host, and sending response data returned by the remote host to the local host when the IN transaction packet sent by the local host to the first address parameter is received again;
step S4, caching the IN transaction packet IN a local register IN a local device, forwarding the IN transaction packet to a remote host, recording a first address parameter when the remote host forwards the IN transaction packet, when receiving the IN transaction packet sent by the local host to the first address parameter again, determining whether the local register is empty, if yes, replying a negative response to the local host, and if not, sending the cached data IN the local register to the local host.
Preferably, the step S3 specifically includes:
sending the IN transaction packet and a first address parameter packet corresponding to the IN transaction packet to a remote host;
recording the first address parameter, and acquiring response data returned by the remote equipment through the remote host;
and when the IN transaction packet sent to the first address parameter by the local host is received again, sending the response data returned by the remote host to the local host.
Preferably, the step S4 specifically includes:
caching the IN transaction packet to a local register of the local device;
sending the IN transaction packet and a first address parameter packet corresponding to the IN transaction packet to a remote host;
recording the first address parameter, and replying a negative response to the local host;
acquiring a first data packet sent by the local host;
when the first data packet is judged to be an IN transaction packet, judging that a second address parameter corresponding to the first data packet is consistent with the first address parameter, if not, replying a negative response to the local host, if so, judging whether the local register is empty, if so, replying the negative response to the local host, and if not, sending the cache data IN the local register to the local host.
Preferably, the step S4 further includes:
and when the first data packet is judged to be a SETUP transaction packet, forwarding the first data packet to the remote host.
Preferably, when the first data packet is judged to be an OUT transaction packet, an OUT transaction flag is generated, and a negative response is replied to the local host.
Preferably, the method further comprises the following steps:
step S5, acquiring an OUT transaction packet sent by the local host through a USB signal;
step S6, judging whether the transmission mode of the OUT transaction packet is synchronous transmission, if so, executing step S7, and if not, executing step S8;
step S7, caching the OUT transaction packet to a local register of local equipment, and sending the OUT transaction packet to a remote host;
step S8, caching the OUT transaction packet in a local register of a local device, forwarding the OUT transaction packet to a remote host, recording a third address parameter when the remote host forwards the OUT transaction packet, when receiving the OUT transaction packet sent by the local host to the third address parameter again, determining whether the local register is empty, if yes, replying a negative response to the local host, and if not, sending the cached data in the local register to the local host.
Preferably, the step S8 specifically includes:
caching the OUT transaction packet to a local register of the local device;
sending the OUT transaction packet and a third address parameter corresponding to the OUT transaction packet to a remote host;
recording the third address parameter, and replying a negative response to the local host;
acquiring a second data packet sent by the local host;
when the second data packet is judged to be an OUT transaction packet, judging that a fourth address parameter corresponding to the second data packet is consistent with the third address parameter, if not, replying a negative response to the local host, if so, judging whether the local register is empty, if so, replying the negative response to the local host, and if not, sending the cache data in the local register to the local host.
A second aspect of the present application provides a data management apparatus for USB signal transparent transmission multiple devices, the apparatus including:
the first acquisition unit is used for acquiring an IN transaction packet sent by a local host through a USB signal;
the first judging unit is used for judging whether the transmission mode of the IN transaction packet is synchronous transmission or not, if so, the first processing unit is triggered, and if not, the second processing unit is triggered;
the first processing unit is configured to send the IN transaction packet to a remote host, record a first address parameter when the remote host forwards the IN transaction packet, and send response data returned by the remote host to the local host when receiving the IN transaction packet sent by the local host to the first address parameter again;
the second processing unit is configured to cache the IN transaction packet to a local register IN local equipment, forward the IN transaction packet to a remote host, record a first address parameter when the remote host forwards the IN transaction packet, determine whether the local register is empty when the IN transaction packet sent by the local host to the first address parameter is received again, reply a negative response to the local host if the local register is empty, and send cache data IN the local register to the local host if the local register is not empty.
A third aspect of the present application provides a data management device for a USB signal pass-through multi-device, where the data management device for the USB signal pass-through multi-device includes a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute any one of the data management methods of the USB signal transparent transmission multi-device according to instructions in the program code.
A fourth aspect of the present application provides a storage medium, where the storage medium is used to store a program code, and the program code is used to execute any one of the data management methods of the USB signal pass-through multi-device according to the first aspect.
According to the technical scheme, the method has the following advantages:
the application provides a data management method for USB signal transparent transmission multiple devices, which comprises the following steps: step S1, obtaining an IN transaction packet sent by the local host through the USB signal; step S2, judging whether the transmission mode of the IN transaction packet is synchronous transmission, if yes, executing step S3, and if no, executing step S4; step S3, sending the IN transaction packet to the remote host, recording a first address parameter when the IN transaction packet is forwarded by the remote host, and sending response data returned by the remote host to the local host when the IN transaction packet sent by the local host to the first address parameter is received again; step S4, caching the IN transaction packet IN the local device to a local register, forwarding the IN transaction packet to the remote host, and recording a first address parameter when the remote host forwards the IN transaction packet, when receiving the IN transaction packet sent by the local host to the first address parameter again, determining whether the local register is empty, if yes, replying a negative response to the local host, and if not, sending the cached data IN the local register to the local host. IN the application, correct communication of the IN transaction packet between the remote equipment and the local is realized IN an address comparison mode, so that the technical problem that transmission errors easily occur when the IN transaction packet is transmitted between the existing remote host and the remote equipment is solved.
Drawings
FIG. 1 is a diagram of the communication connections between a prior art remote device and a local host;
fig. 2 is a communication connection diagram between the remote device and the local host in this embodiment;
fig. 3 is a schematic flowchart of a data management method for a USB signal transparent transmission multi-device according to a first embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a data management method for a USB signal transparent transmission multi-device according to a second embodiment of the present application;
fig. 5 is a schematic diagram illustrating transmission of an IN transaction packet between a remote device and a local host IN an embodiment of the present application;
fig. 6 is a schematic transmission diagram of an OUT transaction packet between a remote device and a local host in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an embodiment of a data management apparatus for USB signal transparent transmission multiple devices in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a data management method and a related device for USB signal transparent transmission multiple devices, and solves the technical problem that transmission errors are easy to occur when IN transaction packets are transmitted between a conventional remote host and a remote device.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In an embodiment of the present application, a data management method for USB signal transmission multi-device is applied to a data management apparatus for USB signal transmission multi-device, and when the data management apparatus is added between a remote device and a local host, a communication connection diagram between the remote device and the local host is shown in fig. 2. In fig. 2, the local host is connected to the data management device, the data management device is connected to the remote host, and the remote host is connected to the remote device.
Specifically, the data management method corresponding to the data management apparatus is described as follows:
referring to fig. 3, fig. 3 is a flowchart illustrating a data management method for USB signal transparent transmission multiple devices according to a first embodiment of the present disclosure.
In this embodiment, a data management method for multiple USB signal transparent transmission devices includes:
And 303, sending the IN transaction packet to the remote host, recording a first address parameter when the remote host forwards the IN transaction packet, and sending response data returned by the remote host to the local host when receiving the IN transaction packet sent by the local host to the first address parameter again.
It can be understood that the address parameters in this embodiment include: a remote device address and a remote device port. One remote device corresponds to one remote device address and a plurality of remote device ports, and the local host, the remote device and the remote device transmit data through the remote device address and the remote device ports.
IN this embodiment, correct communication of the IN transaction packet between the remote device and the local device is achieved by address comparison, so that the technical problem that transmission errors are likely to occur when the IN transaction packet is transmitted between the existing remote host and the remote device is solved.
The foregoing is a first embodiment of a data management method for a USB signal pass-through multi-device provided in the embodiment of the present application, and the following is a second embodiment of the data management method for a USB signal pass-through multi-device provided in the embodiment of the present application.
Referring to fig. 4, a flow chart of an embodiment of a data management method for a USB signal transparent transmission multi-device in the embodiment of the present application is schematically illustrated.
In this embodiment, a data management method for multiple USB signal transparent transmission devices includes:
And step 403, sending the IN transaction packet to the remote host, recording the first address parameter when the remote host forwards the IN transaction packet, and sending the response data returned by the remote host to the local host when receiving the IN transaction packet sent by the local host to the first address parameter again.
It should be noted that step 403 specifically includes:
the IN transaction packet and the corresponding first address parameter packet are sent to a remote host;
recording the first address parameter, and acquiring response data returned by the remote device through the remote host;
and when the IN transaction packet sent to the first address parameter by the local host is received again, sending the response data returned by the remote host to the local host.
Specifically, step 404 in this embodiment specifically includes:
caching the IN transaction packet to a local register of the local device;
the IN transaction packet and the corresponding first address parameter packet are sent to a remote host;
recording the first address parameter and replying a negative response to the local host;
acquiring a first data packet sent by a local host;
and when the first data packet is judged to be the IN transaction packet, judging that the second address parameter corresponding to the first data packet is consistent with the first address parameter, if not, replying a negative response to the local host, if so, judging whether the local register is empty, if so, replying the negative response to the local host, and if not, sending the cache data IN the local register to the local host.
Further, the step 404 further includes:
and when the first data packet is judged to be the SETUP transaction packet, forwarding the first data packet to the remote host.
Further, the step 404 further includes:
and when the first data packet is judged to be the OUT transaction packet, generating an OUT transaction mark and replying a negative response to the local host.
Specifically, step 408 specifically includes:
caching the OUT transaction packet into a local register of local equipment;
sending the OUT transaction packet and the corresponding third address parameter to the remote host;
recording the third address parameter and replying a negative response to the local host;
acquiring a second data packet sent by the local host;
and when the second data packet is judged to be the OUT transaction packet, judging that a fourth address parameter corresponding to the second data packet is consistent with a third address parameter, if not, replying a negative response to the local host, if so, judging whether the local register is empty, if so, replying the negative response to the local host, and if not, sending the cache data in the local register to the local host.
As can be seen from the above description, IN this embodiment, not only the IN transaction packet is correctly transmitted, but also the correct communication of the OUT transaction packet between the remote device and the local device is realized IN an address comparison manner, so that the technical problem that a transmission error is easily generated when the OUT transaction packet is transmitted between the remote host and the remote device IN the prior art is solved.
Referring to fig. 5, IN the present embodiment, the IN transaction packet between multiple remote devices and the local host is described as follows:
local host sends IN transaction packet:
(1) and (5) synchronous transmission. After receiving the IN transaction packet, the management device caches the IN transaction packet, forwards the IN transaction packet to the remote host, does not reply any data to the local host, waits for the remote device to return data, records the address and the endpoint, replies the data returned by the remote device through the remote host to the local host after receiving the same address and endpoint IN packet of the local host again, and does not reply if the remote device does not return any information.
(2) The asynchronous transmission and management device end receives an IN transaction packet sent by a local host end, then buffers the IN transaction packet into a local RX _ FIFO (local register), forwards the IN transaction packet to a remote end, records the address and the endpoint of the forwarded IN transaction packet, and replies NAK (negative acknowledgement) to the local host, when the remote end is waited to reply and a data packet sent by the local host is received again, judges whether the IN transaction packet or other transaction packets are received, if the IN transaction packet is a SETUP transaction packet, the IN transaction packet is preferentially forwarded, if the OUT transaction packet is an OUT transaction packet, an OUT transaction packet mark is generated, NAK is replied and not forwarded, if the IN transaction packet is an IN transaction packet, whether the address and the endpoint are consistent with the address and the endpoint of the IN transaction packet waiting for the remote end reply or not is judged, and if the address and the endpoint are inconsistent with the address and the endpoint of the IN transaction packet waiting for the remote end reply, NAK is replied; if the local TX _ FIFO is not empty, the local TX _ FIFO is not forwarded, if the local TX _ FIFO is empty, the IN transaction packet is not written into the local RX _ FIFO, NAK is replied to the local host, if the local TX _ FIFO is not empty, the IN transaction packet is not written into the local RX _ FIFO, and data cached by the local TX _ FIFO is replied to the local host. After the IN transaction packet is completed, according to the state IN the waiting period, if an OUT transaction packet mark is generated, the processing flow of the OUT transaction packet is jumped to, the forwarding of the OUT transaction packet is waited, if the OUT transaction packet mark is not generated, the forwarding of the IN transaction packet of other different addresses or end points is waited, and the equal probability forwarding of the IN transaction packet of different addresses, end points and transaction packets is ensured.
Referring to fig. 6, in the embodiment, an OUT transaction packet between multiple remote devices and a local host is described as follows:
the local host sends OUT transaction packet:
(1) and in synchronous transmission, the management device receives the OUT transaction packet, then buffers the OUT transaction packet into a local RX _ FIFO, and then forwards the OUT transaction packet to the remote host without replying any data to the local host.
(2) Asynchronous transmission, after receiving OUT transaction packet, the management device buffers to local RX _ FIFO, then forwards remote end, records address and end point of the OUT transaction packet, and replies NAK to local host, IN the process of waiting for remote end reply, when receiving DATA packet sent by local host again, judging whether OUT transaction packet is other transaction packet, if it is SETUP transaction packet, it is forwarded preferentially, if it is IN transaction packet, IN transaction packet flag is generated, NAK is replied, not forwarded, if it is OUT transaction packet, it is judged whether address and end point are consistent with address and end point of OUT transaction packet waiting for remote end reply, if not, NAK is replied, not forwarded, if consistent, it is judged whether local TX _ FIFO is not empty, if it is empty, OUT transaction packet is not written into local RX _ FIFO, and NAK is replied to local host after receiving DATA packet, if not empty, OUT transaction packet is not written into local RX _ FIFO, and replies with the DATA buffered in the local TX _ FIFO to the local host in a received DATA packet. After the management device end and the far-end host finish the OUT packet transaction packet, according to the state IN the waiting period, if an IN transaction packet mark is generated, the management device end jumps to an IN transaction packet processing flow to wait for the forwarding of the IN transaction packet, and if the IN transaction packet mark is not generated, the management device end waits for the forwarding of the OUT transaction packet of other different addresses or end points, so that the equal probability forwarding of the different addresses, the end points and the transaction packet is ensured.
IN this embodiment, correct communication between the IN transaction packet and the OUT transaction packet between the remote device and the local device is achieved by address comparison, so that the technical problem that transmission errors are likely to occur when the IN transaction packet and the OUT transaction packet are transmitted between the existing remote host and the remote device is solved.
The foregoing is a second embodiment of the data management method for multiple USB signal transmission devices according to the embodiments of the present application, and the following is an embodiment of the data management apparatus for multiple USB signal transmission devices according to the embodiments of the present application.
Referring to fig. 7, a schematic structural diagram of an embodiment of a data management apparatus for USB signal transparent transmission multiple devices in an embodiment of the present application includes:
the first acquisition unit is used for acquiring an IN transaction packet sent by a local host through a USB signal;
the first judging unit is used for judging whether the transmission mode of the IN transaction packet is synchronous transmission or not, if so, the first processing unit is triggered, and if not, the second processing unit is triggered;
the first processing unit is used for sending the IN transaction packet to the remote host, recording a first address parameter when the IN transaction packet is forwarded by the remote host, and sending response data returned by the remote host to the local host when the IN transaction packet sent by the local host to the first address parameter is received again;
and the second processing unit is used for caching the IN transaction packet to a local register IN the local equipment, forwarding the IN transaction packet to the remote host, recording a first address parameter when the remote host forwards the IN transaction packet, judging whether the local register is empty or not when receiving the IN transaction packet sent by the local host to the first address parameter again, if so, replying a negative response to the local host, and if not, sending the cached data IN the local register to the local host.
Further, the first processing unit in this embodiment specifically includes:
the first sending subunit is used for sending the IN transaction packet and the corresponding first address parameter packet to the remote host;
the first recording subunit is used for recording the first address parameter and acquiring response data returned by the remote device through the remote host;
and the second sending subunit is used for sending the response data returned by the remote host to the local host when receiving the IN transaction packet sent by the local host to the first address parameter again.
Further, the second processing unit in this embodiment specifically includes:
the first cache subunit is used for caching the IN transaction packet to a local register of the local equipment;
the third sending subunit is used for sending the IN transaction packet and the corresponding first address parameter packet to the remote host;
the second recording subunit is used for recording the first address parameter and replying a negative response to the local host;
the first acquiring subunit is used for acquiring a first data packet sent by the local host;
and the first judging subunit is used for judging that the second address parameter corresponding to the first data packet is consistent with the first address parameter when the first data packet is judged to be the IN transaction packet, if not, replying a negative response to the local host, if so, judging whether the local register is empty, if so, replying the negative response to the local host, and if not, sending the cache data IN the local register to the local host.
Further, the second processing unit in this embodiment further includes:
and the forwarding subunit is used for forwarding the first data packet to the remote host when the first data packet is judged to be the SETUP transaction packet.
Further, the second processing unit in this embodiment further includes:
and the replying subunit is used for generating an OUT transaction mark and replying a negative response to the local host when the first data packet is judged to be the OUT transaction packet.
Further, the data management apparatus in this embodiment further includes:
the second acquisition unit is used for acquiring an OUT transaction packet sent by the local host through a USB signal;
the second judging unit is used for judging whether the transmission mode of the OUT transaction packet is synchronous transmission or not, if so, the first sending unit is triggered, and if not, the second sending unit is triggered;
the first sending unit is used for caching the OUT transaction packet into a local register of the local device and sending the OUT transaction packet to the remote host;
and the second sending unit is used for caching the OUT transaction packet to a local register of the local device, forwarding the OUT transaction packet to the remote host, recording a third address parameter when the OUT transaction packet is forwarded by the remote host, judging whether the local register is empty or not when the OUT transaction packet sent by the local host to the third address parameter is received again, if so, replying a negative response to the local host, and if not, sending the cached data in the local register to the local host.
Specifically, the second sending unit specifically includes:
the second cache subunit is used for caching the OUT transaction packet to a local register of the local device;
the fourth sending subunit is configured to send the OUT transaction packet and the third address parameter corresponding to the OUT transaction packet to the remote host;
the third recording subunit is used for recording the third address parameter and replying a negative response to the local host;
the second acquiring subunit is used for acquiring a second data packet sent by the local host;
and the second judging subunit is used for judging that a fourth address parameter corresponding to the second data packet is consistent with a third address parameter when the second data packet is judged to be the OUT transaction packet, if not, replying a negative response to the local host, if so, judging whether the local register is empty, if so, replying the negative response to the local host, and if not, sending the cache data in the local register to the local host.
IN this embodiment, correct communication between the IN transaction packet and the OUT transaction packet between the remote device and the local device is achieved by address comparison, so that the technical problem that transmission errors are likely to occur when the IN transaction packet and the OUT transaction packet are transmitted between the existing remote host and the remote device is solved.
The embodiment of the application also provides data management equipment for the USB signal transparent transmission multiple devices, wherein the equipment comprises a processor and a memory; the memory is used for storing the program codes and transmitting the program codes to the processor; the processor is configured to execute the data management method of the USB signal transparent transmission multi-device according to the first embodiment or the second embodiment according to instructions in the program code.
The embodiment of the application further provides a storage medium, wherein the storage medium is used for storing a program code, and the program code is used for executing the data management method of the USB signal transparent transmission multi-device in the first embodiment or the second embodiment.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.
Claims (10)
1. A data management method for USB signal transparent transmission multiple devices is characterized by comprising the following steps:
step S1, obtaining an IN transaction packet sent by the local host through the USB signal;
step S2, judging whether the transmission mode of the IN transaction packet is synchronous transmission, if yes, executing step S3, and if no, executing step S4;
step S3, sending the IN transaction packet to a remote host, recording a first address parameter when the IN transaction packet is forwarded by the remote host, and sending response data returned by the remote host to the local host when the IN transaction packet sent by the local host to the first address parameter is received again;
step S4, caching the IN transaction packet IN a local register IN a local device, forwarding the IN transaction packet to a remote host, recording a first address parameter when the remote host forwards the IN transaction packet, when receiving the IN transaction packet sent by the local host to the first address parameter again, determining whether the local register is empty, if yes, replying a negative response to the local host, and if not, sending the cached data IN the local register to the local host.
2. The data management method for the USB signal pass-through multi-device according to claim 1, wherein the step S3 specifically includes:
sending the IN transaction packet and a first address parameter packet corresponding to the IN transaction packet to a remote host;
recording the first address parameter, and acquiring response data returned by the remote equipment through the remote host;
and when the IN transaction packet sent to the first address parameter by the local host is received again, sending the response data returned by the remote host to the local host.
3. The data management method for the USB signal pass-through multi-device according to claim 1, wherein the step S4 specifically includes:
caching the IN transaction packet to a local register of the local device;
sending the IN transaction packet and a first address parameter packet corresponding to the IN transaction packet to a remote host;
recording the first address parameter, and replying a negative response to the local host;
acquiring a first data packet sent by the local host;
when the first data packet is judged to be an IN transaction packet, judging that a second address parameter corresponding to the first data packet is consistent with the first address parameter, if not, replying a negative response to the local host, if so, judging whether the local register is empty, if so, replying the negative response to the local host, and if not, sending the cache data IN the local register to the local host.
4. The data management method of the USB signal pass-through multi-device according to claim 3, wherein the step S4 further includes:
and when the first data packet is judged to be a SETUP transaction packet, forwarding the first data packet to the remote host.
5. The data management method of the USB signal pass-through multi-device according to claim 3, wherein the step S4 further includes:
and when the first data packet is judged to be the OUT transaction packet, generating an OUT transaction mark and replying a negative response to the local host.
6. The method for managing data of a USB signal pass-through multi-device according to claim 1, further comprising:
step S5, acquiring an OUT transaction packet sent by the local host through a USB signal;
step S6, judging whether the transmission mode of the OUT transaction packet is synchronous transmission, if so, executing step S7, and if not, executing step S8;
step S7, caching the OUT transaction packet to a local register of local equipment, and sending the OUT transaction packet to a remote host;
step S8, caching the OUT transaction packet in a local register of a local device, forwarding the OUT transaction packet to a remote host, recording a third address parameter when the remote host forwards the OUT transaction packet, when receiving the OUT transaction packet sent by the local host to the third address parameter again, determining whether the local register is empty, if yes, replying a negative response to the local host, and if not, sending the cached data in the local register to the local host.
7. The data management method for the USB signal pass-through multi-device according to claim 6, wherein the step S8 specifically includes:
caching the OUT transaction packet to a local register of the local device;
sending the OUT transaction packet and a third address parameter corresponding to the OUT transaction packet to a remote host;
recording the third address parameter, and replying a negative response to the local host;
acquiring a second data packet sent by the local host;
when the second data packet is judged to be an OUT transaction packet, judging that a fourth address parameter corresponding to the second data packet is consistent with the third address parameter, if not, replying a negative response to the local host, if so, judging whether the local register is empty, if so, replying the negative response to the local host, and if not, sending the cache data in the local register to the local host.
8. A data management device of USB signal transmission multi-device is characterized by comprising:
the first acquisition unit is used for acquiring an IN transaction packet sent by a local host through a USB signal;
the first judging unit is used for judging whether the transmission mode of the IN transaction packet is synchronous transmission or not, if so, the first processing unit is triggered, and if not, the second processing unit is triggered;
the first processing unit is configured to send the IN transaction packet to a remote host, record a first address parameter when the remote host forwards the IN transaction packet, and send response data returned by the remote host to the local host when receiving the IN transaction packet sent by the local host to the first address parameter again;
the second processing unit is configured to cache the IN transaction packet to a local register IN local equipment, forward the IN transaction packet to a remote host, record a first address parameter when the remote host forwards the IN transaction packet, determine whether the local register is empty when the IN transaction packet sent by the local host to the first address parameter is received again, reply a negative response to the local host if the local register is empty, and send cache data IN the local register to the local host if the local register is not empty.
9. The data management device of the USB signal transmission multi-device is characterized by comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is used for executing the data management method of the USB signal transmission multi-device according to the instructions in the program codes, wherein the method comprises the steps of 1 to 7.
10. A storage medium for storing a program code for executing the data management method of a USB signal transmission multi-device according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111469390.3A CN114338707B (en) | 2021-12-03 | 2021-12-03 | Data management method and related device for USB signal transparent transmission multiple devices |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111469390.3A CN114338707B (en) | 2021-12-03 | 2021-12-03 | Data management method and related device for USB signal transparent transmission multiple devices |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114338707A true CN114338707A (en) | 2022-04-12 |
CN114338707B CN114338707B (en) | 2023-03-24 |
Family
ID=81049429
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111469390.3A Active CN114338707B (en) | 2021-12-03 | 2021-12-03 | Data management method and related device for USB signal transparent transmission multiple devices |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114338707B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114928377A (en) * | 2022-05-11 | 2022-08-19 | 威创集团股份有限公司 | Output transmission method, device and equipment for reducing USB data transparent transmission bandwidth |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2000028696A2 (en) * | 1998-11-10 | 2000-05-18 | Nortel Networks Limited | Usb networking on a multiple access transmission medium |
US20050071733A1 (en) * | 2003-09-29 | 2005-03-31 | Fumihiro Fukae | Communication controller, host-side controller, communication system, USB system, communication equipment, communication method, packet-based communication method, packet-based communication program, and storage medium |
CN1607513A (en) * | 2003-10-15 | 2005-04-20 | 精工爱普生株式会社 | Data transfer control device, electronic instrument, and data transfer control method |
CN108366129A (en) * | 2018-03-08 | 2018-08-03 | 北京淳中科技股份有限公司 | USB data transmission method, device and USB adapter |
-
2021
- 2021-12-03 CN CN202111469390.3A patent/CN114338707B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2000028696A2 (en) * | 1998-11-10 | 2000-05-18 | Nortel Networks Limited | Usb networking on a multiple access transmission medium |
AU1024900A (en) * | 1998-11-10 | 2000-05-29 | Nortel Networks Limited | Usb networking on a multiple access transmission medium |
US20050071733A1 (en) * | 2003-09-29 | 2005-03-31 | Fumihiro Fukae | Communication controller, host-side controller, communication system, USB system, communication equipment, communication method, packet-based communication method, packet-based communication program, and storage medium |
CN1607513A (en) * | 2003-10-15 | 2005-04-20 | 精工爱普生株式会社 | Data transfer control device, electronic instrument, and data transfer control method |
CN108366129A (en) * | 2018-03-08 | 2018-08-03 | 北京淳中科技股份有限公司 | USB data transmission method, device and USB adapter |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114928377A (en) * | 2022-05-11 | 2022-08-19 | 威创集团股份有限公司 | Output transmission method, device and equipment for reducing USB data transparent transmission bandwidth |
Also Published As
Publication number | Publication date |
---|---|
CN114338707B (en) | 2023-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101971154B (en) | Method and system for determining state of I/O operation | |
US20030009432A1 (en) | Access assurance for remote memory access over network | |
CN103530066B (en) | A kind of date storage method, Apparatus and system | |
CN109542857B (en) | Audit log storage method, audit log query method, audit log storage device, audit log query device and related equipment | |
CN103984662B (en) | A kind of method and apparatus of reading and writing data, storage system | |
CN114338707B (en) | Data management method and related device for USB signal transparent transmission multiple devices | |
CN110457251B (en) | Data communication method and device among multiple processors | |
CN114553373B (en) | Data transmission method, device, equipment and storage medium | |
CN101453487A (en) | Memory to storage communication for hybrid systems | |
CN105681222A (en) | Method and apparatus for data receiving and caching, and communication system | |
CN103703474B (en) | The data of processing unit generation | |
CN106066894A (en) | Data global buffer method and data global buffer device | |
CN106464745A (en) | Dns server, client and data synchronization method | |
CN113852533B (en) | Multi-channel data communication system and method and electronic equipment | |
CN114327948A (en) | Message processing method, device, equipment and storage medium | |
CN114092248A (en) | Transaction flow processing method and device | |
CN108228476B (en) | Data acquisition method and device | |
KR101499890B1 (en) | Low Latency Framework System | |
CN101404797B (en) | Storage method, storage management apparatus and storage system for long and short messages | |
US7257680B2 (en) | Storage system including shared memory and plural disk drives, processors, and shared memory control units | |
CN114189445B (en) | USB signal transparent transmission processing method, device, terminal and storage medium | |
JP6195657B1 (en) | Banking system, method executed by banking system, program | |
CN105022707A (en) | Interface unit | |
CN113923176B (en) | Message withdrawal method, device and equipment for instant messaging and computer readable medium | |
CN102215162B (en) | Method for processing optical fiber I/O (input/ output) out-of-order frames based on field programmable gate array |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |