Universal serial bus interface detection method, device, equipment and medium

By reading and comparing interface information and combining it with USB3.0 HUB hardware, the automated detection of the Universal Serial Bus interface is achieved, solving the problems of low efficiency and high cost in existing technologies and improving detection efficiency and accuracy.

CN120705059APending Publication Date: 2025-09-26INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510884791.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the prior art, universal serial bus interface detection is inefficient and costly, and requires manual testing of each USB interface, which is prone to omissions and false positives, and is unable to quickly locate the problem interface.

Method used

By reading the interface information of the universal serial bus interface to be tested, comparing it with the target interface map, automatically detecting the interface status, generating test results, and using USB3.0 HUB hardware for signal acquisition and logic processing, automated detection is achieved.

Benefits of technology

It improves detection efficiency, reduces labor costs and detection costs, reduces false alarm rates, can quickly locate problem interfaces, and improves detection accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705059A_ABST
    Figure CN120705059A_ABST
Patent Text Reader

Abstract

The invention discloses a universal serial bus interface detection method, device, equipment and medium, which are applied to the technical field of interface detection, and the method comprises the following steps: reading interface information of a universal serial bus interface to be detected to obtain first interface information, the universal serial bus interface to be detected being connected with a target hub; determining a target interface map corresponding to target mainboard information based on the target mainboard information of the mainboard where the universal serial bus interface to be detected is located, wherein the target interface map comprises interface information of universal serial bus interfaces at all positions in the target mainboard after the universal serial bus interfaces are connected with the concentrator; the first interface information is compared with second interface information in a target interface map, a comparison result is obtained, and the second interface information is interface information of a position interface corresponding to the universal serial bus interface to be detected after the position interface is connected with a concentrator; and determining a detection result of the to-be-detected universal serial bus interface based on a comparison result. Therefore, the detection efficiency of the universal serial bus interface can be improved, and the cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of interface detection, and in particular to a universal serial bus interface detection method, device, equipment and medium. Background Art

[0002] Currently, to ensure the shipping quality of PCs (personal computers), various functional tests are usually required on produced PCs. For USB (universal serial bus) interface testing, existing technologies typically use a USB flash drive and a keyboard and mouse for testing and verification. Each USB interface needs to be tested individually, and the specific test results must be manually confirmed, resulting in low testing efficiency and high costs.

[0003] Therefore, how to improve the efficiency of USB interface detection and reduce the cost is a problem that those skilled in the art need to solve. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method, apparatus, device and medium for detecting a universal serial bus interface, which can improve the efficiency of universal serial bus interface detection and reduce costs. The specific scheme is as follows:

[0005] In a first aspect, the present invention provides a universal serial bus interface detection method, comprising:

[0006] Reading interface information of a universal serial bus interface to be detected to obtain first interface information, wherein the universal serial bus interface to be detected is connected to a target hub;

[0007] Determining a target interface map corresponding to the target motherboard information based on target motherboard information of the motherboard where the universal serial bus interface to be detected is located, wherein the target interface map includes interface information of the universal serial bus interface at each location on the target motherboard after being connected to a hub, and the target motherboard and the motherboard where the universal serial bus interface to be detected are located have the same universal serial bus interface layout;

[0008] Comparing the first interface information with the second interface information in the target interface map to obtain a comparison result, wherein the second interface information is the interface information of the interface at the corresponding position of the universal serial bus interface to be detected after being connected to the hub;

[0009] A detection result of the universal serial bus interface to be detected is determined based on the comparison result.

[0010] Optionally, also include:

[0011] When universal serial bus interfaces of the plurality of mainboards are connected to a hub, obtaining interface information of the universal serial bus interfaces, and determining interface maps of the plurality of mainboards based on the interface information when the hubs are connected;

[0012] Bind the interface map of each motherboard with the motherboard information of the motherboard and add it to the interface map library;

[0013] Accordingly, determining a target interface map corresponding to the target motherboard information based on the target motherboard information of the motherboard where the universal serial bus interface to be detected is located includes:

[0014] Based on the target motherboard information of the motherboard where the universal serial bus interface to be detected is located, a target interface map corresponding to the target motherboard information is determined from the motherboard information of each interface map in the interface map library.

[0015] Optionally, also include:

[0016] When the universal serial bus interfaces of the plurality of mainboards are not connected to external devices, obtaining interface information of the universal serial bus interfaces;

[0017] Accordingly, based on the interface information when the hub is connected, the interface maps of the plurality of motherboards are determined, including:

