CN112015686B - Equipment access port positioning method and equipment access device - Google Patents

Equipment access port positioning method and equipment access device Download PDF

Info

Publication number
CN112015686B
CN112015686B CN201910452698.3A CN201910452698A CN112015686B CN 112015686 B CN112015686 B CN 112015686B CN 201910452698 A CN201910452698 A CN 201910452698A CN 112015686 B CN112015686 B CN 112015686B
Authority
CN
China
Prior art keywords
hub
port
accessed
identification information
information
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.)
Active
Application number
CN201910452698.3A
Other languages
Chinese (zh)
Other versions
CN112015686A (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.)
Hytera Communications Corp Ltd
Original Assignee
Hytera Communications Corp Ltd
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 Hytera Communications Corp Ltd filed Critical Hytera Communications Corp Ltd
Priority to CN201910452698.3A priority Critical patent/CN112015686B/en
Publication of CN112015686A publication Critical patent/CN112015686A/en
Application granted granted Critical
Publication of CN112015686B publication Critical patent/CN112015686B/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/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • 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]

Abstract

The invention discloses a device access port positioning method and a device access device, wherein the device access port positioning method comprises the following steps: when detecting that the equipment is accessed into a hub system, determining a port accessed by the equipment, wherein the hub system comprises at least one stage of hub, the hub comprises at least one port, and adjacent stages of hubs are connected through the port of the hub at the upper stage; acquiring first identification information of a hub where an accessed port is located and second identification information of the accessed port; and generating information of the port accessed by the equipment by using the first identification information and the second identification information. Through the mode, the invention can improve the acquisition accuracy and efficiency.

Description

