A desktop one-way import device and method
By adding a virtual UI program and mouse interface to the sending end of the desktop one-way import device, an interactive virtual UI is generated, which solves the problem that users cannot select target files and achieves the effects of autonomous transmission and secure isolation.
Patent Information
- Application Number
- CN202611246236.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-11-27
AI Technical Summary
In existing desktop one-way import devices, users cannot select target files of interest for specified transfer via PC; they can only passively receive and manually filter files, which affects user experience and operational efficiency.
A virtual UI program is added to the one-way data sending end. An interactive virtual UI is generated by connecting a mouse and displayed on the PC host computer through the one-way transmission module. Users can browse and select files for transmission in this interface.
This technology enables users to independently select target files for transmission under the condition of physical isolation of unidirectional optical modules, improving ease of use and operational efficiency, while ensuring security and unidirectional transmission.
Smart Images

Figure CN123178353A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of one-way import technology, specifically relating to a desktop one-way import device and method. Background Technology
[0002] A desktop unidirectional optical module is a specialized device that enables unidirectional file transfer from a USB storage medium to a PC. For example... Figure 1 As shown, the existing desktop unidirectional optical device uses the internal unidirectional optical module as a dividing line. The left side is the unidirectional data transmitter, and the right side is the unidirectional data receiver; these are independent hardware modules. The transmitter runs a USB storage medium reading program to send data from the storage medium through the unidirectional optical module; the receiver receives the data and reports it to the PC host computer, where the host computer's file processing program saves the file to the hard drive.
[0003] However, due to the physical characteristics of unidirectional optical modules, data can only flow from the sending end to the receiving end, and the PC host computer cannot send any control commands back to the sending hardware. Therefore, users cannot select target files for transmission using the keyboard and mouse on the PC in a graphical interface; they can only passively receive all files based on preset rules, and then manually select the target file from among many files after transmission is complete. This severely impacts user experience and operational efficiency. Summary of the Invention
[0004] In view of the above-mentioned shortcomings of the prior art, the present invention provides a desktop one-way import device and method to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a desktop one-way import device, comprising: A one-way data transmitter is used to connect a USB storage medium and a mouse. The one-way data transmitter includes a UI interface virtual program. The UI interface virtual program is used to read file directory data in the USB storage medium and mouse data of the mouse, and generate UI virtual interface data based on the file directory data and the mouse data. A one-way transmission module is connected between the one-way data sending end and the one-way data receiving end, and is used to transmit the UI virtual interface data unidirectionally from the one-way data sending end to the one-way data receiving end. The one-way data receiving end is used to receive the UI virtual interface data and report it to the PC host computer, so that the PC host computer can display the UI virtual interface through the display. The mouse movement operation is collected by the one-way data sending end, and the changes in the UI virtual interface data are reflected in the UI virtual interface displayed on the PC host computer.
[0006] In one optional implementation, the unidirectional transmission module is a unidirectional optical module.
[0007] In an optional implementation, the method by which the UI virtual interface program generates the UI virtual interface data includes: The file directory structure of the USB storage medium is displayed in the UI virtual interface, and the UI virtual interface is divided into multiple coordinate areas. The mouse is restricted to move within the multiple coordinate areas, and the mouse focus is displayed in the UI virtual interface.
[0008] In an optional implementation, the one-way data sending end is further configured to send the file directory data and the mouse data as raw data to the one-way data receiving end respectively, and the PC host computer runs the same UI interface fusion logic as the one-way data sending end to generate and display a UI virtual interface based on the raw data.
[0009] In one optional implementation, the file directory structure in the USB storage medium is read starting from the root directory, supporting browsing through folders level by level, and the UI virtual interface displays the folders and file contents in the current directory.
[0010] Secondly, the present invention provides a desktop one-way import method, comprising: The file directory data and mouse data in the USB storage medium are read through the one-way data sending end; UI virtual interface data is generated based on the file directory data and the mouse data by running a UI interface virtual program on the one-way data sending end; The UI virtual interface data is transmitted unidirectionally from the unidirectional data sending end to the unidirectional data receiving end through the unidirectional transmission module; The UI virtual interface data is reported to the PC host computer through the one-way data receiving terminal; The UI virtual interface is displayed on the monitor of the PC host computer, and the mouse focus position in the UI virtual interface is updated according to the changes in the mouse data.
[0011] In an optional implementation, the method for the UI virtual interface program to generate the UI virtual interface data includes: displaying the file directory structure of the USB storage medium in the UI virtual interface, dividing the UI virtual interface into multiple coordinate regions, restricting the mouse to move within the multiple coordinate regions, and displaying the mouse focus in the UI virtual interface.
[0012] In one optional implementation, the UI virtual interface data is the interface data obtained by overlaying and fusing the file directory data and the mouse data, and the PC host computer directly displays the UI virtual interface data.
[0013] In one optional implementation, the one-way data sending end sends the file directory data and the mouse data as raw data to the one-way data receiving end respectively; the PC host computer runs the same UI interface fusion logic as the one-way data sending end, and generates and displays a UI virtual interface based on the raw data.
[0014] In one optional implementation, the file directory structure in the USB storage medium is read starting from the root directory, supporting browsing through folders level by level, and the UI virtual interface displays the folders and file contents in the current directory.
[0015] The beneficial effects of this invention are as follows: The doctor-patient interaction management method, system, device, and storage medium provided by this invention, while maintaining physical isolation of the unidirectional optical module and ensuring that the PC host computer cannot send any instructions back to the sending end, generate a locally interactive UI virtual interface by connecting a mouse to the sending end and running a UI interface virtual program, and transmit it unidirectionally to the PC host computer for display. This allows users to browse the file directory structure of the USB storage medium on the PC monitor and independently select target files for unidirectional transmission, completely changing the existing technology's mode of passively transmitting all files, and greatly improving usability and operational efficiency. Simultaneously, the mouse connected to the PC host computer cannot control the mouse focus in the UI virtual interface, effectively preventing interference or attacks from the PC, thus combining security and convenience. Furthermore, this invention can transmit both the merged UI virtual interface data to simplify the PC display logic and the original mouse data and storage medium data to reduce transmission bandwidth usage, flexibly adapting to the needs of different application scenarios. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the existing desktop one-way import device.
[0018] Figure 2 This is a schematic diagram of data transfer from an existing desktop to a device.
[0019] Figure 3This is a schematic diagram of a desktop one-way import device according to an embodiment of the present invention.
[0020] Figure 4 This is a schematic diagram of the operation of a virtual program with a UI interface according to an embodiment of the present invention.
[0021] Figure 5 This is a schematic diagram of UI virtual interface data according to an embodiment of the present invention.
[0022] Figure 6 This is a schematic diagram illustrating the transmission of UI virtual interface data according to an embodiment of the present invention.
[0023] Figure 7 This is a schematic diagram illustrating the transmission of raw mouse data and storage medium data according to an embodiment of the present invention. Detailed Implementation
[0024] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0026] Please refer to Figure 1 A desktop unidirectional transfer device is a dedicated device that transfers files from a USB storage medium to a PC in one direction. Files on the USB storage medium can only be transferred according to specific rules, such as transferring the contents of a specific folder to the PC.
[0027] The desktop unidirectional optical module is divided into two parts: the left side of the device is the unidirectional data transmitter, and the right side is the unidirectional data receiver. The unidirectional data transmitter and receiver are independent hardware modules.
[0028] The one-way data transmitter runs a USB storage medium reading program. After reading the data from the storage medium, it transmits the data through the one-way optical module. The one-way data receiver receives the data from the one-way optical module, processes the data, and reports it to the PC host computer. The PC host computer runs a corresponding file processing program to store the reported file data to the PC hard drive.
[0029] Data transmission path of desktop single-channel device as follows Figure 2 As shown, data can only be transferred from left to right; it cannot be fed back from the PC to the sending hardware. That is, the PC cannot interact with the USB storage medium; it can only receive data. Therefore, users cannot select specific target files for transfer from the PC via keyboard, mouse, and UI; all files must be transferred according to rules. Users can only wait for all files to be transferred before finding the target file from among them, which negatively impacts usability.
[0030] like Figure 3 As shown, the desktop one-way import device provided by the present invention includes a one-way data sending end (hereinafter referred to as "sending end"), a one-way transmission module and a one-way data receiving end (hereinafter referred to as "receiving end").
[0031] The transmitter is an independent hardware module with a USB host interface on its casing for connecting external USB storage media (such as USB flash drives, portable hard drives, etc.) and a mouse. Internally, the transmitter integrates a main control chip (such as an ARM Cortex-A series processor or MCU), RAM, non-volatile memory (Flash memory for storing UI virtual programs and system firmware), and a power management module. The transmitter establishes a physical connection with the mouse through its USB host interface and collects mouse movement and click data according to the USBHID (Human Interface Device) protocol. Simultaneously, the transmitter connects to the USB storage media through another USB host interface or a different channel of the same USB interface to read file system data from the storage media.
[0032] The unidirectional transmission module is connected between the transmitting end and the receiving end. In this embodiment, the unidirectional transmission module is preferably a unidirectional optical module. The unidirectional optical module includes an optical transmitter (located on the transmitting end side) and an optical receiver (located on the receiving end side), which are connected by one or more optical fibers. The physical characteristics of the unidirectional optical module determine that the optical signal can only be transmitted from the optical transmitter to the optical receiver and cannot be transmitted in the reverse direction. Thus, a physical layer unidirectional data transmission channel is formed between the transmitting end and the receiving end. The receiving end cannot send any data or control commands back to the transmitting end, thereby ensuring unidirectional and secure data transmission from the transmitting end (which can be regarded as a low-security domain or external area) to the receiving end (which can be regarded as a high-security domain or internal area).
[0033] The receiver is an independent hardware module with an interface (such as a USB device interface) for communication with a PC. Internally, the receiver integrates a main control chip, memory, non-volatile memory (for storing UI interface data processing logic and system firmware), and a power management module. The receiver receives optical signals from the transmitter through the optical receiver of the unidirectional optical module, converts them into electrical signals, analyzes and processes them, and then reports the processed data to the PC via the USB interface.
[0034] In a preferred embodiment of the present invention, the transmitting end adopts a hardware architecture of "main control chip + USB hub + optical module driver". The main control chip is an embedded processor that supports USB OTG (On-The-Go) functionality, such as the STM32MP series or i.MX series processors. This processor has multiple built-in USB host controllers, which can connect to a mouse and USB storage media simultaneously.
[0035] The main control chip at the transmitting end runs an embedded operating system (such as embedded Linux or FreeRTOS), on which run a USB storage media reader, a mouse data acquisition program, and a virtual UI program. The USB storage media reader is responsible for mounting the USB storage device, parsing the file system (supporting common file system formats such as FAT32, exFAT, and NTFS), and obtaining file directory structure data. The mouse data acquisition program is responsible for parsing the data packets reported by the mouse according to the USBHID protocol, extracting the mouse movement increment (ΔX, ΔY), button status (left button, right button, middle button, etc.), and scroll wheel status.
[0036] The transmitter is also equipped with non-volatile memory for storing the executable code of the UI virtual program, interface resource configuration files (such as fonts, icons, color themes, etc.), and system configuration files. After the transmitter is powered on, the main control chip loads the UI virtual program from the non-volatile memory and runs it.
[0037] like Figure 4 As shown, the UI interface virtual program running on the transmitting end is a core component of this invention. This program runs in software form on the main control chip of the transmitting end and is responsible for performing the following functions: The UI virtual program retrieves file directory data from the current USB storage medium by calling the application programming interface (API) provided by the USB storage medium reader. This file directory data includes at least: file / folder name, type (file or folder), size, modification time, and hierarchical relationship. Preferably, the UI virtual program starts reading from the root directory of the USB storage medium. When the user selects a folder using the mouse, the UI virtual program rereads the directory contents of that folder and updates the content displayed in the UI virtual interface. The user can browse folders at any level using the mouse, or return to the previous directory or directly to the root directory.
[0038] The UI virtual program acquires mouse movement, button presses, and scroll wheel data in real time through a mouse data acquisition program. Specifically, the mouse data acquisition program parses the mouse data according to the standard message format of the USBHID protocol. Taking a standard four-byte mouse message as an example: bit 0 of the first byte indicates the left-click state (1 for pressed, 0 for released), bit 1 indicates the right-click state, and bit 2 indicates the middle-click state; the second byte indicates the movement increment in the X-axis direction (positive value for rightward movement, negative value for leftward movement); the third byte indicates the movement increment in the Y-axis direction (positive value for upward movement, negative value for downward movement); and the fourth byte indicates the scroll wheel movement. The UI virtual program accumulates the mouse movement increments to the coordinates of the current mouse focus, thereby tracking the mouse's position in the UI virtual interface in real time. The initial position of the mouse focus can be set in the center area or the upper left corner area of the UI virtual interface.
[0039] The UI virtual program overlays and merges the acquired file directory data with mouse data to generate UI virtual interface data. For example... Figure 5 As shown, the UI virtual interface data is essentially a graphical interface data that includes a display of the file directory structure and the mouse focus position.
[0040] Specifically, the UI virtual program maintains a frame buffer in memory, which stores the color data of each pixel of the UI virtual interface. The UI virtual program first draws static elements such as the background, title bar, and toolbar of the UI virtual interface in the frame buffer; then it draws folder icons and file icons in the current directory display area and labels the corresponding file / folder names; finally, it draws the mouse pointer icon in the frame buffer according to the coordinates of the current mouse focus.
[0041] More specifically, the UI virtual program divides the file display area of the UI virtual interface into n virtual coordinate regions, each corresponding to an interactive element (such as a folder icon or a file icon). The mouse is restricted to moving within these n coordinate regions, and the coordinate region where the mouse focus is located is marked with a highlight, border, or other visual means to indicate to the user which file or folder is currently selected.
[0042] The UI virtual interface data is stored in the frame buffer of the sending end in the form of digital images. Preferably, the UI virtual interface data is encoded in RGB565 or RGB888 color format to balance image quality and data transmission volume.
[0043] In this invention, the mouse is the only input device for user interaction with the sending end. Since there is only a one-way data transmission channel between the sending and receiving ends, the PC cannot send any control commands to the sending end; therefore, the mouse connected to the PC cannot control the mouse focus in the UI virtual interface. The mouse connected to the sending end is the sole source of control for the mouse focus in the UI virtual interface.
[0044] Users can control the movement of the mouse cursor within the UI virtual interface by moving the mouse connected to the sending terminal, moving the mouse focus between different coordinate areas. When the mouse focus moves to the coordinate area corresponding to a folder or file, that folder or file is highlighted. Users can trigger the following actions by clicking the left mouse button: When the mouse focus is on the coordinate area corresponding to a folder, clicking the left mouse button means "enter the folder". The UI virtual program then reads the directory contents of the folder and updates the UI virtual interface.
[0045] When the mouse focus is on the coordinate area corresponding to a file, clicking the left mouse button means "selecting the file", and the UI virtual program marks the file as waiting to be transferred.
[0046] When the mouse focus is on the coordinate area corresponding to navigation buttons such as "Back to Previous" or "Back to Root Directory", click the left mouse button to perform the corresponding navigation operation.
[0047] Users can trigger a shortcut menu by right-clicking the mouse, such as "Select All", "Deselect All", and "Start Transfer".
[0048] Users can scroll up and down to browse the file list when it is long by scrolling the mouse wheel, allowing the UI virtual interface to display file list content that exceeds the current visible area.
[0049] In a preferred embodiment of the present invention, the unidirectional transmission module is implemented using a unidirectional optical module. The unidirectional optical module includes an optical transmitter (TOSA, Transmitter Optical Sub-Assembly) and an optical receiver (ROSA, Receiver Optical Sub-Assembly). The optical transmitter is located inside the transmitting end, and the optical receiver is located inside the receiving end; the optical transmitter and optical receiver are connected via optical fiber.
[0050] The optical transmitter converts the electrical signals (i.e., UI virtual interface data) output by the transmitting end's main control chip into optical signals, which are then transmitted outwards through optical fiber. The optical receiver receives the optical signals from the optical fiber, converts them back into electrical signals, and transmits them to the receiving end's main control chip. Since the optical transmitter only has the function of transmitting optical signals, and the optical receiver only has the function of receiving optical signals, the two form an irreversible unidirectional transmission channel at the physical level.
[0051] Preferably, the unidirectional optical module supports a data transmission rate of no less than 100Mbps to meet the real-time transmission requirements of the UI virtual interface data. For higher resolution UI virtual interfaces, optical modules supporting gigabit speeds can be used.
[0052] In a preferred embodiment of the present invention, the sending end and the receiving end communicate using a custom serial data transmission protocol. The data transmission protocol defines the start flag of the data frame, the data length, the data type, the data payload, and the checksum field.
[0053] Specifically, the sending end transmits the UI virtual interface data in segments of fixed-size data packets. Each data packet contains a header and a body. The header includes fields such as the packet sequence number, total number of packets, and data type identifier (e.g., "UI interface data," "mouse event data," or "file directory data"). The body contains the actual UI virtual interface data payload.
[0054] The sending end continuously sends UI virtual interface data to the receiving end at a fixed frame rate (e.g., 30 frames per second). After receiving the data packets, the receiving end reassembles the data according to the information in the packet header to restore the complete UI virtual interface data frame.
[0055] Preferably, each data packet also includes a Cyclic Redundancy Check (CRC) field, used by the receiving end to verify the integrity of the received data. If the verification passes, the receiving end reports the data to the PC host computer; if the verification fails, the receiving end discards the data packet and waits for the arrival of the next data frame. Since the transmission channel is unidirectional, the receiving end cannot request the sending end to retransmit lost or erroneous data packets. Therefore, the sending end adopts a continuous transmission method to ensure that the receiving end can receive complete data frames with a high probability.
[0056] This invention provides two optional UI virtual interface data transmission modes.
[0057] Mode 1: Transmitting the merged UI virtual interface data, such as Figure 6 As shown.
[0058] In this mode, the sending end's UI virtual program overlays and merges file directory data and mouse data locally to generate complete UI virtual interface data (i.e., image data). The sending end transmits the complete UI virtual interface data frame by frame to the receiving end via a unidirectional optical module. After receiving the UI virtual interface data, the receiving end directly reports it to the PC host computer via the USB interface. The PC host computer runs the corresponding UI interface processing program and displays the received UI virtual interface data directly on the PC's monitor.
[0059] The advantage of this mode is that the display logic of the PC host computer is very simple, requiring no interface fusion calculations; it only needs to display the received image data on the screen. The disadvantage is that the amount of data transmitted is large (each frame is complete image data), placing high bandwidth requirements on the unidirectional optical module.
[0060] Mode 2: Transmitting raw mouse data and storage media data, such as Figure 7 As shown.
[0061] In this mode, the sending end's UI virtual program does not perform interface fusion. Instead, it encodes the raw mouse data (mouse coordinates, button states, etc.) and storage medium file directory data separately, and then transmits them to the receiving end via a unidirectional optical module. Upon receiving this raw data, the receiving end reports it to the PC host computer via a USB interface. The PC host computer runs the same UI fusion logic as the sending end—that is, the PC host computer also runs a UI virtual program (with the same interface layout and interaction logic as the sending end's UI virtual program). Based on the received raw mouse data and file directory data, it generates a UI virtual interface locally on the PC and displays it on the monitor.
[0062] The advantage of this mode is the small amount of data transmitted (only text data showing mouse coordinate changes and file directory structure is transmitted), and the lower bandwidth requirement for the unidirectional optical module. The disadvantage is that the PC host computer needs to run a UI interface fusion program consistent with the sending end, placing higher demands on the PC host computer's software.
[0063] In practical applications, users can flexibly choose either of the two modes mentioned above based on the specific application scenario and hardware conditions. For scenarios with ample bandwidth, mode one can be prioritized to simplify PC software deployment; for scenarios with limited bandwidth, mode two can be prioritized to reduce the amount of data transmitted.
[0064] In a preferred embodiment of the present invention, the receiving end adopts a hardware architecture of "main control chip + optical module interface + USB device interface". The main control chip is an embedded processor that supports USB device mode, such as the STM32F4 series or similar processors.
[0065] The receiver's main control chip connects to the optical receiver of the unidirectional optical module via an optical module interface, receiving optical signals from the transmitter and converting them into electrical signals. The receiver's main control chip runs an embedded operating system (such as FreeRTOS), on which a user interface (UI) data processing logic is executed. This processing logic is responsible for parsing, verifying, and reassembling the received data.
[0066] The receiving end connects to the PC via a USB device interface. When the receiving end is connected to the PC via USB, the PC recognizes the receiving end as a standard human-computer interaction device (HID device) or a custom USB device. The receiving end reports the processed UI virtual interface data to the PC via USB bulk transfer or interrupt transfer.
[0067] The data processing flow at the receiving end is as follows: Step 1: Optical signal reception and electrical signal conversion. The optical receiver at the receiving end receives the optical signal from the optical fiber, converts it into an electrical signal (digital signal), and transmits it to the main control chip at the receiving end.
[0068] Step Two: Data Frame Parsing. The receiving end's main control chip parses the received data stream according to a predefined data transmission protocol. The main control chip identifies the start-of-frame marker from the data stream and extracts the header information and payload data of the data frames.
[0069] Step 3: Data Integrity Verification. The receiving end's main control chip performs a CRC check on the extracted payload data. If the check passes, proceed to Step 4; if the check fails, the data frame is discarded.
[0070] Step 4: Data caching and reassembly. The receiving end's main control chip sorts and reassembles the verified data frames according to the data packet sequence number, restoring the complete UI virtual interface data frame (in Mode 1) or the complete mouse data and file directory data (in Mode 2).
[0071] Step 5: Data Reporting. The receiving end's main control chip reports the reconstructed data to the PC host computer via the USB interface. In Mode 1, the complete UI virtual interface image data is reported; in Mode 2, mouse data and file directory data are reported.
[0072] The PC host computer runs a corresponding user interface (UI) program. This program can be a desktop application running as a standalone executable file, or a background program running as a service. Preferably, the UI program is developed using a cross-platform framework (such as Qt, Electron, etc.) to support multiple operating systems such as Windows and Linux.
[0073] The PC's UI interface processing program communicates with the receiving end via a USB driver, receiving UI virtual interface data reported by the receiving end. In Mode 1, the UI interface processing program directly displays the received image data on the PC's monitor in full-screen or windowed mode. In Mode 2, the UI interface processing program runs the same UI interface fusion logic as the sending end, generating a local UI virtual interface based on the received mouse data and file directory data, and displaying it on the monitor.
[0074] The UI virtual interface displayed on the PC's monitor is essentially a "mirror" of the UI virtual interface generated by the sending end. The user operates on the mouse connected to the sending end, and the operation results are reflected in the UI virtual interface displayed on the PC through a one-way transmission channel.
[0075] It is worth noting that the mouse connected to the PC cannot control the mouse focus in the virtual UI. This is because there is no reverse communication channel between the PC and the sending end; the PC cannot send any data or instructions to the sending end, and the sending end cannot receive any signals from the PC. Therefore, even if the user operates the mouse connected to the PC, the mouse event can only be captured by the PC's operating system and cannot be transmitted to the virtual UI program on the sending end. The mouse focus in the virtual UI displayed by the PC is entirely controlled by the mouse connected to the sending end.
[0076] This feature is one of the core security advantages of this invention: while enabling user interaction with the USB storage medium, it maintains physical one-way isolation between the sending and receiving ends, eliminating the possibility of any potential attacks or interference from the PC host computer (high security domain) propagating back to the sending end (low security domain).
[0077] The following is an example of a specific application scenario: The user inserts a USB storage medium into the transmitter's USB port and connects a mouse to another USB port on the transmitter. After powering on, the transmitter automatically runs a virtual UI program, reads the file list in the root directory of the USB storage medium, and generates an initial virtual UI. This virtual UI is transmitted to the receiver via a unidirectional optical module, then reported by the receiver to a PC, and finally displayed on the PC's monitor.
[0078] The user sees a list of files in the root directory of the USB storage medium on the PC's monitor, along with a mouse pointer that can be controlled by the sending end's mouse. When the user moves the mouse connected to the sending end, the mouse pointer on the PC's monitor moves synchronously. When the mouse pointer moves over a folder icon, that folder is highlighted. When the user clicks the left mouse button, the sending end's UI virtual program detects the left-click event, reads the contents of that folder, and updates the UI virtual interface. The updated UI virtual interface is then displayed again on the PC's monitor via a one-way transmission channel, allowing the user to see the subfolders and file list within that folder.
[0079] Users navigate through the file directory structure of the USB storage medium in this manner until they find the target file to be transferred. The user moves the mouse pointer over the target file, left-clicks to select it, and then clicks the "Transfer" button on the interface (or selects "Transfer" via the right-click menu). The sending end's UI virtual program marks the file as ready for transfer and transmits the file data to the receiving end via a unidirectional optical module, which then reports it to the PC for storage.
[0080] Throughout the process, users do not need to wait for all files to be transferred, nor do they need to manually filter target files from a large number of files. Instead, they can browse, select, and transfer target files intuitively, just like operating a local file manager, which significantly improves operational efficiency and user experience.
[0081] In another application scenario, a user needs to transfer multiple files from a USB storage medium to a PC host computer at once. The user selects multiple files one by one in the UI virtual interface using a mouse connected to the sending end (multiple selection can be achieved using the Ctrl or Shift keys on the keyboard, which is also connected to the sending end). Selected files are marked with a checkmark or highlight. The user clicks the "Batch Transfer" button on the interface, and the sending end's UI virtual program sequentially transmits all selected files to the receiving end via a unidirectional optical module, which then reports the data to the PC host computer.
[0082] During this process, the UI virtual interface displays the transfer progress in real time (e.g., "3 / 10 files transferred"), allowing users to check the transfer status at any time. Once the transfer is complete, the UI virtual interface displays "Transfer Complete," and users can find the transferred files in the specified directory on their PC.
[0083] In the above embodiments, the UI virtual program runs on the main control chip at the transmitting end. In another variant embodiment, some functions of the UI virtual program can also be handled by a coprocessor (such as an FPGA) at the transmitting end. For example, an FPGA can be used to accelerate the image rendering and encoding of the UI virtual interface data, thereby reducing the load on the main control chip and increasing the refresh rate of the UI virtual interface.
[0084] In the above embodiment, the mouse is connected to the transmitter via a wired connection through a USB interface. In another variant embodiment, the mouse can also be connected to the transmitter wirelessly (such as via a 2.4GHz wireless receiver or Bluetooth). The transmitter's built-in wireless receiving module receives the mouse's wireless signal, converts it into USBHID data, and then passes it to the UI virtual program for processing.
[0085] In the above embodiments, the unidirectional transmission module is implemented using a unidirectional optical module. In another variant embodiment, the unidirectional transmission module can also be implemented using other physical media with unidirectional transmission characteristics, such as unidirectional electrical isolation devices or unidirectional radio frequency transmission modules. As long as the transmission module can achieve unidirectional and irreversible data transmission from the sending end to the receiving end, and the receiving end cannot send any signal back to the sending end, it falls within the protection scope of this invention.
[0086] In the above embodiments, the resolution of the UI virtual interface can be configured according to actual needs. Preferably, the resolution of the UI virtual interface is 800×600 pixels or 1024×768 pixels to control the amount of data transmission while ensuring display clarity. In another variant embodiment, the resolution of the UI virtual interface can be dynamically adjusted. A higher resolution is used to display more content when the number of files on the USB storage medium is small, and a lower resolution is used to ensure smooth transmission when the number of files is large.
[0087] In summary, this invention, by adding a mouse interface and a virtual UI program to the sending end of a desktop unidirectional import device, enables interactive operation between the user and the USB storage medium under unidirectional physical isolation. Using a mouse connected to the sending end, the user can freely browse the file directory structure of the USB storage medium within the UI virtual interface displayed on the PC monitor and independently select the target file for unidirectional transfer. Throughout the process, physical unidirectional isolation is maintained between the sending and receiving ends; the PC cannot send any control commands back to the sending end, ensuring the security of data transmission. This invention solves the technical problem of existing desktop unidirectional import devices that can only passively transfer all files and that users cannot select the target file, while maintaining the inherent security isolation characteristics of unidirectional import devices, resulting in significant improvements in usability and security.
[0088] The desktop one-way import method provided by this invention includes the following core steps: Step S1: Read the file directory data and mouse data from the USB storage medium through the one-way data sending end.
[0089] Step S2: Generate UI virtual interface data based on the file directory data and the mouse data by running a UI interface virtual program on the one-way data sending end.
[0090] Step S3: The UI virtual interface data is transmitted unidirectionally from the unidirectional data sending end to the unidirectional data receiving end through the unidirectional transmission module.
[0091] Step S4: The UI virtual interface data is reported to the PC host computer through the one-way data receiving end.
[0092] Step S5: Display the UI virtual interface on the monitor of the PC host computer, and update the mouse focus position in the UI virtual interface according to the changes in the mouse data.
[0093] The steps described above will be explained in detail below with reference to specific embodiments.
[0094] Detailed implementation of step S1: After the transmitter powers on, its main control chip runs an embedded operating system and detects whether a USB storage medium is inserted via the USB host interface. When a USB storage medium is detected, the transmitter automatically mounts the storage medium and calls the file system driver to read the file directory structure on the storage medium.
[0095] Preferably, the sending end starts reading from the root directory of the USB storage medium. The read file directory data includes at least: file / folder name, type identifier (distinguishing between folders and files), file size (in bytes), modification timestamp, and directory hierarchy. The sending end stores the read file directory data in memory in a tree structure, facilitating quick access and traversal by the UI virtual program.
[0096] In subsequent user operations, whenever the user clicks to enter a folder, the sending end re-executes this step, reads the directory contents under that folder, and updates the file directory data in memory.
[0097] The transmitting end connects to the mouse via a USB host interface and collects mouse data in real time according to the USB HID protocol. The mouse data includes at least: the mouse's movement increment Δx in the X-axis direction, the movement increment Δy in the Y-axis direction, the left-click status, the right-click status, and the scroll wheel scroll amount.
[0098] Preferably, the sending end collects mouse data at a polling rate of no less than 125Hz to ensure the real-time performance and smoothness of mouse operations. The sending end stores the collected mouse data in a buffer for the UI virtual program to read.
[0099] Detailed implementation of step S2: The UI virtual program reads the mouse movement increment data from the cache and updates the mouse coordinates in the UI virtual interface in real time according to formula (1):
[0100] in, , These are the horizontal and vertical coordinates of the mouse at the previous moment (in pixels). , These represent the incremental movements of the mouse along the X and Y axes, respectively, as collected in this study. , These are the updated mouse horizontal and vertical coordinates, respectively.
[0101] Preferably, the UI virtual program also restricts the mouse coordinates to the effective area of the UI virtual interface, that is, satisfies the constraints of formulas (2) and (3):
[0102]
[0103] in, The width of the UI virtual interface (in pixels). This represents the height of the UI virtual interface (in pixels). With this constraint, the mouse pointer will never move out of the visible range of the UI virtual interface.
[0104] The UI virtual program divides the file display area of the UI virtual interface into n virtual coordinate regions, each corresponding to an interactive element (folder icon or file icon). The coordinate regions are divided as follows: Let the width of the document display area be Height is The number of icons displayed in each row is The width of each icon area is Height is Then the position of each icon area is determined by formula (4) and formula (5):
[0105]
[0106] in, The index number (starting from 0) in the file list. , Let be the coordinates of the top-left corner of the i-th icon area. , This is the offset of the file display area relative to the top left corner of the UI virtual interface.
[0107] Mouse coordinates The index of the icon area is determined by formula (6):
[0108] when When it is effective (i.e.) ,in This represents the total number of files / folders in the current directory. The file / folder corresponding to this index is highlighted.
[0109] The UI virtual program maintains a frame buffer in memory, which stores the color data of each pixel in the UI virtual interface. The size of the frame buffer is... Bytes (in RGB888 color format) or Bytes (in RGB565 color format).
[0110] The UI virtual program generates UI virtual interface data according to the following steps: Step 1: Draw the static background. Initialize all pixels in the frame buffer to a preset background color (such as white or light gray).
[0111] Step 2: Draw the title bar and toolbar. Draw the title text (such as "Desktop Single-Transfer File Transfer") and function buttons (such as "Back to Previous Level", "Start Transfer", etc.) in the top area of the UI virtual interface.
[0112] Step 3: Draw the file directory contents. Traverse all files and folders in the current directory, calculate the display position of each icon according to formulas (4) and (5), draw the folder icon or file icon in the corresponding coordinate area, and draw the file / folder name below the icon.
[0113] Step 4: Draw the mouse pointer. Based on the current mouse coordinates. Draw the mouse pointer icon at the corresponding position in the frame buffer.
[0114] Step 5: Draw the highlighted icon. Calculate the index of the icon area where the mouse is located according to formula (6). Draw a highlighted border or a highlighted background color in the corresponding icon area.
[0115] After the above five steps, the complete UI virtual interface data is formed in the frame buffer.
[0116] Detailed implementation of step S3: In this invention, data transmission between the transmitting end and the receiving end is performed via a one-way transmission module. The one-way transmission module is preferably a one-way optical module. The transmitting end encapsulates the UI virtual interface data generated in step S2 according to a predefined frame format, and then transmits it frame by frame to the receiving end via the one-way optical module.
[0117] Preferably, the transmission frame format of the UI virtual interface data includes: The frame header identifier, which is 2 bytes long and has a fixed value of 0xAA55, is used by the receiver for frame synchronization detection. The data packet sequence number, which is 2 bytes long and increments from 0, is used to identify the order in which data packets are sent. Total number of packets, 2 bytes in length, represents the total number of data packets into which the current complete data frame is divided; The data type is 1 byte long, where 0x01 indicates that the current data packet carries UI virtual interface data; Data length, which is 2 bytes, indicates the number of bytes of payload data in this data packet; Payload data, with a variable length of bytes, is a fragment of UI virtual interface data. CRC check, which is 2 bytes in length, is used to store the check value obtained by performing cyclic redundancy check on the payload data, for the receiving end to verify data integrity.
[0118] The sending end continuously transmits UI virtual interface data at a fixed frame rate (e.g., 30 frames per second). For each frame of UI virtual interface data, the sending end divides it into multiple data packets according to the above frame format, and sends them sequentially to the receiving end through a unidirectional optical module.
[0119] Detailed implementation of step S4: The receiving end receives data packets from the sending end via a unidirectional optical module. The main control chip at the receiving end processes the received data according to the following steps: Step S4.1: Frame Synchronization. The receiving end searches for the frame header identifier 0xAA55 in the received data stream to complete frame synchronization.
[0120] Step S4.2: Data packet parsing. The receiving end parses the header information of each data packet to extract the data packet sequence number, total number of packets, data type, and data length.
[0121] Step S4.3: CRC check. The receiving end performs a CRC check on the payload data of each data packet. The check formula is shown in formula (7):
[0122] in, For the load data pointer, For data length, This is the standard CRC-16 / IBM checksum algorithm. If... If the CRC checksum matches the received CRC checksum, the check passes; otherwise, the data packet is discarded.
[0123] Step S4.4: Data Reassembly. The receiving end sorts the verified data packets according to their sequence numbers. After receiving all data packets, it reconstructs the complete UI virtual interface data frame.
[0124] Step S4.5: Data Reporting. The receiving end reports the reconstructed complete UI virtual interface data frame to the PC host computer via the USB interface.
[0125] Detailed implementation of step S5: The PC host computer runs the corresponding UI interface processing program, which receives UI virtual interface data reported from the receiving end through the USB driver. The PC host computer then renders the received UI virtual interface data directly on the PC's monitor.
[0126] When the user moves the mouse connected to the transmitter, the transmitter collects the mouse movement increment, updates the mouse coordinates, regenerates the UI virtual interface data, and transmits it to the PC host computer via a one-way transmission channel. After receiving the updated UI virtual interface data, the UI interface processing program on the PC host computer refreshes the UI virtual interface on the monitor, and the user can then see the mouse focus moving synchronously within the interface.
[0127] Because the transmission channel is unidirectional, the PC host computer cannot send any data or instructions to the sending end throughout the entire process. Therefore, the mouse connected to the PC host computer cannot control the mouse focus in the UI virtual interface. When the user operates the mouse connected to the PC host computer, although the PC host computer's operating system can capture mouse events, these events cannot be transmitted to the sending end, nor can they affect the mouse position in the UI virtual interface. This characteristic ensures the security isolation effect of this invention.
[0128] Specific implementation methods for the two data transmission modes: Mode 1: Transmitting merged UI virtual interface data In Mode 1, the sending end's UI virtual program overlays and merges file directory data with mouse data locally to generate a complete UI virtual interface data frame (image data). The sending end transmits the complete UI virtual interface data frame by frame to the receiving end through a one-way transmission module. After receiving the data, the PC host computer can display it directly without any interface fusion processing.
[0129] For a UI virtual interface with a resolution of 800×600 pixels and using the RGB565 color format, the data volume of a single frame is 800 × 600 × 2 = 960,000 bytes. When transmitting at 30 frames per second, the required bandwidth is 960,000 × 30 = 28.8Mbps, which a unidirectional optical module can easily meet.
[0130] Mode 2: Transmit raw mouse data and storage media data In Mode 2, the sending end does not perform interface fusion; instead, it encodes the original mouse data and file directory data separately before transmitting them to the receiving end. The PC host computer runs the same UI interface fusion logic as the sending end, generating a virtual UI interface locally.
[0131] The data transmission volume is significantly reduced in this mode: mouse data is approximately 8 bytes per frame, and file directory data is approximately 50-100 bytes per file / folder, far less than the image data volume in Mode 1. This mode is suitable for scenarios where the bandwidth of the unidirectional optical module is limited.
[0132] Specific implementation methods for mouse interaction: When the user moves the mouse connected to the sending end, the mouse movement increment , The mouse coordinates in the UI virtual interface are updated in real time by the method described in step S2, and finally reflected in the UI virtual interface displayed on the PC host computer.
[0133] When the user clicks the left mouse button, the sending end collects the left-click event. The UI virtual program then uses the current mouse coordinates... Combined with formula (6), determine the icon area where the mouse is located. If the mouse is located within the coordinate area corresponding to the folder icon, execute the "Enter Folder" operation, and the UI virtual program will reread the directory contents under the folder and update the UI virtual interface. If the mouse is located within the coordinate area corresponding to the file icon, execute the "Select File" operation and mark the file as pending transfer.
[0134] When the user selects the target file and triggers the "Start Transmission" command, the sending end reads the data content of the file and transmits it to the receiving end through the unidirectional optical module. The receiving end reports the file data to the PC host computer, and the PC host computer saves the file to the specified directory.
[0135] File data transmission follows the same one-way transmission mechanism as UI virtual interface data. File data is sent one by one in the form of data packets through the one-way optical module, ensuring the security and integrity of data transmission.
[0136] In summary, the desktop one-way import method provided by this invention collects file directory data and mouse data from the USB storage medium via the sending end, generates UI virtual interface data, and then transmits it to the PC host computer for display via a one-way optical module. This allows users to browse the file directory of the USB storage medium on the PC host computer's monitor and interact with it using a mouse connected to the sending end. This achieves convenient interaction between the user and the USB storage medium under physical one-way isolation conditions, ensuring the security of data import and significantly improving the user's operating experience.
[0137] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0138] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or modules may be electrical, mechanical, or other forms.
[0139] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0140] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0141] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.
Claims
1. A desktop one-way import device, characterized in that, include: A one-way data transmitter is used to connect a USB storage medium and a mouse. The one-way data transmitter includes a UI interface virtual program. The UI interface virtual program is used to read file directory data in the USB storage medium and mouse data of the mouse, and generate UI virtual interface data based on the file directory data and the mouse data. A one-way transmission module is connected between the one-way data sending end and the one-way data receiving end, and is used to transmit the UI virtual interface data unidirectionally from the one-way data sending end to the one-way data receiving end. The one-way data receiving end is used to receive the UI virtual interface data and report it to the PC host computer, so that the PC host computer can display the UI virtual interface through the display. The mouse movement operation is collected by the one-way data sending end, and the changes in the UI virtual interface data are reflected in the UI virtual interface displayed on the PC host computer.
2. The desktop one-way import device according to claim 1, characterized in that, The unidirectional transmission module is a unidirectional optical module.
3. The desktop one-way import device according to claim 1, characterized in that, The method by which the UI virtual interface program generates the UI virtual interface data includes: The file directory structure of the USB storage medium is displayed in the UI virtual interface, and the UI virtual interface is divided into multiple coordinate areas. The mouse is restricted to move within the multiple coordinate areas, and the mouse focus is displayed in the UI virtual interface.
4. The desktop one-way import device according to claim 1, characterized in that, The one-way data sending end is also used to send the file directory data and the mouse data as raw data to the one-way data receiving end respectively. The PC host computer runs the same UI interface fusion logic as the one-way data sending end, and generates and displays the UI virtual interface according to the raw data.
5. The desktop one-way import device according to claim 1, characterized in that, The file directory structure in the USB storage medium is read starting from the root directory, and supports browsing folders level by level. The UI virtual interface displays the folders and file contents in the current directory.
6. A desktop one-way import method, characterized in that, Based on the desktop one-way import device according to any one of claims 1-5, the method includes: The file directory data and mouse data in the USB storage medium are read through the one-way data sending end; UI virtual interface data is generated based on the file directory data and the mouse data by running a UI interface virtual program on the one-way data sending end; The UI virtual interface data is transmitted unidirectionally from the unidirectional data sending end to the unidirectional data receiving end through the unidirectional transmission module; The UI virtual interface data is reported to the PC host computer through the one-way data receiving terminal; The UI virtual interface is displayed on the monitor of the PC host computer, and the mouse focus position in the UI virtual interface is updated according to the changes in the mouse data.
7. The method according to claim 6, characterized in that, The method for generating the UI virtual interface data by the UI virtual interface program includes: displaying the file directory structure of the USB storage medium in the UI virtual interface, dividing the UI virtual interface into multiple coordinate areas, restricting the mouse to move within the multiple coordinate areas, and displaying the mouse focus in the UI virtual interface.
8. The method according to claim 6, characterized in that, The UI virtual interface data is the interface data obtained by overlaying and fusing the file directory data and the mouse data, and the PC host computer directly displays the UI virtual interface data.
9. The method according to claim 6, characterized in that, The one-way data sending end sends the file directory data and the mouse data as raw data to the one-way data receiving end respectively; the PC host computer runs the same UI interface fusion logic as the one-way data sending end, and generates and displays the UI virtual interface according to the raw data.
10. The method according to claim 6, characterized in that, The file directory structure in the USB storage medium is read starting from the root directory, and supports browsing folders level by level. The UI virtual interface displays the folders and file contents in the current directory.