[0018] An interface map of the plurality of main boards is determined based on the interface information when a hub is connected and the interface information when no external device is connected.

[0019] Optionally, determining a detection result of the universal serial bus interface to be detected based on the comparison result includes:

[0020] If the comparison results are inconsistent, an abnormal prompt message is generated.

[0021] Optionally, also include:

[0022] The first interface information is compared with the third interface information in the target interface map, wherein the third interface information is the interface information when the position interface corresponding to the universal serial bus interface to be detected is not connected to an external device.

[0023] Optionally, if the first interface information is consistent with the third interface information in the target interface map, generating abnormal prompt information includes:

[0024] Generate abnormal prompt information carrying the interface physical location information to prompt checking the connection status of the hub of the interface corresponding to the interface physical location information.

[0025] Optionally, if the first interface information is consistent with the third interface information in the target interface map, the method further includes:

[0026] The interface physical location information corresponding to the third interface information is obtained from the target interface map.

[0027] In a second aspect, the present invention provides a universal serial bus interface detection device, comprising:

[0028] an interface information reading module, configured to read interface information of a to-be-detected universal serial bus interface to obtain first interface information, wherein the to-be-detected universal serial bus interface is connected to a target hub;

[0029] an interface map determining module, configured to determine, based on target motherboard information of the motherboard where the to-be-detected universal serial bus interface is located, a target interface map corresponding to the target motherboard information, wherein the target interface map includes interface information of the universal serial bus interfaces at various locations on the target motherboard after being connected to a hub, and the target motherboard and the motherboard where the to-be-detected universal serial bus interface is located have the same universal serial bus interface layout;

[0030] an interface information comparison module, configured to compare the first interface information with second interface information in the target interface map to obtain a comparison result, wherein the second interface information is interface information of the interface at the corresponding position of the universal serial bus interface to be detected after being connected to a hub;

[0031] A detection result determination module is used to determine a detection result of the universal serial bus interface to be detected based on the comparison result.

[0032] In a third aspect, the present invention provides an electronic device, comprising:

[0033] memory for storing computer programs;

[0034] A processor is used to execute the computer program to implement the steps of the aforementioned universal serial bus interface detection method.

[0035] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the aforementioned universal serial bus interface detection method are implemented.

[0036] In a fifth aspect, the present invention provides a computer program product, comprising a computer program / instruction, which implements the steps of the aforementioned universal serial bus interface detection method when executed by a processor.

[0037] It can be seen from the above scheme that the present invention provides a universal serial bus interface detection method, including: reading the interface information of the universal serial bus interface to be detected to obtain first interface information, wherein the universal serial bus interface to be detected is connected to a target hub; determining a target interface map corresponding to the target motherboard information based on the target motherboard information of the motherboard where the universal serial bus interface to be detected is located, wherein the target interface map includes the interface information of the universal serial bus interface at each position in the target motherboard after being connected to the hub, and the universal serial bus interface layout of the target motherboard is the same as that of the motherboard where the universal serial bus interface to be detected is located; comparing the first interface information with the second interface information in the target interface map to obtain a comparison result, wherein the second interface information is the interface information of the interface at the corresponding position of the universal serial bus interface to be detected after being connected to the hub; and determining the detection result of the universal serial bus interface to be detected based on the comparison result.

[0038] It can be seen that the beneficial effect of the present invention is that: the universal serial bus interface to be detected is connected to the hub, the corresponding interface information is read, and compared with the interface information of the corresponding position in the corresponding pre-collected interface map, and the interface information of the interface after being connected to the hub is saved in the interface map, and then the detection result is obtained. In this way, the automatic detection of the universal serial bus interface can be realized, the detection efficiency is improved, and the labor cost is reduced. In addition, the cost of the hub is relatively low, which reduces the detection cost of the universal serial bus interface.

[0039] Correspondingly, a universal serial bus interface detection device, equipment, and medium provided by the present invention also have the above technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0041] Figure 1 A flow chart of a universal serial bus interface detection method provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of a universal serial bus interface detection provided by an embodiment of the present invention;

[0043] Figure 3 A schematic diagram of an interface map provided by an embodiment of the present invention;

[0044] Figure 4 A schematic structural diagram of a universal serial bus interface detection device provided by an embodiment of the present invention;

[0045] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0047] The terms "including" and "having," as used in the present description and accompanying drawings, and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements and may include steps or elements that are not listed.

[0048] First, the terms involved in the present invention are explained:

[0049] USB: Universal Serial Bus, is a serial bus standard and a technical specification for input and output interfaces. It is widely used in information and communication products such as personal computers and mobile devices, and has also expanded to other related fields such as photographic equipment, digital TVs (set-top boxes), and game consoles.

[0050] USB 2.0: The USB 2.0 specification evolved from the USB 1.1 specification. Its transfer rate reaches 480Mbps, which is equivalent to 60MB / s, which is sufficient to meet the speed requirements of most peripherals.

[0051] USB 3.0: The theoretical speed of USB 3.0 is 5.0 Gb / s, but in reality, it only reaches 50% of the theoretical value, which is nearly 10 times that of USB 2.0. The USB 3.0 physical layer uses 8b / 10b encoding, resulting in a theoretical speed of only 4 Gb / s. The actual speed is slightly lower after deducting protocol overhead. It is widely used in PC peripherals and consumer electronics.

[0052] MES: Manufacturing Execution System, is a software-based solution used to monitor and control production processes on the shop floor during the manufacturing process.

[0053] USB 3.0 HUB: The English word for hub is "Hub." "Hub" means center. The main function of a hub is to regenerate, shape, and amplify received signals to extend the network's transmission distance while concentrating all nodes around it. It operates at Layer 1 of the OSI (Open Systems Interconnection) reference model, the physical layer. Like other transmission media such as network cards and cables, hubs are fundamental components of a local area network (LAN) and utilize the CSMA / CD (Carrier Sense Multiple Access with Collision Detection) media access control mechanism. Each interface on the hub simply transmits and receives bits, forwarding a 1 if a 1 is received and a 0 if a 0 is received. No collision detection is performed. A USB 3.0 hub connects both the USB 3.0 bus and the USB 2.0 bus, ensuring backward compatibility with USB 2.0 devices.

[0054] Currently, most PCs manufactured entirely have numerous USB ports on their motherboards and front panels. To ensure the quality of these PCs before shipment, these machines typically undergo various functional tests, one of which is USB port testing. USB port testing is a crucial step in quality inspection for major PCs, focusing on verifying the USB 2.0 and USB 3.0 functionality of each USB port on each PC. Existing technology uses USB flash drives and keyboards and mice to test and verify each PC port. To ensure the functionality of each USB port on shipped PCs, manual testing of each port is required. Currently, specific test results must be manually verified, and any issues with the device are manually recorded and sent for repair. The specific process involves: an inspector inserting all USB ports with 3.0 USB flash drives and checking the system to see if the number of USB flash drives matches the number of USB flash drives inserted. If not, a repair request is initiated, and repair personnel perform the repair. If they match, the USB 3.0 functionality is assumed to be normal. The next step involves inserting a mouse into each USB port and sliding the mouse. If the mouse does not slide, the 2.0 functionality of that port is faulty. If all USB flash drives slide, the 2.0 functionality is normal.

[0055] Existing USB interface testing methods require manual control, which is not only prone to test omissions due to human error, but can also lead to false alarms due to repeated use of USB flash drives over long periods of time, resulting in relatively low reliability. Furthermore, the entire testing process is inefficient and time-consuming, resulting in significantly higher testing costs. Furthermore, existing methods cannot quickly locate the problematic USB port, requiring USB flash drives to be inserted into each port for testing and location, resulting in low efficiency. Therefore, the present invention provides a universal serial bus (USB) interface detection solution that improves the efficiency of USB interface detection and reduces costs.

[0056] In order to enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0057] Next, a universal serial bus interface detection method provided by an embodiment of the present invention is described in detail. Figure 1 A flowchart of a universal serial bus interface detection method provided in an embodiment of the present invention includes:

[0058] Step S11: reading interface information of a to-be-detected universal serial bus interface to obtain first interface information, wherein the to-be-detected universal serial bus interface is connected to a target hub.

[0059] The USB interfaces to be tested can be all USB interfaces on the motherboard to be tested (i.e., the motherboard where the USB interfaces to be tested are located), or can be specific USB interfaces. USB interfaces can include USB Type-A (legacy peripherals) and USB Type-C (high-speed / multi-function) interfaces.

[0060] Step S12: Determine a target interface map corresponding to the target motherboard information based on the target motherboard information of the motherboard where the universal serial bus interface to be detected is located, wherein the target interface map includes interface information of the universal serial bus interface at each position in the target motherboard after being connected to the hub, and the target motherboard has the same universal serial bus interface layout as the motherboard where the universal serial bus interface to be detected is located.