Equipment access port positioning method and equipment access device
Technical Field
The present invention relates to the field of device access, and in particular, to a device access port positioning method and a device access apparatus.
Background
At present, when law enforcement agencies execute law enforcement, a large amount of electronic evidences such as pictures, audios and videos are collected, and the evidences are uploaded to an electronic evidence platform through collection software on a collection counter. In order to improve the collection efficiency, 20 left and right law enforcement recorders are generally mounted on one collection counter. And in the data acquisition process, the equipment is pulled out after the acquisition is finished, and the next batch of equipment acquisition is carried out. And when the equipment identification and acquisition state is positioned, acquiring the path of the equipment as the unique identification of the equipment by identifying the equipment through Microsoft SetupAPI. The equipment path is dynamically generated by software, the equipment path does not have physical uniqueness, the software has single uniqueness, and the mapping relation of the equipment path cannot be accurately matched during acquisition, so that the equipment which is acquired from the counter slot position cannot be quickly and accurately positioned, and the acquisition efficiency is influenced.
Disclosure of Invention
The invention mainly solves the technical problem of providing a device access port positioning method and a device access device, which can improve the accuracy of port positioning.
In order to solve the technical problems, the invention adopts a technical scheme that: a method for locating a device access port is provided, comprising: when a device is detected to be accessed into a hub system, determining a port accessed by the device, wherein the hub system comprises at least one stage of hub, the hub comprises at least one port, and the hubs of adjacent stages are connected through the port of the hub of the previous stage; acquiring first identification information of a hub where the accessed port is located and second identification information of the accessed port; and generating information of the port accessed by the equipment by using the first identification information and the second identification information.
In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a device access apparatus comprising a processor and a memory coupled to each other for implementing the method as described above.
In order to solve the technical problem, the invention adopts another technical scheme that: there is provided an apparatus having a storage function, storing program data executable to implement the steps in the method as described above.
The beneficial effects of the invention are: different from the prior art, the port information accessed by the equipment is generated by utilizing the first identification information of the concentrator and the second identification information of the accessed port, the port information is uniquely corresponding to the accessed equipment, the accessed equipment can be accurately positioned, and errors can not be sent due to the fact that the port information is not corresponding to the accessed equipment when data is input, so that the acquisition accuracy is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for locating a device access port according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating an embodiment of a method for determining a port accessed by a device according to the present invention;
FIG. 3 is a flow diagram illustrating one embodiment of a method of accessing a root level hub provided by the present invention;
FIG. 4 is a schematic structural diagram of an embodiment of a hub system provided by the present invention;
fig. 5 is a schematic structural diagram of an embodiment of a device access apparatus provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art based on the embodiments of the present invention without any creative effort, fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for locating a device access port according to a first embodiment of the present invention. The equipment access port positioning method provided by the invention comprises the following steps:
s101: when a device is detected to access a hub system, determining a port accessed by the device, wherein the hub system comprises at least one stage of hub, the hub comprises at least one port, and the hubs of adjacent stages are connected through the port of the hub of the previous stage.
In a specific implementation scenario, in order to improve the efficiency of collecting information from the device, the host needs to connect to a plurality of information collecting/storing devices at a time, which may be achieved by connecting the host to a hub system, and connecting the plurality of information collecting/storing devices through the hub system. The number of ports supported by one hub is limited, and currently, a hub can support 26 ports at most. To further expand the number of information gathering/storage devices to which a host can be connected. The hub system may include one or more stages of hubs, with adjacent hubs connected by ports of a higher stage of hubs.
In this implementation scenario, when the host detects that there is a device access to any port of any hub in the hub system by polling or Windows kernel event monitoring, the host determines the port to which the access device is accessed. Specifically, referring to fig. 2, fig. 2 is a schematic flowchart of an embodiment of a method for determining a device access port provided by the present invention, where the method for determining a device access port provided by the present invention includes:
s201: accessing a hub in the hub system, obtaining device descriptor information of the hub, where the device descriptor information includes the number of ports supported by the hub, and obtaining the second identification information of the ports supported by the hub according to the number of ports supported by the hub.
In a specific implementation scenario, one hub in the accessed hub system is a root level hub, and a method for accessing the root level hub is combined with fig. 3, where fig. 3 is a schematic flowchart of an embodiment of a method for accessing the root level hub provided by the present invention. The method for accessing the root level hub comprises the following steps:
s301: enumerating a host controller to which the root level hub is connected.
In a specific implementation scenario, the microsoft SetupAPI application enumerates all host controllers (HostController) of the host, and each host controller may be connected to a root level hub. In this implementation scenario, the host controller is a USB host controller.
S302: and acquiring a handle of the host controller, creating a handle for accessing the root-level hub, and accessing the root-level hub through the handle.
In a specific implementation scenario, the host controller handle is first obtained, the root hub name (RootHubName) is obtained through the DeviceIoControl function, and then the access handle of the root level hub is created according to the root hub name. The root level hub is accessed through the access handle.
In other implementation scenarios, the hub accessed is a secondary hub other than the root hub. The secondary hub is accessed through the root hub. For example, if the accessed hub is a third-level hub, the third-level hub is accessed through the second-level hub by accessing the root-level hub first and then accessing the second-level hub to which the third-level hub is connected.
After accessing the hub, the device descriptor information of the hub is obtained, and the device descriptor information comprises the port number supported by the hub. In this implementation scenario, the root level hub is accessed, and the device descriptor information of the root level hub is obtained through the DeviceIoControl function. The device descriptor information of the root level hub includes the name of the root level hub and the number of ports supported by the root level hub.
In other implementation scenarios, a secondary hub is accessed whose device descriptor information is obtained via the DeviceIoControl function. The device descriptor information for the secondary hub includes the name of the secondary hub and the number of ports supported by the secondary hub.
S202: scanning all ports of the hub according to the number of the ports supported by the hub, acquiring the device information of the ports of the hub, wherein the device information of the ports comprises the device connector information of the ports, and judging the connection state of the ports of the hub according to the device connector information.
In one specific implementation scenario, each port of the hub is scanned according to the number of ports supported by the hub, e.g., 10 ports are supported by the hub, and then 10 ports of the hub are scanned. And acquiring the equipment connector information of each port, wherein the equipment connector information of the port comprises the connection state of the port.
In one specific implementation scenario, the device connector information of the current hub port is obtained through a DeviceIoControl function. And judging the connection state of the port according to the device connector information, wherein the connection state comprises whether the port is connected, whether the port is connected with a device or a secondary hub.
S203: if the port is judged to be connected with the next-level hub according to the connection state of the port of the hub, the steps are executed on the next-level hub until the equipment connected with the port is judged according to the connection state of the port of the hub, and the port of the hub is determined to be the port accessed by the equipment.
In a specific implementation scenario, if it is determined that the port is connected to the device according to the device connector information of the port, the port is a port to which the device is accessed, and if it is determined that the port is connected to the secondary hub according to the device connector information of the port, the steps S201 to S202 are repeatedly performed on the hub until it can be determined that the port is connected to the device according to the connection state of the port of the hub, and it is determined that the port of the hub is the port to which the device is accessed.
S102: and acquiring first identification information of a hub where the accessed port is located and second identification information of the accessed port.
In a specific implementation scenario, after a port accessed by a device is determined, a first identifier of a hub where the port is located and second identifier information of the port are obtained, where the second identifier information of the port is an identifier of the port on the hub, and in this implementation scenario, the identifiers of the ports on the hub are serial numbers, such as 1, 2, and 3 …, that are sequentially marked from one end of the hub. E.g., the port labeled 5 for the device access hub, the second identification information for the device access port is 5. In other implementation scenarios, other marking methods may also be used to set the identifier for the port on the hub, for example, A, B, C … or 11, 22, 33 …, and accordingly, the second label information is B or 22 according to the identifier of the port accessed by the hub.
In this implementation scenario, when the hub where the port accessed by the device is located is a root-level hub, first identification information of a preset root-level hub is obtained. The first identification information of the root level hub is a preset value, for example, preset to 1. In other implementation scenarios, the value may be preset to another value, for example, any integer such as 10 or 11.
In the implementation scenario, each level of hub is connected to the previous level of hub by accessing a port of the previous level of hub until being connected to the root level of hub, so as to form a connection path from the hub to the root level of hub. In this implementation scenario, the host is connected to only one root level hub, and in other implementation scenarios, the host is connected to a plurality of root level hubs, and then preset first identification information, for example, 1, 2, 3 … or 1, 3, 5 …, is sequentially set to these root level hubs.
When the hub where the port accessed by the equipment is located is not the root level hub, acquiring third identification information of the port where the hub where the port accessed by the equipment is located is accessed to the upper level hub; and obtaining the first identification information of the hub where the accessed port is located by using the stage number of the hub where the accessed port is located and the third identification information.
Specifically, the third identification information of the port accessed from the hub where the port accessed by the device is located, which is accessed from the hub where the port accessed by the device is located, to the port accessed from the previous-stage hub to the secondary hub on the connection path is obtained. For example, the hub where the port accessed by the device is located is a secondary hub, the port accessed by the secondary hub to the root-level hub has the identifier of 10, and then the third identification information is 10. For another example, the hub where the port accessed by the device is located is a third-level hub, the identifier of the port accessed by the third-level hub to the second-level hub is 10, the identifier of the port accessed by the second-level hub to the root-level hub is 10, and then the third identification information is 10, 10.
After the third identification information is obtained, the first identification information of the hub where the port accessed by the device is located is calculated by combining the stage number of the hub where the port accessed by the device is located. In this implementation scenario, the first identification information of the hub where the port accessed by the device is located is calculated according to the following formula:
Figure BDA0002075647150000061
the hub index (n) represents first identification information of a hub where a port accessed by the device is located, n represents the stage number of the hub where the port accessed by the device is located, portindex (k) represents third identification information of a port of a previous-stage hub connected to the kth-stage hub, and roothub index (1) represents a first identification of a root-stage hub, which is a preset value. In the present implementation scenario, roothublindex (1) ═ 1.
For example, if the hub where the port accessed by the device is located is a secondary hub, n is 2, the identifier of the port accessed by the secondary hub to the root hub is 10, PortIndex (2) is 10, roothubndex (1) is 1, and hubndex (2) is 10 × 25+1=321。
For example, if the hub where the port accessed by the device is located is a third-level hub, where n is 3, the port identifier of the third-level hub accessing the second-level hub is 10, then PortIndex (3) is 10, the port identifier of the second-level hub accessing the root-level hub is 10, then PortIndex (2) is 10, roothubndex (1)=1,HubIndex(3)=10*22*5+10*21*5+1=10561。
In this implementation scenario, a binary algorithm is used to calculate the storage structure of the HubIndex, the storage structure of the HubIndex can theoretically support infinite stages, each stage has 5 bits, each stage supports 32 ports, in other implementation scenarios, an x-ary algorithm can be used, and each stage has y bits, so that the formula can be modified correspondingly:
Figure BDA0002075647150000071
s103: and generating information of the port accessed by the equipment by using the first identification information and the second identification information.
In a specific implementation scenario, the first identification information and the second identification information are used to generate information about a port accessed by the device, for example, a hub where the port accessed by the device is located is a secondary hub, and if the port accessed by the device is identified as 7 in the secondary hub, the information about the port accessed by the device is (321, 7).
In other implementation scenarios, the information of the access port of the device further includes a serial number of the device, and therefore after the first identification information and the second identification information are obtained, fourth identification information needs to be further obtained, where the fourth identification information is the serial number of the device, the device descriptor of the device is obtained first, and then the device serial number of the device is obtained by reading isearialnumber in the device descriptor.
In the present implementation scenario, a plurality of devices are accessed, and in order to ensure the uniformity of the read content, at least one of the vendor identification code and the product identification code of the current device is acquired, and when it is detected that another device is accessed, if at least one of the vendor identification code and the product identification code of the device is different from that of the device, the device is ignored. And if at least one of the supplier identification code and the product identification code of the equipment is the same as that of the equipment, positioning a port accessed by the equipment.
Specifically, acquiring at least one of the vendor identification code and the product identification code of the device may acquire the connection descriptor of the device through a DeviceIoControl function. At least one of a vendor identification code and a product identification code of the device is acquired through connection description information (DeviceDescriptor) of the connection descriptor. And screening the accessed equipment according to at least one of the obtained supplier identification code and the obtained product identification code.
In this implementation scenario, in order to further clarify the corresponding relationship between the display device and the port, the port information is displayed to the user, which may be displayed to the user through a display, or displayed to the user through messages such as short messages and WeChat.
As can be seen from the above description, in this embodiment, port information accessed by a device is generated by using first identification information of a hub and second identification information of an accessed port, where the first identification information identifies a stage number of the hub where the port accessed by the device is located, the second identification information identifies an identification of the port accessed by the device in the hub, and the port information uniquely corresponds to the accessed device, so that the accessed device can be accurately located. Therefore, when the data of the equipment is input, errors can not be sent due to the fact that the port information does not correspond to the access equipment, and therefore the accuracy and the efficiency of information collection are improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an embodiment of a hub system according to the present invention. In this implementation scenario, the hubs in the hub system are USB hubs, i.e., the ports of the hubs are USB ports. In this embodiment, the root hub 10 has 10 ports, and in other embodiments, the number of ports may be any value. The secondary hubs 21, 22 and 23 have 10 ports, and the number of ports may be any value in other implementation scenarios. The secondary hub 21 is connected to the root hub 10 through a port 1 accessing the root hub 10, the secondary hub 22 is connected to the root hub 10 through a port 5 accessing the root hub 10, and the secondary hub 23 is connected to the root hub 10 through a port 10 accessing the root hub 10. The three devices access port 2 of the secondary hub 21, port 7 of the secondary hub 22 and port 5 of port 23 of the secondary hub of the hub system in sequence.
When the hub system detects that a device has been accessed, the root level hub is accessed and the root level hub 10 scans its ports to determine that ports 1, 5 and 10 have been accessed to the secondary level hub. The secondary hubs 21, 22 and 23 are accessed through the connection between the root hub 10 and the secondary hubs 21, 22 and 23, and it is determined that the device is accessed through port 2 of the secondary hub 21, port 7 of the secondary hub 22 and port 5 of port 23 of the secondary hub. Further, the supplier identification code and the product identification code of the acquisition device RVM01, and the supplier identification code and the product identification code of the determination devices RVM02 and RVM03 are the same as those of the reserve RVM 01. Devices RVM01, RVM02, and RVM03 are thus positioned.
A large amount of electronic evidence such as pictures, audios and videos is stored in an RVM (Remote Video Microphone) device connected to the hub system, and in other implementation scenarios, the RVM device may also be other mobile storage devices or devices with a mobile storage function. In this implementation scenario, RVM01 accesses secondary hub 21 through port 2 connecting secondary hub 21, and therefore, PortIndex of RVM01 is 2, and that of RVM01
Figure BDA0002075647150000091
Therefore, the location information of the RVM01 is (65, 2), and further, the SN of the RVM01 can be obtained: the location information of DR07RD0015, RVM01 includes (65, 2), SN: DR07RD 0015.
RVM02 accesses secondary hub 22 through port 7 connecting secondary hub 22, and therefore, PortIndex of RVM02 is 7, and that of RVM02
Figure BDA0002075647150000092
Therefore, the location information of the RVM02 is (161, 7), and further, the SN of the RVM02 can be obtained: the location information of DR07RD0016, RVM02 includes (161, 7), SN: DR07RD 0016.
RVM03 accesses secondary hub 23 through port 10 connecting secondary hub 23, therefore, PortIndex of RVM03 is 10, that of RVM03
Figure BDA0002075647150000093
Figure BDA0002075647150000094
Therefore, the location information of the RVM03 is (321, 10), and further, the SN of the RVM03 can be obtained: the location information of DR07RD0016, RVM02 includes (321, 7), SN: DR07RD 0017.
As can be seen from the above description, the ports of the hub system in this embodiment only need to be configured once, as long as the structure of the hub system is not changed, the PortIndex and the hubndex corresponding to each port do not change, and the ports are calculated according to a formula, and based on the connection relationship between the root hub and each secondary hub, the location is accurate. Therefore, the accuracy and efficiency of information acquisition can be improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an apparatus access device according to an embodiment of the present invention. The device accessibility apparatus 30 includes: processor 31, memory 32 and a hub system 33, in this embodiment, the hub system 33 includes at least one stage of hub, the hub includes at least one port, and the hubs of the adjacent stages are connected through the port of the hub of the previous stage. The memory 32 is used for storing program data, and the processor 31 is used for executing the program data in the memory 32 through the hub system 33 to execute the following method:
when the processor 31 detects that a device is accessed through the hub system 33, the processor 31 sequentially scans each port of each hub according to the number of stages in the hub system from a root-level hub in the hub system 33, acquires device information of each port, acquires device connector information of the port from the device information, determines whether the port is connected to a device or a next-level hub according to the device connector information of the device, determines that the port is the port to which the device is accessed if the port is connected to the device, and repeats acquiring the device information of each port and subsequent steps until the port to which the device is accessed is found if the port is connected to the next-level hub.
After determining the port accessed by the device, the processor 31 obtains first identification information of a hub where the port accessed by the device is located and second identification information of the accessed port, further, the processor 31 obtains a serial number of the device through the hub system 33, and the processor 31 generates information of the port accessed by the device by using the first identification information, the second identification information and the serial number of the device. In other implementation scenarios, the serial number of the device may not be obtained, and the information of the port may be generated by using the first identification information and the second identification information.
As can be seen from the above description, in this embodiment, the processor of the device access apparatus generates the information of the port according to the second identifier of the port accessed by the device and the first identifier of the hub where the port is located, so that the port information uniquely corresponds to the accessed device, the accessed device can be accurately located, the information of each port obtained according to the algorithm is relatively fixed, and confusion caused by the order of accessing the device does not occur. The accuracy and efficiency in information acquisition can be effectively improved.
As can be seen from the above description, the program stored in the embodiment of the apparatus with a storage function according to the present invention may generate the information of the port according to the second identifier of the port to which the device is accessed and the first identifier of the hub in which the port is located, so that the port information uniquely corresponds to the accessed device, the accessed device may be accurately located, and the information of each port obtained according to the algorithm is relatively fixed, so that confusion caused by the order of accessing the device may not occur. The accuracy and efficiency in information acquisition can be effectively improved.
The method for positioning the device access port combines the second identifier of the position of the port in the hub and the first identifier of the hub of the port in the hub system into the information of the port, and because the method for positioning the port depends on the connection relationship of the hub of the port relative to the root level hub and the position of the port in the hub, the information of each port is uniquely corresponding, and as long as the structure of the hub system is not changed, the information of the port cannot be changed even if the system is restarted, so that the accuracy and the efficiency in information acquisition can be effectively improved.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method for locating a device access port, comprising:
when detecting that a device accesses a hub system, determining a port accessed by the device, wherein the hub system comprises at least one stage of hub, the hub comprises at least one port, and the hubs of adjacent stages are connected through the port of the hub of the upper stage;
acquiring first identification information of a hub where the accessed port is located and second identification information of the accessed port, wherein the second identification information is an identification of the hub where the accessed port is located;
generating information of the port accessed by the equipment by using the first identification information and the second identification information, wherein the information of the port is uniquely corresponding to the accessed equipment;
in the hub system, each level of hub is connected with the upper level of hub through a port of the upper level of hub until the upper level of hub is connected with the root level of hub, so as to form a connection path with the root level of hub;
the acquiring first identification information of a hub where the accessed port is located includes:
when the hub where the accessed port is located is a root level hub, acquiring preset first identification information of the root level hub;
when the hub where the accessed port is located is not a root level hub, obtaining third identification information of the port on a connection path from the hub where the accessed port is located to the root level hub; and obtaining the first identification information of the hub where the accessed port is located by using the number of levels of the hub where the accessed port is located and the third identification information.
2. The method of claim 1,
the obtaining the first identification information of the hub where the accessed port is located by using the number of levels of the hub where the accessed port is located and the third identification information includes:
obtaining first identification information of a hub where the accessed port is located by using the following formula:
Figure FDA0003597254010000011
the hub index (n) represents first identification information of a hub where the accessed port is located, represents the stage number of the hub where the accessed port is located, the portindex (k) represents third identification information of a port of a previous-stage hub connected with the kth-stage hub, and the roothub index (1) is a preset value.
3. The method of claim 2, wherein the generating information of the port to which the device has the access by using the first identification information and the second identification information comprises:
combining the first identification information and the second identification information to obtain the information of the port accessed by the equipment; or combining the first identification information, the second identification information and the fourth identification information to obtain the information of the port accessed by the equipment.
4. The method of claim 3, wherein the first identification information and the second identification information are index information, and the fourth identification information is a device serial number.
5. The method of claim 3, wherein before obtaining the fourth identification information, the method further comprises:
acquiring a supplier identification code and/or a product identification code of the equipment;
when detecting that other equipment is accessed to the hub system, if the supplier identification code and/or the product identification code of the other equipment are different from those of the equipment, ignoring the other equipment;
and if the supplier identification code and/or the product identification code of the other equipment are the same as those of the equipment, positioning the port accessed by the other equipment.
6. The method of claim 1, wherein the determining the port accessed by the device comprises:
accessing a hub in the hub system, and acquiring device descriptor information of the hub, wherein the device descriptor information comprises the port number supported by the hub;
scanning all ports of the hub according to the number of the ports supported by the hub, and acquiring the equipment information of the ports of the hub, wherein the equipment information of the ports comprises the connection information of the ports;
determining the connection state of the port of the hub according to the connection information;
if the port is judged to be connected with the next-level hub according to the connection state of the ports of the hub, accessing the hub in the hub system to the next-level hub to obtain the device descriptor information of the hub, scanning all the ports of the hub according to the port number supported by the hub to obtain the device information of the ports of the hub, judging the connection state of the ports of the hub according to the connection information until the device connected with the ports is judged according to the connection state of the ports of the hub, and determining the ports of the hub to be the ports accessed by the device.
7. The method of claim 6, wherein accessing a hub in the hub system comprises:
if the hub is a root-level hub, enumerating a host controller connected with the root-level hub, creating a handle of the host controller, acquiring a handle for accessing the root-level hub, and accessing the root-level hub through the handle;
and if the hub is not the root level hub, accessing the hub through the root level hub.
8. The method of claim 1, wherein detecting that a device accesses a hub system comprises:
device access to the hub system is detected by polling or Windows kernel events.
9. A device access apparatus comprising a processor, a memory, and a hub system, the processor coupling the memory and the hub system for implementing the method of any one of claims 1-8.
CN201910452698.3A 2019-05-28 2019-05-28 Equipment access port positioning method and equipment access device Active CN112015686B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910452698.3A CN112015686B (en) 2019-05-28 2019-05-28 Equipment access port positioning method and equipment access device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910452698.3A CN112015686B (en) 2019-05-28 2019-05-28 Equipment access port positioning method and equipment access device

