Full-automatic testing method and device for railway navigation data storage
By designing a fully automated testing method and device, and utilizing the UART interface and integrated module to automatically control USB flash drive switching and data comparison, the problem of cumbersome manual operation in existing technologies has been solved. This has enabled the automation and integration of railway navigation data storage and testing, improving testing efficiency and accuracy.
Patent Information
- Application Number
- CN202511753626.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-20
AI Technical Summary
Existing railway navigation data storage and testing devices require multiple manual operations and switching between multiple interfaces, resulting in a cumbersome testing process that is costly and unstable.
Design a fully automated testing method and device. The device automatically switches the USB flash drive via UART1, UART2 and UART3 interfaces. Combined with the logic control of the host computer and the slave computer, it automatically sends and compares simulated navigation data and outputs the results. The device integrates a power module, a navigation data generation module, a prompting module, etc., to achieve automation and integration of the testing process.
The testing process is fully automated, simplifying the operation process, reducing the difficulty of testing, improving the practicality and accuracy of testing, and ensuring the performance and functional integrity of the storage board.
Smart Images

Figure CN121709008A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data storage technology, and in particular to a fully automated testing method and apparatus for railway navigation data storage. Background Technology
[0002] The railway industry is an important application area for the BeiDou system, with a widespread and urgent need for position and time synchronization. Currently, the BeiDou system has been widely used in high-speed railways, especially on trains. BeiDou navigation can provide trains with accurate position and time information. In order to perform offline playback and analysis of navigation data, the storage board is used to store two redundant navigation data channels and provide USB download functionality. The functional and performance testing of the storage board before it leaves the factory is particularly important, as it is related to whether it can meet the functions of large-capacity data storage and download.
[0003] Existing testing equipment requires multiple manual operations, switching between multiple interfaces, and manual judgment of data consistency, making the testing process cumbersome and difficult.
[0004] Furthermore, existing testing equipment requires numerous testing auxiliary tools and instruments, resulting in high testing costs.
[0005] Patent CN119179662A discloses a device and method for rapid storage and retrieval of railway navigation data. The device includes a CPU module, a storage module, a signal isolation module, and a USB interface module connected to the CPU module. The signal isolation module converts navigation data received from an external navigation module into a TTL signal acceptable to the CPU module before sending it to the CPU module. The CPU module stores the collected data in the corresponding storage partition of the storage module. When the CPU module detects a USB flash drive inserted, it quickly reads the corresponding navigation data stored in the storage module into the USB flash drive via the USB interface module. Compared with existing technologies, this invention has advantages such as rapid real-time storage and retrieval of multi-channel navigation data, flexible design, and convenient maintenance and upgrades. However, this technical solution does not address the testing of the storage board, leading to some instability in the functionality of the designed storage device. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art by providing a fully automated testing method and apparatus for railway navigation data storage.
[0007] The objective of this invention can be achieved through the following technical solutions: A fully automated testing method and apparatus for railway navigation data storage, the method comprising the following steps: Step 1: The test fixture receives the current and performs current conversion; the host computer sends a switching command to the slave computer, the slave computer receives the switching command and switches the USB flash drive to the host computer position; the host computer clears the data on the USB flash drive and writes the test sample data and configuration file. Step 2: The host computer sends a switching command to the slave computer to switch the USB flash drive switch to the module under test. After the module under test reads the configuration file, it writes the test sample data and restarts automatically. Step 3: The host computer sends a switching command to the slave computer and clears the data on the USB drive, switching the USB drive switch to the host computer. Then, it sends simulated navigation data to the module under test. After sending, it sends another switching command to the slave computer, switching the USB drive switch to the module under test. The module under test then stores the stored simulated navigation data into the USB drive. After the transmission is complete, the host computer sends a switching command to the slave computer, switching the USB drive switch back to the host computer. The host computer then reads the stored simulated navigation data, compares it, and outputs the result information.
[0008] Furthermore, the test fixture input is 220V AC power. The power supply converts the AC power into DC power to power the module under test, and into DC power to power other circuits of the test fixture.
[0009] Furthermore, the host computer includes two USB interfaces; one interface connects to the slave computer via UART1, and the other interface connects to the navigation data generation module via UART2 and UART3; the third interface connects to the USB flash drive. The host computer sends switching commands to the slave computer via the UART1 interface.
[0010] Furthermore, the host computer first sends the simulated navigation data to the navigation data generation module through the UART2 and UART3 interfaces, and then the navigation data generation module sends the simulated navigation data to the module under test.
[0011] Furthermore, step two also includes: The lower-level machine detects the restart process of the module under test, and when the restart of the module under test is detected, it notifies the upper-level machine, which then sends the switching command again and clears the data on the USB drive.
[0012] Furthermore, the lower-level machine continuously monitors the I / O signal indicating that the transmission of the module under test is complete. When the transmission is detected to be complete, the lower-level machine promptly sends the transmission completion status information to the upper-level machine through the UART1 interface.
[0013] Furthermore, the comparison process specifically includes: the host computer comparing the simulated navigation data to determine whether it is consistent with the stored simulated navigation data, and calculating the bit error rate; and the host computer calculating the time difference between the last two USB flash drive switches to determine whether the time is less than a preset threshold.
[0014] Furthermore, step three also includes: The host computer receives the voltage value of the module under test from the slave computer through the UART1 interface and determines whether it is within the operating range; after outputting the result information, the host computer generates the corresponding PDF file.
[0015] Furthermore, the test fixture also includes a prompting module; after the host computer generates the corresponding PDF file, it sends a notification message to the slave computer through the UART1 interface, and the slave computer sends a lighting command to the prompting module; upon receiving the lighting command, the LED of the prompting module is lit and the buzzer sounds.
[0016] A testing apparatus for a fully automated testing method for railway navigation data storage as described above, characterized in that it comprises: The power module is used to convert AC power into DC power to power the module under test and other circuits of the test fixture. The navigation data generation module consists of a 1-channel USB to 2-channel TTL signal chip and peripheral circuitry, and is used to send the analog navigation data generated by the host computer to the module under test through the UART2 and UART3 interfaces. The lower-level machine, consisting of an ARM chip and peripheral circuits, is used to implement the logic control of the testing process. It communicates with the upper-level machine through the UART1 interface, receives switching commands from the upper-level machine, and sends control information to the USB control module; it is also used to send IO signals back to the upper-level machine. The prompting module, consisting of an LED and a buzzer, is used to provide prompts during the testing process. The USB control module consists of a USB 3.0 interface control switch chip and peripheral circuitry. It is used to receive control information from the lower-level machine, send corresponding switching information to the dual-port USB flash drive, and control whether the dual-port USB flash drive is connected to the module under test or the upper-level machine. The signal acquisition module consists of a resistor voltage divider circuit and an I / O signal acquisition circuit. The resistor voltage divider circuit is used to acquire the voltage signal of the module under test and send it to the lower-level machine. The I / O acquisition circuit is used to acquire the I / O signal of the module under test after transmission is completed and transmit it to the lower-level machine. The host computer has two USB interfaces: one connected to the slave computer via UART1 and the other connected to the navigation data generation module via UART2 and UART3; the other connected to a dual-port USB flash drive. It is used to send the switching command and simulated navigation data, and to compare the simulated navigation data with the stored simulated navigation data. A dual-port USB flash drive consists of a USB-A port on one end and a TYPEC port on the other. It is used to receive switching information sent by the USB control module and connect to the module under test or the host computer accordingly.
[0017] Compared with the prior art, the present invention has the following advantages: (1) This invention designs UART1, UART2 and UART3 interfaces, and the following is achieved: the host computer sends a switching command to the slave computer, the slave computer receives the switching command and switches the USB flash drive switch to the host computer position or the position of the module under test; the USB flash drive switch is switched to the host computer, and the host computer sends simulated navigation data to the module under test through the UART2 and UART3 interfaces; the slave computer continuously monitors the IO signal of the module under test for transmission completion, and when the transmission is detected to be completed, it sends the transmission completion status information to the host computer in a timely manner through the UART1 interface; It realizes multiple interactions between the host computer, slave computer, USB flash drive and the module under test, and achieves full automation of the testing process through multiple interactions, eliminating multiple manual operations and switching of multiple interfaces. The testing process is simple, easy to use and has good practicality.
[0018] (2) The present invention introduces a data comparison process: after reading the stored simulated navigation data, the host computer compares the data to determine whether the simulated navigation data before and after are consistent and calculates the bit error rate; and the host computer calculates the time difference between the last two switching of the USB flash drive and determines whether the time is less than the preset threshold, and finally outputs the result information. Finally, operators can judge the consistency of the data based on the results and make a timely and accurate assessment of the performance of the storage board, further ensuring the completeness of the performance and functions of the storage board leaving the factory.
[0019] (3) This invention achieves an integrated testing process for the entire storage board by designing an integrated testing fixture with a power module, navigation data generation module, prompting module, USB control module, signal acquisition module, CPU module, PC and dual-port USB flash drive, and has high industrial applicability. Attached Figure Description
[0020] Figure 1 This is a flowchart of a fully automated testing method for railway navigation data storage provided in an embodiment of the present invention; Figure 2This is a diagram of a test fixture system for a fully automated test method for storing railway navigation data, provided in an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0022] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0023] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0024] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed during use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0025] It should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0026] Furthermore, terms such as "horizontal" and "vertical" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0027] Example 1 This embodiment provides a fully automated testing method for railway navigation data storage, the method comprising the following steps: S1: The test fixture receives the current and performs current conversion; the host computer sends a switching command to the slave computer, the slave computer receives the switching command and switches the USB flash drive to the host computer position; the host computer clears the data on the USB flash drive and writes the test sample data and configuration file. Specifically, To begin testing, the PC sends a switching command to the CPU via UART1. Upon receiving this command, the CPU module switches the USB drive to the PC position, and the PC's host software erases all data from the USB drive. Since 8GB of data would require 30 days to store, the PC first writes the 8GB test sample data to the current test USB drive and then writes the configuration file to be copied to the USB drive.
[0028] Specifically, The test fixture has a 220V AC input and a 5VDC output. One output supplies power to the module under test, and the other output is converted to 3.3VDC for use by other circuits in the test fixture.
[0029] S2: The host computer sends a switching command to the slave computer to switch the USB flash drive switch to the module under test. After the module under test reads the configuration file, it writes the test sample data and restarts automatically. Specifically, The PC sends a switching command to the CPU, switching the USB interface to the module under test. After the module under test reads the configuration file from the USB drive, it first writes the 8GB test file into the module under test, and then automatically restarts.
[0030] S3: The host computer sends a switching command to the slave computer and clears the USB flash drive data, switching the USB flash drive switch to the host computer. Then, it sends simulated navigation data to the module under test. After the data transmission is complete, the host computer sends a switching command to the slave computer, switching the USB flash drive switch to the module under test. The module under test then saves the stored simulated navigation data to the USB flash drive. After the transmission is complete, the host computer sends a switching command to the slave computer, switching the USB flash drive switch back to the host computer. The host computer then reads the stored simulated navigation data, compares the results, and outputs the results.
[0031] S301: After the CPU module detects that the module under test has restarted, it notifies the PC. The PC then sends a CPU switching command to switch the USB interface to the PC. The PC software then clears all contents of the USB drive.
[0032] S302: The PC then continuously sends simulated navigation data through the UART2 and UART3 interfaces, sending the pre-stored specified data for 20 minutes.
[0033] S303: After the PC finishes sending the simulated navigation data packet, it stops sending data through UART2 and UART3. Then, it sends a switching command to the CPU module through the UART1 interface, and the CPU module switches the USB flash drive switch to the side of the module under test.
[0034] The module under test (DUT) saves the existing navigation data to a dual-port USB flash drive via a USB 3.0 interface. Simultaneously, the CPU module continuously monitors the "transfer complete" I / O signal status of the DUT. Once the transfer is complete, the CPU module promptly sends the status to the PC software via the UART1 interface. Upon receiving this information, the PC software again uses the UART1 interface to switch the CPU module's USB interface to the PC. The PC reads the data from the USB flash drive, compares it to the transmitted data to determine if it matches, calculates the bit error rate, and simultaneously calculates the time difference between the two USB interface switches to ensure it is less than 5 minutes.
[0035] Specifically, The PC receives the voltage value of the module under test from the CPU module via the UART1 interface and determines whether it is within the operating range. A test report is automatically generated: the PC outputs the results and generates a PDF file. Audible and visual alerts indicate test completion to increase efficiency: the PC instructs the CPU module via the UART1 interface to illuminate the LED and sound the buzzer on the indicator module.
[0036] Example 2 This embodiment provides a fully automated testing device for railway navigation data storage as described in Embodiment 1, comprising: Power module: Composed of AC-DC modules, it converts 220VAC to 5VDC to power the board under test (storage board), and at the same time converts 5V to 3.3V to power other circuits of this test tool.
[0037] Navigation data generation module: It consists of a 1-channel USB to 2-channel TTL signal chip and peripheral circuits, which realizes the transmission of navigation data simulated by the PC to the module under test through 2-channel TTL signals.
[0038] Prompt module: Composed of LEDs and a buzzer, it provides prompts during the testing process.
[0039] USB control module: It consists of a USB 3.0 interface control switch chip and peripheral circuits. The chip can change whether the dual-port USB flash drive signal is connected to the module under test or the PC through changes in IO input.
[0040] The signal acquisition module consists of a resistor voltage divider circuit and an I / O signal acquisition circuit. The voltage divider circuit acquires the voltage signal of the module under test and sends it to the CPU module for calculation. The I / O acquisition circuit downloads the data from the module under test, completes the signal acquisition, and then sends it to the CPU module for acquisition.
[0041] CPU module: Composed of ARM chip and peripheral circuits, it realizes the logic control of the test process, communicates with PC via serial port, receives instructions from PC for control, and sends the collected data back to PC.
[0042] PC: A host computer with 2 USB interfaces, one of which generates 3 UART interfaces to connect to the navigation data generation module and the CPU module respectively, and one of which connects to a dual-port USB flash drive.
[0043] Dual-port USB flash drive: consists of a USB flash drive with a USB-A port on one end and a TYPEC port on the other end.
[0044] Definitions: TTL signal chips are a type of integrated circuit based on transistor-transistor logic circuits, used to generate or process TTL level signals. Their core characteristic is the use of single-ended voltage to indicate logic states: typically +5V or +3.3V represents logic "1," and 0V represents logic "0." These chips form the foundation of digital circuits and are commonly found in gate circuits, flip-flops, and other functional units. In communication applications, dedicated interface chips (such as USB-to-TTL chips) can bidirectionally convert other signal protocols (such as USB) to TTL level serial signals (such as UART), thereby enabling stable communication between microcontrollers, sensors, and other board-level devices and computers. The advantages of TTL signals are simple circuitry and low cost, but their anti-interference capability is relatively weak, and they are typically only suitable for short-distance communication between boards or devices.
[0045] UART (Universal Asynchronous Receiver / Transmitter) is a serial communication physical interface that uses the Universal Asynchronous Receiver / Transmitter (UART) protocol. Its core operation involves splitting data bytes into bit sequences at an agreed baud rate without sharing a clock signal, adding start, parity, and stop bits to form data frames for bit-by-bit transmission. This interface typically includes three basic signal lines: transmit (TX), receive (RX), and ground (GND), enabling bidirectional data exchange between devices in full-duplex mode. Due to its asynchronous mechanism and simple hardware structure, UART is widely used in embedded systems, industrial control, and consumer electronics as a fundamental channel for point-to-point communication between devices. It's important to note that the UART interface itself defines logic level signals; in practical applications, it often requires a level conversion chip (such as an RS-232, RS-485, or TTL level converter) to adapt to different physical transmission standards and communication distance requirements.
[0046] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A fully automated testing method for railway navigation data storage, characterized in that, include: Step 1: The test fixture receives the current and performs current conversion; The host computer sends a switching command to the slave computer, which receives the switching command and switches the USB flash drive to the host computer position; the host computer clears the data on the USB flash drive and writes the test sample data and configuration file. Step 2: The host computer sends a switching command to the slave computer to switch the USB flash drive switch to the module under test. After the module under test reads the configuration file, it writes the test sample data and restarts automatically. Step 3: The host computer sends a switching command to the slave computer and clears the data on the USB drive, switching the USB drive switch to the host computer. Then, it sends simulated navigation data to the module under test. After sending, it sends another switching command to the slave computer, switching the USB drive switch to the module under test. The module under test then stores the stored simulated navigation data into the USB drive. After the transmission is complete, the host computer sends a switching command to the slave computer, switching the USB drive switch back to the host computer. The host computer then reads the stored simulated navigation data, compares it, and outputs the result information.
2. The fully automated testing method for railway navigation data storage according to claim 1, characterized in that, The test fixture receives 220V AC power as input. The power supply converts the AC power into DC power to power the module under test, and into DC power to power other circuits of the test fixture.
3. The fully automated testing method for railway navigation data storage according to claim 1, characterized in that, The host computer includes two USB interfaces; one interface is connected to the slave computer via UART1, and the other interface is connected to the navigation data generation module via UART2 and UART3. The other interface is connected to the USB flash drive. The host computer sends switching commands to the slave computer via the UART1 interface.
4. The fully automated testing method for railway navigation data storage according to claim 1, characterized in that, The host computer first sends the simulated navigation data to the navigation data generation module through the UART2 and UART3 interfaces, and then the navigation data generation module sends the simulated navigation data to the module under test.
5. The fully automated testing method for railway navigation data storage according to claim 1, characterized in that, Step two also includes: The lower-level machine detects the restart process of the module under test, and when the restart of the module under test is detected, it notifies the upper-level machine, which then sends the switching command again and clears the data on the USB drive.
6. The fully automated testing method for railway navigation data storage according to claim 1, characterized in that, The lower-level machine continuously monitors the I / O signal indicating that the transmission of the module under test is complete. When the transmission is detected to be complete, the lower-level machine promptly sends the transmission completion status information to the upper-level machine through the UART1 interface.
7. The fully automated testing method for railway navigation data storage according to claim 1, characterized in that, The comparison process specifically includes: the host computer comparing the simulated navigation data to determine whether it is consistent with the stored simulated navigation data and calculating the bit error rate; and the host computer calculating the time difference between the last two USB flash drive switches and determining whether the time is less than a preset threshold.
8. The fully automated testing method for railway navigation data storage according to claim 1, characterized in that, Step three also includes: The host computer receives the voltage value of the module under test from the slave computer through the UART1 interface and determines whether it is within the operating range; after outputting the result information, the host computer generates the corresponding PDF file.
9. A fully automated testing method for railway navigation data storage according to claim 8, characterized in that, The test fixture also includes a prompting module; after the host computer generates the corresponding PDF file, it sends a notification message to the slave computer through the UART1 interface, and the slave computer sends a lighting command to the prompting module; upon receiving the lighting command, the LED of the prompting module is lit and the buzzer sounds.
10. A testing apparatus for a fully automated testing method for railway navigation data storage as described in any one of claims 1-9, characterized in that, include: The power module is used to convert AC power into DC power to power the module under test and other circuits of the test fixture. The navigation data generation module consists of a 1-channel USB to 2-channel TTL signal chip and peripheral circuitry, and is used to send the analog navigation data generated by the host computer to the module under test through the UART2 and UART3 interfaces. The lower-level machine, consisting of an ARM chip and peripheral circuits, is used to implement the logic control of the testing process. It communicates with the upper-level machine through the UART1 interface, receives switching commands from the upper-level machine, and sends control information to the USB control module; it is also used to send IO signals back to the upper-level machine. The prompting module, consisting of an LED and a buzzer, is used to provide prompts during the testing process. The USB control module consists of a USB 3.0 interface control switch chip and peripheral circuitry. It is used to receive control information from the lower-level machine, send corresponding switching information to the dual-port USB flash drive, and control whether the dual-port USB flash drive is connected to the module under test or the upper-level machine. The signal acquisition module consists of a resistor voltage divider circuit and an I / O signal acquisition circuit. The resistor voltage divider circuit is used to acquire the voltage signal of the module under test and send it to the lower-level machine. The I / O acquisition circuit is used to acquire the I / O signal of the module under test after transmission is completed and transmit it to the lower-level machine. The host computer has two USB interfaces: one connected to the slave computer via UART1 and the other connected to the navigation data generation module via UART2 and UART3; the other connected to a dual-port USB flash drive. It is used to send the switching command and simulated navigation data, and to compare the simulated navigation data with the stored simulated navigation data. A dual-port USB flash drive consists of a USB-A port on one end and a TYPEC port on the other. It is used to receive switching information sent by the USB control module and connect to the module under test or the host computer accordingly.
Citation Information
Patent Citations
Rapid storage and reading device and method for railway navigation data
CN119179662A