[0061] The target motherboard information of the motherboard where the USB interface to be tested is located is motherboard information of the motherboard where the USB interface to be tested is located. The target motherboard can be the motherboard where the USB interface to be tested is located, or a motherboard of the same model and version as the motherboard where the USB interface to be tested is located. If the layout of the USB interfaces is identical, i.e., the position, number, and type of the USB interfaces are consistent, then whether the layout is identical can be determined based on the motherboard information.

[0062] In an alternative embodiment, when the Universal Serial Bus (USB) interfaces of several motherboards are connected to a hub, interface information of the USB interfaces can be obtained, and interface maps for the several motherboards can be determined based on the interface information obtained when connected to the hub. The interface map for each motherboard is then bound to the motherboard information for that motherboard and added to the interface map library. In this embodiment of the present invention, "several" can be one or more, and corresponding motherboard types can be selected to collect interface maps.

[0063] Accordingly, determining a target interface map corresponding to the target motherboard information based on the target motherboard information of the motherboard where the USB interface to be detected is located includes: determining a target interface map corresponding to the target motherboard information from the interface map library based on the motherboard information of each interface map based on the target motherboard information of the motherboard where the USB interface to be detected is located. In other words, matching the corresponding interface map using the motherboard information as an index identifier.

[0064] In an optional embodiment, the present invention may also obtain interface information of the Universal Serial Bus (USB) interfaces of the plurality of mainboards when no external device is connected to the USB interfaces of the mainboards. Accordingly, determining the interface maps of the plurality of mainboards based on the interface information when a hub is connected may include determining the interface maps of the plurality of mainboards based on the interface information when a hub is connected and the interface information when no external device is connected. That is, in the embodiment of the present invention, the interface map may include interface information when a hub is connected and when no hub is connected.

[0065] Step S13: Compare the first interface information with the second interface information in the target interface map to obtain a comparison result, wherein the second interface information is the interface information of the corresponding position interface of the universal serial bus interface to be detected after connecting to the hub.

[0066] Step S14: determining a detection result of the USB interface to be detected based on the comparison result.

[0067] In the embodiment of the present invention, if the comparison results are consistent, the test is passed. If the comparison results are inconsistent, an abnormal prompt message is generated.

[0068] In an optional embodiment, if the comparison results are inconsistent, the first interface information can also be compared with the third interface information in the target interface map, wherein the third interface information is the interface information when the interface corresponding to the position of the universal serial bus interface to be tested is not connected to an external device. If the first interface information is consistent with the third interface information in the target interface map, an abnormal prompt message carrying the physical location information of the interface is generated to prompt the tester to check the connection status of the hub of the interface corresponding to the physical location information of the interface. The physical location information of the interface is information that characterizes the physical location of the interface, such as upper left, upper right, etc. That is, if the first interface information is consistent with the third interface information in the target interface map, it is possible to check whether the connection is loose. If the first interface information is inconsistent with the third interface information in the target interface map, a prompt message carrying the inconsistency between the first interface information and the third interface information is generated so that the tester can check the problem.

[0069] Furthermore, the interface information of the universal serial bus interface to be detected is read again to obtain the first interface information, wherein the universal serial bus interface to be detected is connected to the target hub; based on the target motherboard information of the motherboard where the universal serial bus interface to be detected is located, the target interface map corresponding to the target motherboard information is determined, wherein the target interface map contains the interface information of the universal serial bus interface at each position in the target motherboard after being connected to the hub, and the target motherboard and the motherboard where the universal serial bus interface to be detected are located have the same universal serial bus interface layout; the first interface information is compared with the second interface information in the target interface map to obtain a comparison result, wherein the second interface information is the interface information of the interface at the corresponding position of the universal serial bus interface to be detected after being connected to the hub; the detection result of the universal serial bus interface to be detected is determined based on the comparison result. If the first interface information and the second interface information are still inconsistent, a prompt is given to replace the hub, that is, the embodiment of the present invention provides a fault-tolerant mechanism and improves the detection performance.

[0070] In an optional embodiment, the interface physical location information corresponding to the third interface information can be obtained from the target interface map. That is, in this embodiment of the present invention, the interface physical location information page can be stored in the interface map. Each interface in the interface map contains a row of data, including: interface physical location information, interface information when connected to a hub, and interface information when not connected to a hub.

[0071] In addition, the embodiment of the present invention can also upload the test results to the database for testers to search. The test results can include whether the test is passed and the reason for failure.