Publications (2)

Publication Number Publication Date
CN112015686A CN112015686A (en) 2020-12-01
CN112015686B true CN112015686B (en) 2022-07-22

Family

ID=73501658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910452698.3A Active CN112015686B (en) 2019-05-28 2019-05-28 Equipment access port positioning method and equipment access device

Country Status (1)

Country Link
CN (1) CN112015686B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1224788B1 (en) * 1999-10-22 2004-06-23 Nomadix, Inc. Location-based identification for use in a communications network
CN100504835C (en) * 2007-03-28 2009-06-24 杭州华三通信技术有限公司 Method and equipment for acquiring universal serial port bus port information
CN103559162B (en) * 2013-10-28 2017-01-25 飞天诚信科技股份有限公司 Method and host for positioning USB (universal serial bus) devices on HUB set
CN105930243A (en) * 2016-04-18 2016-09-07 深圳市德名利电子有限公司 Port determining method and system for testing USB (Universal Serial Bus) equipment

Also Published As

Publication number Publication date
CN112015686A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
CN113127338A (en) Firmware testing method, server and computer readable storage medium
CN104317618B (en) A kind of firmware partition treating method and apparatus
CN106604362B (en) A kind of Wireless Fidelity Wi-Fi scan method and mobile terminal
CN110718264A (en) Method and device for testing information of solid state disk, computer equipment and storage medium
CN110704677B (en) Program recommendation method and device, readable storage medium and terminal equipment
US11061803B2 (en) Checking system, checking method and compiling method of system start-up file
CN110597523A (en) Board card firmware burning method, device and system, board card and terminal equipment
CN109917978B (en) BiM model-based annotation corresponding component display method and device and storage device
CN111563075B (en) Service verification system, method and equipment and storage medium
CN115981613A (en) Multi-hardware device software adaptation method, electronic device and readable storage medium
CN114124694A (en) Configuration method and configuration device of Internet of things equipment, electronic equipment and medium
CN115776648A (en) Bluetooth broadcasting method and device and computer equipment
US20060129520A1 (en) System and method for automatically updating a program in a computer
CN112015686B (en) Equipment access port positioning method and equipment access device
CN112711398A (en) Method, device and equipment for generating buried point file and storage medium
CN111143092B (en) Fault recording data processing method, system and terminal equipment
CN111582795A (en) Method, device and readable storage medium for automatically detecting logistics merchants
CN113064895B (en) Incremental updating method, device and system for map
CN112783971B (en) Transaction recording method, transaction query method, electronic device and storage medium
CN112070456B (en) Method for issuing task, terminal equipment, robot and storage medium
US20210073580A1 (en) Method and apparatus for obtaining product training images, and non-transitory computer-readable storage medium
CN113551677A (en) Method for relocating a robot and related product
CN111124862A (en) Intelligent equipment performance testing method and device and intelligent equipment
CN107707856B (en) Method and device for recording multimedia program
US9779012B1 (en) Dynamic and global in-system debugger

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