CN113946534A - USB data interception processing system and method based on wireless transmission - Google Patents

USB data interception processing system and method based on wireless transmission Download PDF

Info

Publication number
CN113946534A
CN113946534A CN202111212267.3A CN202111212267A CN113946534A CN 113946534 A CN113946534 A CN 113946534A CN 202111212267 A CN202111212267 A CN 202111212267A CN 113946534 A CN113946534 A CN 113946534A
Authority
CN
China
Prior art keywords
data
file
usb
file data
processing
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
Application number
CN202111212267.3A
Other languages
Chinese (zh)
Other versions
CN113946534B (en
Inventor
王美林
罗泽建
肖文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202111212267.3A priority Critical patent/CN113946534B/en
Publication of CN113946534A publication Critical patent/CN113946534A/en
Application granted granted Critical
Publication of CN113946534B publication Critical patent/CN113946534B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4295Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using an embedded synchronisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a USB data intercepting and processing system and method based on wireless transmission, which relate to the technical field of USB data acquisition and processing.A USB data intercepting and processing device intercepts and processes file data before the file data is written into a data memory, the processed data is stored into a cache circular queue and stored in a random cache, the processed data is sent to other slave machines in a local area network through a Wifi module, the data is received by the other slave machines and further processed and written into the local area finally through classification writing, and after the USB data is intercepted and processed, the monitoring and checking of a user on the USB data are realized based on the wireless transmission; the data interception and sending are consistent with the content of the source file, so that the data quality is ensured while the lossless interception, transmission and monitoring of the data are realized, and further utilization of the transmission data by a user is facilitated.

Description

USB data interception processing system and method based on wireless transmission
Technical Field
The invention relates to the technical field of USB data acquisition and processing, in particular to a USB data interception processing system and method based on wireless transmission.
Background
USB is a convenient and fast point-to-point data transmission mode, and is also often used in people's daily life, wherein, USB flash disk plays an important role in daily life especially work.
In actual work, data in transmission of the USB device needs to be monitored and stored sometimes, but the USB communication process is not allowed to be interrupted, communication data between the USB device and the host can be checked after a current transmission task is finished, the host with a visual interface can directly check the data after the transmission task is finished, but the host without the visual interface and the data checking function needs to be unplugged from the USB device and connected to the host with the data checking function to check the data.
31.5.2017, a Chinese invention patent (publication number: CN106776384A) discloses a USB data intercepting device and an intercepting method, wherein, the device comprises a microcontroller, a static random buffer, an Ethernet/WiFi module and a USB interface end, if the data transmitted in the USB communication needs to be intercepted, the USB host and the USB slave can be directly connected into the device through the USB line without additional driving programs, so that the lossless acquisition of USB data is realized, but if the data is intercepted, due to the limitation of the USB protocol, data which is smaller than the size of one memory block in the data transmission process of the host and the USB device can be repeatedly generated in the monitoring process, and related products for classifying and processing the data in the transmission process of the USB device are not available in the market at present, so that the data can be transmitted only in the original form, and further utilization of the transmitted data by a user is not facilitated.
Disclosure of Invention
In order to solve the problem of how to intercept and process data of a USB storage device in the data transmission process, the invention provides a USB data interception and processing system and method based on wireless transmission.
In order to achieve the technical effects, the technical scheme of the invention is as follows:
a USB data interception processing system based on wireless transmission comprises: the host machine identifies the USB data intercepting device of the lower machine and writes file data into a data storage of the USB data intercepting device of the lower machine, before the file data is written into the data storage, the microcontroller copies the file data, then processes the file data, writes the file data into the random buffer in a buffer cycle queue mode, realizes USB data interception, and stores original file data into the data storage; the slave machines are connected to a local area network of the USB data intercepting device of the lower computer, processed file data are transmitted to the slave machines in a wireless mode through the Ethernet/local area network module, after each slave machine receives the file data, secondary processing is conducted on the data, and finally the data are written into the local area.
Preferably, the ethernet/lan module of the USB data capture device of the lower computer is a WiFi module, the microcontroller is bidirectionally connected to the USB interface terminal through an AB address bus and a DB data bus, an SPI protocol is used between the microcontroller and the WiFi module, the output of the microcontroller to the WiFi module is realized through an MOSI, the output of the WiFi module to the microcontroller is realized through an MISO, the output of the microcontroller to the data storage is realized through a DO by the microcontroller, and the output of the data storage to the microcontroller is realized through a DI; the microcontroller realizes the output of the microcontroller to the random buffer through DO and realizes the output of the random buffer to the microcontroller through DI.
Preferably, the random access memory is a random access memory RAM, and the data memory is a TF card.
The microcontroller is used as a lower computer USB data intercepting device, the microcontroller is used as a lower computer control chip, the random cache is used as a write cache, the USB interface end and the TF card jointly simulate a USB large-capacity storage device, an SPI (serial peripheral interface) protocol is adopted between the microcontroller and the Wifi module, communication between the microcontroller and the Ethernet/wireless local area network module is realized, normal work of the lower computer USB data intercepting device is not influenced, rapid and efficient transmission of data can be realized, and the effect of synchronous transmission can be achieved; in addition, the problem of data interference caused by multiplexing of the serial port is avoided, the system stability is improved, and the data transmission speed of the Wifi module can be maximized through the SPI protocol.
Preferably, the host identifies the lower computer USB data intercepting device through a USB protocol, the request communication instruction sent by the lower computer USB data intercepting device to the host is a handshake packet, the host sends a token packet and a file data packet to the lower computer USB data intercepting device, the file data packet is stored in a specific buffer area in a cache form, the microcontroller copies the file data, establishes a cache circular queue in a random cache, processes the file data, and stores the processed file data in a cache circular sequence.
The data transmission of the storage device is carried out by using batch transmission according to the USB protocol, when batch write data is transmitted in batch, batch output transaction is adopted, when a file data packet is stored in a specific buffer area in a cache form, the lower computer USB data intercepting device intercepts the file data which is sent by the host computer and temporarily stored in the buffer area, and the data are put into a cache circular queue, namely the microcontroller intercepts the data by copying the USB data write-in cache before the file data is written in the data storage based on the USB protocol.
Preferably, the processing of the document data includes data classification and data deduplication, the data classification is to classify data formats to separate different types of data, and the data deduplication process is as follows:
dividing file data into a plurality of file blocks with the same size;
comparing the data of the adjacent file blocks, checking whether the same data segment exists in the adjacent file blocks, and if so, removing the repeated data segment in the file block of the next subscript; otherwise, not processing;
adding head and tail marks for each file block, storing the file data in the processed file blocks into a cache circulating sequence, and waiting for wireless transmission to a plurality of slave machines by the Ethernet/local area network module.
When the USB data intercepting device of the lower computer compares and deduplicates the intercepted file content, a file head and tail mark is added, and then the processed data are respectively temporarily stored in a buffer circular queue.
Preferably, each of the plurality of slave machines is provided with an upper computer system, the upper computer system comprises a human-computer interaction interface module, a TCP/IP module, a cache management module and a file management module, the human-computer interaction interface module has a visual operation function, and is provided with a system login interface, a system environment configuration interface and a data monitoring interface, a user completes login through human-computer operation, then completes system environment configuration through human-computer operation, and data monitoring is realized through the data monitoring interface; the TCP/IP module comprises an IP/Port management unit, an equipment connection unit and a data receiving unit and is used for TCP master-slave machine configuration, equipment connection and receiving callback file data; the cache management module is used for processing the received and recalled file data and comprises a received data cache unit and a file data local cache unit; the file management module comprises a file reading and writing unit and a file information analysis unit, and is used for analyzing and processing the received callback file data and writing the callback file data into a local disk;
the upper computer system on each slave computer confirms the connection with the USB data intercepting device of the lower computer through a TCP/IP module; after the processed file data are stored in the caching cycle sequence, the USB data intercepting device of the lower computer acquires the latest file data from the tail of the caching cycle sequence every time, the latest file data are wirelessly transmitted to an upper computer system of each slave computer in a local area network through a TCP/IP protocol and an Ethernet/local area network module, and a user views the original data through the human-computer interaction interface module.
The TCP/IP protocol can ensure the reliability of data transmission, and the upper computer system assists in verifying the file information and ensuring the integrity of file interception.
Preferably, the cache circular queue adopts a multidimensional cache circular queue, cache circular queues with different dimensions are dynamically created according to the quantity of transmitted file data, each dimension of the cache circular queue stores one file data in transmission, when all the file data are completely transmitted, the dimension of the cache circular queue is changed into 1, all used spaces are emptied, and system resources are released.
Preferably, when processing the received callback file data, the cache management module of the upper computer system performs double verification and deduplication processing on the file data, where the data verification includes data header verification and tail verification, adds a mark to the header and tail of the transmitted file data, and when receiving the file data, determines whether the file data header mark matches with the tail mark of the file block being received by the upper computer system, and if so, writes the data into the file; otherwise, circularly searching the file data in the next transmission for verification;
the process of the deduplication processing is as follows:
dividing file data into a plurality of file blocks with the same size;
comparing the data of the adjacent file blocks, checking whether the same data segment exists in the adjacent file blocks, and if so, removing the repeated data segment in the file block of the next subscript; otherwise, no processing is performed.
The upper computer system performs double verification and duplicate removal processing on the file data, so that no duplication of data transmission and no disorder of file contents are ensured, and further utilization of the data by a user is facilitated.
The invention also provides a USB data intercepting and processing method based on wireless transmission, which is realized based on the USB data intercepting and processing system and comprises the following steps:
s1, determining the number of slave machines, and accessing each slave machine into a local area network of a USB data intercepting device of a lower computer;
s2, connecting the USB data intercepting device of the lower computer with a host through a USB interface end, and sending a communication request instruction to the host;
s3, the host identifies the USB data intercepting device of the lower computer and writes file data into a data storage of the USB data intercepting device of the lower computer;
s4, before the file data are written into the data memory, the microcontroller copies the file data, processes the file data, writes the file data into the random buffer in a buffer circular queue mode, and writes the original file data into the data memory;
and S5, wirelessly transmitting the processed file data to a plurality of slave machines through the Ethernet/local area network module, and after each slave machine receives the file data, performing secondary processing on the data and finally writing the data into the local.
Firstly, the number of the slave machines is determined, if the number of the slave machines is 0, the USB data intercepting device of the lower machine is a simple USB storage device, the intercepting transmission of USB data does not exist, and the original file data is directly written into the data storage; when the number of the connected slaves is multiple, the lower computer USB data intercepting device transmits the data transmitted from the master to each connected slave.
Preferably, in step S1, each slave computer is connected to the lan of the USB data capture device of the lower computer according to a key preset in the lan of the USB data capture device;
the host machine identifies the USB data intercepting device of the lower computer through a USB protocol, the request communication instruction sent to the host machine by the USB data intercepting device of the lower computer is a handshake packet, the host machine sends a token packet and a file data packet to the USB data intercepting device of the lower computer, and the file data packet comprises file data written into a data memory of the USB data intercepting device of the lower computer;
in step S4, the processing of the document data includes data classification and data deduplication, where the data classification is to classify data formats to separate different types of data;
after each slave machine receives the file data, the secondary processing of the data comprises the following steps: and carrying out double verification and de-duplication processing on the data.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the invention provides a USB data intercepting and processing system and method based on wireless transmission, wherein the system comprises a host, a lower computer USB data intercepting device and a plurality of slave computers, and after the USB data intercepting and processing, monitoring and checking of a user on the USB data are realized based on wireless transmission; before the file data is written into the data memory, the USB data intercepting and processing device intercepts and processes the file data, the processed data is stored in a buffer circular queue and stored in a random buffer, the processed data is sent to a slave machine through a WIFI module, the slave machine receives the data and further processes the data, and the data is written into the local area finally through classification writing.
Drawings
Fig. 1 is a schematic structural diagram of a USB data interception processing system based on wireless transmission according to embodiment 1 of the present invention;
fig. 2 is a schematic structural diagram of an upper computer system according to embodiment 1 of the present invention;
fig. 3 is a schematic structural diagram of a specific USB data interception processing system in which the host is a hemodynamic detection system according to embodiment 1 of the present invention;
fig. 4 is a flowchart illustrating a USB data interception processing method based on wireless transmission according to embodiment 2 of the present invention.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for better illustration of the present embodiment, certain parts of the drawings may be omitted, enlarged or reduced, and do not represent actual dimensions;
it will be understood by those skilled in the art that certain well-known descriptions of the figures may be omitted.
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
As shown in fig. 1, the USB data interception processing system based on wireless transmission proposed in the embodiment of the present invention includes: the host 1, the USB data intercepting device 2 of the lower computer and a plurality of slave machines 3, wherein the USB data intercepting device 2 of the lower computer is provided with a microcontroller, a USB interface end, an Ethernet/local area network module, a random buffer and a data memory, the USB data intercepting device 2 of the lower computer is connected with the host 1 through the USB interface end and sends a request communication instruction to the host 1, the host 1 identifies the USB data intercepting device 2 of the lower computer and writes file data into the data memory of the USB data intercepting device 2 of the lower computer, before the file data are written into the data memory, the microcontroller copies the file data, then processes the file data, writes the file data into the random buffer in a mode of caching circular queue, so as to realize USB data interception, and the original file data are stored into the data memory; referring to fig. 1, a plurality of slave machines 3 are connected to a local area network of a USB data capture device 2 of a lower computer, processed file data is wirelessly transmitted to the plurality of slave machines 3 through an ethernet/local area network module, and each slave machine performs secondary processing on the data after receiving the file data, and finally writes the processed file data into the local area.
Referring to fig. 1, the number of the slave machines shown in this embodiment is three, but in practical application, there may be a plurality of slave machines, and particularly, if the number of the slave machines is 0, the USB data interception device 2 of the lower computer is a simple USB storage device, so that there is no interception transmission of USB data, and the original file data is directly written into the data storage; when the number of the connected slave machines is multiple, the USB data intercepting device 2 of the lower computer transmits the data transmitted from the host machine 1 to each connected slave machine; the Ethernet/local area network module of the USB data intercepting device 2 of the lower computer is a WiFi module, the microcontroller is bidirectionally connected with the USB interface end through an AB address bus and a DB data bus, an SPI protocol is adopted between the microcontroller and the Wifi module, the output from the microcontroller to the Wifi module is realized through an MOSI, the output from the Wifi module to the microcontroller is realized through an MISO, the output from the microcontroller to a data memory is realized through a DO by the microcontroller, and the output from the data memory to the microcontroller is realized through a DI; the microcontroller realizes the output of the microcontroller to the random buffer through DO and realizes the output of the random buffer to the microcontroller through DI.
In this embodiment, the random access memory is a random access memory RAM, and the data storage is a TF card. The microcontroller adopts Stm32f103vet6 as a main control chip, the chip realizes the function of a large-capacity storage device by reading and running a program in an internal flash, data interaction with the host 1 is completed through a USB protocol, an ESP8266 is adopted as a control chip of a Wifi module, a USB interface end and a TF card jointly simulate the USB large-capacity storage device, an SPI protocol is adopted between the microcontroller and the Wifi module, communication between the microcontroller and an Ethernet/wireless local area network module is realized, normal work of a USB data intercepting device 2 of a lower computer is not influenced, rapid and efficient transmission of data can be realized, and the effect of synchronous transmission can be achieved; in addition, the problem of data interference caused by serial port multiplexing is avoided, the system stability is improved, the data transmission speed of the Wifi module can be maximized through the SPI protocol, and the actual measurement proves that the data transmission speed can reach 500kb/s through the WIFI module.
In this embodiment, the host 1 recognizes the lower-computer USB data intercepting device 2 through the USB protocol, and performs data transmission of the storage device by using batch transmission according to the USB protocol, and when batch data writing is performed by using batch transmission, a batch output transaction is adopted, the request communication instruction sent from the lower-computer USB data intercepting device 2 to the host 1 is a handshake packet, the host 1 sends a token packet and a file data packet to the lower-computer USB data intercepting device 2, the file data packet is stored in a specific buffer area in a cache form, the microcontroller copies the file data, a cache circular queue is built in a random cache, then processes the file data, and stores the processed file data in the cache circular sequence. When the file data packet is stored in a specific buffer area in a cache form, the lower computer USB data intercepting device 2 intercepts the file data which is sent by the host 1 and temporarily stored in the buffer area, and the data is put into a cache circular queue, namely, the microcontroller intercepts the data by copying the USB data and writing the USB data into the cache before the file data is written into the data memory based on a USB protocol.
The processing of the file data comprises data classification and data deduplication, wherein the data classification is to classify data formats to separate different types of data, the condition of occurrence of the repeated data is that the repeated data may appear in the data of less than one sector part, and the data deduplication process is as follows:
dividing file data into a plurality of file blocks with the same size;
comparing the data of the adjacent file blocks, checking whether the same data segment exists in the adjacent file blocks, and if so, removing the repeated data segment in the file block of the next subscript; otherwise, not processing;
adding head and tail marks for each file block, storing the file data in the processed file blocks into a cache circulating sequence, and waiting for wireless transmission to a plurality of slave machines by the Ethernet/local area network module.
When the USB data intercepting device 2 of the lower computer compares and deduplicates the intercepted file content, a file head and tail mark is added, and then the processed data are respectively temporarily stored in a buffer circular queue.
Each of the plurality of slave machines 3 is provided with an upper computer system, which is shown in fig. 2 and comprises a human-computer interaction interface module, a TCP/IP module, a cache management module and a file management module, wherein the human-computer interaction interface module has a visual operation function, is provided with a system login interface, a system environment configuration interface and a data monitoring interface, and is used for completing login by a user through human-computer operation, then completing system environment configuration through human-computer operation and realizing data monitoring through the data monitoring interface; the TCP/IP module comprises an IP/Port management unit, an equipment connection unit and a data receiving unit and is used for TCP master-slave machine configuration, equipment connection and receiving callback file data; the cache management module is used for processing the received and recalled file data and comprises a received data cache unit and a file data local cache unit; the file management module comprises a file reading and writing unit and a file information analysis unit, and is used for analyzing and processing the received callback file data and writing the callback file data into a local disk;
the upper computer system on each slave computer confirms the connection with the USB data intercepting device 2 of the lower computer through a TCP/IP module; after the processed file data is stored in the caching cycle sequence, the USB data intercepting device 2 of the lower computer acquires the latest file data from the tail of the caching cycle sequence every time, the latest file data is wirelessly transmitted to an upper computer system of each slave computer in a local area network through a TCP/IP protocol and an Ethernet/local area network module, and a user views the original data through the human-computer interaction interface module. The TCP/IP protocol can guarantee the reliability of data transmission.
In this embodiment, the buffer circular queue adopts a multidimensional buffer circular queue, buffer circular queues with different dimensions are dynamically created according to the number of transmitted file data, each dimension of the buffer circular queue stores one file data in transmission, when all the file data are completely transmitted, the dimension of the buffer circular queue is changed to 1, and all used spaces are emptied.
When a cache management module of the upper computer system processes and receives the recalled file data, the cache management module performs double verification and duplicate removal on the file data, and writes the data into different files according to data format classification, wherein the data verification comprises data head verification and tail verification, marks are added at the head and tail of the transmitted file data, when the file data is received, whether the head mark of the file data is matched with the tail mark of a file block which is being received by the upper computer system is judged, and if the head mark of the file data is matched with the tail mark of the file block which is being received by the upper computer system, the data is written into the file; otherwise, circularly searching the file data in the next transmission for verification;
the process of the duplicate removal treatment comprises the following steps:
dividing file data into a plurality of file blocks with the same size;
comparing the data of the adjacent file blocks, checking whether the same data segment exists in the adjacent file blocks, and if so, removing the repeated data segment in the file block of the next subscript; otherwise, no processing is performed. The upper computer system performs double verification and duplicate removal processing on the file data, so that no repetition of data transmission and no disorder of file contents are ensured, and further utilization of the data by a user is facilitated.
In summary, referring to fig. 1, when the USB data capturing device of the lower computer is simply connected to the host 1, it may be regarded as a general USB disk, and if the host 1 copies the file to the USB data capturing device 2 of the lower computer, the USB data capturing device 2 of the lower computer writes the file data into the TF card of the data storage device, so as to form a USB disk capable of storing the file. The slave 3 is connected to the USB data intercepting device 2 according to the Wifi SSID/password preset by the local area network where the USB data intercepting device 2 of the lower computer is located, and after the connection is successful, the slave can be regarded as being successfully connected with the USB data intercepting device 2 of the lower computer. The test process is a process of copying files and transmitting data through a Wifi module, the files are copied to the USB data interception device 2 of the lower computer in the host 1, corresponding files can be found in a file storage folder preset in the slave 2, and the file content is the same as the file content in a data storage TF card copied to the USB data interception device 2 of the lower computer by the host 1.
As shown in fig. 3, the host 1 is replaced by a hemodynamic detection system of Linux system, and the hemodynamic detection system continuously writes the detection data into the external USB device during the detection of the hemodynamic data of the human body. The hemodynamic detection system is started, meanwhile, the lower computer USB data interception device 2 is connected with the hemodynamic detection system through a USB interface end, and the hemodynamic detection system can start detection work after the lower computer USB data interception device 2 is identified to be a USB flash disk. In the detection process, the hemodynamic detection system writes detection data into the lower computer USB data interception device 2, simultaneously sends the data to the (PC) slave machine 3 through the local area network, the upper computer of the (PC) slave machine 3 completely writes the data into the local, and the comparison test finds that the content of the data written into the lower computer USB data interception device is the same as that of the local data written into the (PC) slave machine 3.
Example 2
Referring to fig. 4, the present invention further provides a USB data interception processing method based on wireless transmission, where the method is implemented based on the USB data interception processing system described in embodiment 1, and the method includes the following steps:
s1, determining the number of slave machines, and accessing each slave machine into a local area network of a USB data intercepting device of a lower computer;
s2, connecting the USB data intercepting device of the lower computer with a host through a USB interface end, and sending a communication request instruction to the host;
s3, the host identifies the USB data intercepting device of the lower computer and writes file data into a data storage of the USB data intercepting device of the lower computer;
s4, before the file data are written into the data memory, the microcontroller copies the file data, processes the file data, writes the file data into the random buffer in a buffer circular queue mode, and writes the original file data into the data memory;
and S5, wirelessly transmitting the processed file data to a plurality of slave machines through the Ethernet/local area network module, and after each slave machine receives the file data, performing secondary processing on the data and finally writing the data into the local.
In this embodiment, the number of the slave machines is first determined, and if the number of the slave machines is 0, the lower computer USB data interception device is a simple USB storage device, and there is no interception transmission of USB data, and the original file data is directly written into the data storage; when the number of the connected slaves is multiple, the lower computer USB data intercepting device transmits the data transmitted from the master to each connected slave.
In step S1, each slave computer is connected to the lan of the USB data capturing device of the lower computer according to a secret key preset in the lan of the USB data capturing device;
the host machine identifies the USB data intercepting device of the lower computer through a USB protocol, the request communication instruction sent to the host machine by the USB data intercepting device of the lower computer is a handshake packet, the host machine sends a token packet and a file data packet to the USB data intercepting device of the lower computer, and the file data packet comprises file data written into a data memory of the USB data intercepting device of the lower computer;
in step S4, the processing of the document data includes data classification and data deduplication, where the data classification is to classify data formats to separate different types of data;
after each slave machine receives the file data, the secondary processing of the data comprises the following steps: performing double verification and duplicate removal processing on data, specifically, the double verification comprises data head verification and tail verification, adding marks at the head and tail of transmitted file data, judging whether the head mark of the file data is matched with the tail mark of a file block which is being received by an upper computer system when the file data is received, and writing the data into a file if the head mark of the file data is matched with the tail mark of the file block which is being received by the upper computer system; otherwise, circularly searching the file data in the next transmission for verification;
the process of the duplicate removal treatment comprises the following steps:
dividing file data into a plurality of file blocks with the same size;
comparing the data of the adjacent file blocks, checking whether the same data segment exists in the adjacent file blocks, and if so, removing the repeated data segment in the file block of the next subscript; otherwise, no processing is performed.
In summary, in order to solve the problem that in some current scenarios, real-time monitoring and data acquisition for data transmitted between a host and a USB data capture device are required, due to the limitation of the USB protocol, directly capturing and sending data will cause the data to be inconsistent with the content of a source file, the method provided in the embodiment of the present invention may be summarized as: the method relates to a data verification and de-duplication method, so that the intercepted data can be completely stored and processed.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (10)

1. A USB data interception processing system based on wireless transmission, the system comprising: the host machine identifies the USB data intercepting device of the lower machine and writes file data into a data storage of the USB data intercepting device of the lower machine, before the file data is written into the data storage, the microcontroller copies the file data, then processes the file data, writes the file data into the random buffer in a buffer cycle queue mode, realizes USB data interception, and stores original file data into the data storage; the slave machines are connected to a local area network of the USB data intercepting device of the lower computer, processed file data are transmitted to the slave machines in a wireless mode through the Ethernet/local area network module, after each slave machine receives the file data, secondary processing is conducted on the data, and finally the data are written into the local area.
2. The USB data interception processing system based on wireless transmission of claim 1, wherein the Ethernet/LAN module of the USB data interception device of the lower computer is a WiFi module, the microcontroller is bidirectionally connected with the USB interface terminal through an AB address bus and a DB data bus, an SPI protocol is adopted between the microcontroller and the Wifi module, the output of the microcontroller to the Wifi module is realized through MOSI, the output of the Wifi module to the microcontroller is realized through MISO, the output of the microcontroller to the data memory is realized through DO, and the output of the data memory to the microcontroller is realized through DI; the microcontroller realizes the output of the microcontroller to the random buffer through DO and realizes the output of the random buffer to the microcontroller through DI.
3. The USB data interception processing system based on wireless transmission of claim 2, wherein the Random Access Memory (RAM) and the data storage are TF cards.
4. The system for intercepting and processing the USB data based on the wireless transmission according to claim 1, wherein the host recognizes the USB data intercepting device of the lower computer through a USB protocol, the request communication command sent by the USB data intercepting device of the lower computer to the host is a handshake packet, the host sends a token packet and a file data packet to the USB data intercepting device of the lower computer, the file data packet is stored in a specific buffer area in a cache form, the microcontroller copies the file data, a cache circular queue is built in the random buffer, then the file data is processed, and the processed file data is stored in the cache circular sequence.
5. The USB data interception processing system based on wireless transmission of claim 4, wherein the processing of the file data includes data classification and data deduplication, the data classification is to classify data formats to separate different types of data, and the data deduplication process is:
dividing file data into a plurality of file blocks with the same size;
comparing the data of the adjacent file blocks, checking whether the same data segment exists in the adjacent file blocks, and if so, removing the repeated data segment in the file block of the next subscript; otherwise, not processing;
adding head and tail marks for each file block, storing the file data in the processed file blocks into a cache circulating sequence, and waiting for wireless transmission to a plurality of slave machines by the Ethernet/local area network module.
6. The USB data interception processing system based on wireless transmission according to claim 5, wherein each of the plurality of slave machines is provided with an upper computer system, the upper computer system comprises a man-machine interaction interface module, a TCP/IP module, a cache management module and a file management module, the man-machine interaction interface module has a visual operation function, and is provided with a system login interface, a system environment configuration interface and a data monitoring interface, a user completes login through man-machine operation, then completes system environment configuration through man-machine operation, and realizes data monitoring through the data monitoring interface; the TCP/IP module comprises an IP/Port management unit, an equipment connection unit and a data receiving unit and is used for TCP master-slave machine configuration, equipment connection and receiving callback file data; the cache management module is used for processing the received and recalled file data and comprises a received data cache unit and a file data local cache unit; the file management module comprises a file reading and writing unit and a file information analysis unit, and is used for analyzing and processing the received callback file data and writing the callback file data into a local disk;
the upper computer system on each slave computer confirms the connection with the USB data intercepting device of the lower computer through a TCP/IP module; after the processed file data are stored in the caching cycle sequence, the USB data intercepting device of the lower computer acquires the latest file data from the tail of the caching cycle sequence every time, the latest file data are wirelessly transmitted to an upper computer system of each slave computer in a local area network through a TCP/IP protocol and an Ethernet/local area network module, and a user views the original data through the human-computer interaction interface module.
7. The system according to any one of claims 1 to 6, wherein the buffer circular queue adopts a multidimensional buffer circular queue, buffer circular queues with different dimensions are dynamically created according to the number of transmitted file data, each buffer circular queue stores one file data in transmission, when all file data are transmitted, the buffer circular queue dimension becomes 1, and all used spaces are emptied.
8. The system of claim 5, wherein the cache management module of the upper computer system performs double verification and deduplication processing on the file data when processing the received callback file data, the data verification includes data header verification and trailer verification, a flag is added to the header and trailer of the transmitted file data, when receiving the file data, it is determined whether the file data header flag matches the trailer flag of the file block being received by the upper computer system, and if so, the data is written into the file; otherwise, circularly searching the file data in the next transmission for verification;
the process of the deduplication processing is as follows:
dividing file data into a plurality of file blocks with the same size;
comparing the data of the adjacent file blocks, checking whether the same data segment exists in the adjacent file blocks, and if so, removing the repeated data segment in the file block of the next subscript; otherwise, no processing is performed.
9. A USB data intercepting and processing method based on wireless transmission, wherein the method is implemented based on the USB data intercepting and processing system of claim 1, and the method comprises the following steps:
s1, accessing each slave machine into a local area network of a USB data intercepting device of a lower computer;
s2, connecting the USB data intercepting device of the lower computer with a host through a USB interface end, and sending a communication request instruction to the host;
s3, the host identifies the USB data intercepting device of the lower computer and writes file data into a data storage of the USB data intercepting device of the lower computer;
s4, before the file data are written into the data memory, the microcontroller copies the file data, processes the file data, writes the file data into the random buffer in a buffer circular queue mode, and writes the original file data into the data memory;
and S5, wirelessly transmitting the processed file data to a plurality of slave machines through the Ethernet/local area network module, and after each slave machine receives the file data, performing secondary processing on the data and finally writing the data into the local.
10. The method for intercepting and processing the USB data based on wireless transmission according to claim 9, wherein in step S1, each slave computer accesses to the lan of the USB data intercepting apparatus of the lower computer according to the key preset in the lan of the USB data intercepting apparatus;
the host machine identifies the USB data intercepting device of the lower computer through a USB protocol, the request communication instruction sent to the host machine by the USB data intercepting device of the lower computer is a handshake packet, the host machine sends a token packet and a file data packet to the USB data intercepting device of the lower computer, and the file data packet comprises file data written into a data memory of the USB data intercepting device of the lower computer;
in step S4, the processing of the document data includes data classification and data deduplication, where the data classification is to classify data formats to separate different types of data;
after each slave machine receives the file data, the secondary processing of the data comprises the following steps: and carrying out double verification and de-duplication processing on the data.
CN202111212267.3A 2021-10-18 2021-10-18 USB data interception processing system and method based on wireless transmission Active CN113946534B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111212267.3A CN113946534B (en) 2021-10-18 2021-10-18 USB data interception processing system and method based on wireless transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111212267.3A CN113946534B (en) 2021-10-18 2021-10-18 USB data interception processing system and method based on wireless transmission

Publications (2)

Publication Number Publication Date
CN113946534A true CN113946534A (en) 2022-01-18
CN113946534B CN113946534B (en) 2023-09-12

Family

ID=79331466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111212267.3A Active CN113946534B (en) 2021-10-18 2021-10-18 USB data interception processing system and method based on wireless transmission

Country Status (1)

Country Link
CN (1) CN113946534B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006155240A (en) * 2004-11-29 2006-06-15 Canon Inc Usb connecting system, usb function device, method of communication, and program and storage medium
EP2597577A1 (en) * 2011-11-25 2013-05-29 Huawei Device Co., Ltd. Ethernet base, network system, and data forwarding method
CN105824770A (en) * 2015-01-09 2016-08-03 北京航空航天大学 Transmission method for control information of Ethernet control automation technology (Ether CAT) equipment and adapter
CN106776384A (en) * 2016-12-02 2017-05-31 李天瑜 A kind of usb data capture device and intercept method
CN107332930A (en) * 2017-07-31 2017-11-07 努比亚技术有限公司 Data packet transmission system and method
WO2021142965A1 (en) * 2020-01-14 2021-07-22 深圳壹账通智能科技有限公司 Data synchronization method and apparatus, and computer device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006155240A (en) * 2004-11-29 2006-06-15 Canon Inc Usb connecting system, usb function device, method of communication, and program and storage medium
EP2597577A1 (en) * 2011-11-25 2013-05-29 Huawei Device Co., Ltd. Ethernet base, network system, and data forwarding method
CN105824770A (en) * 2015-01-09 2016-08-03 北京航空航天大学 Transmission method for control information of Ethernet control automation technology (Ether CAT) equipment and adapter
CN106776384A (en) * 2016-12-02 2017-05-31 李天瑜 A kind of usb data capture device and intercept method
CN107332930A (en) * 2017-07-31 2017-11-07 努比亚技术有限公司 Data packet transmission system and method
WO2021142965A1 (en) * 2020-01-14 2021-07-22 深圳壹账通智能科技有限公司 Data synchronization method and apparatus, and computer device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王立萍;吴黎明;: "基于嵌入式的USB数据采集系统的设计开发", 电子测量技术, no. 09, pages 84 - 86 *

Also Published As

Publication number Publication date
CN113946534B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
US11265266B2 (en) Computer-readable recording medium recording port switching program and port switching method
EP2879040A1 (en) Data storage method, data storage apparatus, and storage device
US8909822B2 (en) Output device, log collecting method for output device, and storage medium
CN108989432B (en) User-mode file sending method, user-mode file receiving method and user-mode file receiving and sending device
WO2022032990A1 (en) Command information transmission method, system, and apparatus, and readable storage medium
EP4152140A1 (en) Network card and method for network card to process data
CN103631534B (en) Data storage system and managing method thereof
US9473273B2 (en) Memory system capable of increasing data transfer efficiency
CN111736945A (en) Virtual machine thermal migration method, device, equipment and medium based on intelligent network card
KR20110123541A (en) Data storage device and method for operating thereof
CN114461593B (en) Log writing method and device, electronic device and storage medium
WO2022156376A1 (en) Method, system and device for prefetching target address, and medium
WO2015172391A1 (en) Fast data read/write method and apparatus
CN113946534B (en) USB data interception processing system and method based on wireless transmission
WO2023185335A1 (en) Crash clustering method and apparatus, electronic device and storage medium
WO2023035754A1 (en) Permission synchronization method and apparatus, and electronic device and storage medium
CN107615259B (en) Data processing method and system
CN115470040A (en) Method, device, equipment and medium for testing re-deleted fingerprint threshold based on snapshot
CN106997315B (en) Method and device for memory dump of virtual machine
CN115242813A (en) File access method, network card and computing device
CN106527989A (en) SCSI (Small Computer System Interface) command control method and system for storage system
CN109254953A (en) A kind of data-erasure method based on FAT file, data storage device and system
CN112433812B (en) Virtual machine cross-cluster migration method, system, equipment and computer medium
CN110474941A (en) The implementation method for being synchronized to server-side is got in a kind of log ready
CN104636081B (en) Data-storage system and its management method

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