[0072] It can be seen that the embodiment of the present invention connects the universal serial bus interface to be detected to the hub, reads the corresponding interface information, and compares it with the interface information of the corresponding position in the corresponding pre-collected interface map. The interface information of the interface after being connected to the hub is saved in the interface map, and then the detection result is obtained. In this way, the automatic detection of the universal serial bus interface can be realized, the detection efficiency is improved, and the labor cost is reduced. In addition, the cost of the hub is relatively low, which reduces the detection cost of the universal serial bus interface.

[0073] For further information, see Figure 2As shown, an embodiment of the present invention provides a schematic diagram of universal serial bus interface detection. It can collect USB signals based on USB3.0 HUB hardware and perform logical processing on the collected signals. By combining with USB3.0 HUB hardware, the system automatically diagnoses the problematic USB interface and uploads it to the system. The embodiment of the present invention can adopt USB3.0 HUB hardware. In combination with the system equipped with the universal serial bus interface detection solution provided by the embodiment of the present invention, it can intelligently identify the status information of the corresponding USB interface, and provide intelligent reminders based on the corresponding inspection situation, and take into account the handling method in abnormal situations. At the same time, the test results can be uploaded to the system for easy query and statistical maintenance and other processing.

[0074] The specific implementation method is as follows: First, data is collected from the upper left corner of a PC model Cx5xxx and motherboard C0xx00x000000000: With the pre-installed shipping OS, all external devices, including USB keyboards and mice, are removed. A remote system (which can be another PC or server) is used to connect to the device being tested. Device information is read and stored in A.map. Then, only the USB 3.0 hub is inserted into the upper left corner of the machine. The device information read is stored in B.map. The two maps are then compared to determine the USB port location: Before the USB 3.0 hub is inserted, the USB port is located at '1-4.1.4'; afterward, it is located at '1-4.1.4:1.0'. Next, insert only the USB 3.0 hub fixture into the front-most upper right position of the machine. The device information read at this time is stored in B.map. Next, compare the two map files with A.map to find the differences. The USB port location information is: The front upper right USB port is located at '1-4.1.3' before the USB 3.0 hub is inserted, and the location is '1-4.1.3:1.0' after the USB 3.0 hub is inserted. Next, insert only the USB 3.0 hub fixture into the front-most lower left position of the machine. The device information read at this time is stored in B.map. Next, compare the two map files with A.map to find the differences. The USB port location information is: The front lower left USB port is located at '1-2', '1-2:1.0' before the USB 3.0 hub is inserted, and the location is '2-2', '2-2:1.0' after the USB 3.0 hub is inserted. Similarly, compare the original information of all USB interfaces with the information after inserting only a single USB3.0 HUB hardware in the corresponding position to obtain a UBS interface map for this model and this motherboard. Figure 3 As shown, Figure 3 A schematic diagram of an interface map provided by an embodiment of the present invention.

[0075] After obtaining the corresponding map information, it is stored in a program library. During intelligent testing, the system automatically calls the corresponding USB map library based on the motherboard, intelligently reads the current device information, and compares it line by line with the library information. If a complete match occurs, the USB interface is functioning properly. If some fields do not fully match, the system will directly report a problem with the corresponding USB interface. For example, if only the 1-4.1.3 field is captured, but not the complete 1-4.1.3:1.0 field, this indicates that there is an abnormality in the front description of the corresponding line: "front upper right, USB interface." When an abnormality occurs, the system activates an intelligent fault-tolerant mechanism. Instead of reporting an error and stopping the test, the system will prompt a message indicating that the corresponding position is not properly plugged in, asking you to check and reinsert the USB 3.0 hub hardware. This prevents system misjudgments due to improper insertion, significantly reduces errors caused by manual operation, and improves the accuracy of the test. Furthermore, the system's location information allows precise identification of hardware issues with the abnormal USB interface, such as issues that prevent full insertion, looseness, or incomplete seating.

[0076] If everything is normal after re-plugging and re-checking, the test is considered passed. If the problem persists, a second re-test will be performed to replace the USB 3.0 hub hardware to avoid false USB interface errors caused by USB 3.0 hub hardware issues. If everything is normal after re-checking after replacing the USB 3.0 hub hardware, the test is considered passed. If the problem persists, the system will automatically record the problematic interface and issue an error message, notifying you of the corresponding USB interface error. The error will also be uploaded to the diagnostic test system for review and analysis by maintenance, inspection, and quality control personnel.

