CN107656890A - A kind of method and apparatus of data acquisition - Google Patents
A kind of method and apparatus of data acquisition Download PDFInfo
- Publication number
- CN107656890A CN107656890A CN201710840668.0A CN201710840668A CN107656890A CN 107656890 A CN107656890 A CN 107656890A CN 201710840668 A CN201710840668 A CN 201710840668A CN 107656890 A CN107656890 A CN 107656890A
- Authority
- CN
- China
- Prior art keywords
- logical partition
- usb device
- collecting device
- mapped
- usb
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0042—Universal serial bus [USB]
Abstract
The invention discloses a kind of method and apparatus of data acquisition, to solve the problems, such as to cause when supporting the USB device of more Luns functions to be linked into collecting device in the prior art collecting device can not normal acquisition to USB device total data.The quantity information of logical partition is sent to collecting device, collecting device and the mapping mode of the logical partition of USB device is determined according to logical partition quantity information by USB device by default first message of HID protocol in the present invention;Whole logical partitions are mapped in collecting device by collecting device by the default second message notifying USB device of HID protocol according to the mapping mode of the logical partition of determination, obtain the data in the logical partition after being mapped in USB device.By the way of the present invention, collecting device can be such that whole logical partitions in USB device are mapped in collecting device by the mapping mode of determination, ensure to collect the data in USB device in whole logical partitions.
Description
Technical field
The present invention relates to communication technical field, more particularly to a kind of method and apparatus of data acquisition.
Background technology
When USB (Universal Serial Bus, the general serial of supporting Mass Storage (massage storage) agreement
Bus) after equipment is linked into collecting device by the USB interface on collecting device, USB device can be mapped as in collecting device
One mobile hard disk drive;If there are multiple logical partitions in the USB device, that is, the USB device supports more Luns
During (Logical Unit Number, LUN) function, it is hard that the USB device is mapped as multiple movements in collecting device
Disk drive, wherein, the corresponding mobile hard disk drive of a logical partition, different mobile hard disk disks is used on collecting device
Symbol distinguishes different logical partitions.
Generally, after one is supported the USB device of more Luns functions to be linked into collecting device, it is understood that there may be can not be by USB
Each logical partition of equipment all maps out the situation come, such as a USB interface in collecting device accesses one and included
When having the USB device of eight logical partitions, now should then be mapped as 8 mobile hard disk drives, if but collecting device due to
Access other equipment make it that the mobile hard disk drive number for being currently able to display is 2 so that can only have 2 in USB device and patrol
Collect subregion and mobile hard disk drive is mapped as in collecting device, collecting device can not show whole logical partitions of USB device
Data, so cause collecting device can not normal acquisition USB device total data.
To sum up, cause collecting device can not be just when the USB device of the existing more Luns functions of support is linked into collecting device
Often collect the total data of USB device.
The content of the invention
The present invention provides a kind of method and apparatus of data acquisition, to solve to support more Luns functions in the prior art
USB device cause when being linked into collecting device collecting device can not normal acquisition to USB device total data problem.
The invention provides a kind of method of data acquisition, this method includes:
USB device is linked into collecting device by the USB interface in collecting device, wherein the USB device supports Mass
Storage agreements and HID protocol;
The USB device is by default first message of HID protocol by the quantity information of the logical partition of the USB device
Send to the collecting device, so that the collecting device determines the USB device according to the logical partition quantity information
The mapping mode of logical partition;
After the USB device receives default second message of the HID protocol that the collecting device is sent, according to institute
Whole logical partitions in the USB device are mapped to collection and set by the mapping mode for stating the logical partition included in the second message
In standby.
The invention provides a kind of method of data acquisition, this method includes:
After collecting device determines USB device access, default first report of HID protocol that the USB device is sent is received
Text, wherein including the quantity information of the logical partition of the USB device in the first message;
The collecting device determines the mapping of the logical partition of the USB device according to the quantity information of the logical partition
Mode;
Logic point of the collecting device by USB device described in default second message notifying of HID protocol according to determination
Whole logical partitions are mapped in collecting device by the mapping mode in area, obtain the logical partition after being mapped in the USB device
In data.
The invention provides a kind of USB device of data acquisition, the USB device includes:
AM access module, for being linked into collecting device by the USB interface in collecting device, wherein the USB device branch
Hold Mass Storage agreements and HID protocol;
First transport module, for by default first message of HID protocol by the number of the logical partition of the USB device
Amount information is sent to the collecting device, so that the collecting device determines the USB according to the logical partition quantity information
The mapping mode of the logical partition of equipment;
First processing module, after default second message of the HID protocol sent for receiving the collecting device,
Whole logical partitions in the USB device are mapped to by the mapping mode according to the logical partition included in second message
In collecting device.
The invention provides a kind of collecting device of data acquisition, the collecting device includes:
Second transport module, after determining USB device access, receive the HID protocol that the USB device is sent and preset
The first message, wherein including the quantity information of the logical partition of the USB device in the first message;
Second processing module, for determining the logical partition of the USB device according to the quantity information of the logical partition
Mapping mode;
Data acquisition module, for passing through USB device patrolling according to determination described in default second message notifying of HID protocol
Whole logical partitions are mapped in collecting device by the mapping mode for collecting subregion, obtain the logic after being mapped in the USB device
Data in subregion.
USB device is linked into collecting device by the USB interface in collecting device in the present invention, wherein the USB device
Support Mass Storage agreements and HID protocol;The USB device is set the USB by default first message of HID protocol
The quantity information of standby logical partition is sent to the collecting device, and the collecting device receives what the USB device was sent
Default first message of HID protocol, the mapping of the logical partition of the USB device is determined according to the logical partition quantity information
Mode;The collecting device is by USB device described in default second message notifying of HID protocol according to the logical partition of determination
Whole logical partitions are mapped in collecting device by mapping mode, are obtained in the logical partition after being mapped in the USB device
Data.By the way of the embodiment of the present invention, the quantity of logical partition of the collecting device in USB device determines mapping side
Formula, whole logical partitions in USB device can be mapped in collecting device by corresponding mapping mode, ensure collection
Equipment can collect the data in whole logical partitions in the USB device.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment
Accompanying drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this
For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these accompanying drawings
His accompanying drawing.
Fig. 1 is the system structure diagram of data acquisition of the embodiment of the present invention;
Fig. 2 is the structural representation of the USB device in the system of data acquisition of the embodiment of the present invention;
Fig. 3 is the structural representation of the collecting device in the system of data acquisition of the embodiment of the present invention;
Fig. 4 is the structural representation of another USB device in the system of data acquisition of the embodiment of the present invention;
Fig. 5 is the structural representation of another collecting device in the system of data acquisition of the embodiment of the present invention;
Fig. 6 is the process flow diagram flow chart of collecting device gathered data of the embodiment of the present invention;
Fig. 7 is the process flow diagram flow chart of data acquisition of the embodiment of the present invention;
Fig. 8 is the schematic diagram of USB device data acquisition method of the embodiment of the present invention;
Fig. 9 is the schematic diagram of collecting device collecting method of the embodiment of the present invention.
Embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, the present invention is made below in conjunction with accompanying drawing into
One step it is described in detail, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole implementation
Example.Based on the embodiment in the present invention, what those of ordinary skill in the art were obtained under the premise of creative work is not made
All other embodiment, belongs to the scope of protection of the invention.
The embodiment of the present invention is described in further detail with reference to Figure of description.
In following declarative procedure, first from USB (Universal Serial Bus, USB) equipment sides and
The cooperation of collecting device side is implemented to illustrate, and the finally implementation respectively from USB device side and collecting device side illustrates, but
This is not meant to that the two must coordinate implementation, in fact, when USB device side and collecting device side are performed separately, also solves
Respectively in the problems of USB device side and collecting device side.When only both are used in combination, superior technique can be obtained
Effect.
As shown in figure 1, a kind of data collecting system provided in an embodiment of the present invention, the system includes the He of USB device 10
Collecting device 20.
USB device 10, for being linked into collecting device by the USB interface in collecting device, wherein the USB device branch
Hold Mass Storage (massage storage) agreements and HID (Human InterfaceDevice, man-machine interaction) agreement;Pass through
Default first message of HID protocol sends the quantity information of the logical partition of the USB device to the collecting device, so that
The collecting device determines the mapping mode of the logical partition of the USB device according to the logical partition quantity information;Receive
After default second message of the HID protocol sent to the collecting device, according to the logic included in second message
Whole logical partitions in the USB device are mapped in collecting device by the mapping mode of subregion.
Collecting device 20, after determining USB device access, it is default to receive the HID protocol that the USB device is sent
First message, wherein including the quantity information of the logical partition of the USB device in the first message;According to the logical partition
Quantity information determine the USB device logical partition mapping mode;Pass through the default second message notifying institute of HID protocol
State USB device whole logical partitions are mapped in collecting device according to the mapping mode of the logical partition of determination, described in acquisition
Data in the logical partition of USB device.
Wherein, USB device is to support Mass Storage agreements and the equipment of HID protocol, and the USB device supports Mass
Storage agreements, refer to USB device when being linked into collecting device, logical partition that can be in collecting device in USB can reflect
Penetrate as a mobile hard disk drive, or a USB flash disk drive;The USB device supports HID protocol, refers to that USB device need not
Driving, the message that can be defined by HID protocol are communicated with collecting device, and the message that wherein HID is defined is privately owned message,
That is, the type of message, content etc. can be set according to concrete scene, the first report in the embodiment of the present invention
Text, the second message, the 3rd message belong to the privately owned message defined by HID protocol.
It should be noted that the logical partition in USB device can be storage card built-in in USB device to be
Flash memory in USB device in the virtual logical subregion or USB device of disk.
As shown in Fig. 2 when the logical partition of USB device is SD card (Secure Digital Memory card, safe number
Code card) when, the structure drawing of device of USB device, wherein include USB SLAVE (slave unit) module 201, control module 202 with
And multiple SD card modules 203, wherein USB SLAVE modules 201 are used to connect with USB HOST (main equipment) interface of collecting device
Connect, to carry out data interaction by connecting.Control module 202 is SOC CPU (System on Chip, system level chip), is used
In the overall scheduling of progress.SD modules 203 are used for external SD card, the corresponding SD card of each SD modules.
As shown in figure 3, a kind of structural representation of collecting device of the embodiment of the present invention, including collecting device mainboard
301, multiple USB HOST interfaces 302 are connected on the mainboard, can be with an external USB HUB on each USB HOST interfaces
(hub) expansion board 303, a USB HUB expansion board 303 can external multiple USB devices.
The USB HUB that the USB interface of USB interface or collecting device of the USB device in by collecting device is external extend
Plate is linked into collecting device, and the USB device can be pre- by HID protocol by the quantity information of the logical partition of the USB device
If the first message send to the collecting device, wherein, the time that the USB device sends the first message can accessed
Send after collecting device or sent out after the message of the quantity information of request logical partition of collecting device transmission is received
Send.
The number of logical partition in USB device, the USB are included in the quantity information of the logical partition of the USB device
The quantity information of the logical partition of equipment can be the total number of logical partition or every kind of different type in USB device
Logical partition number, for example, include three SD cards and a disk in the USB device, the wherein logic of disk point
Area is 3, then the quantity information of the logical partition of the USB device can be the total number 6 of logical partition in USB device,
Can also be the number of every kind of different types of logical partition, i.e. SD card, 3, disk logical partition 3.
After collecting device receives default first message of HID protocol that the USB device is sent, it is determined that wherein include
The quantity information of the logical partition of the USB device.
The quantity of the logical partition in the quantity information and the collecting device are currently able to the drive number of display
The mode of collecting device gathered data described in relationship affect between mesh, is more than by the quantity of the logical partition separately below
The collecting device is currently able to the drive number of display and the quantity of the logical partition is current no more than the collecting device
Two kinds of situations of the drive number that can be shown illustrate:
Situation one:The quantity of the logical partition is more than the drive number that the collecting device is currently able to display, described
Collecting device determines mapping mode of the USB device using mapping by several times, wherein, the quantity of the logical partition mapped every time is
One;
If the quantity of the logical partition is more than the drive number that the collecting device is currently able to display, the USB is set
Standby logical partition together can not be all mapped in collecting device, and the collecting device determines the USB device using by several times
The mapping mode of mapping, and by USB device described in default second message notifying of HID protocol in deterministic fashion by logic
Subregion is mapped in collecting device.
Wherein, the drive number that the collecting device is currently able to show refers to that the present collection device removes and shown
The drive number that can also be shown after the drive shown, such as general collecting device can show 26 drives altogether, remove itself
It is remaining to show drive number after the drive that the drive and other access devices that the logical partition of equipment takes take, than
The drive that logical partition such as current equipment of itself takes is 6, now has 8 other equipments to be linked into collecting device, and
Include two logical partitions in each other equipment, then the drive number for being currently able to display is exactly 4 (26-6-8*2=
4)。
The USB device determines that the mapping mode of the logical partition included in second message is the mapping of mapping by several times
Mode, mapping order of the USB device according to default logical partition, the logical partition of the USB device is mapped successively
Into collecting device, wherein the quantity of the logical partition mapped every time is one.
The mapping order of the default logical partition be to the mapping order of logical partition setting in USB device, can be with
According to the mapping order of Random Maps, can also be mapped according to the label of logical partition in USB device, such as, the USB
Include 7 SD cards in equipment, every SD card all corresponds to a numbering in the usb device, and to distinguish different SD cards, numbering can
Be numeral or letter.
The collecting device is after the logical partition is mapped to collecting device by each USB device, described in acquisition
The data in logical partition after the mapping of USB device;The collecting device is in the logical partition currently mapped has been obtained
After data, determine in the USB device with the presence or absence of the logical partition that did not mapped, if in the presence of if the collecting device pass through
USB device described in default 3rd message notifying of HID protocol maps next logical partition, if being not present, terminates data and adopts
The process of collection, user data collection can also be prompted to finish.
The collecting device can be patrolled what is currently mapped after the data of the logical partition currently mapped have been obtained every time
Collect subregion to be identified to represent that this logical partition has completed mapping and data acquisition, be in the USB device is subsequently judged
It is no the logical partition not mapped to be present, it can be determined by the mark of logical partition.
The collecting device can also judge the USB by the serial number of logical partition and the number of logical partition
With the presence or absence of the logical partition not mapped in equipment, for example, the USB device includes 7 logical partitions, respectively in order
Marked as 1~7, the USB device maps successively from small to large according to label, the logic point that collecting device currently maps in acquisition
After data in area, it is determined that whether the logical partition number currently mapped is less than 7, if being less than, it is determined that presently described USB device
It is middle the logical partition not mapped to be present, mapped afterwards by USB device described in default 3rd message notifying of HID protocol next
Individual logical partition.
The USB device maps next after default 3rd message of HID protocol of the collecting device transmission is received
Individual logical partition.
Situation two:The quantity of the logical partition is currently able to the drive number of display, institute no more than the collecting device
Stating collecting device determines the USB device using the mapping mode all mapped.
If the quantity of the logical partition is currently able to the drive number of display, the USB no more than the collecting device
The logical partition of equipment together can be all mapped in collecting device, and the collecting device determines the USB device using complete
The mapping mode of portion's mapping, and will be patrolled in deterministic fashion by USB device described in default second message notifying of HID protocol
Subregion is collected to be mapped in collecting device.
The mapping mode for the logical partition that USB device determines to include in second message is the mode that all maps, institute
USB device is stated together to be mapped to whole logical partitions of the USB device in collecting device.
As shown in figure 4, to include N number of SD card in the USB device, carrying out serial number to every SD card from 1~N is
Example, the flow chart of collecting device gathered data of the embodiment of the present invention.
Step 401:Collecting device determines that USB device accesses;
Step 402:First SD card is mapped in collecting device by collecting device notice USB device;
Step 403:The number N that collecting device passes through SD card in USB device described in the default Receive messages of HID;
Step 404:Collecting device obtains the data in the SD card currently mapped;
Step 405:Collecting device judges whether the numbering of current mapping SD card is less than (N+1), and step is performed if being less than
406, otherwise perform step 407;
Step 406:Collecting device maps next SD card by USB device described in the default message notifying of HID protocol, returns
Return step 404;
Step 407:Collecting device terminates data acquisition.
As shown in figure 5, the process flow diagram flow chart of data acquisition of the embodiment of the present invention, comprises the following steps:
Step 501:USB device is linked into collecting device by the USB interface in collecting device;
Step 502:The HID protocol that the USB device will include the quantity information of the logical partition of the USB device is pre-
If the first message send to the collecting device;
Step 503:Collecting device receives default first message of HID protocol that the USB device is sent;
Step 504:The quantity of the logical partition is more than the drive number that the collecting device is currently able to display, described
Collecting device determines mapping mode of the USB device using mapping by several times, wherein, the quantity of the logical partition mapped every time is
One;
Step 505:The collecting device sends USB device described in default second message notifying of HID protocol according to determination
The mapping mode of logical partition whole logical partitions are mapped to collecting device;
Step 506:The USB device receives default second message of the HID protocol that the collecting device is sent;
Step 507:Mapping order of the USB device according to default logical partition, successively patrolling the USB device
Collect subregion to be mapped in collecting device, wherein the quantity of the logical partition mapped every time is one;
Step 508:The collecting device after the logical partition is mapped to collecting device by each USB device,
Obtain the data in the logical partition after the mapping of the USB device;
Step 509:The collecting device determines the logical partition not mapped in the USB device be present;
Step 510:It is next that the collecting device sends USB device mapping described in default 3rd message notifying of HID protocol
Individual logical partition.
Step 511:The USB device is after default 3rd message of HID protocol that the collecting device is sent is received
Map next logical partition.
Based on same inventive concept, this discovery embodiment additionally provides a kind of USB device of data acquisition due to the equipment
The principle solved the problems, such as is similar to the system of data acquisition of the embodiment of the present invention, therefore the implementation of the equipment may refer to method
Implement, repeat part and repeat no more.
As shown in fig. 6, a kind of USB device of data acquisition of the embodiment of the present invention, the USB device include AM access module 601,
First transport module 602 and first processing module 603.
AM access module 601, for being linked into collecting device by the USB interface in collecting device, wherein the USB device
Support Mass Storage agreements and HID protocol;
First transport module 602, for by default first message of HID protocol by the logical partition of the USB device
Quantity information send to the collecting device so that the collecting device according to the logical partition quantity information determine described in
The mapping mode of the logical partition of USB device;
First processing module 603, default second message of the HID protocol sent for receiving the collecting device
Afterwards, whole logical partitions in the USB device are reflected according to the mapping mode of the logical partition included in second message
It is mapped in collecting device.
The first processing module 603, is specifically used for:
If the mapping mode of the logical partition included in second message is the mapping mode of mapping by several times, according to default
Logical partition mapping order, the logical partition of the USB device is mapped in collecting device successively, wherein every time mapping
Logical partition quantity be one;
If the mapping mode of the logical partition included in second message is the mode all mapped, the USB is set
Standby whole logical partitions are together mapped in collecting device.
The first processing module 603, is additionally operable to:
Next logical partition is mapped after default 3rd message of HID protocol of the collecting device transmission is received.
Based on same inventive concept, this discovery embodiment additionally provides a kind of collecting device of data acquisition due to the equipment
The principle solved the problems, such as is similar to the system of data acquisition of the embodiment of the present invention, therefore the implementation of the equipment may refer to method
Implement, repeat part and repeat no more.
As shown in fig. 7, a kind of collecting device of data acquisition of the embodiment of the present invention, the collecting device includes the second transmission mould
Block 701, Second processing module 702 and data acquisition module 703.
Second transport module 701, after determining USB device access, receive the HID protocol that the USB device is sent
Default first message, wherein including the quantity information of the logical partition of the USB device in the first message;
Second processing module 702, for determining the logic point of the USB device according to the quantity information of the logical partition
The mapping mode in area;
Data acquisition module 703, for by USB device described in default second message notifying of HID protocol according to determination
The mapping mode of logical partition whole logical partitions are mapped in collecting device, obtain after being mapped in the USB device
Data in logical partition.
The Second processing module 702, is specifically used for:
If the quantity of the logical partition is more than the drive number that the collecting device is currently able to display, it is determined that described
The mapping mode that USB device is mapped using gradation, wherein, the quantity of the logical partition mapped every time is one, otherwise determines institute
USB device is stated using the mapping mode all mapped.
The data acquisition module 703, is specifically used for:
The mapping mode mapped by several times is used by logic by USB device described in default second message notifying of HID protocol
Subregion is mapped in collecting device, after the logical partition is mapped to collecting device by each USB device, described in acquisition
The data in logical partition after being mapped in USB device.
Second transport module 701, is additionally operable to:
After it is determined that the logical partition not mapped in the USB device be present, pass through default 3rd message of HID protocol
The USB device is notified to map next logical partition.
Based on same inventive concept, this discovery embodiment additionally provides a kind of method of data acquisition due to the equipment, method solution
Certainly the principle of problem is similar to the system of data acquisition of the embodiment of the present invention, therefore the implementation of the equipment may refer to the reality of method
Apply, repeat part and repeat no more.
As shown in figure 8, a kind of method of data acquisition of the embodiment of the present invention, this method include:
Step 801:USB device is linked into collecting device by the USB interface in collecting device, wherein the USB device
Support Mass Storage agreements and HID protocol;
Step 802:The USB device is by default first message of HID protocol by the logical partition of the USB device
Quantity information is sent to the collecting device, so that the collecting device is according to determining the logical partition quantity information
The mapping mode of the logical partition of USB device;
Step 803:The USB device receives default second message of the HID protocol that the collecting device is sent
Afterwards, whole logical partitions in the USB device are reflected according to the mapping mode of the logical partition included in second message
It is mapped in collecting device.
If the mapping mode of the logical partition included in second message is the mode of mapping by several times, the USB device
According to the mapping order of default logical partition, the logical partition of the USB device is mapped in collecting device successively, wherein
The quantity of the logical partition mapped every time is one;
If the mapping mode of the logical partition included in second message is the mode all mapped, the USB device
Whole logical partitions of the USB device are together mapped in collecting device.
The USB device maps next after default 3rd message of HID protocol of the collecting device transmission is received
Individual logical partition.
Based on same inventive concept, this discovery embodiment additionally provides a kind of method of data acquisition due to the equipment, method solution
Certainly the principle of problem is similar to the system of data acquisition of the embodiment of the present invention, therefore the implementation of the equipment may refer to the reality of method
Apply, repeat part and repeat no more.
As shown in figure 9, a kind of method of data acquisition of the embodiment of the present invention, this method include:
Step 901:After collecting device determines USB device access, receive the HID protocol that the USB device is sent and preset
The first message, wherein including the quantity information of the logical partition of the USB device in the first message;
Step 902:Collecting device determines the logical partition of the USB device according to the quantity information of the logical partition
Mapping mode;
Step 903:Collecting device passes through USB device patrolling according to determination described in default second message notifying of HID protocol
Whole logical partitions are mapped in collecting device by the mapping mode for collecting subregion, obtain the logic after being mapped in the USB device
Data in subregion.
If the quantity of the logical partition is more than the drive number that the collecting device is currently able to display, the collection is set
It is standby to determine mapping mode of the USB device using mapping by several times, wherein, the quantity of the logical partition mapped every time is one,
Otherwise the collecting device determines the USB device using the mapping mode all mapped.
The collecting device reflecting using mapping by several times by USB device described in default second message notifying of HID protocol
Penetrate mode logical partition is mapped in collecting device, the collecting device is in each USB device by the logical partition
After being mapped to collecting device, the data in the logical partition after being mapped in the USB device are obtained.
The collecting device is pre- by HID protocol after it is determined that the logical partition not mapped in the USB device be present
If the 3rd message notifying described in USB device map next logical partition.
Above by reference to showing according to the method, apparatus (system) of the embodiment of the present application and/or the frame of computer program product
Figure and/or flow chart describe the application.It should be understood that it can realize that block diagram and/or flow illustrate by computer program instructions
One block of figure and the combination of block diagram and/or the block of flowchart illustration.These computer program instructions can be supplied to logical
With computer, the processor of special-purpose computer and/or other programmable data processing units, to produce machine so that via meter
The instruction that calculation machine processor and/or other programmable data processing units perform is created for realizing block diagram and/or flow chart block
In specified function/action method.
Correspondingly, the application can also be implemented with hardware and/or software (including firmware, resident software, microcode etc.).More
Further, the application can take computer to can be used or the shape of computer program product on computer-readable recording medium
Formula, it has the computer realized in media as well usable or computer readable program code, to be made by instruction execution system
With or combined command execution system and use.In the present context, computer can be used or computer-readable medium can be with
It is arbitrary medium, it can include, store, communicate, transmit or transmit program, to be made by instruction execution system, device or equipment
With, or combined command execution system, device or equipment use.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention
God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising including these changes and modification.
Claims (14)
- A kind of 1. method of data acquisition, it is characterised in that this method includes:General-purpose serial bus USB equipment is linked into collecting device by the USB interface in collecting device, wherein the USB device Support massage storage Mass Storage agreements and man-machine interaction HID protocol;The USB device is sent the quantity information of the logical partition of the USB device by default first message of HID protocol To the collecting device, so that the collecting device determines the logic of the USB device according to the logical partition quantity information The mapping mode of subregion;After the USB device receives default second message of the HID protocol that the collecting device is sent, according to described the Whole logical partitions in the USB device are mapped to collecting device by the mapping mode of the logical partition included in two messages In.
- 2. the method as described in claim 1, it is characterised in that the USB device is patrolled according to what is included in second message Whole logical partitions in the USB device are mapped in collecting device by the mapping mode for collecting subregion, including:If the mapping mode of the logical partition included in second message for by several times mapping mode, the USB device according to The mapping order of default logical partition, the logical partition of the USB device is mapped in collecting device successively, wherein every time The quantity of the logical partition of mapping is one;If the mapping mode of the logical partition included in second message is the mode that all maps, the USB device is by institute The whole logical partitions for stating USB device are together mapped in collecting device.
- 3. method as claimed in claim 2, it is characterised in that the USB device is suitable according to the mapping of default logical partition Sequence, the logical partition of the USB device is mapped in collecting device several times, in addition to:The USB device maps next patrol after default 3rd message of HID protocol of the collecting device transmission is received Collect subregion.
- A kind of 4. method of data acquisition, it is characterised in that this method includes:After collecting device determines USB device access, default first message of HID protocol that the USB device is sent is received, its In include in the first message the USB device logical partition quantity information;The collecting device determines the mapping side of the logical partition of the USB device according to the quantity information of the logical partition Formula;The collecting device is by USB device described in default second message notifying of HID protocol according to the logical partition of determination Whole logical partitions are mapped in collecting device by mapping mode, are obtained in the logical partition after being mapped in the USB device Data.
- 5. method as claimed in claim 4, it is characterised in that the collecting device is according to the quantity information of the logical partition The mapping mode of the logical partition of the USB device is determined, including:If the quantity of the logical partition is more than the drive number that the collecting device is currently able to display, the collecting device is true The mapping mode that the fixed USB device is mapped using gradation, wherein, the quantity of the logical partition mapped every time is one, otherwise The collecting device determines the USB device using the mapping mode all mapped.
- 6. method as claimed in claim 5, it is characterised in that the collecting device passes through default second message of HID protocol Notify the USB device that whole logical partitions are mapped in collecting device in deterministic fashion, obtain in the USB device The data in logical partition after mapping, including:Mapping side of the collecting device by USB device described in default second message notifying of HID protocol using mapping by several times Logical partition is mapped in collecting device by formula, and the collecting device maps the logical partition in each USB device To after collecting device, the data in the logical partition after being mapped in the USB device are obtained.
- 7. method as claimed in claim 6, it is characterised in that the collecting device is patrolled in each USB device by described After volume subregion is mapped to the collecting device, after obtaining the data in the logical partition of the USB device, in addition to:The collecting device is default by HID protocol after it is determined that the logical partition not mapped in the USB device be present USB device described in 3rd message notifying maps next logical partition.
- 8. a kind of USB device of data acquisition, it is characterised in that the USB device includes:AM access module, for being linked into collecting device by the USB interface in collecting device, wherein the USB device is supported Mass Storage agreements and HID protocol;First transport module, for being believed the quantity of the logical partition of the USB device by default first message of HID protocol Breath is sent to the collecting device, so that the collecting device determines the USB device according to the logical partition quantity information Logical partition mapping mode;First processing module, after default second message of the HID protocol sent for receiving the collecting device, according to Whole logical partitions in the USB device are mapped to collection by the mapping mode of the logical partition included in second message In equipment.
- 9. USB device as claimed in claim 8, it is characterised in that the first processing module, be specifically used for:If the mapping mode of the logical partition included in second message is the mode of mapping by several times, according to default logic point The mapping order in area, the logical partition of the USB device is mapped in collecting device successively, wherein the logic mapped every time point The quantity in area is one;If the mapping mode of the logical partition included in second message is the mode all mapped, by the USB device Whole logical partitions are together mapped in collecting device.
- 10. USB device as claimed in claim 9, it is characterised in that the first processing module, be additionally operable to:Next logical partition is mapped after default 3rd message of HID protocol of the collecting device transmission is received.
- 11. a kind of collecting device of data acquisition, it is characterised in that the collecting device includes:Second transport module, after determining USB device access, receive HID protocol that the USB device is sent default the One message, wherein including the quantity information of the logical partition of the USB device in the first message;Second processing module, for determining that according to the quantity information of the logical partition logical partition of the USB device reflects Penetrate mode;Data acquisition module, for the logic point by USB device described in default second message notifying of HID protocol according to determination Whole logical partitions are mapped in collecting device by the mapping mode in area, obtain the logical partition after being mapped in the USB device In data.
- 12. collecting device as claimed in claim 11, it is characterised in that the Second processing module, be specifically used for:If the quantity of the logical partition is more than the drive number that the collecting device is currently able to display, determine that the USB is set The standby mapping mode using mapping by several times, wherein, the quantity of the logical partition mapped every time is one, otherwise determines the USB Equipment is using the mapping mode all together mapped.
- 13. collecting device as claimed in claim 12, it is characterised in that the data acquisition module, be specifically used for:The mapping mode mapped by several times is used by logical partition by USB device described in default second message notifying of HID protocol It is mapped in collecting device, after the logical partition is mapped to collecting device by each USB device, obtains the USB The data in logical partition after being mapped in equipment.
- 14. collecting device as claimed in claim 13, it is characterised in that second transport module, be additionally operable to:After it is determined that the logical partition not mapped in the USB device be present, pass through default 3rd message notifying of HID protocol The USB device maps next logical partition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710840668.0A CN107656890B (en) | 2017-09-18 | 2017-09-18 | A kind of method and apparatus of data acquisition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710840668.0A CN107656890B (en) | 2017-09-18 | 2017-09-18 | A kind of method and apparatus of data acquisition |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107656890A true CN107656890A (en) | 2018-02-02 |
CN107656890B CN107656890B (en) | 2019-11-19 |
Family
ID=61130600
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710840668.0A Active CN107656890B (en) | 2017-09-18 | 2017-09-18 | A kind of method and apparatus of data acquisition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107656890B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101140552A (en) * | 2007-10-30 | 2008-03-12 | 江松 | Control system of data-transmission through universal serial bus and method thereof |
CN101615106A (en) * | 2008-06-23 | 2009-12-30 | 国际商业机器公司 | The method and system that is used for virtualizing SAS storage adapter |
US20160006620A1 (en) * | 2014-07-01 | 2016-01-07 | American Megatrends, Inc. | Hardware management and control of computer components through physical layout diagrams |
CN105892930A (en) * | 2014-05-12 | 2016-08-24 | 北京同方微电子有限公司 | High capacity USIM mass memory subarea mount realizing method |
-
2017
- 2017-09-18 CN CN201710840668.0A patent/CN107656890B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101140552A (en) * | 2007-10-30 | 2008-03-12 | 江松 | Control system of data-transmission through universal serial bus and method thereof |
CN101615106A (en) * | 2008-06-23 | 2009-12-30 | 国际商业机器公司 | The method and system that is used for virtualizing SAS storage adapter |
CN105892930A (en) * | 2014-05-12 | 2016-08-24 | 北京同方微电子有限公司 | High capacity USIM mass memory subarea mount realizing method |
US20160006620A1 (en) * | 2014-07-01 | 2016-01-07 | American Megatrends, Inc. | Hardware management and control of computer components through physical layout diagrams |
Also Published As
Publication number | Publication date |
---|---|
CN107656890B (en) | 2019-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109976925A (en) | A kind of method and system based on the mixing internuclear real time communication of multisystem | |
CN107209681A (en) | A kind of storage device access methods, devices and systems | |
US8566416B2 (en) | Method and system for accessing storage device | |
CN103955441B (en) | Equipment management system, equipment management method and IO (Input/Output) expansion interface | |
CN102316043B (en) | Port virtualization method, switch and communication system | |
CN103176913B (en) | Hard disk method for mapping dynamically and the server applying it | |
CN109933557A (en) | A kind of generation method and device of I2C topological diagram | |
CN104915302B (en) | Data transmission processing method and data link | |
CN105786732B (en) | Data access method and device | |
CN105488000A (en) | Method and system for achieving rapid accessing of USB devices | |
CN109375874A (en) | A kind of call method of distributed storage, device and equipment | |
CN110515540B (en) | Method and device for topology of hard disk | |
CN107656890B (en) | A kind of method and apparatus of data acquisition | |
CN109039765B (en) | Network configuration method and device | |
CN116860391A (en) | GPU computing power resource scheduling method, device, equipment and medium | |
CN104104594B (en) | VSU protocol massages are sent and method of reseptance, equipment and system | |
CN203658991U (en) | Computer evidence obtaining system | |
CN109522162A (en) | A kind of data back up method, system, equipment and computer readable storage medium | |
CN112948300B (en) | Server, integrated storage and calculation device, and server system | |
CN105471930A (en) | Method, system and equipment for reading distributed data | |
CN111371799B (en) | Method, device and equipment for controlling data receiving and transmitting of MCTP (Multi-channel media Port) controller | |
CN103885813B (en) | Packet capturing method in virtual machine environment | |
CN101937407B (en) | Passive hardware device access method and device | |
CN114253877B (en) | Method and device for scanning Peripheral Component Interconnect Express (PCIE) equipment in Liune system | |
CN104598410B (en) | A kind of computer card for exempting to write driver and its development approach |
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 |