A test device and a test method for identifying a USB flash drive
By designing an automated U disk test device and using the reading module and loop detection module to simulate the plug-in and pull-out state of the U disk, the problem of manual plug-in and pull-out in the existing technology for U disk equipment testing is solved, automated testing is realized, and testing is improved. efficiency and provides an early warning function.
Patent Information
- Application Number
- CN202310895127.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-20
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2043-07-20
AI Technical Summary
In the existing technology, testing of USB flash drive devices requires R&D personnel to manually plug and pull out the devices repeatedly, which is time-consuming and labor-intensive, and automated testing cannot be achieved.
A test device including a reading module and a loop detection module is designed. Through the series connection of the U disk interface unit, identification unit, switch unit and counting unit, the plug and pull state of the U disk is simulated, and the counting unit is used to count the number of reads, and Automated testing is performed through the early warning module and storage module.
It realizes the automated testing of U disk equipment, reduces manual operation time, improves testing efficiency, can automatically count the number of reads and life limits, and issues early warning prompts when the detection is completed or abnormal.
Smart Images

Figure CN117079699B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of USB flash drive testing, and in particular to a testing device and a testing method for identifying a USB flash drive device. Background Art
[0002] USB technology is already very mature and has been applied to various electronic products, so it is very important that USB devices can be stably identified.
[0003] USB flash drives require a lot of experiments before they are put into use. Usually, R&D personnel manually plug and unplug the USB flash drives repeatedly to test the number of reads and life limit of the USB flash drives, which is time-consuming and labor-intensive. Summary of the invention
[0004] The purpose of the present invention is to provide a testing device and a testing method for identifying a USB flash drive device, so as to perform an automated test on the USB flash drive device without the need for R&D personnel to manually plug and unplug the USB flash drive device, thus saving time and effort.
[0005] To achieve the above object, the present invention provides a testing device for identifying a USB flash drive, comprising a reading module and a loop detection module;
[0006] The reading module comprises:
[0007] U disk interface unit, used for connecting a U disk;
[0008] An identification unit, used for identifying the USB flash drive;
[0009] A switch unit, used to connect or disconnect the lines between the identification unit and the USB disk interface unit;
[0010] A counting unit, used to count the number of times the USB flash drive is read;
[0011] The loop detection module comprises: a first line unit, a second line unit and a loop detection unit, wherein the loop detection unit, the first line unit, the switch unit and the second line unit are connected in series to form a closed loop;
[0012] When the identification unit detects a USB flash drive, it generates a first counting signal and feeds the signal back to the counting unit. When the loop detection unit detects a closed loop, it generates a second counting signal and feeds the signal back to the counting unit. The counting unit is used to receive the first counting signal and the second counting signal, and generate read data, and the counter count increases.
[0013] Wherein, the testing device for identifying the USB flash drive device further comprises:
[0014] The early warning module is used to issue an early warning prompt when the detection is completed or an abnormality is detected.
[0015] Wherein, the early warning module includes:
[0016] Green light unit, used to emit green flashing light when the detection is completed;
[0017] The red light unit is used to emit a flashing red light when an abnormality is detected.
[0018] Wherein, the early warning module also includes:
[0019] The voice unit is used to issue a voice announcement when the detection is completed or an abnormality is detected.
[0020] Wherein, the testing device for identifying the USB flash drive device further comprises:
[0021] The storage module is used to save the test data of each USB flash drive.
[0022] The present invention also provides a testing method for the testing device for identifying the USB flash drive device described above, which specifically comprises the following steps:
[0023] Insert the USB disk into the USB disk interface unit;
[0024] The switch unit is opened and closed at intervals to cut off the power supply to the USB flash drive;
[0025] When the switch unit is closed, the identification unit is connected to the U disk interface unit, and the identification unit identifies the U disk. After successful identification, a first counting signal is generated and sent to the counting unit;
[0026] When the switch unit is closed, the loop detection module forms a closed loop, and the loop detection unit generates a second counting signal and sends the signal to the counting unit;
[0027] The counting unit generates read data after receiving the first counting signal and the second counting signal, and controls the counter to count up;
[0028] If the counting unit does not receive the first counting signal and the second counting signal at the same time, an abnormal signal is generated, and the counting unit stores the abnormal signal.
[0029] The present invention provides a test device and a test method for identifying a U disk device. The switch unit is opened and closed once every certain period of time. During this period of time, it is regarded as each test time for the U disk. When the switch unit is closed during this period of time, the insertion state of the U disk is simulated. The identification unit can identify and read the U disk on the U disk port interface unit. After the reading is successful, a first counting signal is generated and sent to the counting unit. At the same time, due to the closing of the switch unit, the first line unit, the second line unit and the loop detection unit form a closed loop. The loop detection unit generates a second counting signal and sends it to the counting unit. After the counting unit receives the first counting signal and the second counting signal at the same time, it generates read data, and the counter counts by 1. Then the switch unit is disconnected to simulate the unplugging state of the U disk. The switch unit repeats this, thereby continuously performing automatic reading tests on the U disk to test the number of reads and the life limit of the U disk. There is no need for R&D personnel to manually plug and unplug the U disk device, which saves time and effort. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0031] Figure 1 It is a framework diagram of a testing device for identifying a USB flash drive device according to the present invention.
[0032] Figure 2 The present invention is a flow chart of a testing method of a testing device for identifying a USB flash drive. DETAILED DESCRIPTION
[0033] Embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, but should not be construed as limiting the present invention.
[0034] See also Figure 1 , Figure 1 This is a framework diagram of a test device for identifying a USB flash drive device of the present invention. The present invention provides a test device for identifying a USB flash drive device, including a reading module, a loop detection module, an early warning module and a storage module;
[0035] The reading module includes: a U disk interface unit, an identification unit, a switch unit and a counting unit. The U disk interface unit is used to connect a U disk; the identification unit is used to identify the U disk; the switch unit is used to connect or disconnect the identification unit and the U disk interface unit; the counting unit is used to count the number of times the U disk is read; the U disk interface unit is used to connect a U disk to test the U disk, the identification unit can identify the U disk, the switch unit is used to control the power on and off of the U disk, the counting unit can count the number of times the U disk is read, and can record abnormal data when the U disk is read. The U disk interface unit, the identification unit, the switch unit and the counting unit are connected in series in sequence. When the switch unit is closed, the U disk interface unit is electrically connected to the identification unit, and the identification unit identifies the U disk plugged into the U disk interface unit. When the switch unit is disconnected, the U disk interface unit is disconnected from the identification unit. Through the setting of the switch unit, the plug-in and unplugging state of the U disk is simulated, and there is no need for R&D personnel to manually plug and unplug the U disk, which saves time and effort.
[0036] The loop detection module includes: a first line unit, a second line unit and a loop detection unit. The loop detection unit, the first line unit, the switch unit and the second line unit are connected in series to form a closed loop. When the switch unit is closed, a closed loop is formed between the loop detection unit, the first line unit and the second line unit. At this time, the loop detection unit will generate a signal to send to the counting unit.
[0037] The warning module is used to issue a warning prompt when the detection is completed or the detection is abnormal. The warning module includes a green light unit, a red light unit and a voice unit: the green light unit is used to emit a green light flashing when the detection is completed; the red light unit is used to emit a red light flashing when the detection is abnormal. The voice unit is used to issue a voice broadcast prompt when the detection is completed or the detection is abnormal.
[0038] The storage module is used to store the test data of each U disk.
[0039] When the identification unit detects the USB flash drive, it generates a first counting signal and feeds the signal back to the counting unit. When the loop detection unit detects a closed loop, it generates a second counting signal and feeds the signal back to the counting unit. The counting unit is used to receive the first counting signal and the second counting signal. After simultaneously receiving the first technical signal and the second technical signal, it generates read data, and the counter count increases.
[0040] The switch unit opens and closes once every certain period of time. During this period of time, it is regarded as each test time for the U disk. When the switch unit is closed during this period of time, it simulates the insertion state of the U disk. The identification unit can identify and read the U disk on the U disk port interface unit. After the reading is successful, a first counting signal is generated and sent to the counting unit. At the same time, due to the closure of the switch unit, the first line unit, the second line unit and the loop detection unit form a closed loop. The loop detection unit generates a second counting signal and sends it to the counting unit. After the counting unit receives the first counting signal and the second counting signal at the same time, it generates read data. The counter counts plus 1, and then the switch unit is disconnected to simulate the unplugging state of the U disk. The switch unit repeats this, thereby continuously performing automatic reading tests on the U disk to test the number of reads and the life limit of the U disk. There is no need for R&D personnel to manually plug and unplug the U disk device, saving time and effort. After the test is completed, the green light unit runs and flashes green light, and cooperates with the voice unit to facilitate the staff to know. If during a single test of the USB flash drive, the counting unit only receives the second counting signal but not the first counting signal, it can be determined that the recognition unit has failed to read the USB flash drive. At this time, the red light unit will flash and cooperate with the voice unit to inform the staff.
[0041] See also Figure 2 , Figure 2 The present invention also provides a test method for the test device for identifying a USB flash drive, which specifically includes the following steps:
[0042] S101: inserting the USB disk into the USB disk interface unit;
[0043] S102: the switch unit is turned on and off at intervals to cut off the power supply to the USB flash drive;
[0044] S103: When the switch unit is closed, the identification unit is connected to the USB flash drive interface unit, and the identification unit identifies the USB flash drive. After successful identification, a first counting signal is generated and sent to the counting unit;
[0045] S104: When the switch unit is closed, the loop detection module forms a closed loop, and the loop detection unit generates a second counting signal and sends the signal to the counting unit;
[0046] S105: the counting unit generates read data after receiving the first counting signal and the second counting signal, and controls the counter to count upward;
[0047] S106: If the counting unit does not receive the first counting signal and the second counting signal at the same time, an abnormal signal is generated, and the counting unit saves the abnormal signal.
[0048] In this embodiment, a U disk is inserted into the U disk interface unit, and the switch unit is opened and closed at intervals to power off the U disk; when the switch unit is closed, the identification unit is connected to the U disk interface unit, and the identification unit identifies the U disk. After successful identification, it generates a first counting signal and sends the signal to the counting unit. At this time, the loop detection module forms a closed loop, and the loop detection unit generates a second counting signal and sends the signal to the counting unit; the counting unit generates read data after receiving the first counting signal and the second counting signal, and controls the counter to count upward; if the counting unit does not receive the first counting signal and the second counting signal at the same time, an abnormal signal is generated, and the counting unit saves the abnormal signal. When a single test is performed on a USB flash drive, the switch unit is closed to simulate the insertion state of the USB flash drive. The identification unit can identify and read the USB flash drive on the USB flash drive interface unit. After successful reading, a first counting signal is generated and sent to the counting unit. At the same time, due to the closure of the switch unit, the first line unit, the second line unit and the loop detection unit form a closed loop. The loop detection unit generates a second counting signal and sends it to the counting unit. The counting unit generates read data after receiving the first counting signal and the second counting signal at the same time. The counter counts plus 1, and then the switch unit is disconnected to simulate the unplugging state of the USB flash drive. The switch unit repeats this, thereby continuously performing automated reading tests on the USB flash drive to test the number of reads and life limit of the USB flash drive. There is no need for R&D personnel to manually plug and unplug the USB flash drive device, saving time and effort. After the test is completed, the green light unit runs and flashes green light, and cooperates with the voice unit to facilitate the staff to know. If during a single test of the USB flash drive, the counting unit only receives the second counting signal but not the first counting signal, it can be determined that the recognition unit has failed to read the USB flash drive. At this time, the red light unit will flash and cooperate with the voice unit to inform the staff.
[0049] What is disclosed above is only one or more preferred embodiments of the present application, and cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiments and equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A test device for identifying a USB flash drive, characterized in that: It includes a reading module and a loop detection module; The reading module comprises: U disk interface unit, used for connecting a U disk; An identification unit, used for identifying the USB flash drive; A switch unit, used to connect or disconnect the lines between the identification unit and the USB disk interface unit; A counting unit, used to count the number of times the USB flash drive is read; The loop detection module comprises: a first line unit, a second line unit and a loop detection unit, wherein the loop detection unit, the first line unit, the switch unit and the second line unit are connected in series to form a closed loop; When the identification unit detects the USB flash drive, it generates a first counting signal and feeds the signal back to the counting unit. When the loop detection unit detects a closed loop, it generates a second counting signal and feeds the signal back to the counting unit. The counting unit is used to receive the first counting signal and the second counting signal, and generate read data, and the counter count increases. The switch unit is opened and closed once every certain period of time. During this period of time, it is regarded as each test time for the U disk. When the switch unit is closed during this period of time, the insertion state of the U disk is simulated, and the identification unit can identify and read the U disk on the U disk port interface unit. After the reading is successful, a first counting signal is generated and sent to the counting unit. At the same time, due to the closing of the switch unit, the first line unit, the second line unit and the loop detection unit form a closed loop. The loop detection unit generates a second counting signal and sends it to the counting unit. After the counting unit receives the first counting signal and the second counting signal at the same time, it generates read data, and the counter counts by 1. Then the switch unit is disconnected to simulate the unplugging state of the U disk. The switch unit repeats this, thereby continuously performing automatic reading tests on the U disk; A testing method for the testing device for identifying a USB flash drive device specifically comprises the following steps: Insert the USB disk into the USB disk interface unit; The switch unit is opened and closed at intervals to cut off the power supply to the USB flash drive; When the switch unit is closed, the identification unit is connected to the U disk interface unit, and the identification unit identifies the U disk. After successful identification, a first counting signal is generated and sent to the counting unit; When the switch unit is closed, the loop detection module forms a closed loop, and the loop detection unit generates a second counting signal and sends the signal to the counting unit; The counting unit generates read data after receiving the first counting signal and the second counting signal, and controls the counter to count up; If the counting unit does not receive the first counting signal and the second counting signal at the same time, an abnormal signal is generated, and the counting unit stores the abnormal signal.
2. The test device for identifying a USB flash drive as claimed in claim 1, characterized in that: The testing device for identifying the USB device also includes: The early warning module is used to issue an early warning prompt when the detection is completed or an abnormality is detected.
3. The testing device for identifying a USB flash drive as claimed in claim 2, characterized in that: The early warning module comprises: Green light unit, used to emit green flashing light when the detection is completed; The red light unit is used to emit a flashing red light when an abnormality is detected.
4. The testing device for identifying a USB flash drive as claimed in claim 3, characterized in that: The early warning module also includes: The voice unit is used to issue a voice announcement when the detection is completed or an abnormality is detected.
5. The testing device for identifying a USB flash drive as claimed in claim 4, characterized in that: The testing device for identifying the USB device also includes: The storage module is used to save the test data of each USB flash drive.