[0077] In an embodiment of the present invention, the entire process of intelligently checking and synchronously uploading the USB interface status of a PC may include: 1. Entering a USB 3.0 hub map using an entry tool; 2. Testing the USB interface status of the PC using a test tool; 3. Uploading the result information to the corresponding database field using a database tool (the corresponding format is machine number + current status + error details); 4. Querying and displaying the test status of the corresponding PC using a query tool. This includes entry, testing, recording, uploading, and querying. Entry refers to rule entry: entering a USB 3.0 hub map; testing: testing using map rules, recording the results; and uploading the test results (uploading the test results) to facilitate querying the test results. Among them, 1. Use the USB3.0HUB map entry system to perform the operation of entering the USB3.0HUB map with the entry tool, and the entered map content can be automatically saved; 2. The function of the USB3.0HUB map can be integrated into the comprehensive test system, and the PC whole machine test system can be used to test the USB interface status of the PC whole machine, and used as one of the environments for testing and recording; 3. The database tool can be flexibly used to upload the result information to the corresponding database field; 4. The query tool can be used to query and display the test status of the corresponding PC whole machine. When implementing the present invention, it can be implemented according to the actual environment and the way of the integrated system, and there is no mandatory hard requirement.

[0078] The embodiment of the present invention uses USB 3.0 HUB hardware instead of a traditional USB flash drive and keyboard and mouse to perform USB interface integrity and availability testing on a PC, drawing USB interface map information. The USB interface map information is then called to detect the current status of the USB interfaces at each location. This significantly improves the efficiency of USB interface testing on the PC and reduces the cost of USB interface testing on the PC. This ensures the quality of the PC product. It avoids the risk of missing data caused by manual inspection of USB interfaces. It also avoids issues such as OS anomalies, USB flash drive tooling anomalies, and test system crashes caused by hot-plugging USB storage devices. Because the USB HUB has no storage device, it has low wear and tear during daily use, a long lifespan, and a low unit price. This saves on the cost of replacing and maintaining test tools and reduces the corresponding lost work hours. This improves testing efficiency and reduces testing time. Because the USB 3.0 HUB can simultaneously test both 3.0 and 2.0 interface links, secondary testing is unnecessary, significantly reducing testing time and improving testing efficiency.

[0079] In the whole machine factory scenario, the universal serial bus interface detection solution provided by this application can be applied, which can specifically include the following steps:

[0080] 1. When assembling the machine, the machine SN (Serial Number), QN (motherboard identification), Mac address and other production line information are scanned and entered into the MES system, which will be bound to the QN, Mac address and SN information to obtain the association relationship;

[0081] 2. After the machine is assembled, use the PXE (Preboot Execution Environment) system to install the test system and software into the machine under test;

[0082] 3. When executing the test, refresh the machine's SN information based on the Mac address according to the association relationship transmitted by MES.

[0083] 4. After the machine SN information is bound, the HUB test process can be carried out;

[0084] 5. Deliver the HUB test results (e.g., it can distinguish the front and rear USB ports, and locate the problem of the main board or the front USB board) to the MES system;

[0085] 6. Based on the test results, confirm whether the tested machine has passed the test or whether the corresponding parts need to be repaired.

[0086] In the board factory scenario, the universal serial bus interface detection solution provided in this application can be applied, which can specifically include the following steps:

[0087] 1. When the machine does not need to be assembled, the board QN, Mac address and other production line information are scanned and entered into the MES system, and the Mac address is bound to the QN information to obtain the association relationship;

[0088] 2. Connect the board to the fixture and start the test system;

[0089] 3. When executing the test, the QN information of the board is determined based on the Mac address according to the management relationship transmitted by MES.

[0090] 4. After the machine QN information is bound, the HUB test process can be carried out;

[0091] 5. Deliver the HUB test results (e.g., it can distinguish the front and rear USB ports, and locate the problem of the main board or the front USB board) to the MES system;

[0092] 6. Based on the test results, confirm whether the tested machine has passed the test or whether the corresponding parts need to be repaired.

[0093] See also Figure 4 As shown, Figure 4 A schematic structural diagram of a universal serial bus interface detection device provided in an embodiment of the present invention, the universal serial bus interface detection device comprising:

[0094] The interface information reading module 41 is used to read the interface information of the universal serial bus interface to be detected to obtain first interface information, wherein the universal serial bus interface to be detected is connected to the target hub;

[0095] an interface map determining module 42 for determining a target interface map corresponding to the target motherboard information based on the target motherboard information of the motherboard where the USB interface to be detected is located, wherein the target interface map includes interface information of the USB interfaces at various locations on the target motherboard after being connected to a hub, and the target motherboard and the motherboard where the USB interface to be detected is located have the same USB interface layout;

[0096] an interface information comparison module 43 for comparing the first interface information with the second interface information in the target interface map to obtain a comparison result, wherein the second interface information is the interface information of the interface corresponding to the position of the universal serial bus interface to be detected after connecting to the hub;

[0097] The detection result determination module 44 is configured to determine a detection result of the USB interface to be detected based on the comparison result.

[0098] In an optional embodiment, the universal serial bus interface detection device further includes:

[0099] An interface map library generation module is used to obtain interface information of the universal serial bus interfaces of several mainboards when the universal serial bus interfaces of the mainboards are connected to a hub, determine the interface maps of the several mainboards based on the interface information when the hubs are connected; bind the interface map of each mainboard with the mainboard information of the mainboard, and add the interface map to the interface map library;

[0100] Correspondingly, the interface map determination module 42 is specifically configured to determine the target interface map corresponding to the target motherboard information from the motherboard information based on each interface map in the interface map library based on the target motherboard information of the motherboard where the USB interface to be detected is located.

[0101] In an optional embodiment, the interface map determination module 42 is also used to: obtain interface information of the universal serial bus interface when the universal serial bus interface of the several mainboards is not connected to an external device; and determine the interface map of the several mainboards based on the interface information when a hub is connected and the interface information when no external device is connected.

[0102] In an optional embodiment, the detection result determination module 44 is specifically configured to generate an abnormality prompt message if the comparison results are inconsistent.

[0103] In an optional implementation manner, the interface information comparison module 43 is further configured to:

[0104] The first interface information is compared with the third interface information in the target interface map, wherein the third interface information is the interface information when the position interface corresponding to the universal serial bus interface to be detected is not connected to an external device.

[0105] In an optional embodiment, the detection result determination module 44 is specifically used to: if the first interface information is consistent with the third interface information in the target interface map, generate an abnormal prompt information carrying the interface physical location information to prompt checking the connection status of the hub of the interface corresponding to the interface physical location information.

[0106] In an optional embodiment, the interface information comparison module 43 is also used to: if the first interface information is consistent with the third interface information in the target interface map, it also includes: obtaining the interface physical location information corresponding to the third interface information from the target interface map.

[0107] It can be seen that the embodiment of the present invention connects the universal serial bus interface to be detected to the hub, reads the corresponding interface information, and compares it with the interface information of the corresponding position in the corresponding pre-collected interface map. The interface information of the interface after being connected to the hub is saved in the interface map, and then the detection result is obtained. In this way, the automatic detection of the universal serial bus interface can be realized, the detection efficiency is improved, and the labor cost is reduced. In addition, the cost of the hub is relatively low, which reduces the detection cost of the universal serial bus interface.

[0108] Figure 4 The description of the features in the corresponding embodiment can be found in Figure 1 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.

[0109] Figure 5 A structural diagram of an electronic device provided by an embodiment of the present invention, such as Figure 5 As shown, the electronic device includes: a memory 50 for storing computer programs;

[0110] The processor 51 is configured to implement the steps of the universal serial bus interface detection method of the above embodiment when executing a computer program.

[0111] The processor 51 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 51 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 51 may also include a main processor and a coprocessor. The main processor is used to process data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 51 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, the processor 51 may also include an artificial intelligence (AI) processor, which is used to handle computational operations related to machine learning.

[0112] The memory 50 may include one or more computer-readable storage media, which may be non-transitory. The memory 50 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 50 is at least used to store the following computer program 501, wherein, after the computer program is loaded and executed by the processor 51, it can implement the relevant steps of the universal serial bus interface detection method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 50 may also include an operating system 502 and data 503, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 502 may include Windows, Unix, Linux, etc. Data 503 may include but is not limited to interface information library data, etc.

[0113] In some embodiments, the electronic device may further include a display screen 52 , an input / output interface 53 , a communication interface 54 , a power supply 55 , and a communication bus 56 .

[0114] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure.

[0115] It is understandable that if the universal serial bus interface detection method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the current technology, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, a magnetic disk, or an optical disk, and other media that can store program code.

[0116] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned universal serial bus interface detection method are implemented.

[0117] A computer program product provided by an embodiment of the present invention is introduced below. The computer program product described below can be referenced with other embodiments described herein.

[0118] A computer program product includes a computer program / instruction, which implements the steps of the aforementioned universal serial bus interface detection method when executed by a processor.

[0119] The above describes in detail the universal serial bus interface detection method, apparatus, device, and medium provided by the embodiments of the present invention. The various embodiments are described in a progressive manner throughout this specification, with each embodiment focusing on the differences from the other embodiments. Similar or identical parts between the various embodiments can be referenced to each other. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; for relevant details, refer to the method description.

[0120] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0121] The above describes in detail the universal serial bus interface detection method, apparatus, device, and medium provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core concept of the present invention. It should be noted that for those skilled in the art, without departing from the principles of the present invention, various improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A universal serial bus interface detection method, characterized in that: include: Reading interface information of a universal serial bus interface to be detected to obtain first interface information, wherein the universal serial bus interface to be detected is connected to a target hub; Determining a target interface map corresponding to the target motherboard information based on target motherboard information of the motherboard where the universal serial bus interface to be detected is located, wherein the target interface map includes interface information of the universal serial bus interface at each location on the target motherboard after being connected to a hub, and the target motherboard and the motherboard where the universal serial bus interface to be detected are located have the same universal serial bus interface layout; Comparing the first interface information with the second interface information in the target interface map to obtain a comparison result, wherein the second interface information is the interface information of the interface at the corresponding position of the universal serial bus interface to be detected after being connected to the hub; A detection result of the universal serial bus interface to be detected is determined based on the comparison result.

2. The method for detecting a universal serial bus interface according to claim 1, wherein: Also includes: When universal serial bus interfaces of the plurality of mainboards are connected to a hub, obtaining interface information of the universal serial bus interfaces, and determining interface maps of the plurality of mainboards based on the interface information when the hubs are connected; Bind the interface map of each motherboard with the motherboard information of the motherboard and add it to the interface map library; Accordingly, determining a target interface map corresponding to the target motherboard information based on the target motherboard information of the motherboard where the universal serial bus interface to be detected is located includes: Based on the target motherboard information of the motherboard where the universal serial bus interface to be detected is located, a target interface map corresponding to the target motherboard information is determined from the motherboard information of each interface map in the interface map library.

3. The method for detecting a universal serial bus interface according to claim 2, wherein: Also includes: When the universal serial bus interfaces of the plurality of mainboards are not connected to external devices, obtaining interface information of the universal serial bus interfaces; Accordingly, based on the interface information when the hub is connected, the interface maps of the plurality of motherboards are determined, including: An interface map of the plurality of main boards is determined based on the interface information when a hub is connected and the interface information when no external device is connected.

4. The method for detecting a universal serial bus interface according to claim 3, wherein: Determining a detection result of the universal serial bus interface to be detected based on the comparison result, comprising: If the comparison results are inconsistent, an abnormal prompt message is generated.

5. The method for detecting a universal serial bus interface according to claim 4, wherein: Also includes: The first interface information is compared with the third interface information in the target interface map, wherein the third interface information is the interface information when the position interface corresponding to the universal serial bus interface to be detected is not connected to an external device.

6. The method for detecting a universal serial bus interface according to claim 5, wherein: If the first interface information is consistent with the third interface information in the target interface map, an abnormal prompt message is generated, including: Generate abnormal prompt information carrying the interface physical location information to prompt checking the connection status of the hub of the interface corresponding to the interface physical location information.

7. The method for detecting a universal serial bus interface according to claim 6, wherein: If the first interface information is consistent with the third interface information in the target interface map, the method further includes: The interface physical location information corresponding to the third interface information is obtained from the target interface map.

8. A universal serial bus interface detection device, characterized in that: include: an interface information reading module, configured to read interface information of a to-be-detected universal serial bus interface to obtain first interface information, wherein the to-be-detected universal serial bus interface is connected to a target hub; an interface map determining module, configured to determine, based on target motherboard information of the motherboard where the to-be-detected universal serial bus interface is located, a target interface map corresponding to the target motherboard information, wherein the target interface map includes interface information of the universal serial bus interfaces at various locations on the target motherboard after being connected to a hub, and the target motherboard and the motherboard where the to-be-detected universal serial bus interface is located have the same universal serial bus interface layout; an interface information comparison module, configured to compare the first interface information with second interface information in the target interface map to obtain a comparison result, wherein the second interface information is interface information of the interface at the corresponding position of the universal serial bus interface to be detected after being connected to a hub; A detection result determination module is used to determine a detection result of the universal serial bus interface to be detected based on the comparison result.

9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the universal serial bus interface detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the universal serial bus interface detection method according to any one of claims 1 to 7 are implemented.